<?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>[nRF5 SDK15.3]52810 encryption problem</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/85283/nrf5-sdk15-3-52810-encryption-problem</link><description>Dear friend, 
 How much RAM does ECB encryption consume? Currently implemented using a third-party AES library (consumes 2.3k of RAM). Is there a way to encrypt that consumes less RAM?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 03 Mar 2022 13:46:44 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/85283/nrf5-sdk15-3-52810-encryption-problem" /><item><title>RE: [nRF5 SDK15.3]52810 encryption problem</title><link>https://devzone.nordicsemi.com/thread/356072?ContentTypeID=1</link><pubDate>Thu, 03 Mar 2022 13:46:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:934b38ee-5ddf-4655-9107-3383fe206517</guid><dc:creator>Charlie</dc:creator><description>&lt;p&gt;Hi Zero,&lt;/p&gt;
&lt;p&gt;The following library demostrates how ECB peripheral is used.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v14.2.0/group__nrf__ecb.html"&gt;AES ECB encryption&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;modules\nrfx\hal\nrf_ecb.c&lt;/p&gt;
&lt;p&gt;modules\nrfx\hal\nrf_ecb.h&lt;/p&gt;
&lt;p&gt;Search function name through nRF5 SDK and you will find how these functions are used by other components.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Charlie&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF5 SDK15.3]52810 encryption problem</title><link>https://devzone.nordicsemi.com/thread/355927?ContentTypeID=1</link><pubDate>Thu, 03 Mar 2022 03:42:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:57c2fcc6-3bc2-46bc-b4aa-03351aeacee9</guid><dc:creator>zero</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi&amp;nbsp;&lt;/span&gt;&lt;span&gt;Charlie，&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Looking at the specification of 52810, it supports ECB peripherals, so how to use ECB peripherals for encryption and decryption based on sdk14.2?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Zero&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF5 SDK15.3]52810 encryption problem</title><link>https://devzone.nordicsemi.com/thread/355887?ContentTypeID=1</link><pubDate>Wed, 02 Mar 2022 15:54:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c5619669-844a-4c90-9795-d5a292f4ac2f</guid><dc:creator>Charlie</dc:creator><description>&lt;p&gt;Hi Zero,&lt;/p&gt;
&lt;p&gt;1)nRF5 SDK1.4.x does not have a formal production-level &lt;span&gt;nrf_crypto library.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2)micro-ecc is for&amp;nbsp;ECDH or ECDSA implementation, they are key exchange algorithms. It is not used for AES, which is&amp;nbsp;a kind of bulk encryption algorithm.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If you just start your research on crypto usage, I suggest you learn some basic knowledge on security cipher suit first, then start with the latest&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.0/nrf/samples/samples_crypto.html"&gt;Cryptography samples — nRF Connect SDK 1.9.0 documentation (nordicsemi.com)&lt;/a&gt;. This will speed up your development and also make your life much easier. ;-)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Charlie&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF5 SDK15.3]52810 encryption problem</title><link>https://devzone.nordicsemi.com/thread/355782?ContentTypeID=1</link><pubDate>Wed, 02 Mar 2022 10:46:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d443430-15d4-48e8-b53e-cf5632585d19</guid><dc:creator>zero</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi&amp;nbsp;&lt;/span&gt;&lt;span&gt;Charlie，&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Sorry, I made a mistake, I am currently using sdk14.2, I did not see a similar description of &amp;quot;Memory management in nrf_crypto&amp;quot; in sdk14.2. Based on sdk14.2, how much ram does it take to encrypt with micro-ecc backend?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Zero&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF5 SDK15.3]52810 encryption problem</title><link>https://devzone.nordicsemi.com/thread/355758?ContentTypeID=1</link><pubDate>Wed, 02 Mar 2022 09:51:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3e539a9e-7549-4081-8272-e9857bd41202</guid><dc:creator>Charlie</dc:creator><description>&lt;p&gt;No. the function&amp;nbsp;nrf_cli_cmd_crypt_ecb in this example has basically demonstrated how to use ECB. Keep in mind that ECB is just one of several AES modes, so&amp;nbsp;it is easy to adapt by following other samples like CBC, CTR modes.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Charlie&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF5 SDK15.3]52810 encryption problem</title><link>https://devzone.nordicsemi.com/thread/355682?ContentTypeID=1</link><pubDate>Wed, 02 Mar 2022 02:43:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5a4ab6f-227b-4536-a88e-ab23d572c694</guid><dc:creator>zero</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;Charlie，&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Does ECB have a simple example to test evaluation? Seeing that only the \examples\crypto\nrf_crypto\aes\aes_all_cli example uses ECB, this code is hard to estimate how much ram it consumes.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Zero&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF5 SDK15.3]52810 encryption problem</title><link>https://devzone.nordicsemi.com/thread/355539?ContentTypeID=1</link><pubDate>Tue, 01 Mar 2022 12:36:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c2c52c4-6f10-4f08-be3d-6e290908008e</guid><dc:creator>Charlie</dc:creator><description>&lt;p&gt;Hi Zero,&lt;/p&gt;
&lt;p&gt;Under&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Flib_crypto_mem_management.html"&gt;Memory management in nrf_crypto&lt;/a&gt;&amp;nbsp;table&amp;nbsp;AES - Advanced Encryption Standard shows ECB memory cost is nrf_crypto_aes_context_t(292B)+nrf_crypto_aes_info_t(&lt;span&gt;36B&lt;/span&gt;) under&amp;nbsp;&lt;span&gt;mbed TLS&lt;/span&gt;.&amp;nbsp;If this is over your budget, you have to consider choosing chip with big memory size.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Charlie&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF5 SDK15.3]52810 encryption problem</title><link>https://devzone.nordicsemi.com/thread/355512?ContentTypeID=1</link><pubDate>Tue, 01 Mar 2022 11:15:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8430f2d9-be4a-44c3-b9c3-232216ceb17a</guid><dc:creator>zero</dc:creator><description>[quote userid="93921" url="~/f/nordic-q-a/85283/nrf5-sdk15-3-52810-encryption-problem/355488#355488"]This will depend on which backend you are going to use. According to &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.0.0/lib_crypto.html"&gt;Cryptography library - nrf_crypto&lt;/a&gt;, at least two backends can be used for nRF52810: mbed TLS and micro-ecc.[/quote]
&lt;p&gt;How much ram does it consume with mbed TLS?&lt;/p&gt;
[quote userid="93921" url="~/f/nordic-q-a/85283/nrf5-sdk15-3-52810-encryption-problem/355488#355488"]&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Flib_crypto_mem_management.html"&gt;Memory management in nrf_crypto&lt;/a&gt;&amp;nbsp;introduces how to assign proper configuration for memory buffer usage optimization.[/quote]
&lt;p&gt;Seeing that the memory consumption of mbed TLS and micro-ecc is very high, how much is it? How much do you save after optimization?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF5 SDK15.3]52810 encryption problem</title><link>https://devzone.nordicsemi.com/thread/355488?ContentTypeID=1</link><pubDate>Tue, 01 Mar 2022 10:17:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f331dff-f84d-4385-97dc-2cc5aa27cf58</guid><dc:creator>Charlie</dc:creator><description>&lt;p&gt;Hi Zero,&lt;/p&gt;
[quote user=""]How much RAM does ECB encryption consume?[/quote]
&lt;p&gt;This will depend on which backend you are going to use. According to &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.0.0/lib_crypto.html"&gt;Cryptography library - nrf_crypto&lt;/a&gt;, at least two backends can be used for nRF52810: mbed TLS and micro-ecc.&lt;/p&gt;
[quote user=""]Is there a way to encrypt that consumes less RAM?[/quote]
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Flib_crypto_mem_management.html"&gt;Memory management in nrf_crypto&lt;/a&gt;&amp;nbsp;introduces how to assign proper configuration for memory buffer usage optimization.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Charlie&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>