Re: [COSE] draft-prorock-cose-post-quantum-signatures [Was: Re: Call for COSE Agenda Items for IETF 113 in Vienna]

Mike Jones <Michael.Jones@microsoft.com> Thu, 10 March 2022 17:16 UTC

Return-Path: <Michael.Jones@microsoft.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 1CECC3A1A29 for <cose@ietfa.amsl.com>; Thu, 10 Mar 2022 09:16:13 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.11
X-Spam-Level:
X-Spam-Status: No, score=-7.11 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=microsoft.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 F2o6Sp05pQqn for <cose@ietfa.amsl.com>; Thu, 10 Mar 2022 09:16:08 -0800 (PST)
Received: from na01-obe.outbound.protection.outlook.com (mail-eus2azlp170100002.outbound.protection.outlook.com [IPv6:2a01:111:f403:c110::2]) (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 9C1583A1A27 for <cose@ietf.org>; Thu, 10 Mar 2022 09:15:56 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YXtPBfDFYaEPD1gruQalZYOzBAly6bwg2sTv8daNpmDAxV42PjBDzZ/P5Zw7fcbIuhkS43N/iREZX4SWDwVlD2BGKQul4F6UfcfEuGD1N1AQ1Cso/rOjhzbOen2fd8kk5bLQs6n8Fbdc0IN+6o3Tt894UyQdDuAUdxhAlRMKBBRcuDebW6a+GaY9jiCfLbnlQG19Ba/VrHW5Efs8eS8mtOwsDoiaVFhyRaTzJpB7kMnNzbP+YDqtjBcvjh1X3jNtAG6B3q1WTUanb7sW8RY7PpTCTCmcf+dtewBf0oFQ8rx4a7XSdZWhincdrBowSXIFeGuIAE4JiMCJES8av9Vwpw==
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=sW8xTMIOkCFcQ1R7JxnkCzEJCGHLHAcvOjYXAI17KTA=; b=A6SEAX39c1fxQzK0dNHro01/mv/nUAKPjuSBXRVC2SU12yEJi3JjMnbj8/T6HI347f2DEYan6Hu82nzxI5+10zjqHFy/wnozxuEtjOFHD2RIFFSwajk+8ZAOtL0fOgObvux4Rvmkd0WRkwVvqVv8rBeQGK7WhpwdFNZk1zbxGSnsSq0hYJbrXNr1MKooRFdSlNc3LpbDQ/ZzYSMJqTvmU7+vMQQGq8aVIxH3qtVJhCSZWfowOtc3uCS/MWebcjBDJnG8XxX8j53O1Px8FrE4wM76TWdocq72EAvX3yUU/X0GBUegAy8I35WCHBIdJk+labolQVOmiAUOVvKMGE4HYA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sW8xTMIOkCFcQ1R7JxnkCzEJCGHLHAcvOjYXAI17KTA=; b=ayQVAiBJwTQm79LdcfxIdLSWgeepdY1N5oBXOpY/rIzjVGPX6E4BMc5bhVrCXfxQ09C4RojUJvBYpJdhoWFwH9NUckwhRt7xX4d5Q61/S2EVZ9F8LN/MYtTn2kYczhf5i8O98KifrEUR/vLJxuu+OeahJtIRWW1iTx6gWIC48Y0=
Received: from SA2PR00MB1002.namprd00.prod.outlook.com (2603:10b6:806:11a::8) by MW2PR00MB0300.namprd00.prod.outlook.com (2603:10b6:302:8::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5094.0; Thu, 10 Mar 2022 17:15:48 +0000
Received: from SA2PR00MB1002.namprd00.prod.outlook.com ([fe80::3041:a612:8ffa:763c]) by SA2PR00MB1002.namprd00.prod.outlook.com ([fe80::3041:a612:8ffa:763c%7]) with mapi id 15.20.5096.000; Thu, 10 Mar 2022 17:15:48 +0000
From: Mike Jones <Michael.Jones@microsoft.com>
To: Mike Prorock <mprorock@mesur.io>, Anders Rundgren <anders.rundgren.net@gmail.com>
CC: Orie Steele <orie@transmute.industries>, Russ Housley <housley@vigilsec.com>, "cose@ietf.org" <cose@ietf.org>
Thread-Topic: [COSE] draft-prorock-cose-post-quantum-signatures [Was: Re: Call for COSE Agenda Items for IETF 113 in Vienna]
Thread-Index: Adg0onfr5h44q+w0SlildSBpvBtayw==
Date: Thu, 10 Mar 2022 17:15:48 +0000
Message-ID: <SA2PR00MB1002092057CE9580A4029532F50B9@SA2PR00MB1002.namprd00.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2022-03-10T17:15:44Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=3269a51b-66a6-4a15-a2e8-ef8c370b4628; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0
authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microsoft.com;
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: ba12361d-7f6d-4dfd-28b9-08da02b99ef9
x-ms-traffictypediagnostic: MW2PR00MB0300:EE_
x-ms-exchange-atpmessageproperties: SA|SL
x-microsoft-antispam-prvs: <MW2PR00MB030030A5EE14182A446379EAF50B9@MW2PR00MB0300.namprd00.prod.outlook.com>
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: xjG5edmBSGTzt4CKr7dvO1Jbq6/4vbA9B/uNqlP9vkUWDqG5IOMUYmFVJIkf/aBADCnSgCOTxWi09Hzsv9/ENYkbM6Z3dmeRykZk+n9CQ4603YliuLlokWWlUVhlk9Rx2OS+lHsbZsfXTS6yP8dy+fckKQ/0Yt386ijczqNv6GXjpRwSvB+SftlbNNrPntPwNdkQpgSShoBimQXpH6moGkXz+niXb5tTuthMNQoax991oJIY8eheAuVoojhYUVyv/YlCMLZz1c5EZsohnGB5FQ8GVMZgLR0Y87Wwe5YlUQF60o8y4isCneVxXasURM5YzVmjviPzo6eQMtSpdvpFQXaUFnD/iEv5KYyi4shn2U3CfOH2T77mUSm9ho24s70pWf4ZbJeECfBfj78jMJFaVamPbQnlyiiX/SOYXpVRaID/YlTYboDEmwD+jPMEPG8gutVS+qA/apSEMbOdbMpXIiPILXgejgvrsl66yLPJfVW4fHprnCPNy2ZLNzfbqxIRTnCjPHvCgsGKukFsWKBch/cuq+3cEqhZsmPqdTaK2CKprIQnAHlJl22HBYDxLO19SAOGd9Ar88WBnLVZunErg0PSNyGzwdfmboI6rJP9jb55zaI9zYiplP+/ndpYcB7kmqGto/PIzZUFSiPixZKNFqj7i+P5/akgLhLl+dM3R6yRrex3xP4VYNbYJQbkF4LV5vFMfbLqKz0ugedHEgKbKMSX++bWaKsalPv7uVYL7FDtQUQa9kOE7juy+I0P8vUtjp6vBe/rvWGP4D9OVXLKuJU4MiLAXfZdkYlk1h3W2AbircavrYXcVmJVzeQ2pXsmdXLtblGAaYBsBR1h8uaHgg==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SA2PR00MB1002.namprd00.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(451199009)(122000001)(316002)(166002)(110136005)(2906002)(82960400001)(82950400001)(966005)(54906003)(66556008)(8936002)(53546011)(86362001)(66476007)(4326008)(38100700002)(8990500004)(66946007)(52536014)(55016003)(83380400001)(64756008)(76116006)(5660300002)(8676002)(38070700005)(66446008)(26005)(186003)(508600001)(71200400001)(33656002)(9686003)(10290500003)(6506007)(7696005); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: =?utf-8?B?QVZTOStzcEZTQWJ3WVV6QWdsRmM0YS9mOXBqRm1rL3krLzBwN2g2TDFMM0pp?= =?utf-8?B?NFBPU2JGY3RIdjBYSUFWWFN1MitvdXU3Ykt3UFl6Rm1jbis0WTlWNjdJYUE4?= =?utf-8?B?Um9qd21HYXlrSU51cVQ2QTRqWm85UGZ4bmNSb1dwSmtxclVGRUFybkg3VjBQ?= =?utf-8?B?Z0Zid2I1QnZEK0puL1VsVXBzWDJUdWdYMEY1UjAxcXNZRjVtSU1WaFdGQ0Ux?= =?utf-8?B?em42WHVPUFpMVXFsdnR6YVRVRGJoUFd5cnpRcy9YTjFjakd2ZEVlT1dBdGt2?= =?utf-8?B?ak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kSk55WHFSZ0M5ZkRE?= =?utf-8?B?YVF2WnB0ZHVzd0hySVdhaTV6YkNpRDBwQi8zczR1eWRuZGR2MFZ6cmFGdS9B?= =?utf-8?B?dXlESHNBUExLOTRtQVVDTW9HMlFKTEhaWXZHajVEV1B2ejhmQXoyQkFWcDl6?= =?utf-8?B?bS8xL00vY0pWMWFJcGE4SG9FbmlWendMVytRcGs0Y2pEa0h1UHhSN2x6TnlW?= =?utf-8?B?MVFEamRrYlZIeTJiMVRnTXpZSnc5OWgwN1hTYTlQYjk1R3ZYczZ3OUJ1NUsv?= =?utf-8?B?Vkoyb2NGRTBLNGRzS0pGaGdMcEZEM1EyNGVubDNPN3lidXlzcjlrSlQ0MmpK?= =?utf-8?B?YVBuK2swNWVmOFh0UXBJSnpybWt6R05KbFVKa1hIeUluT1RtVVE0WTFsMWdk?= =?utf-8?B?QiszaDZEditFZXRCQmhlOE03NlkzS1JjUXUyMEU5M1hxbHlRZUxjNXFXQzl2?= =?utf-8?B?Si82NXpzcFRKZE82ZDM1ckxVWm9SbDJmSFdLaHRaQVcyWDB0aDBaYnpDNlB4?= =?utf-8?B?cjVXV2NGZlRFV1FDeWlzejI5bVBybXVJSE95UjQyT3pjTDNNQVAwU05VMkdl?= =?utf-8?B?cGQ2M0JuLzZiU1hCcXVuWW9UdS9LMktkVTJtTjNvNHlLTncvM2lud1NML0hN?= =?utf-8?B?UEpJM3VKVWNzQWdFekpFdmR2RjZiNkV3dEZaNEg3Q0RPU05lVHdJTEdNSGxi?= =?utf-8?B?czFYa1B2Y0x2R1pWcFNhamUxUU82dmdxOVZlUGhQbXZQM2hRTEJTUmErWWxN?= =?utf-8?Q?5hNTg69KpK8xrPfgDYej42iU6NQ0+/na?=
Content-Type: multipart/alternative; boundary="_000_SA2PR00MB1002092057CE9580A4029532F50B9SA2PR00MB1002namp_"
MIME-Version: 1.0
X-OriginatorOrg: microsoft.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: SA2PR00MB1002.namprd00.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: ba12361d-7f6d-4dfd-28b9-08da02b99ef9
X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Mar 2022 17:15:48.4481 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: WmIoIjd1zrpF8zn6AXK8zXEasCcGHgs18AbiZU0GTMiGGxuBWzTGHtjKzou6blN/B5mDivC2kKzBhFVN3lAu9w==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2PR00MB0300
Archived-At: <https://mailarchive.ietf.org/arch/msg/cose/DQzYcXlVKS633EJvnIau5sFIWW0>
Subject: Re: [COSE] draft-prorock-cose-post-quantum-signatures [Was: Re: Call for COSE Agenda Items for IETF 113 in Vienna]
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: Thu, 10 Mar 2022 17:16:13 -0000

As the inventor of “kty”, I’ll say that its intent is to indicate which key syntax is used among keys representations that are syntactically different.  It’s for syntax – not semantics.

To understand the semantics of how to use the key, you have to also know the “alg” value, as many algorithms may use keys with the same syntax – such as “OKP”.

                                                       -- Mike

From: Mike Prorock <mprorock@mesur.io>
Sent: Thursday, March 10, 2022 9:06 AM
To: Anders Rundgren <anders.rundgren.net@gmail.com>
Cc: Orie Steele <orie@transmute.industries>es>; Mike Jones <Michael.Jones@microsoft.com>om>; Russ Housley <housley@vigilsec.com>om>; cose@ietf.org
Subject: [EXTERNAL] Re: [COSE] draft-prorock-cose-post-quantum-signatures [Was: Re: Call for COSE Agenda Items for IETF 113 in Vienna]

Anders,
That read closely matches my interpretation as well, and is part of why i suggested that we might want one new 'kty' for post quantum, or perhaps two in this case (breaking things apart by family of algorithms) - 1) for lattice based algorithms, possibly 'PQL', and 2) for hash based approaches, perhaps 'PQH'
This way the kty is additionally informational in that we are indicating that the algorithms are post quantum in nature, and then the specific family of post quantum approach that is being followed.  This could be very beneficial with something like SPHINCS+ where then the 'alg' can break out as required for:
SPHINCS+-SHAKE256-[PARAMETERS]
SPHINCS+-SHA-256-[PARAMETERS]
SPHINCS+-Haraka-[PARAMETERS]

Mike Prorock
CTO, Founder
https://mesur.io/



On Thu, Mar 10, 2022 at 10:56 AM Anders Rundgren <anders.rundgren.net@gmail.com<mailto:anders.rundgren.net@gmail.com>> wrote:
Hi Orie,

TL;DR

This is my interpretation of how things presumably were intended to work:

Each "kty" represents a family of related key algorithms.

Each signature "alg" represents a specific signature algorithm that is compatible with exactly one "kty" family but not necessarily with all of its members.  For ECDH which is polymorphic things gets a little bit more fuzzy since it involves multiple "kty" families.

Since "kty" is a top-level item you should (IMO...) be free to define within reason :) whatever sub-level items that matches the algorithm specification.  The bottom line is that it must be easy to figure out which specific key- and signature-algorithms that were used, preferably supporting table-driven designs as well.

However, the existing "kty" definitions should (for not breaking existing software) be regarded as frozen even if EC keys indeed can be used both for ECDH and ECDSA (but the use-cases for that are few if any).

If there are strong arguments for not using the same key with multiple signature algorithms (assuming it is actually technically feasible as well), the most robust solution would be to define signature and key algorithms as pairs using the same identifier, but not under the same label since "alg" already is reserved for use in "kty"s.  You could also just say that "alg" in a "kty" is RECOMMENDED.  A problem here is that this scheme does not necessarily work at the crypto API level and then it becomes useless.  If this problem is for real, I would talk to the algorithms designers to get their view on this as well.  This is obviously history in the making :)

Cheers,
Anders


On 2022-03-10 14:57, Orie Steele wrote:
> seems like I should have replied here first... I agree with the comments.
>
> If we think overloading will cause problems we should avoid it.
>
> The problem with switching on key type alone is that there are key types used for multiple signature algorithms.
>
> I would recommend switching on kty + crv when present... but even then, secp256k1 supports both ECDSA (ES256K) and Schnorr (unregistered, but I once proposed SS256K at DIF - https://github.com/decentralized-identity/SchnorrSecp256k1Signature2019 <https://github.com/decentralized-identity/SchnorrSecp256k1Signature2019>)... we also have the problem of normalize to lower s in ES256K... we would probably need a new alg to signal that all ES256K signatures had been normalized... so there is a future where a single public key representation might verify many unique signature formats... without the requirement to signal which one it was "meant for".
>
> Our current approach with dilithium leaves us wishing `alg` were required in all key formats... it's also a best practice not to use the same key material for multiple algorithms... alg needs to be present to help mitigate this, because otherwise any signature that verifies with the key would be acceptable since the key representation does not signal an intention.... depending on your perspective on security, you might think this is a good thing.
>
> All this to say, if you are only looking at `kty` you might have other issues, at least with certain crv values that are registered today, we should avoid making this problem worse.
>
> OS
>
>
> On Thu, Mar 10, 2022 at 4:27 AM Mike Prorock <mprorock@mesur.io<mailto:mprorock@mesur.io> <mailto:mprorock@mesur.io<mailto:mprorock@mesur.io>>> wrote:
>
>     Thanks Anders,
>     This implementation side is exactly why I set kty as a unique value first.  This work started when I was testing an implementation of Dilithium, and then SPHINCS+ with some of our existing code and I wanted a clean way to branch down a path to the new libs without adjusting our existing code that switches on key types.  This was so that we could begin validating our ability to handle post quantum algorithms once NIST finalizes, based on a few customer requests.
>
>     Mike Prorock
>     mesur.io<http://mesur.io> <http://mesur.io>
>
>
>
> --
> *ORIE STEELE*
> Chief Technical Officer
> www.transmute.industries<http://www.transmute.industries>
>
> <https://www.transmute.industries>