[Suit] Parameters and Commands

Brendan Moran <Brendan.Moran@arm.com> Thu, 27 February 2020 13:44 UTC

Return-Path: <Brendan.Moran@arm.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 0A4943A0908 for <suit@ietfa.amsl.com>; Thu, 27 Feb 2020 05:44:54 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=armh.onmicrosoft.com header.b=x7xiB19K; dkim=pass (1024-bit key) header.d=armh.onmicrosoft.com header.b=x7xiB19K
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 wqXakD3HfQc9 for <suit@ietfa.amsl.com>; Thu, 27 Feb 2020 05:44:51 -0800 (PST)
Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2060.outbound.protection.outlook.com [40.107.20.60]) (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 7DD023A095C for <suit@ietf.org>; Thu, 27 Feb 2020 05:44:51 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4zLqiCb0hHlrN7wjwz21ZOu4eqN3wJTP96OdUIy0F7g=; b=x7xiB19KOD4eIzWb6IMblhhmn4EuDsjuWKDTlTumCoxDbs7SpiN974zXJOq9zAB55AouWXJa3K+FAuOgVm3uJbwNDW3inOSy2zkkIFWZIWPFPeS8D1OsOqti/h7Bv8LIlyZRX/gHivqdnIcq9xgQwlxesnCBAbJcHaxT6lC855c=
Received: from DB6PR0801CA0066.eurprd08.prod.outlook.com (2603:10a6:4:2b::34) by DB8PR08MB5482.eurprd08.prod.outlook.com (2603:10a6:10:116::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2750.21; Thu, 27 Feb 2020 13:44:49 +0000
Received: from DB5EUR03FT041.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e0a::205) by DB6PR0801CA0066.outlook.office365.com (2603:10a6:4:2b::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2772.15 via Frontend Transport; Thu, 27 Feb 2020 13:44:49 +0000
Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; ietf.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;ietf.org; dmarc=bestguesspass action=none header.from=arm.com;
Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com;
Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT041.mail.protection.outlook.com (10.152.21.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2772.15 via Frontend Transport; Thu, 27 Feb 2020 13:44:49 +0000
Received: ("Tessian outbound 846b976b3941:v42"); Thu, 27 Feb 2020 13:44:49 +0000
X-CheckRecipientChecked: true
X-CR-MTA-CID: b9867f0b0a0deee6
X-CR-MTA-TID: 64aa7808
Received: from 294d7db1044d.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 7238CB3B-F602-4EF5-B1C4-70869901C79A.1; Thu, 27 Feb 2020 13:44:43 +0000
Received: from EUR03-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 294d7db1044d.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 27 Feb 2020 13:44:43 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H702+fNRQ9xnNuYP/yXAt2YvRIxfXtsfYwMicModLcSEgLrUHrvQG2BC2wYeUMbus8GznnI7DeO2J4BpbPXhH42yFbWSDmjE0GCxqivcPQBFzoWe77V/K5bdACg9HdMSndrWwCayblF+X1mChixbmF57k6xSRhTJBd5i+y82wpvp4+Q4eVXIM2SM1JuA/xpuLEdjyaWnFGd6GdeYe1Skcz9rGegyLfs0gIMYvi850UPGW/2Yi6VZG5qxQqZkWh7H+qh5YeZcu0A5mF3EFw1B0QPTu4NK1IoNATApxfNZtGs6bjo22V5OfeZBpmNFaC2L53Mo6orcFP7pwy01IZqaDA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4zLqiCb0hHlrN7wjwz21ZOu4eqN3wJTP96OdUIy0F7g=; b=ZUhzXWUB5iVEWt0QJHrQ4XPDx8+ElGUR7yaCAT2+NPqA+aHs5NHzZl3ExfBc+hVxi0C88xdlhwuTqk049Ye9KW5j44y/vHztf6Xyt3gC4JzLDB9dcaVIyhe+bhlTsbEVTJcJFmJ/evspHK+rGZUZolA+kmMIsNH2ymIqq+wXBe9cJ+AcHGx5lrOEHodZTTkrtCJ5QG8HqODWreE514UhinOFwAZWQpeRkeDGP44BCkC142icPHJ3aCzgzYspLEzr9pbVORfzTU6QjZztyW70qBZ0lL5nVpAN8O5O20R0ms6f06UBVFbKp93MBKAlHVCX5cRnbz1KoxXBlc0gYyQwjw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4zLqiCb0hHlrN7wjwz21ZOu4eqN3wJTP96OdUIy0F7g=; b=x7xiB19KOD4eIzWb6IMblhhmn4EuDsjuWKDTlTumCoxDbs7SpiN974zXJOq9zAB55AouWXJa3K+FAuOgVm3uJbwNDW3inOSy2zkkIFWZIWPFPeS8D1OsOqti/h7Bv8LIlyZRX/gHivqdnIcq9xgQwlxesnCBAbJcHaxT6lC855c=
Received: from AM6PR08MB4738.eurprd08.prod.outlook.com (10.255.99.138) by AM6PR08MB4817.eurprd08.prod.outlook.com (10.255.96.204) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2772.14; Thu, 27 Feb 2020 13:44:42 +0000
Received: from AM6PR08MB4738.eurprd08.prod.outlook.com ([fe80::7960:8949:a754:4288]) by AM6PR08MB4738.eurprd08.prod.outlook.com ([fe80::7960:8949:a754:4288%7]) with mapi id 15.20.2750.024; Thu, 27 Feb 2020 13:44:42 +0000
From: Brendan Moran <Brendan.Moran@arm.com>
To: suit <suit@ietf.org>
CC: Emmanuel Baccelli <Emmanuel.Baccelli@inria.fr>, Koen Zandberg <koen@bergzand.net>
Thread-Topic: Parameters and Commands
Thread-Index: AQHV7XQQQA0i3AEJykizdfj2dpCACQ==
Date: Thu, 27 Feb 2020 13:44:42 +0000
Message-ID: <27913A6B-F42C-4AA9-8A7A-64B1D546C13C@arm.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-mailer: Apple Mail (2.3608.60.0.2.5)
Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Brendan.Moran@arm.com;
x-originating-ip: [217.140.106.51]
x-ms-publictraffictype: Email
X-MS-Office365-Filtering-HT: Tenant
X-MS-Office365-Filtering-Correlation-Id: 6e5cc825-21a2-498a-a4ee-08d7bb8b36ea
X-MS-TrafficTypeDiagnostic: AM6PR08MB4817:|DB8PR08MB5482:
X-Microsoft-Antispam-PRVS: <DB8PR08MB548216DC76C73392850D2AA5EAEB0@DB8PR08MB5482.eurprd08.prod.outlook.com>
x-checkrecipientrouted: true
nodisclaimer: true
x-ms-oob-tlc-oobclassifiers: OLM:10000;OLM:10000;
x-forefront-prvs: 03264AEA72
X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4636009)(396003)(366004)(346002)(136003)(376002)(39860400002)(199004)(189003)(6506007)(26005)(6916009)(6512007)(186003)(6486002)(7116003)(2616005)(33656002)(4326008)(2906002)(3480700007)(316002)(64756008)(91956017)(8936002)(66946007)(478600001)(71200400001)(8676002)(66476007)(76116006)(86362001)(36756003)(81166006)(66556008)(81156014)(54906003)(66446008)(5660300002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR08MB4817; H:AM6PR08MB4738.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts)
X-MS-Exchange-SenderADCheck: 1
X-Microsoft-Antispam-Untrusted: BCL:0;
X-Microsoft-Antispam-Message-Info-Original: MNF3SX9Jf4nLnnvQWW0k9RnKOxr3tdfsakYVytIPCK6usdHJJQKp/E5DifWbR2DezeLPjjLweC4tjCtD3Z2+zVj16DE2bekbdxgK1V18w8S4qI7M27i9gAqWoDX/VhxUwymr0aFvx3z2TYaTd4MSnAJJ48MpTsXYbgcc2XfikIgyLWvoPgRnZm3Uv3LUSowlY+n+V6Pxu8p00DnLGdtFbyLEKke1EwKs2jwMA8Ddzn0hOtboStSeTDkkgbsAyeeiQ2tgWyyWTqrM/NR2FZ55ZIrkhzBOcv08Wt1/AGi/K11Aa4aYqwHZ1bJTMI+pqCGfMYNCkCcMcBFREIRnCdl3KO4XT/v8Tdf9N6a0F9x/Y3Wo76eH+QzvBmdQX4H5FJCiW9blWl+iBOaO7YCNs6rPWOreti5XYjTrM4YueE8nxdAVPMmX3gArdUyt+4WCt9Mx
x-ms-exchange-antispam-messagedata: lQNwkAMmKfYzDqEvLFcOWjW/ayGoFt6azlxWP9JH3lCCsvYNq3xvxJHi1ELwkmqC/EmT85JHb+zVmufYA8Tk+yKOjvkQiXZN4kuzEy9DuZdfm6QGT8Z/o81gy/25eIeANA7fmzBAbW5P0yV6DPWQXg==
x-ms-exchange-transport-forked: True
Content-Type: multipart/alternative; boundary="_000_27913A6BF42C4AA98A7A64B1D546C13Carmcom_"
MIME-Version: 1.0
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4817
Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Brendan.Moran@arm.com;
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT041.eop-EUR03.prod.protection.outlook.com
X-Forefront-Antispam-Report: CIP:63.35.35.123; IPV:CAL; SCL:-1; CTRY:IE; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(136003)(376002)(396003)(39860400002)(346002)(189003)(199004)(2616005)(107886003)(316002)(8676002)(81156014)(81166006)(2906002)(6486002)(4326008)(7116003)(356004)(86362001)(3480700007)(54906003)(8936002)(6506007)(478600001)(33656002)(5660300002)(186003)(6512007)(336012)(45080400002)(70586007)(26005)(36756003)(6916009)(70206006)(33964004)(26826003); DIR:OUT; SFP:1101; SCL:1; SRVR:DB8PR08MB5482; H:64aa7808-outbound-1.mta.getcheckrecipient.com; FPR:; SPF:Pass; LANG:en; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; MX:1; A:1;
X-MS-Office365-Filtering-Correlation-Id-Prvs: 81299aca-bd27-4417-6fa9-08d7bb8b32f9
X-Forefront-PRVS: 03264AEA72
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: m9FG5+LfBPU2/jrCs64yi3otEu1KxRVSZuOP/kqvL9qZWonqkxeJkyxtTJDIWGTAQfaEdzK2/8XxSlOo6N/D35CJ6uGbL3ylKLWWkNaNgAT+qTDaqgscNfvqGsQ5DgOD0DVEh2ML1Q1+QXQ46gKBV5+w1cdF4bsBKfspnrJOqPRxagAFkv1MSAHA6QWse1k0brDNkwF/6wDQmzZrPD43IyI+ATAVXWx4X53KfjrjoTinsVaaicXys2G5hK8Wz6l0y266Nx1FMUsvRnBCYOKTAxhvHzof9AAQuiBgawpWPje3SkpAYJKaVZT5GzmHIJMBxz1zWPp1O6FielzC9C/hQ59ub88VzsLkgWD/qpkSDR5DKx7trDRh5VvrAm1QaFXx0ivN88shDxy2FgA4wpyMhy+6J0cQEWzkJPjuD8eeWmmk2/CZQ9i5k43etfTE028D
X-OriginatorOrg: arm.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Feb 2020 13:44:49.2269 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: 6e5cc825-21a2-498a-a4ee-08d7bb8b36ea
X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com]
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB5482
Archived-At: <https://mailarchive.ietf.org/arch/msg/suit/AU8wWOHp0oJuloBiKB0vg-64BTg>
Subject: [Suit] Parameters and Commands
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: Thu, 27 Feb 2020 13:45:00 -0000

During the hackathon, I discovered that my examples and my manifest generator tool are generating incorrect sequences for testing vendor ID and class ID.

There are currently two ways to handle commands (conditions or directives):

  1.  The command consumes an argument (that is the value that follows the command's key)
  2.  The command consumes a parameter (that is a value set by the “set-parameters” or “override-parameters” commands)

This duality led to my error in setting up the Vendor and Class ID tests in the demo code.

The reasons for each mode are:

  1.  Command consumes an argument
     *   Encoding is more compact (encoding via parameters takes 2-3 more bytes, depending on the situation).
     *   Less storage needed (the argument is consumed immediately)
     *   Does not require matching parameter key
     *   More explicit association between command and argument
  2.  Command consumes a parameter
     *   More compact when the parameter is used more than once (e.g. image digest)
     *   Allows override by dependencies, when set-parameters is used


We’ve talked before about “only one way to do things” and I think I can see a path to making that the case here. Here is my proposal:

Commands consuming a parameter are absolutely necessary due to override and deduplication concerns. Conditions testing against an argument are convenient and more explicit. Therefore, harmonising around a single option probably means that we have to select parameters instead of arguments:


  1.  Eliminate arguments from most commands (see below)
  2.  Match most parameter keys with command keys to simplify the association, make “arguments” more explicit

Only these commands require arguments, since they either deal with setting parameters, setting parameter scope, or with flow control, which requires nested command sequences.


  *   Set Component Index
  *   Set Dependency Index
  *   Set Parameters
  *   Override Parameters
  *   Try-each
  *   Run Sequence
  *   For Each Component

This leaves the majority of commands with NUL arguments. This is actually quite useful for another feature.

We have also discussed the possibility of defining attestation policy within SUIT. This would mean that we need flags to indicate to the parser which measurements should be reported. For example, a Vendor ID, an image digest, or a component offset might need to be reported in the attestation report. Each of these is checked by a condition. Each of those conditions will consume a parameter under this model. Then, the argument can indicate: report a measurement, do not report a measurement, report a measurement only if comparison is successful, or perhaps other attestation-related policies. Bear in mind that attesting a failed condition may be helpful for attesting why a manifest has failed, as we discussed in the hackathon and virtual interim meeting.

If we are making the majority of commands are using parameters instead of arguments, this becomes trivial: the arguments are replaced with attestation policy arguments. This allows us to tell the attestation engine explicitly what to report from the manifest, which allows secure, dynamically updatable attestation policy.

This doesn’t introduce a substantial change to either the parser or the format. If there is some appetite for simplifying the correlation between commands and parameters, I think it might make sense to spend some effort aligning parameter keys with command keys. This could simplify the parser by allowing a generic parameter lookup to be done in one place, rather than by each handler.

Best Regards,
Brendan
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.