Re: [CFRG] Google's (current) Threat model for Post-Quantum Cryptography

Daniel Kahn Gillmor <dkg@fifthhorseman.net> Sun, 17 March 2024 22:01 UTC

Return-Path: <dkg@fifthhorseman.net>
X-Original-To: cfrg@ietfa.amsl.com
Delivered-To: cfrg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id BCA12C14F617 for <cfrg@ietfa.amsl.com>; Sun, 17 Mar 2024 15:01:39 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.105
X-Spam-Level:
X-Spam-Status: No, score=-2.105 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=neutral reason="invalid (unsupported algorithm ed25519-sha256)" header.d=fifthhorseman.net header.b="RVs92wWB"; dkim=pass (2048-bit key) header.d=fifthhorseman.net header.b="E1QLbXQD"
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wTzTlqeqLbGU for <cfrg@ietfa.amsl.com>; Sun, 17 Mar 2024 15:01:34 -0700 (PDT)
Received: from che.mayfirst.org (che.mayfirst.org [IPv6:2001:470:1:116::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 7E0C2C14F60F for <cfrg@irtf.org>; Sun, 17 Mar 2024 15:01:12 -0700 (PDT)
DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019; t=1710712871; h=from : to : subject : in-reply-to : references : date : message-id : mime-version : content-type : from; bh=GittX6SZff5pQ+OY744SvhjDy5zP7+bdoXVUclhC+Y8=; b=RVs92wWBNhIpUmlmkdbXU/wjzkUBr2/LCruMPaGCOwRymr/TpCqA8kZChvHFwDnNP05jh dPTg4GugU1bXYztBg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019rsa; t=1710712871; h=from : to : subject : in-reply-to : references : date : message-id : mime-version : content-type : from; bh=GittX6SZff5pQ+OY744SvhjDy5zP7+bdoXVUclhC+Y8=; b=E1QLbXQDW/R1rWWvkeVThzL3VXdYJkmTtAA1meP/VcEGqNSzquY8bYrZ7DKkT5viHbxp/ Pa+w44FeTl0OxK+36LfYkGUPHh4nhkRr84kdnimvlq0mOx7pcUBBi+93a//ppo6JdflpgiI ONlV4TCK30UnepxD0CxCWySX+IJQCVRdDyCIVBf4HlAL8mSxDVnlae7A4LdV/TSvLv80ayc NS3Lzv8hYwNzp83/ghHydhkUISwlWq60gKWOWnofhsthia8CbISWtoUP+5bHF7c/ZQgkx9l cuYsFJ5Cr1zGN0T0+8rQsStiWft/ozI0S1XqGlO6dJ6H/QfEpUOlbyB8t0rQ==
Received: from fifthhorseman.net (lair.fifthhorseman.net [108.58.6.98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by che.mayfirst.org (Postfix) with ESMTPSA id 83F3CF9D8; Sun, 17 Mar 2024 18:01:11 -0400 (EDT)
Received: by fifthhorseman.net (Postfix, from userid 1000) id 95163204E6; Sun, 17 Mar 2024 18:01:05 -0400 (EDT)
From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
To: Stephen Farrell <stephen.farrell@cs.tcd.ie>, cfrg@irtf.org
In-Reply-To: <096ede01-b2e7-477d-84af-b5c1bbff8fc9@cs.tcd.ie>
References: <20240316160202.328102.qmail@cr.yp.to> <096ede01-b2e7-477d-84af-b5c1bbff8fc9@cs.tcd.ie>
Autocrypt: addr=dkg@fifthhorseman.net; prefer-encrypt=mutual; keydata= xjMEZXEJyxYJKwYBBAHaRw8BAQdA5BpbW0bpl5qCng/RiqwhQINrplDMSS5JsO/YO+5Zi7HCi QQfFgoAMQWCZadnIAUJBdtHCwMLCQcDFQoIApsBAh4BFiEE1HcEDHDCFWpcKYVJu36RAUlea/ cACgkQu36RAUlea/edDQD+M2QjnoEyu/TjI+gRXBpXQ5jCsnnp9FdYhaSSUW/vZ8kBAJByWlj A9aMfVaVrmvgcYw7jzJz+gmZspBRB++5LZ20NzRc8ZGtnQGZpZnRoaG9yc2VtYW4ubmV0PsLA EQQTFgoAeQMLCQdHFAAAAAAAHgAgc2FsdEBub3RhdGlvbnMuc2VxdW9pYS1wZ3Aub3JnEu/CS CeyWwC6j4ihJr2u/z6delsF1pvYW3ufgf1L538DFQoIApsBAh4BFiEE1HcEDHDCFWpcKYVJu3 6RAUlea/cFAmWnX5AFCQXZ8EUACgkQu36RAUlea/cjVwD+ONjdHM74rAa6EEiiqaPjlptiaZx CVqFYXnib6EbZARkBAPnnR8pW8vCBnDXHKu65jNqwF3aH761NaOqqMFfppg8GzjMEZXEJyxYJ KwYBBAHaRw8BAQdAjX25Fq2Q9IUFeHy6yByIQPBnFOedFliuEiCIUzJsENDCwMUEGBYKAS1HF AAAAAAAHgAgc2FsdEBub3RhdGlvbnMuc2VxdW9pYS1wZ3Aub3JnwqKWsw56uoWVLIFcs7ZecJ gwpsSNevWCzbviKQ8yRLUCmwK+oAQZFgoAbwWCZXEJywkQdy0WHjXNS4FHFAAAAAAAHgAgc2F sdEBub3RhdGlvbnMuc2VxdW9pYS1wZ3Aub3JnEIJSOxuw2y/UJmg5M3BLpN0JYjODZpXiEVFu 1byARzMWIQR0vATEPYYIS+hnLAZ3LRYeNc1LgQAAsH8BAKg1C5LK/D7pSkXCD+jfTSP+CqM58 iHLjh4vKhpOKsTJAQCHldtEjxJ1ksPTFgG9HihHH7qc6/wvvLw77ETMpwlrAxYhBNR3BAxwwh VqXCmFSbt+kQFJXmv3BQJlp1+rBQkCF4lgAAoJELt+kQFJXmv3ydsA/2roQZ2Jm/7iUrg/2C5 ClWA/xbvPC31LyMkGGH2/rq8tAP9BgqLuCPnNTVPqeX9+9qqMmaFq7wmvjq5I+yycAw9CDc44 BGVxCcsSCisGAQQBl1UBBQEBB0BZMsRrRaaeFSYMF1ZdfRmVgBriDUIr99eDQ085BK14DgMBC AfCwAYEGBYKAG5HFAAAAAAAHgAgc2FsdEBub3RhdGlvbnMuc2VxdW9pYS1wZ3Aub3JnsazAWX tEHUPmSTmcRZAIsAsNiO8k0hdjsfRlRVipgJgCmwwWIQTUdwQMcMIValwphUm7fpEBSV5r9wU CZadfqwUJAheJYAAKCRC7fpEBSV5r90AjAPwLgY1iKiFJEj32SVD5f721929l79VxQB5FlQss x1n5kQEA6Uct2tPvbB6T7p5KG3Gl+tbi7oJAuxFmpkpW5/N2Owg=
Date: Sun, 17 Mar 2024 18:01:04 -0400
Message-ID: <875xxk7c2n.fsf@fifthhorseman.net>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-="; micalg="pgp-sha512"; protocol="application/pgp-signature"
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/u32wiNA8d4FQmQ8Bmli-kRksNgE>
Subject: Re: [CFRG] Google's (current) Threat model for Post-Quantum Cryptography
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <https://mailman.irtf.org/mailman/options/cfrg>, <mailto:cfrg-request@irtf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cfrg/>
List-Post: <mailto:cfrg@irtf.org>
List-Help: <mailto:cfrg-request@irtf.org?subject=help>
List-Subscribe: <https://mailman.irtf.org/mailman/listinfo/cfrg>, <mailto:cfrg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Sun, 17 Mar 2024 22:01:39 -0000

On Sun 2024-03-17 20:49:53 +0000, Stephen Farrell wrote:
> It seems telling to me that that's the best case that comes to
> mind. I take it from that that discussion of technical mechanisms
> that attempt to provide non-repudiation ought be treated as noise,
> and we ought consider requirements related to code-signing as the
> ones most important to meet.

Agreed that code-signing seems like the simplest case to tackle, and is
worth prioritizing as there are pretty clear functional consequences
here.

> Doing "more" also has costs, e.g. related to the time available from
> busy analysts as I think someone has pointed out:-) If we do anything
> other than "check both" then we also run a real risk of ending up with
> a load of ways to do that. (Which would make the already horrible
> combinatorics related to composite sigs worse.)

Agreed: if we bake "check both" with reasonably matched primitives into
the lower level signature cryptographic APIs, and don't change the
application layer semantics, then we avoid extra costs associated with
fragmentation, combinatorics and lack of cryptanalytic resources.

Explicitly encoding a composite signature as a new signature algorthm
seems like the way to do that.

> The above ignores the costs related to the combinatorics of composite
> sigs, esp when it comes to key management.

Key management is a cost at the application layer only when the fact of
how the combinations work is exposed to the application layer.  if a
composite sig is just a "new signature type", then the application layer
just has to do what it always has to do when a new signature type is
introduced.

> A better phrasing might be that the verifier has to decide which
> sets of signatures are acceptable, noting that until now, being
> presented with multiple signatures was extremely uncommon.

If we're talking about code-signing, being presented with multiple
signatures is actually quite common.

Debian apt manifests ("Release files"), for example, tend to contain
multiple OpenPGP signatures:

$ curl 'http://deb.debian.org/debian/dists/bookworm/InRelease' | \
> sq toolbox packet dump 2>/dev/null | \
> grep -e ^Signature -e Pk.algo
Signature Packet, old CTB, 563 bytes
    Pk algo: RSA
Signature Packet, old CTB, 563 bytes
    Pk algo: RSA
Signature Packet, old CTB, 150 bytes
    Pk algo: EdDSA
$ 

When debian wants to introduce a new signing algorithm (or just a new
key), they sign the release with the old signing key for a while
alongside the new key.

In this case, you can see that the manifest is signed by two legacy RSA
keys, and one from the newer EdDSA (Ed25519) signature algorithm.  three
versions ago, many older Debian systems couldn't even verify an Ed25519
signature.

If the next release for debian is also signed by a composite sig, i
suspect they would just add the new composite sig and phase out the
older of the legacy RSA signing keys.

>> And yes, a signer might still want to sign twice during the
>> transition period, where not every verifier is capable of verifying
>> the new composite signatures.  That's something that already happens
>> whenever *any* new signing algorithm is introduced, composite or
>> otherwise.
>
> Twice? That ignore the combinatorics. We might end up needing a whole
> pile of signatures for code-signing, or worse, might end up with some
> verifiers who can't handle sigs from some distributions and so skip
> signature verification entirely.

I'm pretty sure i mean just twice for a simple transition:

 - once with a new composite signature algorithm, for updated verifiers,
   and
   
 - once with the existing legacy classical algorithm, for legacy
   verifiers.

In the event that you need to support "legacy-legacy" clients, i.e.,
those that have never heard about even the newer legacy key, you can
sign three times, like the InRelease file above does.

If there's a known QC break for one of the legacy algorithms, you just
stop signing with the keys; installations that haven't received the new
signing algorithm, or don't know about the signing key, are out of luck.
But then, they're out of luck anyway, because the QC operator can forge
code signatures that they'll accept.

There is a clear, simple upgrade path with this approach, but it is
linear, *not* combinatorial.  And it's already happening.  We just need
to make it work safely with the new algorithms, and not require every
application layer to sort out some complex new semantics in order to be
safe.

For signature algorithms with weaker cryptanalytic history than we'd
like, like ML-DSA, composite sigs offer that kind of safety.

        --dkg