<?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>problem to adding AES encription to secure DFU SDK15.0</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/41478/problem-to-adding-aes-encription-to-secure-dfu-sdk15-0</link><description>Hi! 
 nRF52832, SDK15, SD6.0.0, S132 
 I try to use secure_bootloader from SDK15 examples. All works. 
 Now I need encrypt my firmware with AES. I already made it on a SDK13- works fine. 
 Now after encrypt .bin file in the dfu.zip package, I try to decrypt</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 28 Dec 2018 10:49:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/41478/problem-to-adding-aes-encription-to-secure-dfu-sdk15-0" /><item><title>RE: problem to adding AES encription to secure DFU SDK15.0</title><link>https://devzone.nordicsemi.com/thread/163184?ContentTypeID=1</link><pubDate>Fri, 28 Dec 2018 10:49:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:434509e8-8f91-439f-a748-4f869fb767d5</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;I decided. All works. Should crypt by stream chiper. Because nordic DFU use block by 244 bytes.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Hung, please, insert by Nordic team native encryption in the DFU. Really, it is necessary action. All people want to use encryption update via DFU. Same history was in the SDK13, now in the SDK15 I need again use encryption.&lt;/p&gt;
&lt;p&gt;Think about it pls.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: problem to adding AES encription to secure DFU SDK15.0</title><link>https://devzone.nordicsemi.com/thread/163023?ContentTypeID=1</link><pubDate>Thu, 27 Dec 2018 05:06:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01ccc2e9-8af3-486c-ad7b-de83173c4d5c</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Didn&amp;#39;t it work for you in SDK v13 ? I can see the CRCs&amp;nbsp;are different after the first write command. We are only limited staff during the holiday so I can&amp;#39;t try and test myself but I don&amp;#39;t see any reason why we couldn&amp;#39;t debug and find why the CRC is different, shouldn&amp;#39;t it be very simple to put a break point and see why CRC is calculated differently ? It must start from either the size of the input data or the input data (the write packet) it self ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: problem to adding AES encription to secure DFU SDK15.0</title><link>https://devzone.nordicsemi.com/thread/162805?ContentTypeID=1</link><pubDate>Fri, 21 Dec 2018 09:36:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:926ba84a-b23c-4ea2-b6a8-83fbbf9ff62c</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/6012.Screenshot_5F00_2.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;without AES:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/wo_5F00_aes2.log"&gt;devzone.nordicsemi.com/.../wo_5F00_aes2.log&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;with AES:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/aes2.log"&gt;devzone.nordicsemi.com/.../aes2.log&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Why second data is&lt;/p&gt;
&lt;p&gt;az on_data_obj_write_request crc32_compute_*p_req-&amp;gt;write.p_data = 0x00000009&lt;/p&gt;
&lt;p&gt;? are different.&lt;/p&gt;
&lt;p&gt;My oppinion is: I try to decrypt 244 bytes by AES block crypt. One data block DFU is 244 bytes. Therefore, I cant divide 244 to 16 without&amp;nbsp;remainder of the division. For this reason I have changed different data&amp;nbsp;p_req-&amp;gt;write.p_data&lt;/p&gt;
&lt;p&gt;Is it possible?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: problem to adding AES encription to secure DFU SDK15.0</title><link>https://devzone.nordicsemi.com/thread/162793?ContentTypeID=1</link><pubDate>Fri, 21 Dec 2018 08:48:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef63cbae-b657-4503-97fb-6d9724a37dd0</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;uno momento...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: problem to adding AES encription to secure DFU SDK15.0</title><link>https://devzone.nordicsemi.com/thread/162792?ContentTypeID=1</link><pubDate>Fri, 21 Dec 2018 08:46:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:515326a4-b702-4b26-8310-08b032262beb</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Mikhail,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you printout value of&amp;nbsp;firmware_image_crc ? not the address of it. It&amp;#39;s normal to have different address when you modified the code.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: problem to adding AES encription to secure DFU SDK15.0</title><link>https://devzone.nordicsemi.com/thread/162787?ContentTypeID=1</link><pubDate>Fri, 21 Dec 2018 08:25:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8dd713bb-99ad-4fc5-bfef-6059c53ad4cd</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;seems,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;amp;s_dfu_settings.progress.firmware_image_crc&lt;/p&gt;
&lt;p&gt;antother due to adding some code. And address of&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;amp;s_dfu_settings.progress.firmware_image_crc&lt;/p&gt;
&lt;p&gt;some moved. It is my opinion.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: problem to adding AES encription to secure DFU SDK15.0</title><link>https://devzone.nordicsemi.com/thread/162784?ContentTypeID=1</link><pubDate>Fri, 21 Dec 2018 08:11:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2610cf94-650c-4c4b-86c3-2aecb8f3799b</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;just added AES block or comment:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/7563.Screenshot_5F00_1.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;without AES block:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/7485.wo_5F00_aes.log"&gt;devzone.nordicsemi.com/.../7485.wo_5F00_aes.log&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;with AES:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/0131.aes.log"&gt;devzone.nordicsemi.com/.../0131.aes.log&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: problem to adding AES encription to secure DFU SDK15.0</title><link>https://devzone.nordicsemi.com/thread/162775?ContentTypeID=1</link><pubDate>Fri, 21 Dec 2018 06:45:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3287f3ae-ebf4-4bff-a27d-3547763da832</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;You don&amp;#39;t need to resume, just check the input of the CRC calculation function, to see if the input data are the same in both case or not&amp;nbsp; ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Most likely they are not the same.&amp;nbsp;&lt;br /&gt;The CRC calculation function is very simple. The input is the previous CRC (make sure this one is the same in both cases) and the 244 byte data of new write command. If these 2 are matches the result CRC should be the same.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: problem to adding AES encription to secure DFU SDK15.0</title><link>https://devzone.nordicsemi.com/thread/162630?ContentTypeID=1</link><pubDate>Thu, 20 Dec 2018 10:37:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e4673af4-0b31-4355-8da2-f1072a4d75b1</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;I can&amp;#39;t resume this situation. I see that first CRC in both cases are&amp;nbsp;CRC = 0xA5BE0D95, the second CRC are different.&lt;/p&gt;
&lt;p&gt;We should try to understad why&amp;nbsp;&lt;/p&gt;
&lt;p&gt;for (int i = 0; i &amp;lt; p_req-&amp;gt;write.len; i+=16)&lt;br /&gt; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; AES128_ECB_decrypt (p_req-&amp;gt;write.p_data + i, key, p_req-&amp;gt;write.p_data + i); &lt;br /&gt; }&lt;/p&gt;
&lt;p&gt;this code leads to different CRC. I cant understand it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: problem to adding AES encription to secure DFU SDK15.0</title><link>https://devzone.nordicsemi.com/thread/162602?ContentTypeID=1</link><pubDate>Thu, 20 Dec 2018 07:35:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f7804be-68ca-47a3-a75a-16a6cae2a28e</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;Ok, I&amp;#39;ll check it. But your say that replace in that part of code CRC -absolutly normal? Or you have any another idea where it does to do best?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: problem to adding AES encription to secure DFU SDK15.0</title><link>https://devzone.nordicsemi.com/thread/162576?ContentTypeID=1</link><pubDate>Thu, 20 Dec 2018 03:30:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:481468b0-62dd-454d-9ac2-a076507f911f</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;It&amp;#39;s pretty strange.&amp;nbsp;Could you print out more info before the CRC calculation (like previous CRC, some data on the write packet )? You can think of adding a counter and set a breakpoint when it count to 3 and step into the code to see why it&amp;#39;s different CRCs ? If it&amp;#39;s the same data and same previous CRC, the result CRC should be the same.&lt;/p&gt;
&lt;p&gt;I think we are getting close to the root cause of the issue.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: problem to adding AES encription to secure DFU SDK15.0</title><link>https://devzone.nordicsemi.com/thread/162510?ContentTypeID=1</link><pubDate>Wed, 19 Dec 2018 13:24:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7aae3533-62b6-43f7-9e99-d64bebd1f2d9</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;I try again load with same program encrypted. But in the bootloader I use AES encryption and do not use it.&lt;/p&gt;
&lt;p&gt;below two logs.&lt;/p&gt;
&lt;p&gt;with AES:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/aes.log"&gt;devzone.nordicsemi.com/.../aes.log&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;WO AES:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/wo_5F00_aes.log"&gt;devzone.nordicsemi.com/.../wo_5F00_aes.log&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I see that first two&amp;nbsp;&lt;/p&gt;
&lt;p&gt;az on_data_obj_write_request CRC = 0xA5BE0D95&lt;/p&gt;
&lt;p&gt;az on_data_obj_write_request CRC = 0x65491F3A&lt;/p&gt;
&lt;p&gt;are same&lt;/p&gt;
&lt;p&gt;third CRC is different. Why?&lt;/p&gt;
&lt;p&gt;I just take CRC from air and log it. After that I call AES enc function and write in to flash.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: problem to adding AES encription to secure DFU SDK15.0</title><link>https://devzone.nordicsemi.com/thread/162477?ContentTypeID=1</link><pubDate>Wed, 19 Dec 2018 11:13:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4334326-73d6-4535-a463-122bd6cc53b2</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;I am trying to have a quick comparison between the wo_enc.log and the log you just sent, and I can see right at the first write command , the CRC already different (0x65491F3A vs&amp;nbsp;0xE5314F14) could you step in to the code and check why ?&amp;nbsp;&lt;br /&gt;I assume the&amp;nbsp;&lt;span&gt;wo_enc.log&amp;nbsp; and the log you just sent using the same encrypted firmware and the crc calculated on the undecrypted data, so they should be the same.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: problem to adding AES encription to secure DFU SDK15.0</title><link>https://devzone.nordicsemi.com/thread/162442?ContentTypeID=1</link><pubDate>Wed, 19 Dec 2018 09:26:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:525c08ec-532a-435c-bb01-e275889fd253</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;Yes.&amp;nbsp;&lt;span&gt;0x39000&amp;nbsp;written first time and percentage goes from 1 to 3%. When again percentage restarts from 1%, in the log we see again attempt write from&amp;nbsp;0x39000&amp;nbsp;... Therefore- normal behavior.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/3757.uint32_5F00_t-crc32_5F00_compute_5F00_encrypted-_3D00_-crc32_5F00_compute.log"&gt;devzone.nordicsemi.com/.../3757.uint32_5F00_t-crc32_5F00_compute_5F00_encrypted-_3D00_-crc32_5F00_compute.log&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;log file with AES encryption.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: problem to adding AES encription to secure DFU SDK15.0</title><link>https://devzone.nordicsemi.com/thread/162439?ContentTypeID=1</link><pubDate>Wed, 19 Dec 2018 09:17:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9155d2c4-b87e-4014-9b0e-a4a98eded5be</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;You are saying the 0x39000 being written twice ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Could you send the log of the test when you do CRC calculation before decrypting ? The .log file, not the screenshot.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: problem to adding AES encription to secure DFU SDK15.0</title><link>https://devzone.nordicsemi.com/thread/162252?ContentTypeID=1</link><pubDate>Tue, 18 Dec 2018 10:46:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b1da406-a4f2-4253-9cac-aac6fad912a4</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;After compare log from bootloader with AES like above my code printscreen, I have CRC check&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;0&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_req_handler: Handle NRF_DFU_OP_CRC_GET (data)&lt;/p&gt;
&lt;p&gt;and after that CRC check, booltoader again try to wryte data from&amp;nbsp;addr=0x00039000&lt;/p&gt;
&lt;p&gt;But on a screen below, I see&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Screenshot_5F00_9.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;that CRC&amp;nbsp;NRF_DFU_OP_CRC_GET and last CRC&amp;nbsp;NRF_DFU_OP_OBJECT_WRITE is same (CRC = 0xB69DF0F4). But after this check, bootloader again write from&amp;nbsp;&lt;span&gt;addr=0x00039000. Therefore, it understand that CRC not correct.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: problem to adding AES encription to secure DFU SDK15.0</title><link>https://devzone.nordicsemi.com/thread/162251?ContentTypeID=1</link><pubDate>Tue, 18 Dec 2018 10:38:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:92d5b62c-0418-4116-aea2-15ae146cee4e</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;As I understand, I should try to load encrypted DFU in the bootloader. But bootloader without any AES modifications? Correct?&lt;/p&gt;
&lt;p&gt;There is:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/wo_5F00_enc.log"&gt;devzone.nordicsemi.com/.../wo_5F00_enc.log&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As you suggest, percentage fill from 1 to 100% and when all loaded - HASH error.&lt;/p&gt;
&lt;p&gt;But when try to insert AES, percentage goes 1,2,3... next- error.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: problem to adding AES encription to secure DFU SDK15.0</title><link>https://devzone.nordicsemi.com/thread/162250?ContentTypeID=1</link><pubDate>Tue, 18 Dec 2018 10:33:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:487564b3-7575-44a2-a581-6cebb67b993b</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hmm, could you try to simply update the encrypted image without modifying anything in the bootloader ? Meaning you will update&amp;nbsp;an encrypted application (of course it won&amp;#39;t run) , just to see the CRC report from the bootloader. I assume the CRC on the phone and CRC from bootloader should match.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;After that you can&amp;nbsp;compare the log of this success update and the above log you just capture&amp;nbsp;and check why it doesn&amp;#39;t match. I think they should be the same if you calculate before you decrypt.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: problem to adding AES encription to secure DFU SDK15.0</title><link>https://devzone.nordicsemi.com/thread/162239?ContentTypeID=1</link><pubDate>Tue, 18 Dec 2018 09:55:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:143f47a2-f923-4d56-8fa8-3e2b894d37b7</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;I tryed it before:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Screenshot_5F00_8.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;and result is:&lt;/p&gt;
&lt;p&gt;on the smartphone- 1,2,3 %... 1,2,3 %... CRC INCORRECT.&lt;/p&gt;
&lt;p&gt;On the RTT debug is:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/uint32_5F00_t-crc32_5F00_compute_5F00_encrypted-_3D00_-crc32_5F00_compute.log"&gt;devzone.nordicsemi.com/.../uint32_5F00_t-crc32_5F00_compute_5F00_encrypted-_3D00_-crc32_5F00_compute.log&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Therefore, youre suggest doesn&amp;#39;t works.&lt;/p&gt;
&lt;p&gt;May be do you have one more idea?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: problem to adding AES encription to secure DFU SDK15.0</title><link>https://devzone.nordicsemi.com/thread/162225?ContentTypeID=1</link><pubDate>Tue, 18 Dec 2018 09:17:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:995b4495-3970-4e7f-b4cb-dea1b6208794</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Mikhail,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not so sure why it worked for you in SDK v13, but my understanding is that you would need to calculate CRC on undecrypted data and send that CRC back to the DFU controller. The DFU controller&amp;nbsp;in my understanding would not need to know about decrypted data as it only cares about sending the encrypted data correctly.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What about you moving the&amp;nbsp;&lt;/p&gt;
&lt;p&gt;s_dfu_settings.progress.firmware_image_crc =&lt;br /&gt; crc32_compute(p_req-&amp;gt;write.p_data, p_req-&amp;gt;write.len, &amp;amp;s_dfu_settings.progress.firmware_image_crc);&lt;/p&gt;
&lt;p&gt;above the call to AES128_ECB_decrypt() ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: problem to adding AES encription to secure DFU SDK15.0</title><link>https://devzone.nordicsemi.com/thread/161891?ContentTypeID=1</link><pubDate>Fri, 14 Dec 2018 14:32:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43dbb37b-72db-427f-b451-959077d98656</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;In the SDK13 I use same method. I encrypted only .bin file. In the bootloader I just take old CRC and&amp;nbsp;replace it CRC with a compared CRC. All works.&lt;/p&gt;
&lt;p&gt;In this SDK15 I want just or replace my CRC with comared CRC or (I can&amp;#39;t find this place where&amp;nbsp; can I) insert my decode code:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;//                for (int i = 0; i &amp;lt; len; i+=16)
//                {
//                    AES128_ECB_decrypt ((uint8_t *)p_src + i, key, (uint8_t *)p_src + i); 
//                }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Therefore, when data from air were received, first I decrypt it and data will like on non encrypted .bin data. And CRC will compare correct.&lt;/p&gt;
&lt;p&gt;But if this method is difficult, possible just replace CRC one to another and compare it between themselves.&lt;/p&gt;
&lt;p&gt;where should it be done?&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: problem to adding AES encription to secure DFU SDK15.0</title><link>https://devzone.nordicsemi.com/thread/161879?ContentTypeID=1</link><pubDate>Fri, 14 Dec 2018 13:56:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e082e1a4-11c6-4920-bdab-3fb618141805</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;You get invalid CRC because you are calculating the CRC on the decrypted data while the phone compares the CRC agains its encrypted image. If you want to skip CRC validation you need to do it&amp;nbsp;in&amp;nbsp;the phone app, not in the bootloader.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: problem to adding AES encription to secure DFU SDK15.0</title><link>https://devzone.nordicsemi.com/thread/161609?ContentTypeID=1</link><pubDate>Thu, 13 Dec 2018 08:55:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ddb8de3d-d508-4bf6-8f17-5dcaa9a86533</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;I tryed topic&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/37260/adding-encryption-to-secure-dfu-sdk-v15"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/37260/adding-encryption-to-secure-dfu-sdk-v15&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;and without any success. But I use my AES encryption manualy. And crypt in the DFU only .bin file from this package.&lt;/p&gt;
&lt;p&gt;Any help?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>