Re: [COSE] Update to the COSE-HPKE draft and new use case (?)

Hannes Tschofenig <Hannes.Tschofenig@arm.com> Fri, 22 April 2022 11:55 UTC

Return-Path: <Hannes.Tschofenig@arm.com>
X-Original-To: cose@ietfa.amsl.com
Delivered-To: cose@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9EB513A109F for <cose@ietfa.amsl.com>; Fri, 22 Apr 2022 04:55:18 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.905
X-Spam-Level:
X-Spam-Status: No, score=-1.905 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_BLOCKED=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, UNPARSEABLE_RELAY=0.001, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=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=ynTw0IKt; dkim=pass (1024-bit key) header.d=armh.onmicrosoft.com header.b=ynTw0IKt
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 qYBcbVe-kXl4 for <cose@ietfa.amsl.com>; Fri, 22 Apr 2022 04:55:13 -0700 (PDT)
Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on0618.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0d::618]) (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 9479C3A1518 for <cose@ietf.org>; Fri, 22 Apr 2022 04:55:13 -0700 (PDT)
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=LcWmhooNHKTnjgOCxm0Dp9+C1KKNdvbQJkLksDGeUU8=; b=ynTw0IKtgDlIuQTVO7WeydC1qV6rspvlKjjhfSOZsDr+TLPWmTEQGH1HQDJc6w6Eg54+8IO/oXmUUYsmqiTlDBiEzWkQMCbPoBisifOod0h/NOx2TnXQtJuloIaFd5e6+Rsb/o7cSC5xIN//4EUD5GIaSobNS1drZ+Rm2WRRO3s=
Received: from AM6P194CA0038.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:84::15) by AM6PR08MB4023.eurprd08.prod.outlook.com (2603:10a6:20b:a6::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.14; Fri, 22 Apr 2022 11:55:06 +0000
Received: from AM5EUR03FT050.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:84:cafe::1a) by AM6P194CA0038.outlook.office365.com (2603:10a6:209:84::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.13 via Frontend Transport; Fri, 22 Apr 2022 11:55:06 +0000
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass 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 AM5EUR03FT050.mail.protection.outlook.com (10.152.17.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.14 via Frontend Transport; Fri, 22 Apr 2022 11:55:06 +0000
Received: ("Tessian outbound 62985e3c34b6:v118"); Fri, 22 Apr 2022 11:55:06 +0000
X-CR-MTA-TID: 64aa7808
Received: from fb478382d834.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 10635349-F5A1-40BC-AE67-C908B648769C.1; Fri, 22 Apr 2022 11:55:00 +0000
Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id fb478382d834.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 22 Apr 2022 11:55:00 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n7J3ABscPeqqfJESphkQsDDzrGd1Ols1YkutC2i+qMv8Q14EJoHBNmDxyGxhzuEhFCjsfGd/JPY7Z3ufodMwEJH0lz24XqKUsNdOL2NZUR6b0DT7R21g5PNKpR1N/GyrVfqtH+M78OYJICmzEODZKKUtVpXMDhsWOMshQd5sQuvDEvBuir1pKAcmqa3UbD/6tv8xSERZoEVHzsjwnf7kxU5eYM/rnpQoyRXwaxivE8it1UI5BEbP2DFfgt9SuqrQn0/wWi4u4NWTjwEaxQO4rpFBvpDnfVxdcyUrI4rfG5+P9/LSqTVDl/pN+8Xph6ABoyACX+HR2SRHlaGpGv6wug==
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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=LcWmhooNHKTnjgOCxm0Dp9+C1KKNdvbQJkLksDGeUU8=; b=HE69O7cOrZniq+8hbLQszaOXMqHGwtHjiKQbb5MeWV7p+mFZfvgCZNecNpCedycAdIlr2PldsG8MZBe+tOSnlAJua+UChWfuTDHJsxZF4wjakY5GZVm+jk6Tn+r+72TojwrkKiufhS3JJ/5puDsXKFp0Qg5Gk5/7VaMdgBVrHer12QQliJT7ZcJ+80HBXe4f1GCFwoVjCNSwwtLc2RuWobvBIuvvHeaSvTp/iu84ljLgd6+qjM7QJQUtHlAurLZeSrJGgtN60mbxTxtP2hBocbsKxh4VJ6QJRu27kmO09Hj6GlPXrDvpjdCqcSI16HbTi2bXkTtnQyuvRgjELKxVBw==
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=LcWmhooNHKTnjgOCxm0Dp9+C1KKNdvbQJkLksDGeUU8=; b=ynTw0IKtgDlIuQTVO7WeydC1qV6rspvlKjjhfSOZsDr+TLPWmTEQGH1HQDJc6w6Eg54+8IO/oXmUUYsmqiTlDBiEzWkQMCbPoBisifOod0h/NOx2TnXQtJuloIaFd5e6+Rsb/o7cSC5xIN//4EUD5GIaSobNS1drZ+Rm2WRRO3s=
Received: from DBBPR08MB5915.eurprd08.prod.outlook.com (2603:10a6:10:20d::17) by AM5PR0802MB2482.eurprd08.prod.outlook.com (2603:10a6:203:98::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.14; Fri, 22 Apr 2022 11:54:59 +0000
Received: from DBBPR08MB5915.eurprd08.prod.outlook.com ([fe80::5896:9eec:b108:9a3]) by DBBPR08MB5915.eurprd08.prod.outlook.com ([fe80::5896:9eec:b108:9a3%7]) with mapi id 15.20.5186.015; Fri, 22 Apr 2022 11:54:59 +0000
From: Hannes Tschofenig <Hannes.Tschofenig@arm.com>
To: "cose@ietf.org" <cose@ietf.org>
CC: Richard Barnes <rlb@ipv.sx>, Chris Wood <caw@heapingbits.net>
Thread-Topic: Update to the COSE-HPKE draft and new use case (?)
Thread-Index: AdgssVAELsxNzCHhRZOACjsjjmMa5gpjlqtw
Date: Fri, 22 Apr 2022 11:54:59 +0000
Message-ID: <DBBPR08MB59156170634FE8A6899F7323FAF79@DBBPR08MB5915.eurprd08.prod.outlook.com>
References: <DBBPR08MB5915DBF46D50E44049EEEB72FA019@DBBPR08MB5915.eurprd08.prod.outlook.com>
In-Reply-To: <DBBPR08MB5915DBF46D50E44049EEEB72FA019@DBBPR08MB5915.eurprd08.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ts-tracking-id: 58A85144843B324EBCC3815DDF86CE80.0
x-checkrecipientchecked: true
Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
X-MS-Office365-Filtering-Correlation-Id: 421cc0dd-b640-4643-35a4-08da2456f1ad
x-ms-traffictypediagnostic: AM5PR0802MB2482:EE_|AM5EUR03FT050:EE_|AM6PR08MB4023:EE_
X-Microsoft-Antispam-PRVS: <AM6PR08MB4023864E0DD4402CC8BA5CEEFAF79@AM6PR08MB4023.eurprd08.prod.outlook.com>
x-checkrecipientrouted: true
nodisclaimer: true
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam-Untrusted: BCL:0;
X-Microsoft-Antispam-Message-Info-Original: YdBKNOHKa4ozyICGQSI7QnkpBP90p1Z7eBZXZAIVQEgfINzwHWWwD+6l1N2M1nWyxYTAVAqIZ67EfnSTB/s1UAlZQTSVS1IFKAMeSZB7tCCqhFcdB9W5z9f6IJOZtD2arSYEuOyf6HlYm2KHh2KSsAZMkBf4YOJ0tARtH/gkurGD0D/pKdYylDZsoM0iE3l5JiZQxRZ1CBU4QgMIAvQhGgc6NXtJig+lbfjHNQgZxdzwH042r0ALVBz1LHfz4oivKADRhUeUXgQbIvgTIMWL9GKyocCjxi9mnkBIjAsfMiJVujtg0WcvJ3f3jjII2Gx8fu4fSb0Vj9guJDLx8nk9SXcVsSmlEMqkWkggP1tkxeDEcNdlKUbugwI7/M1mRVUKZQ6IdmlHYigHcCqjwHPlPFMLjTgqUBudDpu/D2UG0gV9uo01X6WEDN+4X2aw6U0n8SpshEXGIN1g5f0pn2x20kxk2Rh9z18D0oF95X4AdV7mUFkwLMKcX31V7Dc9AZ8vizPzmB+Aoy0LARfFJFn1LBt8RRt8TdRvaYRqi+gJsV6LOhT0DCCLlDu1IYohMfxjfC1ganxRZcZE2laTbHxHaxIGqDOouVQBlWcHU28W9GXBjkYGzJe+vN928RonTLNbpPCX5Y6EjAv0u1lviZ0W8AB7U/yhlL8tsh1snp+7H/DF/+9fvKbFLDT9OT2TGaXj3AFaUDPiihptSwq9LzjDpmght2S45PYIC1IfCv6dRRSC/h41jSgfi+/zRKalnT9I2wUvMbjGVd47QfRn+X5AHNKZLajSNEDwUJl+v+/RAhiv3f7hTu97X2zPZvtZxnTxkHnii0iWx+ulpDkVVdZTbQ==
X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DBBPR08MB5915.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(38070700005)(66446008)(64756008)(6916009)(54906003)(66946007)(38100700002)(71200400001)(9686003)(508600001)(316002)(122000001)(8676002)(166002)(4326008)(66476007)(76116006)(26005)(66556008)(55016003)(86362001)(52536014)(966005)(2906002)(8936002)(53546011)(186003)(83380400001)(5660300002)(6506007)(15650500001)(7696005)(33656002); DIR:OUT; SFP:1101;
Content-Type: multipart/alternative; boundary="_000_DBBPR08MB59156170634FE8A6899F7323FAF79DBBPR08MB5915eurp_"
MIME-Version: 1.0
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0802MB2482
Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT050.eop-EUR03.prod.protection.outlook.com
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id-Prvs: 80778862-a38f-4ee7-ec89-08da2456ed46
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: fcSRJ03KdKA+jW5CbM/QcbFTxuk1xep7fu86D4bdSc6z+Oq9MVl/+sbGPXa2lJgYWYSSF8+r1AyLAsFyxpEbzeSQLO0WlrxuejmZZhhnliBY3rFxsCeNJVfHqUmPkVV7aHnBnNrYpOMCCouU/Rv7t6amGU/cGBHSZ+Fmn75WS61BRXYwKFt+3BHUk5xIPvMZ/M630QBUrD/i0qWonDpEWbJPg6h5UP6M2tuEcxFqKTSC9S423JxH0/1xE0yAz5MWvIZSW/ZuutmdbU7tJ5+s1uNL4iJM/KXuQfCa2Zq1PUNzKcfa8PhnwnghNI1NxHnBCqe0n5p0FbcZ1A+mI93qERgD9YVnNGksk4Quh5eXGu1F7g0Oyd2wOYnAQIRV0mxhHoU9Wx5r15ILyTUufDigprevlpyewErjFUgTM8GaXSdQO0jnXjVrQ/F2fLmWEVOYiwSvlValGCvJWm1SEKm0U6oJJx23bg3m9GHryvYW/vMwp/KQYO3KzdZYu1b/pdqOHR68xr11WnDyDulmC2t/dwZK6wsTTlq48vtxoilU3XOMVp0aDCF9pIJL3n7u8KXh8q17S0ZUYF/K6N+7P6MPdeL7yNQj3Endyb7f9P2XG9FfSEJWPT0UB8fYiPBNTWpYApPI0fZDAFXOAaAiRh3f2TeqFS8tP6FJia/RXG/e+sRnFt/8a2QJTvCZXR0tE/dsXp/OTJ/1IoCZRNiqJ3epvGV/n/Bn4PIfIta4b18CTrahP6kLcAtvwTKjyqBpQBvkC+Q15hSDnzidIGHm1534qXvTGh4ixSTzyUL01Pqqdww=
X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230001)(4636009)(36840700001)(40470700004)(46966006)(2906002)(55016003)(6506007)(186003)(5660300002)(9686003)(36860700001)(966005)(53546011)(54906003)(316002)(82310400005)(6916009)(336012)(40460700003)(7696005)(166002)(86362001)(83380400001)(26005)(8936002)(356005)(4326008)(70586007)(70206006)(8676002)(15650500001)(33656002)(81166007)(107886003)(47076005)(508600001)(52536014); DIR:OUT; SFP:1101;
X-OriginatorOrg: arm.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Apr 2022 11:55:06.6013 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: 421cc0dd-b640-4643-35a4-08da2456f1ad
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-AuthSource: AM5EUR03FT050.eop-EUR03.prod.protection.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4023
Archived-At: <https://mailarchive.ietf.org/arch/msg/cose/1aVqxLOEk1EOWfH8UYjcjd0PEqk>
Subject: Re: [COSE] Update to the COSE-HPKE draft and new use case (?)
X-BeenThere: cose@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: CBOR Object Signing and Encryption <cose.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cose>, <mailto:cose-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cose/>
List-Post: <mailto:cose@ietf.org>
List-Help: <mailto:cose-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cose>, <mailto:cose-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 22 Apr 2022 11:55:19 -0000

Hi all

I have created a PR to add the use case described below into the COSE-HPKE draft:
https://github.com/cose-wg/HPKE/pull/5

I briefly talked about this topic at the IETF meeting in Vienna. Comments welcome!

Ciao
Hannes

From: Hannes Tschofenig
Sent: Monday, February 28, 2022 4:05 PM
To: cose@ietf.org
Cc: Richard Barnes <rlb@ipv.sx>; Chris Wood <caw@heapingbits.net>
Subject: Update to the COSE-HPKE draft and new use case (?)

Hi all,

Following the virtual interim meeting we have updated the draft and here is a recent snapshot:
https://github.com/cose-wg/HPKE/blob/main/draft-ietf-cose-hpke.txt

Here are the slides from that meeting:
https://datatracker.ietf.org/meeting/interim-2022-cose-01/materials/slides-interim-2022-cose-01-sessa-cose-hpke-00

At that meeting we made progress on two open issues:


  1.  Simplify the layering (to a 2-layer model), as proposed by Ilari.
  2.  Not to introduce new parameters for HPKE algorithms but instead have the HPKE authors to add a note to their draft so that new value registrations are automatically populated into the IANA COSE registry.

There are additional open issues described in the slide deck that require further discussion in the group. I will add those to the Github open issue list.

A new aspect raised by Richard and Chris (on CC), in an off-list review, is to add an even more "optimized" layering. As a reminder, they currently described layering (see link to the draft snapshot) encrypts a CEK via HPKE and places the encrypted CEK in layer 1. Then, the plaintext in layer 0 is encrypted using that CEK. This design was selected for use with firmware encryption in mind (plaintext is the firmware image in this case). Richard believes that there are use cases where this intermediate step is not needed. Consequently, there would be only one layer and HPKE is thereby directly applied to the plaintext.

I would like to bring this issue to the list for discussion since adding such functionality to the draft requires changes. Below is an example for you to visualize the result of what Richard&Chris are asking for (if I correctly understood it):

96(
    [
        << {1: -100} >>, / algorithm id -100 for HPKE/P-256+HKDF-256 and AES-128-GCM /
        {
            / ephemeral public key structure /
            -1: << {
                1: 2,
                -1: 1,
                -2: h'985E2FDE3E67E1F7146AB305AA98FE89B1CFE545965B6CFB066C0BB19DE7E489',
                -3: h'4AC5E777A7C96CB5D70B8A40E2951562F20C21DB021AAD12E54A8DBE7EF9DF10'
                } >>,
             4: 'kid-2'
        },
        / encrypted plaintext /
        h'4123E7C3CD992723F0FA1CD3A903A58842B1161E02D8E7FD842C4DA3B984B9CF'
    ]
)

(Ignore details - the high-level details matter here)

Thoughts?

Ciao
Hannes & Russ

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.