Subject: [core] Checksum for firmware updates

From: Maciej Wasilak <[email-masked]>
Date: Tue, 24 Feb 2015 15:27:26 +0100

Dear all,

we are currently working on OTA firmware update that uses CoAP
PUT/POST request with blockwise support. Part of the problem is to
implement checksums for firmware image. There are several solutions to
send checksum with CoAP:
1) Inside payload as part of the firmware package
2) Together with payload as a CoAP option (existing or new)
3) As a separate transaction

Solution 1 should be fine for firmware, but might not be acceptable
for other payloads, like human-readable config files etc.
Solution 2 is very comfortable for embedded systems, but it might lead
to unwanted overhead, as options are repeated in every block
Solution 3 is the most complicated

I would like to ask if anyone implemented such checksums, and what are
your thoughts.

Best Regards
Maciej Wasilak

---

From: Klaus Hartke <[email-masked]>
Date: Tue, 24 Feb 2015 15:47:32 +0100

Hi Maciej,

instead of POSTing the firmware image itself to the node, I would POST
a link to the image along with the checksum. The node then can GET the
image at its own pace and compare the checksum. The advantage of this
is that caches along the path can improve efficiency if more than one
node needs the firmware update.

Klaus

---

From: Julien Vermillard <[email-masked]>
Date: Wed, 25 Feb 2015 15:40:57 +0000

Hi,
I use option #1: the binary is encapsulated inside a container containing a
checksum and/or RSA signature for identifying the binary.
HTH
Julien

On Tue, Feb 24, 2015 at 3:48 PM Klaus Hartke <[email-masked]> wrote:

> _______________________________________________
> core mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/core
>

---

From: Paul Duffy <[email-masked]>
Date: Wed, 25 Feb 2015 18:28:58 -0500

Agreed.

Option 1.  The firmware payload is a blob being moved using CoAP. 
Internal structure of that blob in not CoAP's concern.  Place whatever 
internal structure you like within the blob.  Image, checksum, digital 
signature, etc.

Maybe not appropriate for CoAP solutions, but one example of a blob 
container can be had at...

https://tools.ietf.org/html/rfc5652

Cheers

On 2/25/2015 10:40 AM, Julien Vermillard wrote:
> Hi,
> I use option #1: the binary is encapsulated inside a container 
> containing a checksum and/or RSA signature for identifying the binary.
> HTH
> Julien
>
> On Tue, Feb 24, 2015 at 3:48 PM Klaus Hartke <[email-masked] 
> <mailto:[email-masked]>> wrote:
>
>     Hi Maciej,
>
>     On 24 February 2015 at 15:27, Maciej Wasilak <[email-masked]
>     <mailto:[email-masked]>> wrote:
>     > Dear all,
>     >
>     [email-masked] <mailto:[email-masked]>