Re: [Rats] [sacm] CoSWID and EAT and CWT

Laurence Lundblade <lgl@island-resort.com> Thu, 28 November 2019 21:53 UTC

Return-Path: <lgl@island-resort.com>
X-Original-To: rats@ietfa.amsl.com
Delivered-To: rats@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 63B80120033 for <rats@ietfa.amsl.com>; Thu, 28 Nov 2019 13:53:34 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.896
X-Spam-Level:
X-Spam-Status: No, score=-1.896 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] autolearn=unavailable autolearn_force=no
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 ihqPixlxffS2 for <rats@ietfa.amsl.com>; Thu, 28 Nov 2019 13:53:31 -0800 (PST)
Received: from p3plsmtpa06-04.prod.phx3.secureserver.net (p3plsmtpa06-04.prod.phx3.secureserver.net [173.201.192.105]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E474C1207FC for <rats@ietf.org>; Thu, 28 Nov 2019 13:53:30 -0800 (PST)
Received: from [10.182.0.86] ([45.56.150.186]) by :SMTPAUTH: with ESMTPA id aRj7i6CsW1GdmaRj8iKWKA; Thu, 28 Nov 2019 14:53:30 -0700
From: Laurence Lundblade <lgl@island-resort.com>
Message-Id: <F2BA51D5-25B4-470D-8BED-BDCFCAF17BC9@island-resort.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_8AD69A77-7450-4536-9A63-B9B1BAF7C5B9"
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\))
Date: Thu, 28 Nov 2019 13:53:29 -0800
In-Reply-To: <BB362412-1C0B-4BF6-99FF-6BE210C939B5@arm.com>
Cc: Thomas Fossati <Thomas.Fossati@arm.com>, "rats@ietf.org" <rats@ietf.org>, Hannes Tschofenig <Hannes.Tschofenig@arm.com>, Henk Birkholz <henk.birkholz@sit.fraunhofer.de>, "sacm@ietf.org" <sacm@ietf.org>
To: Adrian Shaw <Adrian.Shaw@arm.com>
References: <2A12D8A3-722A-44D1-8011-218C89C8B50B@island-resort.com> <VI1PR08MB5360236E3583EBD3A78085EDFA490@VI1PR08MB5360.eurprd08.prod.outlook.com> <60C4E362-02FD-4DDF-BFB4-D09D358282D4@arm.com> <b5bca8a7-7e7c-4432-a1be-6cf1fc21c352@sit.fraunhofer.de> <05D67FD7-B95E-4716-B844-2F2F3A09030F@arm.com> <BB362412-1C0B-4BF6-99FF-6BE210C939B5@arm.com>
X-Mailer: Apple Mail (2.3445.104.11)
X-CMAE-Envelope: MS4wfC5z4z7rp4m0tq635uYJNp3i3uNUE0q5WwpuNRII+iHO91hejWk1Vzq85oz5pe0MpBKYsEmcDsn7tXlGm/oqM/n0VzvfYR5Gj83bjfkNE1TW7GT7IXRQ YMpGNhnE29DqQwBd1IVa73qdSCaWHRv3b8j530nZBdZ9ErFRpFponjeNQBF4hB+Z8hDGtXkgWcT4j7EwDkJ9DGZTEzb5+znsGuSpRVrUKb32Wz9qOaW3sNIt 4dzzD+g7OklEqkvcofP8TTfKc6u9iyS6y73m8ZANBnPaXUJ9lFAz4dE66+WQxmHU1G+D9spCH8qgofYyA8LSByioQwifRTHoTNBrA0id4KM=
Archived-At: <https://mailarchive.ietf.org/arch/msg/rats/hkbIS7EY1tBD3KgpqdBDYw5d3i0>
Subject: Re: [Rats] [sacm] CoSWID and EAT and CWT
X-BeenThere: rats@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Remote Attestation Procedures <rats.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/rats>, <mailto:rats-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/rats/>
List-Post: <mailto:rats@ietf.org>
List-Help: <mailto:rats-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/rats>, <mailto:rats-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 28 Nov 2019 21:53:34 -0000

I am very much agreement with Adrian.

SUIT is far from wide adoption, yet billions of devices have verified/secure boot* and do a good job of SW update. Some of these devices like mobile phones have very complex boot and multifaceted SW updated, other are very simple lost cost single-use devices.

For many use cases, a simple EAT with only a few claims will suffice. Maybe the only claims are the UEID and the version of THE software for the device because it only has one SW component. Only the mandatory CoSWID fields, plus version, are filled in for the single SW component. Such an EAT would have 8 claims as in the example below. It is critical IMO that EAT keeps tokens for these simple use case simple. The minimum CoSWID is 5 claims right now. Wouldn’t want to increase that.

Constructing the payload for this EAT is pretty simple. The only claim that varies from one token to the next is the nonce. The CoSWID part could be a hard-coded byte array containing the encoded CBOR since it will never change. The harder part of EAT here will be COSE and signing key set up, not claim construction.

Importantly, the boot SW of this simple device need not be touched. The EAT implementation automatically gets the security from whatever boot security it has. 

Even on a complex device such as one with a TEE and TA’s, the TA’s most likely get all the security from the boot sequence and TEE OS without having to modify the boot sequence or the TEE OS (I am quite sure of this having done it for Qualcomm's Hardware Token here <https://www.qualcomm.com/products/features/mobile-security>).

LL


* Generally agree with Monty’s recent definition of verified boot; some people call this secure boot


18(
    [
        / protected parameters, bstr wrapped / << {
            / alg / 1: -7 / ECDSA 256 /
        } >>,
        / unprotected parameters / {
            / kid / 4: h'4173796d6d657472696345434453413
                          23536' / 'AsymmetricECDSA256' /
        },

        / COSE payload, the EAT, bstr wrapped / << {
            / nonce  /
            7:h'948f8860d13a463e8e',
    
            / UEID /
            8:h'0198f50a4ff6c05861c8860d13a638ea4fe2f',
    
            / The CoSWID /
            21: {
           
                / tag-id, globally unique identifier for the software component /
      0: "trustedfirmware.org/TF-M <http://trustedfirmware.org/TF-M>",

      / tag-version (here: 0, i.e. initial tag) /
      12: 0,

      / software component name /
      1: "TF-M",

      / version of the software component /
      13: "1.0.0-rc1+build.123",


      / entity, i.e. organizations responsible for producing or releasing
        the software component /
      2: {
          / entity name /
          31: "Linaro Limited”,

    / entity role (here: software creator) /
    33: 2,

           },

       }
   } >>,

   / signature / h'5427c1ff28d23fbad1f29c4c7c6a555e601d6fa29f
                   9179bc3d7438bacaca5acd08c8d4d4f96131680c42
                   9a01f85951ecee743a52b9b63632c57209120e1c9e
                   30'
]
)




> On Nov 27, 2019, at 9:13 AM, Adrian Shaw <Adrian.Shaw@arm.com> wrote:
> 
> While there is some synergy with the SUIT definition, I’m unconvinced that it should be the way to express a software component metadata. Firstly, there are legacy systems without SUIT that would want to use EAT, and such a dependency would make it hard for incremental adoption. Secondly, not all the data from the SUIT manifest is needed for this claim.
> 
> Adrian
> 
>> On 27 Nov 2019, at 16:59, Thomas Fossati <Thomas.Fossati@arm.com> wrote:
>> 
>> Hi Henk
>> 
>> Thanks very much for your input.
>> 
>> On 27/11/2019, 13:24, "Henk Birkholz" <henk.birkholz@sit.fraunhofer.de> wrote:
>>> yes there are ways to deal with firmware in SWID, namely the resource
>>> type (index 19) in the set of SWID resource-collection [1] in
>>> combination with the rel type (index 40) entries.
>>> 
>>> This way, you would not have to use filesystem-items, but this way is
>>> also a bit clunky and would require an informational guidance document
>>> describing how to use *SWID for that.
>> 
>> That's interesting because initially I also tried to use the resource
>> type -- which looked like the less wrong among all the available types
>> in the resource collection.  However it wasn't clear to me how to
>> associate a checksum to the component, hence I went for the
>> filesystem-item.  Maybe I was just looking in the wrong place or maybe,
>> as you say, there's a magic firmware recipe that's worth documenting
>> here.
>> 
>>> There are some quite smart ways to do that actually with
>>> filesystem-items, but I think it is more feasible to use a SUIT
>>> manifest here to describe everything relevant to the "firmware thingy"
>>> and then put a CoSWID into the SUIT manifest's outer wrapper [2] that
>>> then represents the rest of the semantics that is not covered by the
>>> manifest but by CoSWID. This method is fine, as the COSE envelope
>>> around the EAT will make tempering with the outer wrapper of the SUIT
>>> Manifest evident.
>>> 
>>> I think that is a more elegant way to do it, actually, and the reason
>>> why issue #46 in the EAT repo proposes to define a Claim to include a
>>> SUIT Manifest in an EAT, too.
>> 
>> I'll look into this, thanks for the pointer.
>> 
>> Stepping back for a second and looking from the perspective of my
>> immediate requirement (i.e., "Is it possible to translate PSA's software
>> component claim using purely EAT constructs?"), ideally I'd like to have
>> something that is expressive enough to encode my semantics (i.e.: SW
>> component name, version, signer and measurement) without being overly
>> complex.
>> 
>> So my knee-jerk reaction is if that implies pulling a dependency on
>> SUIT maybe it's a bit too much?  But I confess haven't yet looked at
>> the details of your proposal nor I can claim enough SUIT-foo to really
>> grok the complexity involved.  As said, I'll have a look shortly.
>> 
>> cheers!
>> 
>> 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.
>> _______________________________________________
>> RATS mailing list
>> RATS@ietf.org
>> https://www.ietf.org/mailman/listinfo/rats
> 
> 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.
> _______________________________________________
> RATS mailing list
> RATS@ietf.org
> https://www.ietf.org/mailman/listinfo/rats