<?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>Saving root key on battery powered devices</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/38351/saving-root-key-on-battery-powered-devices</link><description>Hi, 
 On battery powered devices, how is it possible to retain a root key when changing batteries? 
 The crypto cell has an Always On power domain for retaining device secrets but it seems to work when crypto cell is disabled for power saving reasons</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 25 Jul 2020 20:38:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/38351/saving-root-key-on-battery-powered-devices" /><item><title>RE: Saving root key on battery powered devices</title><link>https://devzone.nordicsemi.com/thread/261682?ContentTypeID=1</link><pubDate>Sat, 25 Jul 2020 20:38:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b99b1202-fe85-4704-b372-29f958b0ae9d</guid><dc:creator>chirag-parmar</dc:creator><description>&lt;p&gt;So I followed your instructions and created a version of secure bootloader.&lt;br /&gt;&lt;br /&gt;Here is the link&amp;nbsp;&lt;a href="https://github.com/slockit/nrf52-secure-boot"&gt;https://github.com/slockit/nrf52-secure-boot&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving root key on battery powered devices</title><link>https://devzone.nordicsemi.com/thread/183696?ContentTypeID=1</link><pubDate>Thu, 25 Apr 2019 08:47:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3756b1c8-6e87-4a4e-a526-29658c6b5d26</guid><dc:creator>DamianV</dc:creator><description>&lt;p&gt;Even if you wanted to protect a 16 byte key that is not supposed to be used with AES (say you want to use it for HMAC), you would have to indirectly protect it with the device root key, because once loaded in the secure memory, the device root key can only be used with AES and the AES modes of operation.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving root key on battery powered devices</title><link>https://devzone.nordicsemi.com/thread/183666?ContentTypeID=1</link><pubDate>Thu, 25 Apr 2019 07:53:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c02a3fe-46e9-4d6e-93b8-65870b18e69e</guid><dc:creator>Crudo</dc:creator><description>&lt;p&gt;I see. In that case it also wouldn&amp;#39;t work for other public-key cryptography, like ECC P-256 or Curve25519, correct? The only solution to protect private keys bigger than 16bytes is using the wrapping method that you described?&lt;br /&gt;Thanks for your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving root key on battery powered devices</title><link>https://devzone.nordicsemi.com/thread/183566?ContentTypeID=1</link><pubDate>Wed, 24 Apr 2019 15:13:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5bdeef5-d022-4321-bb6a-5f0feda04dae</guid><dc:creator>DamianV</dc:creator><description>&lt;p&gt;You won&amp;#39;t be able to use it for RSA. You can encrypt (a.k.a. wrap) the RSA key using the device root key (with an appropriate mode of operation), and store the ciphertext.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving root key on battery powered devices</title><link>https://devzone.nordicsemi.com/thread/183562?ContentTypeID=1</link><pubDate>Wed, 24 Apr 2019 15:02:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3f68470-4252-417d-b6c8-79e0632d7cf0</guid><dc:creator>Crudo</dc:creator><description>&lt;p&gt;The KDR registers are only for AES, correct? In my case, I am using RSA and I&amp;#39;d like to use this solution to read the private key, which is 128 bytes long. The KDR regs only fit 16 bytes.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving root key on battery powered devices</title><link>https://devzone.nordicsemi.com/thread/183489?ContentTypeID=1</link><pubDate>Wed, 24 Apr 2019 13:06:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c98ab8a9-6eda-4517-ac86-191fccca2cc6</guid><dc:creator>DamianV</dc:creator><description>&lt;p&gt;Hello Crudo,&lt;/p&gt;
&lt;p&gt;you have to directly write the KDR in the registers HOST_IOT_KDR[0..3]. Also, pay attention to the CryptoCell lifecycle (see section 6.6.3 and 6.6.4 of the specification &lt;a href="https://infocenter.nordicsemi.com/pdf/nRF52840_PS_v1.0.pdf"&gt;https://infocenter.nordicsemi.com/pdf/nRF52840_PS_v1.0.pdf)&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving root key on battery powered devices</title><link>https://devzone.nordicsemi.com/thread/183436?ContentTypeID=1</link><pubDate>Wed, 24 Apr 2019 12:00:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:095cbca3-436a-4dd5-bf2d-fe4e2571b074</guid><dc:creator>Crudo</dc:creator><description>&lt;p&gt;How can I copy the key to CryptoCell (secure RAM)? Is there an API for that?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving root key on battery powered devices</title><link>https://devzone.nordicsemi.com/thread/162640?ContentTypeID=1</link><pubDate>Thu, 20 Dec 2018 11:34:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c9f6511-51ba-41f9-adb8-7973295bdc1a</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Unfortunately it will not work, as the Device Root Key also has to be configured after every reset. This is because the CryptoCell peripheral does not have any persistent (flash) memory.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving root key on battery powered devices</title><link>https://devzone.nordicsemi.com/thread/162564?ContentTypeID=1</link><pubDate>Wed, 19 Dec 2018 20:00:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8098a4e3-627e-4079-99e5-ecbf9e46db60</guid><dc:creator>Blake</dc:creator><description>&lt;p&gt;Hi Einar - Thanks for covering this, it is appreciated. As a follow up, the CryptoCell as described in the nRF52840 reference manual can have a device root key (Kdr) set. Is it possible to store the asymmetric key pair to flash as you described, but encrypted to the CC310 Kdr? This would ensure it can only exist in RAM after being decrypted by the CC310, even if for some reason it was recovered from flash.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving root key on battery powered devices</title><link>https://devzone.nordicsemi.com/thread/161155?ContentTypeID=1</link><pubDate>Tue, 11 Dec 2018 10:06:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40674d13-30b8-494e-b427-a07d91c40676</guid><dc:creator>DamianV</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
&lt;p&gt;I have a follow-up question. Would it be possible to use the platform retail key (K_PRTL in the spec, I think?) to protect the root key in the flash (using a suitable mod of operation)? If I understood correctly, it is possible to use it for cryptographic operations, if you do not disable it, correct? I think, this would be no less secure than just having the root key in flash in plain.&lt;/p&gt;
&lt;p&gt;Can you please comment on this?&lt;/p&gt;
&lt;p&gt;Damian&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving root key on battery powered devices</title><link>https://devzone.nordicsemi.com/thread/161149?ContentTypeID=1</link><pubDate>Tue, 11 Dec 2018 09:43:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d02e605-4890-43b7-8fbb-4972c83865cd</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi Peter,&lt;/p&gt;
&lt;p&gt;There is no secure boot example in the lastest nRF5 SDK (15.2), so this depend on your firmware design. For secure boot you would typically want to store a key in a secure and tamper proof way so that it can be used to verify the application from the bootloader before the application is started. &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/38351/saving-root-key-on-battery-powered-devices/148018#148018"&gt;My initial reply&lt;/a&gt; describes how you can protect the key on the nRF52840.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving root key on battery powered devices</title><link>https://devzone.nordicsemi.com/thread/161145?ContentTypeID=1</link><pubDate>Tue, 11 Dec 2018 09:31:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:787414e9-c8bd-44c5-9bd9-2ba16d47e60e</guid><dc:creator>PBT</dc:creator><description>&lt;p&gt;How does storing the &amp;quot;root key in flash&amp;quot; relate to &amp;quot;secure boot&amp;quot;?&lt;br /&gt;Ie. what key is used for &amp;quot;secure boot&amp;quot; and how is that key stored?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best&lt;/p&gt;
&lt;p&gt;Peter&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving root key on battery powered devices</title><link>https://devzone.nordicsemi.com/thread/150293?ContentTypeID=1</link><pubDate>Tue, 25 Sep 2018 14:01:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe8737df-d12c-4742-aaee-69c032499926</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;Damian,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes, you are right. Crypto operations using a key stored within the&amp;nbsp;OPTIGA Trust X has to be handled&amp;nbsp;by the Trust X. You could of course use the&amp;nbsp;CryptoCell for other operations as it may be faster in some cases, but generally CryptoCell is not an important feature if you anyway use a&amp;nbsp;OPTIGA Trust X.&amp;nbsp;&lt;/span&gt;&lt;span&gt;However, CryptoCell can be very useful&amp;nbsp;in other situations, and I would argue that the&amp;nbsp;&lt;/span&gt;&lt;span&gt;security level you can get using only a nRF52840 is good enough for most applications.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving root key on battery powered devices</title><link>https://devzone.nordicsemi.com/thread/150290?ContentTypeID=1</link><pubDate>Tue, 25 Sep 2018 13:51:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2634500-afd5-47f2-8c5b-d65858044cbf</guid><dc:creator>DamianV</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
&lt;p&gt;I am following this post and I am trying to understand the situation:&lt;/p&gt;
&lt;p&gt;Wouldn&amp;#39;t this make the Cryptocell inside the nRF52840 obsolete? Because it seems that if use the OPTIGA Trust&amp;nbsp;X to store the keys, all crypto operations will have to be done within it, right?&lt;/p&gt;
&lt;p&gt;Thanks in advance&lt;/p&gt;
&lt;p&gt;Damian&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving root key on battery powered devices</title><link>https://devzone.nordicsemi.com/thread/148524?ContentTypeID=1</link><pubDate>Thu, 13 Sep 2018 06:55:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b6034f4b-5033-4479-adde-d28765b7bb91</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The point with using the OPTIGA Trust&amp;nbsp;X in this case is that it provides secure key storage. You can only write keys to the Trust X, never read it back. The key is safe there and is never communicated to the nRF52840. Instead, any data that needs to be encrypted or decrypted must be sent back and forth to the Trust X, as this has the key(s).&lt;/p&gt;
&lt;p&gt;You cannot activate the debug interface from firmware once it has been deactivated. The only way is to do a full chip erase (see &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52840.ps/dif.html?cp=2_0_0_3_7_1#concept_udr_mns_1s"&gt;Control access port&lt;/a&gt;).&amp;nbsp;(Note that the nRF device only has SWD, not JTAG).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving root key on battery powered devices</title><link>https://devzone.nordicsemi.com/thread/148461?ContentTypeID=1</link><pubDate>Wed, 12 Sep 2018 15:06:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a29f0d5-bc3d-44e7-aafa-c13c64276644</guid><dc:creator>bperrin2</dc:creator><description>&lt;p&gt;Thank you for your clear answer.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If we consider decapping as a possible attack: is the solution to have an extra chip safe? I guess it will be possible to sniff the communication lines between the Infineon and the nRF chips when it try to get the master key. The exchange could be encrypted with a key but this will require to store this key somewhere starting with a chicken and egg problem. Am i wrong?&lt;/p&gt;
&lt;p&gt;I have another question concerning the JTAG: is it possible to connect / disconnect it by software. For example, we would like to have it disconnected by default and reconnected when a demand is done by the smart device via a secure connection (with a second level of security above BLE). This could be required for example during maintenance operations.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If this is possible, I would be very happy to get a pointer to a coding example.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Bernard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving root key on battery powered devices</title><link>https://devzone.nordicsemi.com/thread/148018?ContentTypeID=1</link><pubDate>Mon, 10 Sep 2018 12:34:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82ed772b-ca23-4ddd-a4c2-2016cd1bb0c5</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You cannot retain the root key within CryptoCell, and the nRF52840 does not have any secure flash, so you have to store it in (normal) flash. You are still able to keep the key in a reasonably secure manner using something like the following strategy:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Store the key in a reserved flash region.&lt;/li&gt;
&lt;li&gt;Enable read-back protection using &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52840.ps/dif.html?cp=2_0_0_3_7_1#concept_udr_mns_1s"&gt;Control access port&lt;/a&gt;. This prevents a debugger from accessing the flash (the only way to disable it is to first do a full chip erase).&lt;/li&gt;
&lt;li&gt;In the bootloader:
&lt;ul&gt;
&lt;li&gt;Read the key from flash and copy it to CryptoCell (secure always on RAM).&lt;/li&gt;
&lt;li&gt;Enable &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52840.ps/acl.html?cp=2_0_0_5_2"&gt;ACL&lt;/a&gt; to protect the key so that it cannot be accessed by the application.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The above procedure should keep the root key safe against most kinds of attacks, but it does not provide protection against decapping. If you need that, then the only option is to use an&amp;nbsp;additional device, such as for example the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.0.0/ifx_optiga_ecdsa_simple_example.html?cp=4_0_1_4_2_1_1"&gt;OPTIGA&amp;nbsp;Trust X&lt;/a&gt;&amp;nbsp;instead.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>