<?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 to secure DFU</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/35895/adding-encryption-to-secure-dfu</link><description>Hello. 
 I&amp;#39;m trying to add encryption to the secure DFU bootloader. I&amp;#39;m using SDK v15. I know this topic has been discussed on this forum before. In particular I have found this blog post and this thread very helpful. I haven&amp;#39;t yet been able to build</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 07 Aug 2018 08:08:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/35895/adding-encryption-to-secure-dfu" /><item><title>RE: Adding encryption to secure DFU</title><link>https://devzone.nordicsemi.com/thread/143153?ContentTypeID=1</link><pubDate>Tue, 07 Aug 2018 08:08:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f66991aa-03c5-40cd-9b1f-5c3823e4b7dd</guid><dc:creator>mrono</dc:creator><description>&lt;p&gt;Other things came up, so I haven&amp;#39;t had a chance to work on this for a while.&lt;/p&gt;
&lt;p&gt;My plan is to proceed like this:&amp;nbsp;First try to encrypt and decrypt some data (probably a text string) on the target and verify that it works. Then send the encrypted data out through RTT, and try to recreate the same encrypted data with openssl. (I still suspect my issue is that I&amp;#39;m not invoking openssl with the correct parameters.)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding encryption to secure DFU</title><link>https://devzone.nordicsemi.com/thread/143114?ContentTypeID=1</link><pubDate>Tue, 07 Aug 2018 03:29:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a08f38c3-bb50-4da0-bb55-7a3f93c4b223</guid><dc:creator>Mathew</dc:creator><description>&lt;p&gt;Hi Markku,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m also attempting to&amp;nbsp;add encryption to the&amp;nbsp;SDK v15 secure DFU bootloader.&lt;/p&gt;
&lt;p&gt;I am interested in how you got on and whether you have any tips on how to implement a working solution.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Mathew&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding encryption to secure DFU</title><link>https://devzone.nordicsemi.com/thread/138708?ContentTypeID=1</link><pubDate>Tue, 03 Jul 2018 09:16:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e01dbda3-1c71-48f6-b880-60099358bdd1</guid><dc:creator>mrono</dc:creator><description>&lt;p&gt;Thank you. I&amp;#39;ll try those steps.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding encryption to secure DFU</title><link>https://devzone.nordicsemi.com/thread/138296?ContentTypeID=1</link><pubDate>Fri, 29 Jun 2018 14:00:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e7e9e87-7caa-4650-9907-d256103b43fb</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Markku,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To be honest I&amp;#39;m don&amp;#39;t have much experience with crypto library, but I can try to help.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;From my point of view adding AES into&amp;nbsp;CC310_bl could be a good idea. The main reason we didn&amp;#39;t use CC310 in our bootloader was the limit of ROM size that we don&amp;#39;t want to add the full big library in.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;My suggestion is,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1)&amp;nbsp;First you test inside your application, just encrypt and decrypt some dummy test data, doesn&amp;#39;t need to try with a big image first.&lt;/p&gt;
&lt;p&gt;2)After that you test on the real image, just write a blinky binary image into flash, and then use your application (not the bootloader) to encrypt and decrypt.&lt;/p&gt;
&lt;p&gt;3) After you have above steps done, I don&amp;#39;t see any problem&amp;nbsp;using that encrypted image to create the .zip file and send it to the bootloader where you add the decrypting&amp;nbsp;code. Note that there a tricky part with CRC. So on the fly CRC calculation for each packet is calculated on the encrypted data received. However, at the end, when we need to check the hash of the image, to verify the signature we should use the decrypted image. Same applied with the CRC calculation at post-validate, this is the CRC to be stored in flash so each time the device starts the bootloader will check if the application image still matches with the stored CRC. So this CRC has to be calculated on the decrypted image.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;But most important is to have the test image encrypt and decrypt correctly&amp;nbsp; (step 2), I think.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>