<?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>nRF51422 AES app mode with soft module S110</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/5048/nrf51422-aes-app-mode-with-soft-module-s110</link><description>There are a few threads on using the AES module and there is a lot of confusing and somewhat contradictory information. 
 I want to do the following: 
 
 generate secure random numbers via hw (e.g. using radio noise and entropy calcs) 
 encrypt and</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 20 Jan 2015 12:48:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/5048/nrf51422-aes-app-mode-with-soft-module-s110" /><item><title>RE: nRF51422 AES app mode with soft module S110</title><link>https://devzone.nordicsemi.com/thread/17777?ContentTypeID=1</link><pubDate>Tue, 20 Jan 2015 12:48:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7eb6c396-3cb2-429d-8e69-feccd980c6e4</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I&amp;#39;m not a cryptographic expert, but I will try to answer your questions.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;To generate random numbers you can use the Random Number Generator, please see Section 21 in the nRF51 Series Reference Manual  v3.0 for more information. It creates generates true non-deterministic random numbers based on internal thermal noise. &lt;a href="http://developer.nordicsemi.com/nRF51_SDK/doc/7.1.0/s110/html/a00031.html"&gt;The Random Number Generator Example&lt;/a&gt; might also be helpful.&lt;/li&gt;
&lt;li&gt;The AES ECB module (see Section 23 in the nRF51 Series Reference Manual v3.0) only does encryption. Counter mode only requires a encryption module and that is why it has been suggested previously.&lt;/li&gt;
&lt;li&gt;CBC seems to require a decryption module, so I don&amp;#39;t think it can be implemented.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Please see Section 10.2 in the S110 SoftDevice Specification v1.3 for what hardware blocks that are open, restricted, and open when the SoftDevice is active. CCM is blocked, while ECB is restricted. Restricted means that the application has limited access throught the SoftDevice API.&lt;/p&gt;
&lt;p&gt;We don&amp;#39;t have an example, but it should easy just to use the following function from nrf_soc.h:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/**@brief Encrypts a block according to the specified parameters.
 *
 * 128-bit AES encryption.
 *
 * @param[in, out] p_ecb_data Pointer to the ECB parameters&amp;#39; struct (two input
 *                            parameters and one output parameter).
 *
 * @retval ::NRF_SUCCESS
 */
SVCALL(SD_ECB_BLOCK_ENCRYPT, uint32_t, sd_ecb_block_encrypt(nrf_ecb_hal_data_t * p_ecb_data));
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51422 AES app mode with soft module S110</title><link>https://devzone.nordicsemi.com/thread/17776?ContentTypeID=1</link><pubDate>Tue, 13 Jan 2015 22:18:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ffbafdf-e49e-463e-8632-3ef26547a9c2</guid><dc:creator>sam wagner</dc:creator><description>&lt;p&gt;Nordic Support,
Any comments on the question above? I am also interested in knowing this for nRF51822
regards!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>