<?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>NRF_CCM-&amp;gt;MICSTATUS bit not set, even though it&amp;#39;s computed correctly</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/29237/nrf_ccm--micstatus-bit-not-set-even-though-it-s-computed-correctly</link><description>I&amp;#39;m developing a minimal bootloader on the nrf52832 that just reads/writes flash and decrypts some data already present in flash. I&amp;#39;m using the Bluetooth Spec&amp;#39;s own sample data, specifically Sample Data 2 (Vol 2, Part G, 1.2.2 - p1547 of v5.0 spec). </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 24 Jan 2018 15:05:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/29237/nrf_ccm--micstatus-bit-not-set-even-though-it-s-computed-correctly" /><item><title>RE: NRF_CCM-&gt;MICSTATUS bit not set, even though it's computed correctly</title><link>https://devzone.nordicsemi.com/thread/116312?ContentTypeID=1</link><pubDate>Wed, 24 Jan 2018 15:05:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12da919f-12d0-4452-959a-da91057d043d</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Elias,&lt;/p&gt;
&lt;p&gt;I think there is a misunderstanding here. Both MIC and data payload are encrypted after the CCM block. This is why you don&amp;#39;t receive MIC check passed when you put b1d8a011 at the end of the payload. It has to be the encrypted MIC you need to put there.&lt;/p&gt;
&lt;p&gt;You can find at section 2.3 Vol 6 Part 5 Bluetooth 5:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;The CCM algorithm uses the Ai blocks to generate keystream that is used to
encrypt the MIC and the Data Channel PDU payload. Block A0 is always used
to encrypt and decrypt the MIC.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Same, inside nRF52832 spec, you can find at Table 59 Data structure for encrypted packet, it&amp;#39;s the 4 byte encrypted MIC at the end.&lt;/p&gt;
&lt;p&gt;You can find the encrypted MIC using ccm_crypt_packet_encrypt() function.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_CCM-&gt;MICSTATUS bit not set, even though it's computed correctly</title><link>https://devzone.nordicsemi.com/thread/116311?ContentTypeID=1</link><pubDate>Tue, 23 Jan 2018 13:16:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8a253c9-d0f2-4e0c-890f-2ccb9b1ce1bd</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Elias: Thanks, we will try to test here and get back to you. It&amp;#39;s been pretty busy here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_CCM-&gt;MICSTATUS bit not set, even though it's computed correctly</title><link>https://devzone.nordicsemi.com/thread/116310?ContentTypeID=1</link><pubDate>Fri, 19 Jan 2018 20:33:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:967185d2-462e-455d-b217-4ec979e00808</guid><dc:creator>Elias</dc:creator><description>&lt;p&gt;I&amp;#39;ve uploaded a minimal example here:
&lt;a href="https://gist.github.com/sarkreth/b203de23b2ee1b869bb950c388003ece"&gt;gist.github.com/.../b203de23b2ee1b869bb950c388003ece&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_CCM-&gt;MICSTATUS bit not set, even though it's computed correctly</title><link>https://devzone.nordicsemi.com/thread/116309?ContentTypeID=1</link><pubDate>Mon, 08 Jan 2018 12:43:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:86f80436-2093-48b9-9620-38edaa00f4f0</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Elias,&lt;/p&gt;
&lt;p&gt;Could you send us a simplified example of your code that can reproduce the issue, so we can test here ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>