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

Rafael Misoczki <rafaelmisoczki@google.com> Fri, 11 March 2022 18:15 UTC

Return-Path: <rafaelmisoczki@google.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 D4C683A0E12 for <cose@ietfa.amsl.com>; Fri, 11 Mar 2022 10:15:59 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -17.609
X-Spam-Level:
X-Spam-Status: No, score=-17.609 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=google.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 k28Av-9FowN2 for <cose@ietfa.amsl.com>; Fri, 11 Mar 2022 10:15:55 -0800 (PST)
Received: from mail-yb1-xb33.google.com (mail-yb1-xb33.google.com [IPv6:2607:f8b0:4864:20::b33]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 08D783A0E17 for <cose@ietf.org>; Fri, 11 Mar 2022 10:15:54 -0800 (PST)
Received: by mail-yb1-xb33.google.com with SMTP id g26so18552449ybj.10 for <cose@ietf.org>; Fri, 11 Mar 2022 10:15:54 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HFEq3uhiqQi5Wv2WF5PAuyk/rI0VZL3cdLZQhL9N9Sc=; b=IMMeCgH1NIu9mllRUGeu2eoDNhhr+uQYeHyB1SqK67OZM2iqTz51tLnU20HZjqFf8s bwx0d7ph6QxSbyufC6HUvtTYbLzaqUmnTVR3UeWDUjAPLAbcFApCxrqZh4qv/HBR0Rqx YbQgz04MdmYBD4AcGaU9+F00MPrP1AeeYvR1+7OLHId6UGVe0Iyx4q8jQmVyO2sqhr7K Zem4Ej8mWuAc1/1/KSkTb4SRr1F87vulI86oi5fb73X11bR6mK7Yd7L9Hcz8ks/v1GzW WuL5cBBBHSqBKcxBrFgQejyJEjqMi75YTBqqBkGC8TNSIbI9LEYEvB8+W7StP7HWMuRE pmBw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HFEq3uhiqQi5Wv2WF5PAuyk/rI0VZL3cdLZQhL9N9Sc=; b=z/BPSHN0O9vZXAQ2J++GNmoVQF9Ij9ZWCjCaiOGQ3rfdRhgLJOhdY71QLciSPM3euG faEUTjRI7G7M8eiFPIYLgbxL6PfrvRzIC8quGYjmEHBWRm7+JC1B4Pd8qVPslxuP25fj /ZezRv5skwNw3enOjPaZwiEMSiGLRHpXO0eagmcLfPRI6gcOMBGrNjXm6tahLxVGJmYK Tm+VeXiSKmfuRCdhvCzmvtnf4/tAki00xAYqyd/D2lTeMyVga/ZUOoYVlmaJII+D8i05 RklQXrCIaxDhg+MXdScaeHbWu065NH5kyuU6bwPRc8SlSQAKYrYeYgYhNTpyVLVzML10 peSQ==
X-Gm-Message-State: AOAM531Zhwz6zxgrkMz6LsePH4HrFgzrs/AUIu9ZFQdl+tgp0LGIloML 3p5DkjJsxtab7SIDhMkP2P6XYY+YxE4RTNeWUKo/1g==
X-Google-Smtp-Source: ABdhPJwNvwZMDMNxfCedrs/+PVjXXaXran+KQjUBWTzFVtQaoRmajNGtoZuWmME+hClUPzRnhkTXTy0wkS/n5aad26Q=
X-Received: by 2002:a05:6902:51:b0:61e:1a26:3243 with SMTP id m17-20020a056902005100b0061e1a263243mr8775019ybh.57.1647022553515; Fri, 11 Mar 2022 10:15:53 -0800 (PST)
MIME-Version: 1.0
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> <15470fe2-c88d-5274-3b21-bfcc86c7f085@gmail.com>
In-Reply-To: <15470fe2-c88d-5274-3b21-bfcc86c7f085@gmail.com>
From: Rafael Misoczki <rafaelmisoczki@google.com>
Date: Fri, 11 Mar 2022 13:15:41 -0500
Message-ID: <CAHrM0e_7KLmpYqUcLyFCVVZro7RrYgkO16u=nR8qehA17kfduA@mail.gmail.com>
To: Anders Rundgren <anders.rundgren.net@gmail.com>
Cc: Ilari Liusvaara <ilariliusvaara@welho.com>, "cose@ietf.org" <cose@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000003db3b005d9f5522b"
Archived-At: <https://mailarchive.ietf.org/arch/msg/cose/INeqeqfIwsYvk6WvFZzKY5nYwV4>
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: Fri, 11 Mar 2022 18:16:00 -0000

Re: creating a kty for PQC algorithms (or any other way of grouping these
algorithms to indicate they are PQ-secure), two things to consider:

- These algorithms are *currently* classified as post-quantum secure, and
the truth is that we can't guarantee this property in the long-term. As an
example of how these things may change quickly, we just saw a *3rd-Round
Finalist* candidate (Rainbow <https://www.pqcrainbow.org/>) being subject
to a devastating *classical* attack <https://eprint.iacr.org/2022/214.pdf>.

- Only very carefully selected parameters lead to instances of these
algorithms which can be (currently) called post-quantum secure. If
the community/NIST ends up standardizing parameters with overestimated
security, this may lead to quantum vulnerable instances of these algorithms
in this group of PQ-secure algorithms while they are not PQ-secure.

Just some food for thought for the situation where these algorithms are
grouped with some indication they are "PQ-secure" but later on we found
they are not. There might be some benefits for not officially labeling them
as "PQ-secure" in any way, and instead only indicate what is the underlying
class of problems (e.g. lattices, or hash, or isogney, etc).

On Fri, Mar 11, 2022 at 11:34 AM Anders Rundgren <
anders.rundgren.net@gmail.com> wrote:

> Hi Ilari,
>
> I fully understand what you are saying and how OKP was supposed to work.
> That everything in crypto-land isn't great is also true.
>
> However, overloading established identifiers is seldom a good idea because
> it obviously requires changes in well-functioning code.
>
> I also believe that from a marketing point of view post-quantum algorithms
> may be entitled their own "kty" :) If it is sufficient with one is beyond
> my insight in the matter...
>
> In the draft I also found additional optional fields which doesn't have an
> OKP counterpart.
>
> Cheers,
> Anders
>
>
> On 2022-03-11 17:11, Ilari Liusvaara wrote:
> > On Fri, Mar 11, 2022 at 05:23:48AM +0100, Anders Rundgren wrote:
> >> Before deciding to overload "OKP" for a new crypto system, I would
> discuss the matter with maintainers of cryptographic libraries and APIs.
> >>
> >> In the Java platform overloading the native counterparts to OKP keys
> >> [1,2] won't happen because that would break a lot.  I guess the same
> >> is valid for OpenSSL.
> >
> > The way it is supposed to work is to use the raw key parts as key
> > material in underlying cryptographic implementation. Implementations
> > where that is not possible are just broken.
> >
> >> It seems to me that reusing OKP would rather create an artificial
> >> "semantic gap" which doesn't exist today where "kty" indeed is
> >> synonymous with key type/family (RSA, EC, Ed etc):
> >> https://datatracker.ietf.org/doc/html/rfc7517#section-4.1
> >
> > There are already two "subtypes" of OKP keys that are not
> > interchangeable:
> >
> > - Key agreement keys.
> > - Signature keys.
> >
> > 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).
> >
> >
> > This is very different from RSA and EC2, where there are no subtypes,
> > and all keys are interchangeable.
> >
> >
> > Another place similar multi-subtype non-interchangeable keys are seen
> > is symmetric algorithms, as there are at least two "subtypes":
> >
> > - AE(AD) Encryption keys.
> > - MAC keys.
> >
> >
> >
> > -Ilari
> >
> > _______________________________________________
> > COSE mailing list
> > COSE@ietf.org
> > https://www.ietf.org/mailman/listinfo/cose
>
> _______________________________________________
> COSE mailing list
> COSE@ietf.org
> https://www.ietf.org/mailman/listinfo/cose
>