<?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>nrf5340 key mangement unit</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/78535/nrf5340-key-mangement-unit</link><description>Hi, I am interested in using the KMU and I have seen some examples of it here (9160 but similar): https://github.com/einarthorsrud/kmu_sample 
 and also some docmentation here: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/include/hw_unique_key</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 13 Aug 2021 12:42:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/78535/nrf5340-key-mangement-unit" /><item><title>RE: nrf5340 key mangement unit</title><link>https://devzone.nordicsemi.com/thread/324854?ContentTypeID=1</link><pubDate>Fri, 13 Aug 2021 12:42:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b8cb5b3a-5bc3-4521-a652-7ad11d113e8c</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi Rookie&lt;/p&gt;
&lt;p&gt;It is only possible to write to a keyslot if it is empty. This is decided by hardware, se the &lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf9160/kmu.html?cp=2_0_0_5_7_3_1_1#kmu_writekey"&gt;nRF5340 Product Specification&lt;/a&gt;:&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&amp;quot;The selected key slot must be empty in order to add a new entry to UICR&amp;quot;&lt;/p&gt;
&lt;p&gt;In other words, you can not overwrite KMU keys from firmware.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;There is another, a bit less secure way to save keys, as mentioned in &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.6.1/nrf/include/hw_unique_key.html"&gt;Hardware unique key documentation&lt;/a&gt;:&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&amp;quot;In devices without a &lt;span&gt;KMU&lt;/span&gt;, like nRF52840, the bootloader writes the key to the Arm CryptoCell and locks the flash memory page where the key is stored. In this case, only one key is supported.&amp;quot;&lt;/p&gt;
&lt;p&gt;However, it is not possible to &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.6.1/nrf/include/fprotect.html?highlight=irreversible"&gt;unlock hardware flash write protection&lt;/a&gt; before a reset, so you can not overwrite keys with this method either.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/38351/saving-root-key-on-battery-powered-devices/148018#148018"&gt;&lt;br /&gt;This answer&lt;/a&gt; describes some alternatives for securing when not using secure flash(KMU), which may be what you are looking for.&lt;/p&gt;
&lt;p&gt;Did this answer your question?&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>