<?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>Calculate CMAC using KMU and nrfx library</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/81504/calculate-cmac-using-kmu-and-nrfx-library</link><description>Hi, 
 Is it possible to calculate a CMAC using the nrfx security library? 
 Our keys are stored in the KMU of a nRF9160. 
 For now, we are using mbedtls function mbedtls_aes_setkey_enc_shadow_key( ) for encryption for example, but I&amp;#39;ve not found a way</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 06 Jul 2023 11:21:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/81504/calculate-cmac-using-kmu-and-nrfx-library" /><item><title>RE: Calculate CMAC using KMU and nrfx library</title><link>https://devzone.nordicsemi.com/thread/434948?ContentTypeID=1</link><pubDate>Thu, 06 Jul 2023 11:21:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4312f01b-77f3-425a-8a26-275fe5f19235</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hah, nice that you saw my answer on the minute&lt;/p&gt;
&lt;p&gt;I hope that you find it useful,&lt;br /&gt;And good luck with your continued developement!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Calculate CMAC using KMU and nrfx library</title><link>https://devzone.nordicsemi.com/thread/434945?ContentTypeID=1</link><pubDate>Thu, 06 Jul 2023 11:18:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dcb78a0c-41c1-47f5-866b-54a73a601309</guid><dc:creator>GiulianoFranchetto</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;Thanks for the blog post &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Calculate CMAC using KMU and nrfx library</title><link>https://devzone.nordicsemi.com/thread/434944?ContentTypeID=1</link><pubDate>Thu, 06 Jul 2023 11:17:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e0dc0ad-1c0e-4aae-ac4c-25dda24a4c95</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/lseg"&gt;lseg&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Better late than never as they say:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/persistent-storage-of-keys-and-data-using-the-nrf-connect-sdk"&gt;Persistent storage of keys and data using the nRF Connect SDK&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Calculate CMAC using KMU and nrfx library</title><link>https://devzone.nordicsemi.com/thread/398137?ContentTypeID=1</link><pubDate>Tue, 29 Nov 2022 13:50:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51b2aab2-7c5f-40f0-87b0-47a7d17b8cd1</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="lseg"]Hi, is there any progress on this secure storage blog post?[/quote]
&lt;p&gt;We try to publish security-related content in a planned manner, which is why this has not been published yet.&lt;br /&gt;However, I hope&amp;nbsp; that this blog-post will be out some time this winter.&lt;/p&gt;
&lt;p&gt;To allow me to best suggest a solution for your key storage, can you explain what you intend to use the ECC key for?&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><item><title>RE: Calculate CMAC using KMU and nrfx library</title><link>https://devzone.nordicsemi.com/thread/397931?ContentTypeID=1</link><pubDate>Mon, 28 Nov 2022 15:07:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e352e2a4-5b10-4d33-9381-8830e525adcb</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have been on vacation for the past couple weeks.&lt;/p&gt;
&lt;p&gt;But now I am back, so I will have a look at this tomorrow.&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><item><title>RE: Calculate CMAC using KMU and nrfx library</title><link>https://devzone.nordicsemi.com/thread/395746?ContentTypeID=1</link><pubDate>Tue, 15 Nov 2022 10:42:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b619ccf-90de-4c6b-8998-745e3d5cbe54</guid><dc:creator>lseg</dc:creator><description>&lt;p&gt;Hi, is there any progress on this secure storage blog post?&lt;/p&gt;
&lt;p&gt;I am wondering what I can do if I want to store ECC keys. Could I use KMU for this? Is it correct that I could use KMU to store any key, but the biggest problem is that KMU can only pass symmetric keys through HW to the cryptocell (I am using the nRF53)?&lt;br /&gt;&lt;br /&gt;So my only option for ECC keys would be to use ITS (Internal Trusted Storage) using &lt;span&gt;the Platform Security Architecture (PSA) APIs?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Is the use of ITS by PSA still under development as you noted&amp;nbsp;1 year&amp;nbsp;ago?&lt;br /&gt;&lt;br /&gt;Is it also correct to say that this ITS is a part of flash storage where things will be stored encrypted (AES?). So for example if I want to store my ECC key there, it will be encrypted and stored in flash. If I want to use it, it will be read from flash, decrypted to a variable, and this variable would be used as an input for my ecc encryption or decryption function? So it will reside in memory for a short amount of time. There is no way to direct it to the cryptocell HW immediately?&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kind regards,&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Calculate CMAC using KMU and nrfx library</title><link>https://devzone.nordicsemi.com/thread/386522?ContentTypeID=1</link><pubDate>Fri, 16 Sep 2022 07:12:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:036aabf8-842a-4ed2-a69a-54618035418c</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi again &lt;a href="https://devzone.nordicsemi.com/members/giulianofranchetto"&gt;GiulianoFranchetto&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The blog-post on secure storage is not ready yet.&lt;br /&gt;But one of the per-cursors for many of the types of secure storage is Trusted Firmware-M.&lt;br /&gt;Recently I posted a blog on &lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/an-introduction-to-trusted-firmware-m-t-m"&gt; An Introduction to Trusted Firmware-M (TF-M)&lt;/a&gt;. Maybe you find this useful.&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><item><title>RE: Calculate CMAC using KMU and nrfx library</title><link>https://devzone.nordicsemi.com/thread/359643?ContentTypeID=1</link><pubDate>Wed, 23 Mar 2022 14:43:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b12e7c93-63b1-4fdf-b239-b492ad157570</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I am still working on a blog post on secure key storage, but I am unfortunally not done yet. &lt;br /&gt;Thank you for checking on it!&lt;/p&gt;
&lt;p&gt;Just a couple of points I learned while working on this which could be relevant to you from your previous questions:&lt;/p&gt;
&lt;p&gt;If you want to store keys in ITS, just use the PSA Crypto API.&lt;br /&gt;For example as it is done in the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/nrf/samples/crypto/persistent_key_usage/README.html"&gt;Persistent key storage Sample&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;ITS is for saving data securely to internal flash.&lt;/p&gt;
&lt;p&gt;While Protected Storage is intended for saving data to external flash.&lt;br /&gt;This is showcased in the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/zephyr/samples/tfm_integration/psa_protected_storage/README.html"&gt;Zephyr Protected Storage Sample&lt;/a&gt;.&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><item><title>RE: Calculate CMAC using KMU and nrfx library</title><link>https://devzone.nordicsemi.com/thread/359342?ContentTypeID=1</link><pubDate>Tue, 22 Mar 2022 11:21:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f93e5ae-3bc6-40f2-97d7-d198fb3ee652</guid><dc:creator>GiulianoFranchetto</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;Was there any progress on this subject?&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Giuliano&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Calculate CMAC using KMU and nrfx library</title><link>https://devzone.nordicsemi.com/thread/337986?ContentTypeID=1</link><pubDate>Mon, 08 Nov 2021 15:42:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7f724b76-9678-4bb0-b324-18e5c2c21556</guid><dc:creator>GiulianoFranchetto</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote userid="106736" url="~/f/nordic-q-a/81504/calculate-cmac-using-kmu-and-nrfx-library/337983#337983"]This is a great idea! I will see if I can make such a &amp;quot;guide&amp;quot;. I can not make any guarantees for when this is done, but thanks for the suggestion.[/quote]
&lt;p&gt;Glad you love the idea &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Can&amp;#39;t wait for that guide, before I&amp;#39;ll need to rework all of my security/crypto code!&lt;/p&gt;
&lt;p&gt;Regarding security, I&amp;#39;d prefer to be as secure and efficient as possible.&lt;/p&gt;
&lt;p&gt;If I can be of any help, feel free to ask.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll keep the ticket open if you don&amp;#39;t mind, so we can keep track of the progress on either the guide or suggestions/ideas coming from the community.&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Giuliano&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Calculate CMAC using KMU and nrfx library</title><link>https://devzone.nordicsemi.com/thread/337983?ContentTypeID=1</link><pubDate>Mon, 08 Nov 2021 15:37:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f85b7fef-25e9-4a0a-946f-9e418a96af4c</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
[quote user="GiulianoFranchetto"]With ITP available, when should we use Hardware Unique Key ?[/quote]
&lt;p&gt;For the nRF91 series and nRF53 series, the HUK library use the KMU peripheral. &lt;br /&gt;The CryptoCell can access keys in the KMU directly, without using the application as a middleman.&lt;/p&gt;
&lt;p&gt;The ITS library stores its keys in secure flash. To learn how these are secured, see&amp;nbsp; &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.7.1/tfm/docs/technical_references/tfm_its_service.html"&gt;Internal Trusted Storage (ITS) Service&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Even though both keys should be secure, the ones stored by HUK are more secure, because of the fact that they are separated by hardware.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Also, remark that TF-M is still under developement, and that for ITS:&lt;br /&gt;&amp;quot;Currently, the TF-M Secure Storage service implements PSA Protected Storage version 1.0-beta2. There is not yet an implementation of PSA Internal Trusted Storage in TF-M.&amp;quot; &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.7.1/tfm/docs/technical_references/tfm_its_service.html"&gt;[1]&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So there you have yet another abbreviation: PSA Protected Storage (PS)&lt;/p&gt;
[quote user="GiulianoFranchetto"]Could it be possible to have a small table to know when to use which module? Like taking usual use cases for any device on the field, and recommend which module to use?[/quote]
&lt;p&gt;This is a great idea! I will see if I can make such a &amp;quot;guide&amp;quot;. I can not make any guarantees for when this is done, but thanks for the suggestion.&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><item><title>RE: Calculate CMAC using KMU and nrfx library</title><link>https://devzone.nordicsemi.com/thread/337976?ContentTypeID=1</link><pubDate>Mon, 08 Nov 2021 15:21:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca1bb016-3f38-43d7-9bb3-3a23a61df423</guid><dc:creator>GiulianoFranchetto</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Great, thanks for the answer.&lt;/p&gt;
&lt;p&gt;With ITP available, when should we use Hardware Unique Key ?&lt;/p&gt;
&lt;p&gt;I&amp;#39;m a bit lost as there are many &amp;quot;keys&amp;quot; entry in the nRFx specification: KMU, HUK, OTP, ITP, nRF9160 has certificate manager...&lt;/p&gt;
&lt;p&gt;Could it be possible to have a small table to know when to use which module? Like taking usual use cases for any device on the field, and recommend which module to use?&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Giuliano&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Calculate CMAC using KMU and nrfx library</title><link>https://devzone.nordicsemi.com/thread/337974?ContentTypeID=1</link><pubDate>Mon, 08 Nov 2021 15:18:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b8608cf1-9cc2-4b48-8808-e187b73038ec</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Just heard back from our developers. There is no way of doing CMAC calculation with a KMU key at the moment.&lt;/p&gt;
&lt;p&gt;Here is a copy from one of my previous answers (to a private case), which might help you choose how you will store your keys:&lt;br /&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;What you want is likely either &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/78068/how-should-i-use-this-otp-region/322699#322699"&gt;OTP&lt;/a&gt; or Internal Trusted Stroage (ITP).&lt;br /&gt;ITP is showcased in the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.7.0/nrf/samples/crypto/persistent_key_usage/README.html"&gt;Crypto: Persistent key storage&lt;/a&gt; sample.&lt;/p&gt;
&lt;p&gt;OTP is best for keys that are written once, and will stay the same during the device lifetime.&lt;br /&gt;ITP is best if you intend to change the keys in runtime. (Delete old and add new)&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;Regards, &lt;br /&gt;Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Calculate CMAC using KMU and nrfx library</title><link>https://devzone.nordicsemi.com/thread/337964?ContentTypeID=1</link><pubDate>Mon, 08 Nov 2021 14:57:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa55e5b2-0fc8-438b-bed9-6f4536da9464</guid><dc:creator>GiulianoFranchetto</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;Actually, I&amp;#39;ve dig a little bit.&lt;/p&gt;
&lt;p&gt;We will not use the KMU in our use case, as the specification states that it&amp;#39;s not meant for storing session and low lifespan keys.&lt;/p&gt;
&lt;p&gt;Anyway, could be cool to have the answer. Just for academic purposes &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Giuliano&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Calculate CMAC using KMU and nrfx library</title><link>https://devzone.nordicsemi.com/thread/337961?ContentTypeID=1</link><pubDate>Mon, 08 Nov 2021 14:50:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd8595b5-3ecd-4665-8b13-7c3f19cd5191</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi Giuliano,&lt;/p&gt;
&lt;p&gt;I will look into this, and return with an answer by the end of Wednesday.&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>