<?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 signing data CC310</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/73314/nrf9160-rsa-signing-data-cc310</link><description>I am currently working on a project that involves RSA signing data before POSTing it to a PHP web server. 
 I believe this uses the CC310 cryptography hardware in the nRF9160, but even if the RSA signature takes time to complete it is not an issue. 
</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 25 Mar 2022 08:15:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/73314/nrf9160-rsa-signing-data-cc310" /><item><title>RE: nRF9160 RSA signing data CC310</title><link>https://devzone.nordicsemi.com/thread/359922?ContentTypeID=1</link><pubDate>Fri, 25 Mar 2022 08:15:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d19aa51-8f41-4bf6-b2b6-dcd1178d7f3d</guid><dc:creator>aldras</dc:creator><description>&lt;p&gt;I am closing this ticket as I have opened a new one, but this issue seems to have been resolved with the later 1.9.1 SDK. &amp;nbsp;Not sure I did something different or not, as I reworked it from the ground up.&lt;/p&gt;
&lt;p&gt;Please see the below link for more details, but the signature result does return successfully with the new code.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/85733/rsa-crypto-sample-on-nrf9160-does-not-appear-to-function-correctly-sdk-1-9-1"&gt;devzone.nordicsemi.com/.../rsa-crypto-sample-on-nrf9160-does-not-appear-to-function-correctly-sdk-1-9-1&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 RSA signing data CC310</title><link>https://devzone.nordicsemi.com/thread/302784?ContentTypeID=1</link><pubDate>Wed, 31 Mar 2021 15:02:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dea575e5-270d-4854-bb41-1ebd3d2d927c</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Thanks for the update, Allan! Good luck with the prototyping and happy Easter!&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 RSA signing data CC310</title><link>https://devzone.nordicsemi.com/thread/302777?ContentTypeID=1</link><pubDate>Wed, 31 Mar 2021 13:59:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6014b3b6-ffdc-41d9-bbdf-5256459b7e1a</guid><dc:creator>aldras</dc:creator><description>&lt;p&gt;Hi Carl,&lt;/p&gt;
&lt;p&gt;Thank you for the additional information!&lt;/p&gt;
&lt;p&gt;I am now working on other parts of the project and have pushed RSA aside for the moment and using a Raspberry Pi to perform the RSA signing in Python to speed up the prototype schedule.&lt;/p&gt;
&lt;p&gt;I have the nRF9160 write required information such as the&amp;nbsp;IMEI on an SD card, then insert&amp;nbsp;that SD card (with an adapter) into&amp;nbsp;the&amp;nbsp;Raspberry Pi USB. &amp;nbsp;The Raspberry Pi performs the RSA signing, communicates with a PHP web server, writes the results to the SD card, then I return it to the&amp;nbsp;nRF9160. &amp;nbsp;Not the most efficient, but allows faster progression on the prototype.&lt;/p&gt;
&lt;p&gt;I was able to get an RSA signature, but it does not match the expected result. &amp;nbsp;I will look into this soon and open a new ticket at that time when I get back to troubleshooting the RSA signing functions.&lt;/p&gt;
&lt;p&gt;At that time I will get back to the RSA signing and update the functions using&amp;nbsp;&lt;span&gt;entropy.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Sincerely,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Allan&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 RSA signing data CC310</title><link>https://devzone.nordicsemi.com/thread/302739?ContentTypeID=1</link><pubDate>Wed, 31 Mar 2021 12:58:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d36e07f-6f4e-4f3c-92bd-bc15a3a1e5bd</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Hi again!&lt;br /&gt;&lt;br /&gt;I just wanted to add that it seems like proper support for entropy on the nRF9160 recently has been added in the master branch. Just apply &lt;a href="https://github.com/nrfconnect/sdk-nrfxlib/commit/01acd15117499f69170c43f18afc770f1b696412"&gt;this commit&lt;/a&gt;&amp;nbsp;to your SDK&amp;nbsp;and it should work!&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 RSA signing data CC310</title><link>https://devzone.nordicsemi.com/thread/302409?ContentTypeID=1</link><pubDate>Mon, 29 Mar 2021 14:30:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3c4930b-ff70-49c9-9f12-ea358d16946f</guid><dc:creator>aldras</dc:creator><description>&lt;p&gt;Hi Carl,&lt;/p&gt;
&lt;p&gt;Thank you for the quick response, I will investigate this function!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 RSA signing data CC310</title><link>https://devzone.nordicsemi.com/thread/302405?ContentTypeID=1</link><pubDate>Mon, 29 Mar 2021 14:22:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d30a7f04-c51c-4cbb-9328-4ac2b9773a3c</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Hi, Aldras!&lt;br /&gt;&lt;br /&gt;CC310 is not directly accessible from non-secure applications on the nRF9160. As mentioned in the documentation for the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/drivers/entropy_cc310.html?highlight=cryptocell#cc310-entropy-driver"&gt;CC310 entropy driver&lt;/a&gt;, entropy can be gathered through the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/include/secure_services.html#lib-secure-services"&gt;Secure Services&lt;/a&gt;&amp;nbsp;library. You can also implement your own secure services that can be accessed through this library.&lt;br /&gt;&lt;br /&gt;In your case you can get random numbers from SPM using &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/include/secure_services.html#c.spm_request_random_number"&gt;spm_request_random_number&lt;/a&gt;.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Hope this makes sense!&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 RSA singing data CC310</title><link>https://devzone.nordicsemi.com/thread/302255?ContentTypeID=1</link><pubDate>Sun, 28 Mar 2021 13:55:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1f961c48-15f1-4117-8301-a1db78e96434</guid><dc:creator>aldras</dc:creator><description>&lt;p&gt;I have come up with a solution but I don&amp;#39;t like it, I think it completely bypasses the hardware random number generator.&lt;/p&gt;
&lt;p&gt;According to what I understand the configuration option CONFIG_MBEDTLS_ENTROPY_HARDWARE_ALT=y has made it into the build meaning that I need to provide the function for the following prototype:&lt;/p&gt;
&lt;p&gt;int mbedtls_hardware_poll( void *data,&amp;nbsp;unsigned char *output, size_t len, size_t *olen )&lt;/p&gt;
&lt;p&gt;I added this into the main.c file.&lt;/p&gt;
&lt;p&gt;I have done so with the below function but I am not sure I am confident with this solution, but it does resolve the build errors and allows me to progress on the project. &amp;nbsp;I can come back and fix this later. &amp;nbsp;Please do offer some suggestion though, if there is any recommendation.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;int mbedtls_hardware_poll( void *data,
                           unsigned char *output, size_t len, size_t *olen ) {
    int e;
    //e = mbedtls_hardware_poll(NULL, output, len, NULL);
    e = sys_csrand_get(output, len);
    return e;
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>