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> Sat, 12 March 2022 09: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 383903A1732 for <cose@ietfa.amsl.com>; Sat, 12 Mar 2022 01:59:10 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.909
X-Spam-Level:
X-Spam-Status: No, score=-1.909 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, URIBL_BLOCKED=0.001] 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 085CbLvmc11l for <cose@ietfa.amsl.com>; Sat, 12 Mar 2022 01:59:05 -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 A0D793A0C0E for <cose@ietf.org>; Sat, 12 Mar 2022 01:59:04 -0800 (PST)
Received: from localhost (localhost [127.0.0.1]) by welho-filter3.welho.com (Postfix) with ESMTP id B84FD14C9C for <cose@ietf.org>; Sat, 12 Mar 2022 11:59:01 +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 N5GnzkLuoC5e for <cose@ietf.org>; Sat, 12 Mar 2022 11:59:01 +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 869F3285 for <cose@ietf.org>; Sat, 12 Mar 2022 11:59:00 +0200 (EET)
Date: Sat, 12 Mar 2022 11:59:00 +0200
From: Ilari Liusvaara <ilariliusvaara@welho.com>
To: "cose@ietf.org" <cose@ietf.org>
Message-ID: <Yixu5IXZKAmNjH7g@LK-Perkele-VII2.locald>
References: <SA2PR00MB1002092057CE9580A4029532F50B9@SA2PR00MB1002.namprd00.prod.outlook.com> <CAGJKSNSVuvmsdy9PmUGW7_a2kGqvAxW0fv+hOqSKE6ZfeagSWw@mail.gmail.com> <Yio968v//v87+fTH@LK-Perkele-VII2.locald> <40bf177b-9ac4-f1ed-db05-a0e8636a9363@gmail.com> <Yit0xOrYJSQXxkMy@LK-Perkele-VII2.locald> <F677F35E-8C9B-4FD6-901A-CBEEC36E7E8A@vigilsec.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <F677F35E-8C9B-4FD6-901A-CBEEC36E7E8A@vigilsec.com>
Sender: ilariliusvaara@welho.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/cose/HtnShGvT_qAkEIAQ5lFQ_tgnegc>
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: Sat, 12 Mar 2022 09:59:11 -0000

On Fri, Mar 11, 2022 at 03:34:08PM -0500, Russ Housley wrote:
> 
> 
> > On Mar 11, 2022, at 11:11 AM, Ilari Liusvaara <ilariliusvaara@welho.com> wrote:
> > 
> > NISTPQC signatures would fit into signature keys "subtype", but NISTPQC
> > KEMs will not fit into the key agreement keys "subtype", so that would
> > be a third "subtype" (all NISTPQC algorithms have OKP-style key format,
> > as this was required by NIST).
> 
> Right.  It makes sense to add support for KEM.  We can figure that out
> without waiting for NIST to announce Round 3 winners.  We can do the
> work based on RFC 5990.

One idea how (modelled on ECDH-ES, as operation of KEMs is very similar
to ECDH-ES):

- Add new alg values KEM+{A{128,192,256}KW,HKDF-{256,512}}, mirroring
  the ECDH-ES ones.
- Add new new header algorithm parameter "encapsulated ciphertext"
  (bstr) that carries the KEM ciphertext.
- Sender procedure:
  - Select the public key to encrypt to.
  - Apply the KEM encapsulate operation to the public key.
  - Use the encapsulate secret output as input for key derivation, just
    like in ECDH-ES.
  - Write the encapsulate ciphertext output into the "encapsulated
    ciphertext" header algorithm parameter.
- Receiver procedure:
  - Retretive the private key to use.
  - Read the ciphertext input from the "encapsulated ciphertext" header
    algorithm parameter.
  - Apply the KEM decapsulate operation to the private key and the
    ciphertext. If decapsulate fails, fail.
  - Use the decapsulate secret output as input for key derivation,  just
    like in ECDH-ES.


A word of cauntion: Altough it might seem that the "encapsulated
ciphertext" header can be reused for HPKE, there is a subtle issue:
This mechanism can not trivially support compressing the ciphertext. So
reusing it would require HPKE to define compact NIST curves, so COSE
could just forget about key compression.



-Ilari