Re: [Suit] Fwd: Firmware Update Paper

Szymon Słupik <simon@silvair.com> Wed, 04 December 2019 00:56 UTC

Return-Path: <simon@silvair.com>
X-Original-To: suit@ietfa.amsl.com
Delivered-To: suit@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E073B120096 for <suit@ietfa.amsl.com>; Tue, 3 Dec 2019 16:56:26 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.898
X-Spam-Level:
X-Spam-Status: No, score=-1.898 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=silvair-com.20150623.gappssmtp.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oZutFrwsKPkE for <suit@ietfa.amsl.com>; Tue, 3 Dec 2019 16:56:23 -0800 (PST)
Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 2F8BA12000F for <suit@ietf.org>; Tue, 3 Dec 2019 16:56:23 -0800 (PST)
Received: by mail-lf1-x136.google.com with SMTP id y19so4619788lfl.9 for <suit@ietf.org>; Tue, 03 Dec 2019 16:56:23 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silvair-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dVOt6TSzhQJ63rFuPEgciPC1iRYcNrVZAMhZaQpW2es=; b=xacR9hlltCTkE8eNsRsRhhUrv8tiQ0txApADOYYMJ/KKwVYEynp1ApN5TEZa3RTsEk Ciju9kb3TPrJEUw8l/5a1RAE9r4LQRXK2j+NMwslz7OGVO3sEy4D9N+1w6x5BoSQRdLb f7aQkIEqXE/mHObTfRRms7Fl9zGunRRA8mtwv26mNTMFEoLYnk4mtZ4MVNKVan618FPy QMutd5HRNKsvdTH5/aKM2XqPTaLQhevUY5dq0IuBVos5Oaxr/ZeBNDvQ4cKpVKzfQejk aOVG1grn7tUEtIOYwi+YCCf20umvLXg3zsbyT4lweQww9dB/8wf2eVk35qSY8Lz03b86 LO9A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dVOt6TSzhQJ63rFuPEgciPC1iRYcNrVZAMhZaQpW2es=; b=IRxK1xSBA73BCU9GwmwEHqdydwLz0OCM6RjTR2Cm6CmPu5/k06NrR24HNLbSnUc0Id LAG9iYqKbfJMHwbqU7ycdj2SwLJceHnRMiE7uVWuAdHXgF+up15Af1hvYrdRtSJ9eXAg oh1oYOsuL2qPL9hEIjlK0VGmTDVCTRjSv6DBrfUISj6DDLCz/4b9vgbHcIZruLY/c5xI 3Bz7PU0emvibV93w+JCar8kuXcx3Y6w7bZ+oPdcWqH6qYMRWTkRLhHchyMJaPAO1wDs0 eJnyIRa4kp/iTXQPWMKsXbS+YN/xfZmKpjSSHKPA6ZKCdBs/SlDWyNx2LmjupUbwK63m Vpxw==
X-Gm-Message-State: APjAAAUXPSAy5PkKKpfFHTj2gxPFD2KHDKHYeXlA+oCNyagUrcEKIOMQ JS82R2JAHZBS6+zXH7l3GlHHPH86ul6x/R9L47wsEw==
X-Google-Smtp-Source: APXvYqxEkQ2UfGUIJnQencG8s+u26UmShxUtTQ4s54YFvwnt+GmQtq88qDyWULwSCHiaR0EfHEZBSMRd0aP5Gjo7Bb0=
X-Received: by 2002:ac2:48bc:: with SMTP id u28mr398984lfg.161.1575420981144; Tue, 03 Dec 2019 16:56:21 -0800 (PST)
MIME-Version: 1.0
References: <VI1PR08MB53600B1D1A194F49B67B90DFFAC60@VI1PR08MB5360.eurprd08.prod.outlook.com> <20191127203651.GA117656@davidb.org> <CANK0pbaWkn7w2swRgkOqsTubE1os=rDo2BLjrTZ5eW6ePv3WnA@mail.gmail.com> <20191129183627.GA16289@davidb.org> <DB6PR0801MB1879D9742622EA0AE08A8B72EA430@DB6PR0801MB1879.eurprd08.prod.outlook.com> <CABNHR1yEFvgEzHjBhpqTW-FX+LQTVYuSJE_9SP9OMwzjWsdORQ@mail.gmail.com> <CANK0pbaf8TTtMOSKHD0D-73+MCzSdjk7p+6hVO0WzpSxhF2fVg@mail.gmail.com> <CABNHR1z4N=uH9d5DvyYi17DCULqu3T6Ve9k-_EJr-37zUjF-uw@mail.gmail.com> <CANK0pbYGbzu8VAr7ZuzUOY1yQ75qkMKQ6PAncZCfkH2=RZWNUQ@mail.gmail.com>
In-Reply-To: <CANK0pbYGbzu8VAr7ZuzUOY1yQ75qkMKQ6PAncZCfkH2=RZWNUQ@mail.gmail.com>
From: =?UTF-8?Q?Szymon_S=C5=82upik?= <simon@silvair.com>
Date: Wed, 4 Dec 2019 09:55:44 +0900
Message-ID: <CABNHR1wOXx6QRYMMFgnNs12qtc5Ofs8MdR-Oe=d4KRCzXtaiQA@mail.gmail.com>
To: Emmanuel Baccelli <Emmanuel.Baccelli@inria.fr>
Cc: suit@ietf.org
Content-Type: multipart/alternative; boundary="000000000000f3ffc20598d64786"
Archived-At: <https://mailarchive.ietf.org/arch/msg/suit/1_MWbC_H5d0JyugFwhvavOEUzMs>
Subject: Re: [Suit] Fwd: Firmware Update Paper
X-BeenThere: suit@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Software Updates for Internet of Things <suit.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/suit>, <mailto:suit-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/suit/>
List-Post: <mailto:suit@ietf.org>
List-Help: <mailto:suit-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/suit>, <mailto:suit-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 04 Dec 2019 00:56:27 -0000

Hi Emmanuel,

Thanks fo the detailed info.

Some comments of mine in line below

In the experiment you point out (reported in Table 3 and 4 in [1]) the
> transfer of the firmware binary + the manifest (totaling ~35kB) took about
> 11 seconds.
>

[SS] yeah... that 35kB is a bit unrealistic... for production stacks
(including application functionality) we see the FW sizes (uncompressed) to
be in 200kB range. But I take it the times scale linearly, so for 200kB the
transfer time would be about 1 minute. Have you considered the link
saturation during the transfer? In many cases you do not want the transfer
to [significantly] affect the operation of the network, so a strategy to
reduce the transfer duty cycle may be prudent.


> The 802.15.4 radio was used in 2.4GHz band in default mode (we used an
> off-the-shelf SAMR21 board [2] for this experiment).
>

[SS] And that was a single-hop, right? Have you considered multi-hop
transfers over a mesh network?


> The signature verification was performed with the HACL library (ed25519)
> on an ARM Cortex-M0+ and took approx. 7 seconds -- so yes, pretty long
> indeed, in this case.


[SS] Does that scale linearly with image size? Do memory requirements (RAM
usage) increase with the image size?

Best
Simon

On Tue, Dec 3, 2019 at 10:05 PM Emmanuel Baccelli <
Emmanuel.Baccelli@inria.fr> wrote:

> Hi Szymon
>
> below some more information, since you ask ;)
>
> In the experiment you point out (reported in Table 3 and 4 in [1]) the
> transfer of the firmware binary + the manifest (totaling ~35kB) took about
> 11 seconds.
> The 802.15.4 radio was used in 2.4GHz band in default mode (we used an
> off-the-shelf SAMR21 board [2] for this experiment).
> The signature verification was performed with the HACL library (ed25519)
> on an ARM Cortex-M0+ and took approx. 7 seconds -- so yes, pretty long
> indeed, in this case.
>
> For other microcontrollers and/or with other signature schemes or
> alternative implementations/libraries, the speed & memory footprint we
> measured are compared in Tables 8, 7 and 6 (see [1])..
>
> As observed in the paper:
>     - the time spent on signature verification heavily depends on the type
> of microcontroller, on the signature scheme, and on the specific
> implementation;
>     - crypto's footprint in Flash memory can significantly impact the size
> of update binaries which need to be transferred over the network.
>
> Cheers,
>
> Emmanuel
>
> [1] https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=8725488
> [2] https://github.com/RIOT-OS/RIOT/wiki/Board:-Samr21-xpro
>
> On Tue, Dec 3, 2019 at 9:53 AM Szymon Słupik <simon@silvair.com> wrote:
>
>> Thanks Emmanuel,
>>
>> So the PHY data rate was 250kb/s, right?
>>
>> WRT Figure 3 (tIme spent) 38% is signature verification and 60% is
>> transfer. That seems like signature verification is taking a huge amount
>> of time... or was it a different data rate?
>>
>> Best
>>
>> Simon
>>
>>
>> On Tue, Dec 3, 2019 at 5:37 PM Emmanuel Baccelli <
>> Emmanuel.Baccelli@inria.fr> wrote:
>>
>>> Hi Szymon
>>>
>>> in the paper [1] for our experiements we used CoAP as transport, over
>>> UDP, 6LoWPAN and IEEE 802.15.4 low power radio.
>>>
>>> However the open source RIOT implementation which stemmed out also works
>>> out-of-the-box on other link layers too (among others BLE [3], wired [1]
>>> ...).
>>>
>>> Cheers,
>>>
>>> Emmanuel
>>>
>>> [1] https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=8725488
>>> [2] https://github.com/RIOT-OS/RIOT/tree/master/examples/suit_update
>>> [3] https://github.com/RIOT-OS/RIOT/pull/12391
>>>
>>> On Tue, Dec 3, 2019 at 12:58 AM Szymon Słupik <simon@silvair.com> wrote:
>>>
>>>> Hi Hannes,
>>>>
>>>> What transport did you use? I could not find that information
>>>> explicitly stated in the paper...
>>>>
>>>> Thanks!
>>>>
>>>> Simon
>>>>
>>>> On Tue, Dec 3, 2019 at 12:20 AM Brendan Moran <Brendan.Moran@arm.com>
>>>> wrote:
>>>>
>>>>> Hi David,
>>>>>
>>>>> The manifest generator that I released previously was apache
>>>>> 2.0-licensed. I don't plan to change that for the next release. I'm also
>>>>> developing a manifest parser which I anticipate being released under the
>>>>> same license.
>>>>>
>>>>> Best Regards,
>>>>> Brendan
>>>>>
>>>>> -----Original Message-----
>>>>> From: Suit <suit-bounces@ietf.org> On Behalf Of David Brown
>>>>> Sent: 29 November 2019 18:36
>>>>> To: Emmanuel Baccelli <Emmanuel.Baccelli@inria.fr>
>>>>> Cc: suit@ietf.org
>>>>> Subject: Re: [Suit] Firmware Update Paper
>>>>>
>>>>> On Fri, Nov 29, 2019 at 12:46:42PM +0100, Emmanuel Baccelli wrote:
>>>>>
>>>>> > The open source implementation stemming from our paper [1] is
>>>>> embedded
>>>>> > into the RIOT operating system, which is indeed licensed with LGPL.
>>>>> > The implementation is compliant with draft-ietf-suit-manifest-00 and
>>>>> > has recently been merged into the main branch of RIOT, see [2].
>>>>> > Reuse and further contributions to this code base are welcome!
>>>>> >
>>>>> > Relicensing this code is not planned as far as I know (@ code
>>>>> co-authors:
>>>>> > please correct me if I'm wrong).
>>>>>
>>>>> This is fine.  The authors of the code are free to license the code
>>>>> however they wish.  I just want to make sure it is clear that this code is
>>>>> not useful as a general example, and if the SUIT wishes to have reference
>>>>> code, it will need to be licensed differently.
>>>>>
>>>>> > Related: we know of several companies, big and small, which use RIOT
>>>>> > in their IoT products (and thus use software including -- but not
>>>>> > limited to -- LGPL
>>>>> > code) and they are quite happy with it.
>>>>>
>>>>> I'm sure there are a few companies that are willing to use LGPL
>>>>> licensed embedded code, but their existence doesn't negate that there are
>>>>> large numbers of users who will be unable to use (or even look at) this
>>>>> code.
>>>>>
>>>>> One example is that both Zephyr and MCUboot are licensed under the
>>>>> Apache 2..0 license.  Most parties feel that the Apache 2.0 and the LGPL 2
>>>>> license are incompatible, and this code cannot be linked together into a
>>>>> single product.  Since I'd like to include SUIT support into MCUboot, this
>>>>> means I'll have to be doing an implementation from scratch.
>>>>>
>>>>> It's not my place to argue about the licensing of RIOT, but I would
>>>>> like to see reference code for SUIT that can be used as widley as possible,
>>>>> and the licensing of this particular code prevents it from being used for
>>>>> that.
>>>>>
>>>>> David
>>>>>
>>>>> _______________________________________________
>>>>> Suit mailing list
>>>>> Suit@ietf.org
>>>>> https://www.ietf.org/mailman/listinfo/suit
>>>>> IMPORTANT NOTICE: The contents of this email and any attachments are
>>>>> confidential and may also be privileged. If you are not the intended
>>>>> recipient, please notify the sender immediately and do not disclose the
>>>>> contents to any other person, use it for any purpose, or store or copy the
>>>>> information in any medium. Thank you.
>>>>>
>>>>> _______________________________________________
>>>>> Suit mailing list
>>>>> Suit@ietf.org
>>>>> https://www.ietf.org/mailman/listinfo/suit
>>>>>
>>>> _______________________________________________
> Suit mailing list
> Suit@ietf.org
> https://www.ietf.org/mailman/listinfo/suit
>