<?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>ESB aes-ccm MIC verify</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/85107/esb-aes-ccm-mic-verify</link><description>Hi 
 We are verifying the encrypt value and MIC value using a crypto tool. 
 The result is different depending on the setting of the packet S0 field. 
 
 If the S0 field is set as below, the MIC value is checked correctly. 
 NRF-&amp;gt;RADIO-&amp;gt;PCNF0 = (1 &amp;lt;&amp;lt;</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 08 Mar 2022 19:41:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/85107/esb-aes-ccm-mic-verify" /><item><title>RE: ESB aes-ccm MIC verify</title><link>https://devzone.nordicsemi.com/thread/356985?ContentTypeID=1</link><pubDate>Tue, 08 Mar 2022 19:41:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f19d9674-627d-4965-8b5a-c1cf8b50d235</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What is &amp;quot;AAD&amp;quot; a reference to?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I can&amp;#39;t find this acronym in our CCM documentation.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The problem with using the CCM when S0 is set to 0 is that the CCM module always assume that the S0 field is there, and if you are receiving data over the air without S0 included then the CCM module will process the data incorrectly.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ESB aes-ccm MIC verify</title><link>https://devzone.nordicsemi.com/thread/356734?ContentTypeID=1</link><pubDate>Tue, 08 Mar 2022 01:59:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a36a3758-8b29-4920-a6d4-135e37a41805</guid><dc:creator>imo</dc:creator><description>&lt;p&gt;clear_buffer[CCM_IN_HEADER_INDEX] = 0;&lt;br /&gt;clear_buffer[CCM_IN_LENGTH_INDEX] = (uint8_t)packet_length;&lt;br /&gt;clear_buffer[CCM_IN_RFU_INDEX] = 0;&lt;br /&gt;memcpy(&amp;amp;clear_buffer[CCM_IN_PAYLOAD_INDEX], packet, packet_length);&lt;br /&gt;NRF_CCM-&amp;gt;INPTR = (uint32_t)clear_buffer;&lt;/p&gt;
&lt;pre class="tw-data-text tw-text-large tw-ta" dir="ltr"&gt;&lt;span class="Y2IQFc" lang="en"&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="tw-data-text tw-text-large tw-ta" id="tw-target-text" dir="ltr"&gt;I understood&amp;nbsp; the above code , when the S0 field is set to 1, it is used as follows.&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;
&lt;pre class="tw-data-text tw-text-large tw-ta" dir="ltr"&gt;&lt;span class="Y2IQFc" lang="en"&gt;&lt;strong&gt; AAD                  plain text&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;| S0 | length | S1(RFU) | payload |&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How to use &amp;#39;AAD&amp;#39; when S0 field is set to 0?&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;
&lt;pre class="tw-data-text tw-text-large tw-ta" dir="ltr"&gt;&lt;span class="Y2IQFc" lang="en"&gt;&lt;strong&gt;AAD?                   plain text&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;| X | length | S1(RFU) | payload |&lt;/pre&gt;
&lt;pre class="tw-data-text tw-text-large tw-ta" dir="ltr"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ESB aes-ccm MIC verify</title><link>https://devzone.nordicsemi.com/thread/356578?ContentTypeID=1</link><pubDate>Mon, 07 Mar 2022 12:32:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:396356a6-567c-4960-9167-7a6b5c7e7f7b</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;The team confirmed that S0 has to be used in order for the CCM to work properly.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ESB aes-ccm MIC verify</title><link>https://devzone.nordicsemi.com/thread/354944?ContentTypeID=1</link><pubDate>Fri, 25 Feb 2022 08:32:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ae83ef1-b40e-4916-9f69-6738a94382ab</guid><dc:creator>imo</dc:creator><description>&lt;p&gt;OK. Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ESB aes-ccm MIC verify</title><link>https://devzone.nordicsemi.com/thread/354859?ContentTypeID=1</link><pubDate>Thu, 24 Feb 2022 15:16:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7cfd377a-f996-46c6-8543-ec389aa98e24</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The CCM module is designed with Bluetooth encryption in mind, and Bluetooth uses a 2-byte packet header that requires the S0 field to be set to 1.&amp;nbsp;I will have to double check this with the hardware team, but I believe the MIC check will only work when the radio is configured in a Bluetooth compliant mode, which would explain why S0 has to be 1 byte long.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I will get this confirmed and get back to you.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>