<?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>Adding encryption library to application using nRF Connect for VS Code</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/103038/adding-encryption-library-to-application-using-nrf-connect-for-vs-code</link><description>I am current developing an application for the nRF52840 using nRF Connect for VS Code and nRF Connect SDK version 2.3.0. I need to be able to decrypt messages that were encrypted using AES-EAX. Looking around I notice that there is an nrf_oberon encryption</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 22 Dec 2023 20:53:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/103038/adding-encryption-library-to-application-using-nrf-connect-for-vs-code" /><item><title>RE: Adding encryption library to application using nRF Connect for VS Code</title><link>https://devzone.nordicsemi.com/thread/461631?ContentTypeID=1</link><pubDate>Fri, 22 Dec 2023 20:53:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:515a615a-c538-4437-bb90-5c5d0d3af6c0</guid><dc:creator>underpickled</dc:creator><description>&lt;p&gt;I am also very interested in this question. I am trying to implement AES-EAX with a 4 byte tag for authentication and running into these same limitations. Have you made any progress on this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding encryption library to application using nRF Connect for VS Code</title><link>https://devzone.nordicsemi.com/thread/443034?ContentTypeID=1</link><pubDate>Thu, 24 Aug 2023 16:11:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:109298ac-a3f1-4519-9847-dadb785616f9</guid><dc:creator>Tim Chadwick</dc:creator><description>&lt;p&gt;Yes, if I pass the function the smaller auth tag the decryption works correctly (the decrypted data is what I expected it to be), but the decryption function returns -1 indicating that the auth tag isn&amp;#39;t valid.&amp;nbsp; I think that the oberon encrypt/decrypt functions expect a 16-byte buffer for the auth tag.&amp;nbsp; I went back to the &amp;quot;hello world&amp;quot; sample that you sent me and changed the tag buffer to be 2 bytes long instead 16.&amp;nbsp; If I step through the code in the debugger, when the encrypt function gets called (tag is an output parameter) I see the tag buffer being overrun.&amp;nbsp; If I change one of the values in the overrun part of memory before calling the decrypt function, it returns -1 indicating an invalid tag.&amp;nbsp; Based on this it looks like it&amp;#39;s expecting 16 bytes.&amp;nbsp; So if I&amp;#39;m not using authentication it still encrypts/decrypts correctly.&lt;/p&gt;
&lt;p&gt;Thanks for your help.&lt;/p&gt;
&lt;p&gt;Tim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding encryption library to application using nRF Connect for VS Code</title><link>https://devzone.nordicsemi.com/thread/442965?ContentTypeID=1</link><pubDate>Thu, 24 Aug 2023 11:54:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02a4b42a-0777-4729-8e14-9abba666bbd7</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Sorry, but I wasn&amp;#39;t able to confirm today whether the Oberon API requires the auth. tag to be 16 bytes or not. Have you had an opportunity to test this with the beacon payload to see if it can decrypt it despite the shorter tag length?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding encryption library to application using nRF Connect for VS Code</title><link>https://devzone.nordicsemi.com/thread/442819?ContentTypeID=1</link><pubDate>Wed, 23 Aug 2023 15:21:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:212e85af-def0-4a45-bcec-3df82efabb58</guid><dc:creator>Tim Chadwick</dc:creator><description>&lt;p&gt;I am trying to decrypt data in a message sent from a BLE beacon.&amp;nbsp; I have a few questions about the authentication tag.&amp;nbsp; Is this an optional parameter to the API and what is it&amp;#39;s length.&amp;nbsp; In the sample you sent me it&amp;#39;s length is 16 bytes.&amp;nbsp; The documentation for the BLE beacon I&amp;#39;m working with says the tag is optional and if it uses it the length is 2 bytes.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding encryption library to application using nRF Connect for VS Code</title><link>https://devzone.nordicsemi.com/thread/442816?ContentTypeID=1</link><pubDate>Wed, 23 Aug 2023 15:10:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:083da4c7-c0f1-4638-b26d-9c60c4e6a939</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;No problem. Thank you for confirming that it worked.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding encryption library to application using nRF Connect for VS Code</title><link>https://devzone.nordicsemi.com/thread/442810?ContentTypeID=1</link><pubDate>Wed, 23 Aug 2023 14:50:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:92a9f802-988a-4184-b300-f344fb169d33</guid><dc:creator>Tim Chadwick</dc:creator><description>&lt;p&gt;Vidar,&lt;/p&gt;
&lt;p&gt;Thank you so much for your prompt response.&amp;nbsp; I have your sample program running in my environment, correctly encrypting and decrypting data.&amp;nbsp; Thanks again for your assistance.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Tim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding encryption library to application using nRF Connect for VS Code</title><link>https://devzone.nordicsemi.com/thread/442619?ContentTypeID=1</link><pubDate>Tue, 22 Aug 2023 15:10:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f31c535a-0d77-489b-bcba-9b4cdc5d4187</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello Tim,&lt;/p&gt;
&lt;p&gt;Most of our crypto examples utilize mbedTLS or the PSA crypto API, with Oberon being one of the available backends. However, since neither of these support EAX, it appears that the option at the moment is to use the Oberon library directly, as you mentioned.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I put together a small demo based on the Hello World sample which I have included below. To link in the Oberon library with this project I had to add&amp;nbsp;CONFIG_NRF_OBERON=y to the prj.conf file, and &amp;#39;zephyr_library_link_libraries(nrfxlib_crypto)&amp;#39; to the project CMakelists.txt file.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Test project&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/5228.hello_5F00_world_5F00_aes_5F00_eax_5F00_test.zip"&gt;devzone.nordicsemi.com/.../5228.hello_5F00_world_5F00_aes_5F00_eax_5F00_test.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Disclaimer:&amp;nbsp;this project has not been tested or&amp;nbsp;validated&amp;nbsp;by our R&amp;amp;D team. Please keep this in mind if you use the code implementation as a reference.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;
&lt;p&gt;API doc:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.3.0/nrfxlib/crypto/doc/api.html#aes-eax-apis"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.3.0/nrfxlib/crypto/doc/api.html#aes-eax-apis&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>