<?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>Using the device root key (KDR[0..3]) directly for AES Encryption?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/51239/using-the-device-root-key-kdr-0-3-directly-for-aes-encryption</link><description>Are there any examples to use the device root key directly in the cryptographic functions?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 22 Aug 2019 12:51:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/51239/using-the-device-root-key-kdr-0-3-directly-for-aes-encryption" /><item><title>RE: Using the device root key (KDR[0..3]) directly for AES Encryption?</title><link>https://devzone.nordicsemi.com/thread/205614?ContentTypeID=1</link><pubDate>Thu, 22 Aug 2019 12:51:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc84910f-12e2-4d65-83ed-182bc408355d</guid><dc:creator>chirag-parmar</dc:creator><description>&lt;p&gt;Last but not the least, Can a derived key be used as a ECC key?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using the device root key (KDR[0..3]) directly for AES Encryption?</title><link>https://devzone.nordicsemi.com/thread/205611?ContentTypeID=1</link><pubDate>Thu, 22 Aug 2019 12:46:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93c266fe-4fc5-4e18-a558-d9dffc88192f</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;No, unfortunately not. The only information you can securely store in the internal secure RAM in CryptoCell is KDR (128 bit). And that cannot be read back, only used for crypto operations (such as deriving other keys).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using the device root key (KDR[0..3]) directly for AES Encryption?</title><link>https://devzone.nordicsemi.com/thread/205604?ContentTypeID=1</link><pubDate>Thu, 22 Aug 2019 12:34:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3093afed-910b-496d-aff9-8b265bd1c446</guid><dc:creator>chirag-parmar</dc:creator><description>&lt;p&gt;Is there somehow I can store some of my keys (other than the KDR) in the secure RAM? If yes, How would one go about it?&lt;/p&gt;
&lt;p&gt;And by store I mean temporarily or just for that particular reset cycle.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using the device root key (KDR[0..3]) directly for AES Encryption?</title><link>https://devzone.nordicsemi.com/thread/205586?ContentTypeID=1</link><pubDate>Thu, 22 Aug 2019 12:07:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3f681bc-6799-4a44-85c8-ef7586e55525</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="chirag-parmar"]1. Is it OK to hold the derived the key in the normal RAM?[/quote]
&lt;p&gt;If it is in normal RAM then it is susceptible to some attacks. If that is OK or not depends on your security requirements.&lt;/p&gt;
[quote user="chirag-parmar"]2. What are the best security practices for handling the derived key?[/quote]
&lt;p&gt;We do not have any recommendations here.&lt;/p&gt;
[quote user="chirag-parmar"]2. Also, Will the same root key generate the same derived key every time, provided the input variables stay constant?[/quote]
&lt;p&gt;Yes, provided the lengh/size, label, context and root key is the same.&lt;/p&gt;
&lt;p&gt;Please note that the lack of secure memory means that you may not find CryptoCell the best option if you need &lt;em&gt;very&lt;/em&gt; high security with regard to keeping key(s) secret. If that is the case, then you may want to use a secure element such as the Optiga TrustX or similar (I mention that since it is integrated with the SDK, but there are another alternative as well). However, this will, of course, increase the BOM and is therefor only sensible for security-critical applications.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using the device root key (KDR[0..3]) directly for AES Encryption?</title><link>https://devzone.nordicsemi.com/thread/205486?ContentTypeID=1</link><pubDate>Thu, 22 Aug 2019 08:52:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6acf9484-6bf5-4c28-8351-95bdd7d0e6f4</guid><dc:creator>chirag-parmar</dc:creator><description>&lt;p&gt;But, The derived key will stay in the normal RAM. So,&lt;br /&gt;&lt;br /&gt;1. Is it OK to hold the derived the key in the normal RAM?&lt;br /&gt;2. What are the best security practices for handling the derived key?&lt;br /&gt;2. Also, Will the same root key generate the same derived key every time, provided the input variables stay constant?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using the device root key (KDR[0..3]) directly for AES Encryption?</title><link>https://devzone.nordicsemi.com/thread/205349?ContentTypeID=1</link><pubDate>Wed, 21 Aug 2019 13:54:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12cda39e-8aef-4b01-80dd-3727022ad529</guid><dc:creator>Einar Thorsrud</dc:creator><description>[quote user="chirag-parmar"]Although, deriving the key means that the key will be copied into a buffer right? This would leave a footprint of the key on the RAM. Which beats the entire purpose of having KDR registers in the cryptocell. Am i right?[/quote]
&lt;p&gt;Yes and no. It is not copied into normal RAM, but kept internally in a secure RAM block in CC310. It is not possible to access the key, only refer to it so that it can be used for crypto operations in CC310.&amp;nbsp;There is one related fact&amp;nbsp;you should be aware of, though. CryptoCell only has secure RAM, not secure flash. That means that you have to store the root key in normal flash for it to be persistent, as described in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/38351/saving-root-key-on-battery-powered-devices/148018#148018"&gt;this post&lt;/a&gt;.&lt;/p&gt;
[quote user="chirag-parmar"]Also the register documentation&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/pdf/nRF52840_PS_v1.1.pdf"&gt;here&lt;/a&gt;&amp;nbsp;says that I can select a key using the HOST_CRYPTOKEY_SEL. I was looking for a documentation/example for this exact feature.[/quote]
&lt;p&gt;We do not have any examples or documentation, unfortunately. The only reference is the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/group__cryptocell__api.html?cp=5_1_6_4_0"&gt;CC310 API documentation&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using the device root key (KDR[0..3]) directly for AES Encryption?</title><link>https://devzone.nordicsemi.com/thread/205294?ContentTypeID=1</link><pubDate>Wed, 21 Aug 2019 11:43:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:948d93b3-bce7-4a78-a36a-dc7a786e0e1e</guid><dc:creator>chirag-parmar</dc:creator><description>&lt;p&gt;Although, deriving the key means that the key will be copied into a buffer right? This would leave a footprint of the key on the RAM. Which beats the entire purpose of having KDR registers in the cryptocell. Am i right?&lt;br /&gt;&lt;br /&gt;Also the register documentation&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/pdf/nRF52840_PS_v1.1.pdf"&gt;here&lt;/a&gt;&amp;nbsp;says that I can select a key using the HOST_CRYPTOKEY_SEL. I was looking for a documentation/example for this exact feature.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using the device root key (KDR[0..3]) directly for AES Encryption?</title><link>https://devzone.nordicsemi.com/thread/205239?ContentTypeID=1</link><pubDate>Wed, 21 Aug 2019 09:21:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eeb697c5-eb12-4f65-af02-87ec91757cf4</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It should be possible, but there are no examples of this in the SDK (or anywhere else that I am aware of). &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/group__ssi__utils__key__derivation.html?cp=5_1_6_4_0_20_2_1#ga8cdcb54513d8c964783a819b8ca79ee8"&gt;SaSi_UtilKeyDerivation()&lt;/a&gt;&amp;nbsp;can be used to derive an AES key from KDR.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>