Re: [CFRG] NSA vs. hybrid

Soatok Dreamseeker <soatok.dhole@gmail.com> Sun, 14 November 2021 21:07 UTC

Return-Path: <soatok.dhole@gmail.com>
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 D18873A05AC for <cfrg@ietfa.amsl.com>; Sun, 14 Nov 2021 13:07:11 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 F-_zO-cfrZy6 for <cfrg@ietfa.amsl.com>; Sun, 14 Nov 2021 13:07:07 -0800 (PST)
Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) (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 B087D3A05C7 for <cfrg@irtf.org>; Sun, 14 Nov 2021 13:07:06 -0800 (PST)
Received: by mail-wm1-x334.google.com with SMTP id 133so12241004wme.0 for <cfrg@irtf.org>; Sun, 14 Nov 2021 13:07:06 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=biU3thbfezmxYT5j1DtvFydmK1SSCzlMhHJPfQ2xZ3Q=; b=E1HEeDUFq1ImnYrxhxGfS9gWtfQ4/+3WPUiv8TEA1fGQLqIei2Q3zTpat0FMLiE/d8 f4uCv+49tMJqGY3bdhQL6fnFTyRbjNkK41gzjv9M7OiRnlHUxfjKFpoGBlH/VxIAPpUs Qu/5BR7DJe4Jn7A94nFYvDvwKT52Zv1kWLRX3Yj+kVhlEZpRSEhtLIlVF0yBDcUr10He ascgBn3zyS4rrLIKgaYRRlqLLHDIjLuzY8r+pve/9ZvlYVVhGPQ2yFdtQsLNJXkSIPvJ JIOly3hXd4dCjaqrOEh7Fmjj2V709CQ6qjbOEHls1OpU+iedgRiMI57xIOaw+5bGBMVY 7TUw==
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; bh=biU3thbfezmxYT5j1DtvFydmK1SSCzlMhHJPfQ2xZ3Q=; b=QDvbljImL4YVM4ae0nSQSkFmJUG8PEQPsca3uh6f/4egjIxfZlRMhu+ddUM/7IOaI2 W5yjFjzBI8+wudWd302VEhvRle8MjbIjxtVD2upXrSBwmfHEtJLGdeK2A6/CgBwCwK37 Im9940HfIbPUV/t+x7Z5/aT5lTUvvr4cZcscrXmWg+IZAzUsHnNIEDbp/ACzEbFZY/yb e3LDNdEVho8YlyNJ/IilcvvnOpv8rxzM/0s3Bh8w604AKhdSUr4XkECeiRhI2Yo0SYOl xJf2XPnKGQqIeqCAdPNYorSykTNHsUXaD2O9zPfgnIFb30jCP70qGojcGu03EWQFqt17 aoxQ==
X-Gm-Message-State: AOAM532pByUA5ZP/24r+cIgFf4P6QIR7xyenwsjY0FYWtGVxRP1XGAeG yfIh2Ulba+ShA+RcVGCZiRwcp9kATF+gUaFmqDPY+Rkg5RQ=
X-Google-Smtp-Source: ABdhPJzuQKJHkLsnfh1l71kQNdOuZtuMSEZDyK3h7Wpm7h9EPQTq+16+7UJUbYz0R0se87PHp2Tj0BWedMfvfeW1YMQ=
X-Received: by 2002:a05:600c:a49:: with SMTP id c9mr37225296wmq.172.1636924019980; Sun, 14 Nov 2021 13:06:59 -0800 (PST)
MIME-Version: 1.0
References: <A76CD9D7-7502-4C9D-AFCA-E9378D44E52B@ll.mit.edu> <20211113135339.770521.qmail@cr.yp.to>
In-Reply-To: <20211113135339.770521.qmail@cr.yp.to>
From: Soatok Dreamseeker <soatok.dhole@gmail.com>
Date: Sun, 14 Nov 2021 16:06:49 -0500
Message-ID: <CAOvwWh2ac2VOAwPdDj5mZmKoOYAoJ_0q=AoodLk8LNNETs8GCQ@mail.gmail.com>
To: cfrg@irtf.org
Content-Type: multipart/alternative; boundary="000000000000bc3bc405d0c61238"
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/3_6IC-cSusI-6-BsLuddZ_maWhw>
Subject: Re: [CFRG] NSA vs. hybrid
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <https://www.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://www.irtf.org/mailman/listinfo/cfrg>, <mailto:cfrg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Sun, 14 Nov 2021 21:07:12 -0000

Hi Dan,

On Sat, Nov 13, 2021, 8:54 AM D. J. Bernstein <djb@cr.yp.to> wrote:

> Blumenthal, Uri - 0553 - MITLL writes:
> > Using Dan's terminology: you want P chain of trust - ask for it, you
> > want Q chain of trust - request that. In the unlikely case of wanting
> > both - get both, AFAICT, the overhead would be small.
>
> Google's CECPQ1 experiment and the Google-Cloudflare CECPQ2 experiment
> both combined P (ECC) with Q (the post-quantum option). The motivation
> was clearly stated, and applies verbatim to signatures too:
>
>    The post-quantum algorithm might turn out to be breakable even with
>    today's computers, in which case the elliptic-curve algorithm will
>    still provide the best security that today’s technology can offer.
>    Alternatively, if the post-quantum algorithm turns out to be secure
>    then it'll protect the connection even against a future, quantum
>    computer.
>
> The post-quantum situation since then hasn't become _less_ scary. We've
> seen almost every NISTPQC submission losing security, often so much as
> to be declared broken. Exciting new attacks are appearing, and the study
> of post-quantum implementation failures is in its infancy. Why would it
> be unlikely for people to want to combine post-quantum crypto with ECC?
>
> If the answer is that NSA's declaration of confidence is influential:
> This is where it would be valuable for CFRG to advise ECC integration
> into all post-quantum deployments for the foreseeable future.
>
> > And you expect P+Q certificates to be validated correctly?
>
> I agree that certificate validation is a mess. This is why, regarding
> the mechanisms for doing both P and Q, I'd expect that having a new
> signature system _internally_ combining P+Q is safer than changing the
> certificate-validation logic. I'm puzzled by NSA's unexplained
> statements to the contrary. See also Mike's message.
>
> > In practice, large PKI that have multiple intermediary CAs, will
> > likely have separate CAs for P and Q certs.
>
> Why? If a CA is interested in offering Q certificates, why would it not
> want to provide
>
>    * the extra security value of offering P+Q certificates (which are
>      practically the same size as Q certificates) plus
>
>    * the extra compatibility value of offering P certificates?
>
> For the RSA->ECC upgrade there's (1) a stable ECC security picture and
> (2) clear performance reasons to not have the ECC signatures accompanied
> by RSA signatures. For the post-quantum upgrade, the story is reversed:
> the post-quantum security picture isn't stable, and keeping ECC as a
> security layer has low cost.
>
> ---Dan
>
> _______________________________________________
> CFRG mailing list
> CFRG@irtf.org
> https://www.irtf.org/mailman/listinfo/cfrg


Coming from the world outside of academic cryptography, I expect more logic
bugs from software trying to validate separate P-chains and Q-chains than
with an additional, unified, P+Q signature scheme.

Additionally, why can't we define a unified mode that generates both
keypairs from a single random secret? i.e.

primary_seed := randombytes_buf(64) // store this

ed25519_seed := hash_sha512256(PREFIX_PREQUANTUM || primary_seed)

pq_seed := hash_sha512256(PREFIX_POSTQUANTUM || primary_seed)

ed25519_keypair := crypto_sign_seed_keypair(ed25519_seed)

pq_keypair := pqcrypto_sign_seed_keypair(pq_seed)

This turns a 512-bit secret into two distinct 256-bit seeds. For ed25519,
this can be the unclamped sk. For PQ, it can be a seed for a DRBG used to
generate the (sk, pk) pair.

Even if you can break ECC and recover the secret key, you would also need
to be able to preimage attack SHA512 from only half of its output. The
input being 512 bits is chosen to have a birthday bound at the 256-bit
security level.

Why would we do this? Because specifying a higher-level composite protocol
for signatures makes it less likely that implementors will get it wrong.

>
>