<?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>nRF9160 RSA crypto changes from v2.3.0 to v2.4.0 SHA-1 signing</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/102777/nrf9160-rsa-crypto-changes-from-v2-3-0-to-v2-4-0-sha-1-signing</link><description>I am in the process of porting a project from v2.3.0 (Zeyphr v3.2.99) to v2.4.1 (Zephyr v3.3.99) and I believe there was a change that breaks the project. 
 I believe this change happened in v2.4.0. 
 I have extracted the relevant code and created a self</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 15 Aug 2023 10:49:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/102777/nrf9160-rsa-crypto-changes-from-v2-3-0-to-v2-4-0-sha-1-signing" /><item><title>RE: nRF9160 RSA crypto changes from v2.3.0 to v2.4.0 SHA-1 signing</title><link>https://devzone.nordicsemi.com/thread/441342?ContentTypeID=1</link><pubDate>Tue, 15 Aug 2023 10:49:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6fc6ef14-c8fd-4b6d-b12a-994d78bd08d9</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We strongly recommend that you do use a larger key size, unless this is a special scenario for supporting legacy device(s).&lt;/p&gt;
&lt;p&gt;oberon supports 1024/2048 bit RSA keys, as described here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.4.1/nrfxlib/crypto/doc/nrf_oberon.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.4.1/nrfxlib/crypto/doc/nrf_oberon.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;nrf_oberon has never supported 384 bit keys, so there is a fallback to mbedtls builtin implementation. This fallback requires an additional kconfig with NCS v2.4.0&lt;/p&gt;
&lt;p&gt;Please note that RSA 384 bit&amp;nbsp;&lt;span&gt;is not recommended and we&amp;nbsp;will not actively support it.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kind regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Håkon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 RSA crypto changes from v2.3.0 to v2.4.0 SHA-1 signing</title><link>https://devzone.nordicsemi.com/thread/441196?ContentTypeID=1</link><pubDate>Mon, 14 Aug 2023 14:18:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4506b477-29df-4bec-a3f1-516d3402e46a</guid><dc:creator>aldras</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;H&amp;aring;kon,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you for the timely reply.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I tried with the above configuration and it now works&amp;nbsp;as expected while signing data with a 384-bit SHA-1 RSA key.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;There is one side effect, I have a *lot* of warnings for the following... however the project builds without error and the RSA singing features are now working again as expected, thank you very much for the workaround suggestion.&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;In file included from secure_fw/partitions/crypto/mbedcrypto/nrf_security_src/include/generated/nrf-config.h:12:
secure_fw/partitions/crypto/mbedcrypto/nrf_security_src/include/generated/nrf-config-user.h:147: note: this is the location of the previous definition
  147 | #define MBEDTLS_PSA_BUILTIN_ALG_SHA_1&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I noticed there seemed to be an overhaul of the Oberon driver from v2.3.x to x2.4.x. &amp;nbsp;Have there been changes to the Oberon library that removed support for 384-bit SHA-1 keys? &amp;nbsp;I *believe* I was using the Oberon driver in 2.3.x as it was able to perform the RSA signing at the time. &amp;nbsp;Is this possibly the case here?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Also, I did not look&amp;nbsp;&lt;/span&gt;carefully, but I noticed that the Oberon library is provided precompiled into a binary form. &amp;nbsp;From a development standpoint was it easier to precompile the binary rather than have it build from source with the project?&lt;/p&gt;
&lt;p&gt;I ask this because I was trying to trace the issues that I was having with the Oberon library only to find that a large chunk was being linked to a precompiled library. &amp;nbsp;Perhaps the source is present, but requires me to setup the proper build environment to run the Makefile for it.&lt;/p&gt;
&lt;p&gt;Thank you for looking into the Oberon library support issues with the sample project&amp;nbsp;&lt;span&gt;/opt/nordic/ncs/v2.4.1/nrf/samples/crypto/rsa&lt;/span&gt;&amp;nbsp;. &amp;nbsp;I look forward to the results. &amp;nbsp;I may move up to a 1024-bit key in the future, but will require change to code on other systems to support the change... at that time I may be able to use the hardware crypto cell.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I will leave this ticket open until we hear a result from the developers concerning the Oberon library issues (in the sample project).&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 RSA crypto changes from v2.3.0 to v2.4.0 SHA-1 signing</title><link>https://devzone.nordicsemi.com/thread/441153?ContentTypeID=1</link><pubDate>Mon, 14 Aug 2023 12:32:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa8d66ad-341a-4947-a492-c5f58940979c</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;SHA-1 384 is not supported by oberon, and need mbedtls to work as expected.&lt;/p&gt;
&lt;p&gt;Can you try to add this to your configuration?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_PSA_CRYPTO_DRIVER_OBERON=n
CONFIG_PSA_CRYPTO_DRIVER_CC3XX=n
CONFIG_PSA_CORE_BUILTIN=y
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 RSA crypto changes from v2.3.0 to v2.4.0 SHA-1 signing</title><link>https://devzone.nordicsemi.com/thread/441115?ContentTypeID=1</link><pubDate>Mon, 14 Aug 2023 10:36:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22e19b86-0ff3-4094-a83a-4b5794898e02</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi Allan,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you for reporting and making us aware of this.&lt;/p&gt;
&lt;p&gt;I am able to reproduce the issue that you&amp;#39;re seeing in NCS v2.4.x, and I have reported this back to our developers. This is currently being looked into.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 RSA crypto changes from v2.3.0 to v2.4.0 SHA-1 signing</title><link>https://devzone.nordicsemi.com/thread/440872?ContentTypeID=1</link><pubDate>Fri, 11 Aug 2023 06:45:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a1ebdf8-5a5d-4106-bf47-6dcfee9ead24</guid><dc:creator>aldras</dc:creator><description>&lt;p&gt;I have done some testing with the sample project at&lt;/p&gt;
&lt;p&gt;&lt;span&gt;/opt/nordic/ncs/v2.4.1/nrf/samples/crypto/rsa&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If I add the following the prj.conf file (and remove those settings from the boards files) then this results in a runtime error -134.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_PSA_CRYPTO_DRIVER_OBERON=y
CONFIG_PSA_CRYPTO_DRIVER_CC3XX=n&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Has something broken with the OBERON library?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>