<?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>PSA Crypto vs Key Management Unit</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/107522/psa-crypto-vs-key-management-unit</link><description>My understanding is, that the recommended way of dealing with Cryptographic keys is, to generate them with the live-time specified as PERSISTENT using the CRYPTO API. 
 The key will then be store in INTERNAL TRUSTED STORAGE (ITS). My understanding is</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 29 Jan 2024 13:30:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/107522/psa-crypto-vs-key-management-unit" /><item><title>RE: PSA Crypto vs Key Management Unit</title><link>https://devzone.nordicsemi.com/thread/466531?ContentTypeID=1</link><pubDate>Mon, 29 Jan 2024 13:30:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd6c0bf7-342b-4c45-8495-193e67cb50bb</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Happy to help. &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: PSA Crypto vs Key Management Unit</title><link>https://devzone.nordicsemi.com/thread/466470?ContentTypeID=1</link><pubDate>Mon, 29 Jan 2024 11:37:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b24cea2-0d43-49a6-afe3-fc5e71e7073f</guid><dc:creator>Cla</dc:creator><description>&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PSA Crypto vs Key Management Unit</title><link>https://devzone.nordicsemi.com/thread/466040?ContentTypeID=1</link><pubDate>Thu, 25 Jan 2024 14:09:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f0ab907-eb91-42a3-b779-8dd1683fd6d0</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We only use HW keys in KMU for the HW unique keys (MKEK for EITS, MEXT for PSA PS, and encrypted private key for identity in Attestation tokens) TF-M uses hw_unique_key library for this.&lt;/p&gt;
&lt;p&gt;Generic KMU support is not in place in the PSA driver scope.&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PSA Crypto vs Key Management Unit</title><link>https://devzone.nordicsemi.com/thread/465732?ContentTypeID=1</link><pubDate>Wed, 24 Jan 2024 09:24:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0db8ddc8-3047-4c8b-b768-db4bb401a8fb</guid><dc:creator>Cla</dc:creator><description>[quote userid="77782" url="~/f/nordic-q-a/107522/psa-crypto-vs-key-management-unit/465617"]2 &amp;amp;6. as my previous reply.&amp;nbsp;[/quote]
&lt;p&gt;My understanding from reading the documentation is, that when using the psa_crypto APIs the keys are exactly not stored in the Key Management Unit. Instead the keys are stored in internal trusted storage, which in turn in encrypted using MKEK. MKEK is stored in the keymanagement unit (using nrf_cc3xx).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;That is to say, if I read the documentation about persistent keys, when using the psa_crypto APIs correctly, then it is not a way to use the keymanagement unit to store keys. Instead it uses TFM ITS to store keys.&lt;/p&gt;
&lt;p&gt;&amp;quot;The persistent key sample shows how to generate a persistent key using the Platform Security Architecture (PSA) APIs. Persistent keys are stored in the &lt;span class="highlighted"&gt;Internal&lt;/span&gt; &lt;span class="highlighted"&gt;Trusted&lt;/span&gt; &lt;span class="highlighted"&gt;Storage&lt;/span&gt; (ITS) &amp;quot; &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/crypto/persistent_key_usage/README.html#crypto-persistent-key-storage"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/crypto/persistent_key_usage/README.html#crypto-persistent-key-storage&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If I would like to use the key management unit to store keys when using TFM do I have to implement my own custom service?&lt;/p&gt;
[quote userid="77782" url="~/f/nordic-q-a/107522/psa-crypto-vs-key-management-unit/465617"]4 &amp;amp; 5.&amp;nbsp;&amp;nbsp;psa_crypto APIs could be used without TFM. Here is the sample&amp;nbsp;&lt;span dir="ltr"&gt;&lt;a title="https://github.com/nrfconnect/sdk-nrf/tree/main/samples/crypto/persistent_key_usage" href="https://github.com/nrfconnect/sdk-nrf/tree/main/samples/crypto/persistent_key_usage" rel="noopener noreferrer" target="_blank"&gt;https://github.com/nrfconnect/sdk-nrf/tree/main/samples/crypto/persistent_key_usage&lt;/a&gt;&amp;nbsp;&lt;/span&gt;[/quote]
&lt;p&gt;Edit: Understood, thanks for the sample.&lt;/p&gt;
[quote userid="77782" url="~/f/nordic-q-a/107522/psa-crypto-vs-key-management-unit/465617"]TFM can support&amp;nbsp;&lt;span&gt;hardware unique key with&amp;nbsp;psa_crypto APIs instead of using&amp;nbsp;nrf_cc3xx.&lt;/span&gt;[/quote]
&lt;p&gt;I am not refering to colloquial hardware keys that are unique. I am refering explicitly to the linked library &lt;a id="" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/others/hw_unique_key.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/others/hw_unique_key.html&lt;/a&gt; . This library is unavailable when using TFM?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PSA Crypto vs Key Management Unit</title><link>https://devzone.nordicsemi.com/thread/465617?ContentTypeID=1</link><pubDate>Tue, 23 Jan 2024 14:29:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:afc04de3-f3c5-48a5-927a-c5281d5b043f</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;1. correct&lt;/p&gt;
&lt;p&gt;2 &amp;amp;6. as my previous reply.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;3. TFM can support&amp;nbsp;&lt;span&gt;hardware unique key with&amp;nbsp;psa_crypto APIs instead of using&amp;nbsp;nrf_cc3xx.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;4 &amp;amp; 5.&amp;nbsp;&amp;nbsp;psa_crypto APIs could be used without TFM. Here is the sample&amp;nbsp;&lt;span dir="ltr"&gt;&lt;a title="https://github.com/nrfconnect/sdk-nrf/tree/main/samples/crypto/persistent_key_usage" href="https://github.com/nrfconnect/sdk-nrf/tree/main/samples/crypto/persistent_key_usage" rel="noopener noreferrer" target="_blank"&gt;https://github.com/nrfconnect/sdk-nrf/tree/main/samples/crypto/persistent_key_usage&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PSA Crypto vs Key Management Unit</title><link>https://devzone.nordicsemi.com/thread/465501?ContentTypeID=1</link><pubDate>Tue, 23 Jan 2024 09:04:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0b996dc-a4c0-492d-ba47-e5c6ae235834</guid><dc:creator>Cla</dc:creator><description>&lt;p&gt;Thank you for your reply.&lt;br /&gt;Do I understand your reply correctly, that your are confirming all above statements 1-6 to be true?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PSA Crypto vs Key Management Unit</title><link>https://devzone.nordicsemi.com/thread/465432?ContentTypeID=1</link><pubDate>Mon, 22 Jan 2024 17:33:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7bf7e2d4-2d1c-4820-80ec-61f922e3beb8</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;When TF-M is enabled, the&amp;nbsp;hardware unique key is derived using the psa_crypto APIs. Otherwise, the native nrf_cc3xx_platform APIs are used, and the key is imported into psa_crypto.&amp;nbsp;For more information, see the hardware unique key&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/others/hw_unique_key.html#lib-hw-unique-key"&gt;&lt;span&gt;library&lt;/span&gt;&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/keys/hw_unique_key/README.html#hw-unique-key-usage"&gt;&lt;span&gt;sample&lt;/span&gt;&lt;/a&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PSA Crypto vs Key Management Unit</title><link>https://devzone.nordicsemi.com/thread/465422?ContentTypeID=1</link><pubDate>Mon, 22 Jan 2024 16:38:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:074a50a6-e804-4c2a-bffc-a73ae1b30f94</guid><dc:creator>Cla</dc:creator><description>&lt;p&gt;Thanks for replying. This does not at all help to clarify, I am afraid.&lt;/p&gt;
&lt;p&gt;Maybe let me express myself differently:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;If I want to access &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfxlib/crypto/doc/api.html#crypto-api-nrf-cc3xx-platform"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfxlib/crypto/doc/api.html#crypto-api-nrf-cc3xx-platform&lt;/a&gt; from my application, then I MUST not use COFIG_BUILD_WITH_TFM&lt;/li&gt;
&lt;li&gt;If I want to access &lt;a id="" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/others/hw_unique_key.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/others/hw_unique_key.html&lt;/a&gt; from my application, then&amp;nbsp; I MUST not use CONFIG_BUILD_WITH_TFM&lt;/li&gt;
&lt;li&gt;If I want to use CONFIG_BUILD_WITH_TFM, then `cc3xx` and `hw_unique_keys` is not available to the application&lt;/li&gt;
&lt;li&gt;If I want to use any of the PSA_...- libraries (&lt;a id="" href="https://arm-software.github.io/psa-api/"&gt;https://arm-software.github.io/psa-api/&lt;/a&gt; crypto, secure storage consisting of internal trusted storage and protected storage), then I MUST use CONFIG_BUILD_WITH_TFM&lt;/li&gt;
&lt;li&gt;If I do not want to use CONFIG_BUILD_WITH_TFM,&amp;nbsp;then the PSA_...-libraries are not available to me.&lt;/li&gt;
&lt;li&gt;So I can either use CONFIG_BUILD_WITH_TFM and the PSA...-libraries or the `cc3xx`- and `hw_unique_keys`-libraries. But I can not mix. In that sense they are mutually exclusive.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Did I get that right?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PSA Crypto vs Key Management Unit</title><link>https://devzone.nordicsemi.com/thread/465401?ContentTypeID=1</link><pubDate>Mon, 22 Jan 2024 15:35:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3722a9cd-f562-4b2d-b364-7090c23050f2</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;&lt;span&gt;TF-M Internal Trusted Storage (ITS) service implements PSA Internal Trusted Storage APIs. See &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/tfm/integration_guide/services/tfm_its_integration_guide.html"&gt;TF-M Internal Trusted Storage Service Integration Guide&lt;/a&gt;&lt;/span&gt;.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PSA Crypto vs Key Management Unit</title><link>https://devzone.nordicsemi.com/thread/465222?ContentTypeID=1</link><pubDate>Mon, 22 Jan 2024 07:45:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c215b70a-885a-4f41-8cbd-45f3cf2fc8c4</guid><dc:creator>Cla</dc:creator><description>&lt;p&gt;Thanks for your reply.&lt;br /&gt;&lt;br /&gt;Do I understand correctly, that to access the CryptoCell there are different options?&lt;/p&gt;
&lt;p&gt;- Build without tfm and use the `cc3xx` interface and/or the `hardware_unique_key`&lt;/p&gt;
&lt;p&gt;- Build with tfm and use the `PSA X` (PSA CRYPTO, PSA ITS, PSA PS) -interfaces&lt;br /&gt;&lt;br /&gt;The two options are mutually exclusive? No combination of the above is possible?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PSA Crypto vs Key Management Unit</title><link>https://devzone.nordicsemi.com/thread/465155?ContentTypeID=1</link><pubDate>Fri, 19 Jan 2024 21:19:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ffa6c03a-20b2-4164-a76c-18706af71337</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;The warning is expected.&amp;nbsp;&lt;span&gt;NRF_CC3XX library cannot work with TF-M. To encrypted ITS with TF-M,&amp;nbsp; it requires&amp;nbsp;&lt;a title="(in Kconfig reference v&amp;amp;nbsp;)" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_TFM_ITS_ENCRYPTED"&gt;&lt;code&gt;&lt;span&gt;CONFIG_TFM_ITS_ENCRYPTED&lt;/span&gt;&lt;/code&gt;&lt;/a&gt;. S&lt;span dir="ltr"&gt;ee the&amp;nbsp;&lt;/span&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.5.1/nrf/security/tfm.html#encrypted-its"&gt;Encrypted ITS&lt;/a&gt;&amp;nbsp;section.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PSA Crypto vs Key Management Unit</title><link>https://devzone.nordicsemi.com/thread/465126?ContentTypeID=1</link><pubDate>Fri, 19 Jan 2024 17:04:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abc84ed4-9b61-4acf-b312-c5e2f515710f</guid><dc:creator>Cla</dc:creator><description>&lt;blockquote&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;The cc3xx library can work in the non-TF-M secure environment. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;span&gt;When I want to enable `NRF_CC3XX_PLATFORM` I get a warning, that TFM needs to be disabled!&lt;br /&gt;Am I doing something wrong?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PSA Crypto vs Key Management Unit</title><link>https://devzone.nordicsemi.com/thread/464889?ContentTypeID=1</link><pubDate>Thu, 18 Jan 2024 16:46:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf817dd8-1b5c-4170-bf70-dda95df97224</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]&lt;p&gt;If the ITS is encrypted it will use the MKEK key (part of HARDWARE UNIQUE KEYS (HUK), stored in the key management unit).&lt;/p&gt;
&lt;p&gt;Is my assessment correct?&lt;/p&gt;[/quote]
&lt;p&gt;Yes, see &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/100616/using-psa-function-to-persist-key-in-kmu-and-later-restore-it-for-aes-encryption/430440"&gt;this post&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
[quote user=""]What is the connection between the PSA CRYPTO API, the KEY MANAGEMENT UNIT and the ...cc3x_...-library?[/quote]
&lt;p&gt;See this blog&amp;nbsp;&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;
[quote user=""]Is the cc3xx...-api available from secure and non-secure processing environment (app and tfm?)?[/quote]
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;The cc3xx library can work in the non-TF-M secure environment. As for TFM, please see&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.5.1/nrf/security/tfm.html#encrypted-its"&gt;Encrypted ITS&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PSA Crypto vs Key Management Unit</title><link>https://devzone.nordicsemi.com/thread/464787?ContentTypeID=1</link><pubDate>Thu, 18 Jan 2024 12:28:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8078ae02-bc54-4973-84a1-fba55b31b704</guid><dc:creator>Cla</dc:creator><description>&lt;p&gt;Compare also: &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/100616/using-psa-function-to-persist-key-in-kmu-and-later-restore-it-for-aes-encryption"&gt;devzone.nordicsemi.com/.../using-psa-function-to-persist-key-in-kmu-and-later-restore-it-for-aes-encryption&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>