Re: [COSE] draft-ietf-cose-hpke-00 and proposed changes for -01
Ilari Liusvaara <ilariliusvaara@welho.com> Fri, 21 January 2022 14:17 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 2BCD13A2126
for <cose@ietfa.amsl.com>; Fri, 21 Jan 2022 06:17:59 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.499
X-Spam-Level:
X-Spam-Status: No, score=-1.499 tagged_above=-999 required=5
tests=[BAYES_00=-1.9, KHOP_HELO_FCRDNS=0.399, SPF_HELO_NONE=0.001,
SPF_NONE=0.001] autolearn=no 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 QmPXPdYcKHph for <cose@ietfa.amsl.com>;
Fri, 21 Jan 2022 06:17:54 -0800 (PST)
Received: from welho-filter3.welho.com (welho-filter3b.welho.com
[83.102.41.29])
(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
(No client certificate requested)
by ietfa.amsl.com (Postfix) with ESMTPS id 5ECCD3A2124
for <cose@ietf.org>; Fri, 21 Jan 2022 06:17:53 -0800 (PST)
Received: from localhost (localhost [127.0.0.1])
by welho-filter3.welho.com (Postfix) with ESMTP id B5157153F5;
Fri, 21 Jan 2022 16:17:50 +0200 (EET)
X-Virus-Scanned: Debian amavisd-new at pp.htv.fi
Received: from welho-smtp2.welho.com ([IPv6:::ffff:83.102.41.85])
by localhost (welho-filter3.welho.com [::ffff:83.102.41.25]) (amavisd-new,
port 10024)
with ESMTP id y32J04i-NcSR; Fri, 21 Jan 2022 16:17: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-smtp2.welho.com (Postfix) with ESMTPSA id 4852072;
Fri, 21 Jan 2022 16:17:48 +0200 (EET)
Date: Fri, 21 Jan 2022 16:17:47 +0200
From: Ilari Liusvaara <ilariliusvaara@welho.com>
To: Hannes Tschofenig <Hannes.Tschofenig@arm.com>
Cc: "cose@ietf.org" <cose@ietf.org>
Message-ID: <YerAi7tqgY075EoM@LK-Perkele-VII2.locald>
References: <DBBPR08MB5915C899B9EF8122898057BDFA579@DBBPR08MB5915.eurprd08.prod.outlook.com>
<YeVQooQEGzfjFeE9@LK-Perkele-VII2.locald>
<DBBPR08MB5915C7AFF11B55A8AA8CBBEEFA579@DBBPR08MB5915.eurprd08.prod.outlook.com>
<YeWbRYe13Mk+IV+2@LK-Perkele-VII2.locald>
<DBBPR08MB591586D6CB6BAF7B5354F517FA589@DBBPR08MB5915.eurprd08.prod.outlook.com>
<YemgmVX/zsWFQfA/@LK-Perkele-VII2.locald>
<DBBPR08MB59153905223EB68CD94F44E0FA5B9@DBBPR08MB5915.eurprd08.prod.outlook.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <DBBPR08MB59153905223EB68CD94F44E0FA5B9@DBBPR08MB5915.eurprd08.prod.outlook.com>
Sender: ilariliusvaara@welho.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/cose/Dr7nFhzAVqADMfA9uQ5K9mkwo-k>
Subject: Re: [COSE] draft-ietf-cose-hpke-00 and proposed changes for -01
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, 21 Jan 2022 14:17:59 -0000
On Fri, Jan 21, 2022 at 01:15:50PM +0000, Hannes Tschofenig wrote: > Hi Ilari, > > You are again raising good points, namely > > 1) Should we convey the KEM ID, and KDF ID explicitly? I think so. Well, I think that all HPKE algorithms should be supported in generic way, so that COSE does not have to deal with registering HPKE algorithms the second time. > 2) If we do, where should this information go? You suggest to put > them into the COSE key (ephemeral key) structure. I would have > thought that the unprotected header would be more appropriate but > I do not really have a strong preference. Well, for KDF id, one could stick it either inside ephemeral key structure, or the main headers. However, I think that one will run into cases where: - KDF is implicit from KEM. E.g. KEM 17 is probably combined with KDF 2. - KDF is not implicit from KEM. E.g. KEM 48 goes with KDF ???. > 3) Should we define a new kty id? If we place the KEM ID and the > KDF ID into the COSE key structure then I think it would be a > good idea to define a new kty id. Well, there are not just HPKE encapsulated keys, HPKE also has public and private keys. While reusing OKP for generic case would be possible (at cost of a few bytes, since crv will be pushed to 5 byte territory), I think new kty would be cleaner. > I am curious what others in the group think about this idea. > > I lost you when you are were talking about the "size issues" and tried > to solve the issues. Maybe you could elaborate a bit what problem you > see. The size issue is that HPKE currently uses uncompressed P-256/P-384/ P-521. This makes public keys and ephemeral keys a few dozen bytes larger than they should be if one uses NIST curves. And I came up with two ways of representing compressed ephemeral key (and public key). > IMHO we cannot use COSE_Encrypt0 because we need the recipient > structure, which is not present with the COSE_Encrypt0. HPKE itself does not seem to need the recipient. > You also seem to define new key formats. What prevents us from > re-using the existing COSE key formats? Section 13 of RFC 8152 > defines various ECC key formats and those could be re-used. > Since there is no compressed point format, we could add it. One of the ideas I had for key compression was reusing the existing formats. And these are the cases where there is an obvious KDF to use. Then there is question how generic HPKE keys should be presented. > I am also not sure why you talk about PQC algorithms. Neither > COSE nor HPKE define PQC algorithms. Do you think we should > define them in this document? I am expecting that once NIST comes with PQC algorithm recommendations, those will be added to HPKE. And with generic HPKE algorithm support, those would be immediately usable in COSE. -Ilari
- [COSE] draft-ietf-cose-hpke-00 and proposed chang… Hannes Tschofenig
- Re: [COSE] draft-ietf-cose-hpke-00 and proposed c… Ilari Liusvaara
- Re: [COSE] draft-ietf-cose-hpke-00 and proposed c… Hannes Tschofenig
- Re: [COSE] draft-ietf-cose-hpke-00 and proposed c… Ilari Liusvaara
- Re: [COSE] draft-ietf-cose-hpke-00 and proposed c… Hannes Tschofenig
- Re: [COSE] draft-ietf-cose-hpke-00 and proposed c… Ilari Liusvaara
- Re: [COSE] draft-ietf-cose-hpke-00 and proposed c… Hannes Tschofenig
- Re: [COSE] draft-ietf-cose-hpke-00 and proposed c… Ilari Liusvaara
- Re: [COSE] draft-ietf-cose-hpke-00 and proposed c… Hannes Tschofenig
- Re: [COSE] draft-ietf-cose-hpke-00 and proposed c… Carsten Bormann
- Re: [COSE] draft-ietf-cose-hpke-00 and proposed c… Hannes Tschofenig
- Re: [COSE] draft-ietf-cose-hpke-00 and proposed c… Ilari Liusvaara
- Re: [COSE] draft-ietf-cose-hpke-00 and proposed c… Hannes Tschofenig