<?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>How to enable cryptocell on nrf5340</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/101903/how-to-enable-cryptocell-on-nrf5340</link><description>I built an tf_m zephyr image that runs tfm_ipc application with following west command: 
 west build -p always -b nrf5340dk_nrf5340_cpuapp_ns samples/tfm_integration/tfm_ipc/ 
 After flashing it to my nrf5340 board through nrfjprog -f nrf53 -r --program</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 01 Aug 2023 18:52:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/101903/how-to-enable-cryptocell-on-nrf5340" /><item><title>RE: How to enable cryptocell on nrf5340</title><link>https://devzone.nordicsemi.com/thread/439355?ContentTypeID=1</link><pubDate>Tue, 01 Aug 2023 18:52:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84fc982c-63ff-4896-8a5d-159c3c81a640</guid><dc:creator>ByteChesser</dc:creator><description>&lt;p&gt;Thank you sigurd for your answer. I figured out the second question myself. I would kindly ask if you could close the question. Thanks again!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable cryptocell on nrf5340</title><link>https://devzone.nordicsemi.com/thread/437801?ContentTypeID=1</link><pubDate>Mon, 24 Jul 2023 08:51:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2b27d51-81a6-42ac-a51c-306ea181887d</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="ByteChesser"]I saw CC_LibInit function, but it cannot be stepped into with gdb and its source file doesn&amp;#39;t seem available. Is it because the CC_LibInit is a nrf implementation that is not available to us.[/quote]
&lt;p&gt;Yep. Parts of our CryptoCell libraries are not public.&lt;/p&gt;
[quote user="ByteChesser"]2. I am confused that as shown in backtrace, why is CC_LibInit not calling all arm cryptocell internal function but called&amp;nbsp;nrf_cc3xx_platform_ctr_drbg_init (). So when nordic integrates cryptocell to tf-m, it is not as easy as calling an arm provided CC_LibInit and is done with the work for initalization?[/quote]
&lt;p&gt;I do not understand the questions.&lt;br /&gt;Can you try to rephrase it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable cryptocell on nrf5340</title><link>https://devzone.nordicsemi.com/thread/437711?ContentTypeID=1</link><pubDate>Fri, 21 Jul 2023 14:44:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5d50b25-695f-4133-a75c-137e921a8fbc</guid><dc:creator>ByteChesser</dc:creator><description>&lt;p&gt;Thank you! I am able to use cryptocell. Now I have two more questions.&lt;/p&gt;
&lt;p&gt;1. When I run gdb for image built by&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;west build -p always -b nrf5340dk_nrf5340_cpuapp_ns samples/tfm_integration/tfm_psa_test -- -DCONFIG_TFM_PSA_TEST_CRYPTO=y&lt;/pre&gt;&lt;span style="color:#212529;font-family:SFMono-Regular;" lang="zh-CN"&gt;I saw CC_LibInit function, but it cannot be stepped into with gdb and its source file doesn&amp;#39;t seem available. Is it because the CC_LibInit is a nrf implementation that is not available to us.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;(gdb) bt
#0  0x00013e80 in cc_mbedtls_sha256_init ()
#1  0x000127c8 in cc_mbedtls_entropy_func ()
#2  0x0001205c in mbedtls_ctr_drbg_reseed_internal ()
#3  0x000121a4 in cc_mbedtls_ctr_drbg_seed ()
#4  0x00010ff8 in nrf_cc3xx_platform_ctr_drbg_init ()
#5  0x0001291e in CC_LibInit ()
#6  0x00010f56 in nrf_cc3xx_platform_init ()
#7  0x00004c7e in crypto_platform_init ()
    at /home/zephyr/nrf-sdk/nrf/modules/tfm/tfm/boards/common/tfm_hal_platform.c:35
#8  tfm_hal_platform_init ()
    at /home/zephyr/nrf-sdk/nrf/modules/tfm/tfm/boards/common/tfm_hal_platform.c:91
#9  0x00006184 in tfm_core_init ()
    at /home/zephyr/nrf-sdk/modules/tee/tf-m/trusted-firmware-m/secure_fw/spm/cmsis_psa/main.c:44
#10 main ()
    at /home/zephyr/nrf-sdk/modules/tee/tf-m/trusted-firmware-m/secure_fw/spm/cmsis_psa/main.c:95&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;2. I am confused that as shown in backtrace, why is CC_LibInit not calling all arm cryptocell internal function but called&amp;nbsp;nrf_cc3xx_platform_ctr_drbg_init (). So when nordic integrates cryptocell to tf-m, it is not as easy as calling an arm provided CC_LibInit and is done with the work for initalization?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable cryptocell on nrf5340</title><link>https://devzone.nordicsemi.com/thread/436902?ContentTypeID=1</link><pubDate>Tue, 18 Jul 2023 07:44:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ffb3f72-a6bf-48ff-97bf-ba6ec497b74c</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;TF-M support on nRF devices are in the nRF Connect SDK, not zephyr. The zephyr one has limitations, and we do not support it for production.&lt;/p&gt;
&lt;p&gt;You seem to be using Vanilla Zephyr.&lt;br /&gt;To sum up the advantages you get from using the nRF Connect SDK instead of vanilla Zephyr:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The nRF Connect SDK has support for hardware acceleration for crypto using CryptoCell.&lt;/li&gt;
&lt;li&gt;The nRF Connect SDK has a higher granularity of Kconfig options for crypto&lt;/li&gt;
&lt;li&gt;The nRF Connect SDK has more integration towards nRF devices for bootup(e.g. to set up Root of Trust)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The nRF Connect SDK contains an almost identical version of Zephyr. So you can do most things you can do with Zephyr with the nRF Connect SDK.&lt;br /&gt;If you would like to use the nRF Connect SDK, we have a good getting started guide at &lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/"&gt;https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/&lt;/a&gt;.&lt;/p&gt;
[quote user="ByteChesser"]&lt;span&gt;&lt;span dir="ltr"&gt;As you were suggesting to check&amp;nbsp;Nordic Security Module Configuration, how do we do so for Zephyr?&lt;/span&gt;&lt;/span&gt;[/quote]
&lt;p&gt;You can not do so with vanilla Zephyr.&lt;/p&gt;
[quote user="ByteChesser"]&lt;span&gt;&lt;span dir="ltr"&gt;Also,&amp;nbsp;I do not know how to determine what is the nrfconnect SDK version if that is used by Zephyr underneath/eventually by the build system.&lt;/span&gt;&lt;/span&gt;[/quote]
&lt;p&gt;It goes the other way. If you use the vanilla Zephyr, you do not get the nRF Connect SDK.&lt;br /&gt;However, if you get the nRF Connect SDK, you also get Zephyr.&lt;/p&gt;
[quote user=""] figured cryptocell-312 accelerator is not enabled by default. I would like to know how I could enable it. [/quote]
&lt;p&gt;Hardware acceleration is not supported for vanilla Zephyr.&lt;/p&gt;
&lt;p&gt;Let me know if you have any questions&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable cryptocell on nrf5340</title><link>https://devzone.nordicsemi.com/thread/436803?ContentTypeID=1</link><pubDate>Mon, 17 Jul 2023 14:37:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4cf95ace-5b55-45ba-9c3c-ec80727113d4</guid><dc:creator>ByteChesser</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am building with Zephyr using west build with tfm library included. I don&amp;#39;t know if it uses some sdk behind the scene.&lt;/p&gt;
&lt;p&gt;I am using nrf5340dk.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;After checking DTSI file, there is one line difference between yours and my setting, which is&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="ui-provider fz b c d e f g h i j k l m n o p q r s t u v w x y z ab ac ae af ag ah ai aj ak" dir="ltr"&gt;diff nrf5340_cpuapp.dtsi.orig nrf5340_cpuapp.dtsi.new&lt;br /&gt; 36c36&lt;br /&gt;&amp;lt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; zephyr,entropy = &amp;amp;rng_hci;&lt;br /&gt; ---&lt;br /&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; zephyr,entropy = &amp;amp;cryptocell;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="ui-provider fz b c d e f g h i j k l m n o p q r s t u v w x y z ab ac ae af ag ah ai aj ak" dir="ltr"&gt;My zephyr version is the mainline/latest.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="ui-provider fz b c d e f g h i j k l m n o p q r s t u v w x y z ab ac ae af ag ah ai aj ak" dir="ltr"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="ui-provider fz b c d e f g h i j k l m n o p q r s t u v w x y z ab ac ae af ag ah ai aj ak" dir="ltr"&gt;As you were suggesting to check&amp;nbsp;Nordic Security Module Configuration, how do we do so for Zephyr?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="ui-provider fz b c d e f g h i j k l m n o p q r s t u v w x y z ab ac ae af ag ah ai aj ak" dir="ltr"&gt;Also,&amp;nbsp;I do not know how to determine what is the nrfconnect SDK version if that is used by Zephyr underneath/eventually by the build system.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="ui-provider fz b c d e f g h i j k l m n o p q r s t u v w x y z ab ac ae af ag ah ai aj ak" dir="ltr"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="ui-provider fz b c d e f g h i j k l m n o p q r s t u v w x y z ab ac ae af ag ah ai aj ak" dir="ltr"&gt;Thank you!&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable cryptocell on nrf5340</title><link>https://devzone.nordicsemi.com/thread/436660?ContentTypeID=1</link><pubDate>Mon, 17 Jul 2023 08:10:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:59531278-bf35-47d8-8e34-766835be64f7</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Which version of the SDK do you use?&lt;/p&gt;
&lt;p&gt;Do you use a custom PCB or Developement kit?&lt;/p&gt;
&lt;p&gt;For a start:&lt;br /&gt;You can see &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/nrf_security/doc/configuration.html#psa-crypto-support"&gt;Nordic Security Module: Configuration&lt;/a&gt; for how to configure PSA.&lt;/p&gt;
&lt;p&gt;Also, you need &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/b37ce40878ec52295afe6350d17712d60eb6639a/dts/arm/nordic/nrf5340_cpuapp.dtsi#L89"&gt;cryptocell&lt;/a&gt; to be enabled in your DeviceTree. You can check this in your build/zephyr/zephyr.dts .&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>