<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Solution for generating new private keys when modem firmware 1.3.1 cannot be used.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/95747/solution-for-generating-new-private-keys-when-modem-firmware-1-3-1-cannot-be-used</link><description>Does Nordic have a suggested solution for what to do with B0A level devices which cannot run modem firmware 1.3.1 in production? We&amp;#39;ve got a nice solution using AT%KEYGEN for version 2 hardware, but we&amp;#39;ve got deployed version 1 devices out in the wild</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 06 Feb 2023 12:52:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/95747/solution-for-generating-new-private-keys-when-modem-firmware-1-3-1-cannot-be-used" /><item><title>RE: Solution for generating new private keys when modem firmware 1.3.1 cannot be used.</title><link>https://devzone.nordicsemi.com/thread/408283?ContentTypeID=1</link><pubDate>Mon, 06 Feb 2023 12:52:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b6a7c8b-1daf-49a0-9918-d3a00ac592c0</guid><dc:creator>Hakon</dc:creator><description>[quote user="JVantol"]Is there an example of how to generate a CSR from a public key out there somewhere?[/quote]
&lt;p&gt;&lt;a href="https://mbed-tls.readthedocs.io/en/latest/kb/how-to/generate-a-certificate-request-csr/"&gt;Here&lt;/a&gt; is one way to do it. It&amp;#39;s for generating a CSR on a computer, not on the device though. You also need a private key for that. &lt;a href="https://en.wikipedia.org/wiki/Certificate_signing_request"&gt;https://en.wikipedia.org/wiki/Certificate_signing_request&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Solution for generating new private keys when modem firmware 1.3.1 cannot be used.</title><link>https://devzone.nordicsemi.com/thread/407841?ContentTypeID=1</link><pubDate>Thu, 02 Feb 2023 16:34:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2c3f7162-9322-433d-8c48-c02a1f9f7bba</guid><dc:creator>JVantol</dc:creator><description>&lt;p&gt;Good idea. A CSR is more than just a public key though, right? Is there an example of how to generate a CSR from a public key out there somewhere? My knowledge of crypto is limited enough that I don&amp;#39;t want to do that from scratch if I can help it.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Solution for generating new private keys when modem firmware 1.3.1 cannot be used.</title><link>https://devzone.nordicsemi.com/thread/407840?ContentTypeID=1</link><pubDate>Thu, 02 Feb 2023 16:25:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9757254b-a641-4740-924b-d9c663787178</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;Perhaps useful comment;&lt;/p&gt;
&lt;p&gt;They could look at the crypto/rsa sample. It will generate a RSA keypair (and then use it to sign and verify something).&lt;/p&gt;
&lt;p&gt;If they change the key generation to also set the PSA_KEY_USAGE_EXPORT flag, they should be able to use psa_key_export() to read the private key.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://armmbed.github.io/mbed-crypto/html/api/keys/management.html#c.psa_export_key" rel="nofollow noopener noreferrer" target="_blank"&gt;https://armmbed.github.io/mbed-crypto/html/api/keys/management.html#c.psa_export_key&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/crypto/rsa/README.html" rel="nofollow noopener noreferrer" target="_blank"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/crypto/rsa/README.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Solution for generating new private keys when modem firmware 1.3.1 cannot be used.</title><link>https://devzone.nordicsemi.com/thread/406922?ContentTypeID=1</link><pubDate>Fri, 27 Jan 2023 16:55:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b670bdc8-bca9-447d-b393-d2582bb7c2ab</guid><dc:creator>JVantol</dc:creator><description>&lt;p&gt;1.2.1 Which is the newest version we can use with B0A devices on ATT.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Solution for generating new private keys when modem firmware 1.3.1 cannot be used.</title><link>https://devzone.nordicsemi.com/thread/406832?ContentTypeID=1</link><pubDate>Fri, 27 Jan 2023 11:43:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3fcdcdd3-9c10-42b4-b176-caee545ff55b</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;What mfw are you using in the B0A devices?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Solution for generating new private keys when modem firmware 1.3.1 cannot be used.</title><link>https://devzone.nordicsemi.com/thread/405876?ContentTypeID=1</link><pubDate>Fri, 20 Jan 2023 15:05:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c485d335-42af-41ee-adaa-2efe57f55025</guid><dc:creator>JVantol</dc:creator><description>&lt;p&gt;Yeah, I know all that, we use that capability to install the initial private key. What I&amp;#39;m needing is capability to generate a new private key, public key and CSR on the device to be able to replace the key and cert at 3 year intervals as required by the strict security posture of the Azure private IOT hub these devices are connected to.&lt;/p&gt;
&lt;p&gt;So, step by step, I need:&lt;/p&gt;
&lt;p&gt;1.) To generate a new 2048 bit RSA private/public key pair on the device.&lt;/p&gt;
&lt;p&gt;2.) To generate a CSR from this.&lt;/p&gt;
&lt;p&gt;Then some stuff that we&amp;#39;ve already implemented happens to call a re-provisioning API on the client&amp;#39;s private IOT hub, with the CSR as a parameter. The hub generates a new cert, which we download.&lt;/p&gt;
&lt;p&gt;3.) We take the new cert and private key and plug it in using the CMNG commands.&lt;/p&gt;
&lt;p&gt;4.) Device reboots and re-connects to the cloud using the new private key and cert.&lt;/p&gt;
&lt;p&gt;We have implemented all this using AT%KEYGEN for devices that have modem firmware 1.3.x, but we have a large population of older devices which have Gen1 modems, which are not allowed to be upgraded to 1.3.1 modem firmware, hence the need to generate key pairs in the app processor.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Solution for generating new private keys when modem firmware 1.3.1 cannot be used.</title><link>https://devzone.nordicsemi.com/thread/405870?ContentTypeID=1</link><pubDate>Fri, 20 Jan 2023 14:57:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5af9ee2b-9bd8-4f39-a031-bbff4afc9af6</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;Modem team;&lt;/p&gt;
&lt;p&gt;Once the new certificate is in the application domain it can be written to modem file system. AT%CMNG allows clients to list, read, write and delete certificates in modem file system with some limitations.&lt;/p&gt;
&lt;p&gt;Some information about credential management in following links:&lt;br /&gt; &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/modem/modem_key_mgmt.html#modem-key-mgmt" rel="nofollow noopener noreferrer" target="_blank"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/modem/modem_key_mgmt.html#modem-key-mgmt&lt;/a&gt;&lt;br /&gt; &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fref_at_commands%2FREF%2Fat_commands%2Fsecurity%2Fcmng.html" rel="nofollow noopener noreferrer" target="_blank"&gt;https://infocenter.nordicsemi.com/index.jsp?topic=%2Fref_at_commands%2FREF%2Fat_commands%2Fsecurity%2Fcmng.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Solution for generating new private keys when modem firmware 1.3.1 cannot be used.</title><link>https://devzone.nordicsemi.com/thread/405525?ContentTypeID=1</link><pubDate>Wed, 18 Jan 2023 15:32:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:545a51e5-8c25-4c73-ba40-90f32cd42c25</guid><dc:creator>JVantol</dc:creator><description>&lt;p&gt;It looks like there is a crypto example for generating an RSA private/public key pair:&lt;/p&gt;
&lt;p&gt;&lt;a id="" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.2.0/nrf/samples/crypto/rsa/README.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.2.0/nrf/samples/crypto/rsa/README.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I think that you could use this to generate the private key, and they generate a CSR from the public key, but I&amp;#39;m not enough of an expert to know exactly how this might be done. Is this correct that you could use the PSA crypto library to make the required key pair? If so, can you suggest a library that can generate a CSR from the public key?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Solution for generating new private keys when modem firmware 1.3.1 cannot be used.</title><link>https://devzone.nordicsemi.com/thread/405504?ContentTypeID=1</link><pubDate>Wed, 18 Jan 2023 14:22:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d309e0ad-e4c7-45ad-9bc2-a48fc583ac8d</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I will check this with the modem team.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>