Re: [COSE] draft-prorock-cose-post-quantum-signatures [Was: Re: Call for COSE Agenda Items for IETF 113 in Vienna]
Ilari Liusvaara <ilariliusvaara@welho.com> Thu, 10 March 2022 17:59 UTC
Return-Path: <ilariliusvaara@welho.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 C42523A1AC1
for <cose@ietfa.amsl.com>; Thu, 10 Mar 2022 09:59:56 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.91
X-Spam-Level:
X-Spam-Status: No, score=-1.91 tagged_above=-999 required=5
tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
T_SCC_BODY_TEXT_LINE=-0.01] autolearn=ham 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 0oJq4hxZiZsB for <cose@ietfa.amsl.com>;
Thu, 10 Mar 2022 09:59:54 -0800 (PST)
Received: from welho-filter4.welho.com (welho-filter4b.welho.com
[83.102.41.30])
(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
(No client certificate requested)
by ietfa.amsl.com (Postfix) with ESMTPS id DE6893A1ABF
for <cose@ietf.org>; Thu, 10 Mar 2022 09:59:53 -0800 (PST)
Received: from localhost (localhost [127.0.0.1])
by welho-filter4.welho.com (Postfix) with ESMTP id 8DA966874D
for <cose@ietf.org>; Thu, 10 Mar 2022 19:59:50 +0200 (EET)
X-Virus-Scanned: Debian amavisd-new at pp.htv.fi
Received: from welho-smtp3.welho.com ([IPv6:::ffff:83.102.41.86])
by localhost (welho-filter4.welho.com [::ffff:83.102.41.26]) (amavisd-new,
port 10024) with ESMTP id b9OgPGP-pM6E for <cose@ietf.org>;
Thu, 10 Mar 2022 19:59:50 +0200 (EET)
Received: from LK-Perkele-VII2 (87-92-216-160.rev.dnainternet.fi
[87.92.216.160])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by welho-smtp3.welho.com (Postfix) with ESMTPSA id 4C4BD2321
for <cose@ietf.org>; Thu, 10 Mar 2022 19:59:49 +0200 (EET)
Date: Thu, 10 Mar 2022 19:59:49 +0200
From: Ilari Liusvaara <ilariliusvaara@welho.com>
To: cose@ietf.org
Message-ID: <Yio8lfPQ/fHuxU6f@LK-Perkele-VII2.locald>
References: <SA2PR00MB1002C64FDF9A7CF14E95D135F50B9@SA2PR00MB1002.namprd00.prod.outlook.com>
<a730ecbe-bbc5-2df1-ec60-a43353507b93@gmail.com>
<CAGJKSNSY5WdXXRrE-GBi7zgsy69ea8MhPsc0P4X7tNB4=JDRtw@mail.gmail.com>
<CAN8C-_+6ydynEFqiKvK2ONw9cwDxDX0F8xBXm4x6awvNfHOnkw@mail.gmail.com>
<91bb290a-b109-ae35-6188-44568e44197c@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <91bb290a-b109-ae35-6188-44568e44197c@gmail.com>
Sender: ilariliusvaara@welho.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/cose/nRRSQfQoqGAEaiv9W6VON3Ceg9s>
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:59:57 -0000
On Thu, Mar 10, 2022 at 04:56:55PM +0100, Anders Rundgren 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. No, each "kty" represents a key format. Each key format may or may not have multiple key types. For example, OKP is the key format with octet string private and public keys. It explicitly has nothing to more to do with elliptic curves than that initial key types all happened to be based on elliptic cuves. > 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. Each alg is compatible with key types it is compatible with. That might include some key types of some key format (happens especially with OKP) or it might include entiere key formats (happens especially with EC2), or both at once. That might turn out to be bit problematic if, e.g., some joker defines some coordinate-swapped Edwards curve as EC2. Those things work just fine for ECDH. Attempting to perform ECDSA technically works, but breaks ECDSA specification. > 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. It goes the other way around: Once one has a new key type, one goes to see if it has existing key format, or if one should define a new key format for it. > 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). Not being able to introduce new key types would for example imply that new elliptic curves can not be added. > 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 :) In general, using the same key with multiple signature algoritihms is not cryptographically kosher. In fact, RSA-PKCS#1v1.5 is one of the rare exceptions (it has encoded message level indication of hash algorithm used). It depends on algorithm if trying to use mismatching key and algorithm is guranteed to blow up as implementation is faced trying to do the impossible (e.g., trying to mismatch dilithium2 and dilithium3), or if it is just omittable implementation checks that prevent some key/algorithm pair from working (e.g. trying to mismatch ES384 and P-256 curve). However, there is no "key says what alg this actually is" alg value in COSE and JOSE. However, in current HTTP signatures work, there is such value (omitted alg means exactly that). -Ilari
- [COSE] Call for COSE Agenda Items for IETF 113 in… Mike Jones
- Re: [COSE] Call for COSE Agenda Items for IETF 11… Mike Jones
- Re: [COSE] Call for COSE Agenda Items for IETF 11… Mike Jones
- Re: [COSE] Call for COSE Agenda Items for IETF 11… Anders Rundgren
- Re: [COSE] Call for COSE Agenda Items for IETF 11… Mike Prorock
- Re: [COSE] Call for COSE Agenda Items for IETF 11… Hannes Tschofenig
- [COSE] draft-prorock-cose-post-quantum-signatures… Ilari Liusvaara
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Anders Rundgren
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Mike Prorock
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Russ Housley
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Mike Jones
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Anders Rundgren
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Ilari Liusvaara
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Mike Prorock
- Re: [COSE] Call for COSE Agenda Items for IETF 11… Göran Selander
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Orie Steele
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Orie Steele
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Anders Rundgren
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Mike Prorock
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Mike Jones
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Mike Prorock
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Ilari Liusvaara
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Ilari Liusvaara
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Rafael Misoczki
- Re: [COSE] draft-prorock-cose-post-quantum-signat… John K
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Anders Rundgren
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Ilari Liusvaara
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Ilari Liusvaara
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Russ Housley
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Anders Rundgren
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Rafael Misoczki
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Russ Housley
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Anders Rundgren
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Ilari Liusvaara
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Russ Housley
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Orie Steele
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Mike Jones
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Orie Steele
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Anders Rundgren
- Re: [COSE] draft-prorock-cose-post-quantum-signat… David Waite
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Mike Prorock
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Anders Rundgren
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Russ Housley
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Orie Steele
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Mike Prorock
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Mike Prorock
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Mike Prorock
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Ilari Liusvaara
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Ilari Liusvaara
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Russ Housley
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Mike Prorock
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Michael Richardson
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Mike Jones
- Re: [COSE] draft-prorock-cose-post-quantum-signat… Mike Jones