[CFRG] Re: [lamps] Re: Re: Cross-testing update on LAMPS Composite and cfrg-concrete-hybrid-kems

Martin Schanzenbach <mschanzenbach@posteo.de> Mon, 27 October 2025 11:04 UTC

Return-Path: <mschanzenbach@posteo.de>
X-Original-To: cfrg@mail2.ietf.org
Delivered-To: cfrg@mail2.ietf.org
Received: from localhost (localhost [127.0.0.1]) by mail2.ietf.org (Postfix) with ESMTP id 7528F7CCA90D for <cfrg@mail2.ietf.org>; Mon, 27 Oct 2025 04:04:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at ietf.org
X-Spam-Flag: NO
X-Spam-Score: -2.796
X-Spam-Level:
X-Spam-Status: No, score=-2.796 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: mail2.ietf.org (amavisd-new); dkim=pass (2048-bit key) header.d=posteo.de
Received: from mail2.ietf.org ([166.84.6.31]) by localhost (mail2.ietf.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id O2TXcye0IK5B for <cfrg@mail2.ietf.org>; Mon, 27 Oct 2025 04:04:13 -0700 (PDT)
Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.66]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail2.ietf.org (Postfix) with ESMTPS id 4D39F7CCA8FB for <cfrg@irtf.org>; Mon, 27 Oct 2025 04:04:13 -0700 (PDT)
Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id F202E240103 for <cfrg@irtf.org>; Mon, 27 Oct 2025 12:04:05 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=posteo.de; s=2017; t=1761563046; bh=I+WTWy0Kz9afpwx1GJuz2u+/VBsKhf9xmj7QApKL/+Y=; h=Message-ID:Subject:From:To:Cc:Date:Autocrypt:Content-Type: MIME-Version:From; b=QLRFfJYtA8ZHMiBso1Q1QG1f5iicHHtUl0HZo4Ix72puPGSgYcmL5OT+BOlchox27 j0wBFNoZsEYUxWZUIcHtO6eIBwZ2oPwsQz5FnlbCwmKJmbbMnMyU/p1TPWmRGPHQM9 CCn+d2TZCYQUbvpDEojA3jFPggDAORKg16+bS4T1URQdNRetsDxoZ3weVtxKuxl1v4 wswkvUAPh9cOU0wWZPIBcNHk3bSOta+eH//sRcq/dCH7mp+f79NEAbikY5g2s5/g+S b+5B8vf/vHgcjjkfV/2WvWIaVczTJtzdlg9cko92iZWlelEnHpGGnK75DQy0/jGSoN MYlvKko28oO0g==
Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4cw9cN1qfpz9rxS; Mon, 27 Oct 2025 12:04:04 +0100 (CET)
Message-ID: <51e5bc4a83c2b213716dfec19be26152d47d4254.camel@posteo.de>
From: Martin Schanzenbach <mschanzenbach@posteo.de>
To: Thad Thompson <thad.thompson@gmail.com>, Filippo Valsorda <filippo@ml.filippo.io>
Date: Mon, 27 Oct 2025 11:04:05 +0000
In-Reply-To: <CAH7DV8C9wZZA5xdbjNuuQOSnp5VMEXPyL2K9QxjoUvuWF14AFg@mail.gmail.com>
References: <CAKZgXHoi88=hETRtacXgph0pscmU4VreGxOHTsEgbecLJT1opQ@mail.gmail.com> <21e583cf-a58c-4ff2-8ef6-e4c894525dd9@app.fastmail.com> <CAKZgXHpJKUVurxvWYKdrioMH1yKRFot8svAsuc2VXYwGxZ2jNw@mail.gmail.com> <CAJfyev290iHbckqaQJaX4pnySVwnp4_oSfbL1M8JQgji1MQsEg@mail.gmail.com> <CAKZgXHovWwAErpaUcW_KxW0Xx5-0TQT_=SWp9cCf6OZokxeeNQ@mail.gmail.com> <CAKZgXHo-BQzVARL-jxDDA+veXs1ytj-LmDLDWcviH5M8SpDEWg@mail.gmail.com> <CACsn0ckbY3hmLyEymFEEUMPmnP-zJuEZ23kUurZBtczT59O93w@mail.gmail.com> <CAKZgXHpPPQLZzdWnRA-J=WuMryMiKJD-e-ujQgaJWDiadXCYKw@mail.gmail.com> <6205989c-81f2-45e5-837b-ce6217b88b55@app.fastmail.com> <CAH7DV8C9wZZA5xdbjNuuQOSnp5VMEXPyL2K9QxjoUvuWF14AFg@mail.gmail.com>
Autocrypt: addr=mschanzenbach@posteo.de; prefer-encrypt=mutual; keydata=mQINBFZlTN8BEADIXdWebdUepgP8YkULGh2EClt/q2Nkh5QB+V88ZtWVdEfz6ELbKeKE/ 39yllXso20H56OfWGgcU2SF6EKdT+FDir5pDxM+RQiIjrYHLMj9MG87LBcW65PHny6hmXtrfrWISX q7x2Si5G9pMz33jp5Dsx/IMTbTPbdK09b34S9aqIjTkpQ4yqByi07nkRcYgSOzx1Dr/7oatKn5/tT RQm9CQ2pqcYYD5Rqg1jcNpKRUWFX/m+LRd3iQ6ZF/F2W9hR6BYWRUi3eJOFYX/ngWrSj3q3c3zQgP y7R/4weZRT/WYjwccHyvLHbw3YFVLDgM2RAu2q765+3iWrH4RvYxS0eMDan7uK6q3+83KB83ofnH8 IEt6PWK3tmmQJ1vYbQDSqeLxiptPlOgoQuaJCCAFJaBIwamLZJq0BPmncDzZ3bGksROgV31qqFYsd KfyUnKQZZpEVsdpOz1oMK0RSlqW2j759C8E4DrsqCBoBm63lZPQsYp94s4gT5W2D3vfPqF3dOht6n ByGVYvwh3ildcBtKcU8vctlms+izbb0p94pviM10/vIuuAzerB4Pb8qMN8+KuSfIUtTWprD/D0NAP RBpc7Uiv8sSufldNhN+A4GdkkXe409+AWGusKMlZO9fP3BYf+J3jDxlbRoVoEyl67d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c8VprxMAz9C+T3KuxGH /gK26ALV8roxi3en7wIGLRcybxY9fmrnj4YahHyMCWEg7MATN4BIUXDQy+u7vdBmLn+iv6KBFszo8 9KwBfzd08Rqb+N77z9BgkrJp9etRSlqqh0D4YtzWXmBnxSShU/xQac/qMdIDVYFK9HypIcD0rHJgg sEaq/0g3ECnVLR/IFpBrKIPNjA7U+d2W9g=
Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-rcAc/EPUWrmqeiNqSoPm"
MIME-Version: 1.0
Message-ID-Hash: AEVXS6KGSBLSRNZ4XTGFLANI74ZTM7QK
X-Message-ID-Hash: AEVXS6KGSBLSRNZ4XTGFLANI74ZTM7QK
X-MailFrom: mschanzenbach@posteo.de
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-cfrg.irtf.org-0; header-match-cfrg.irtf.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: CFRG <cfrg@irtf.org>, hpke@ietf.org, LAMPS WG <spasm@ietf.org>
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [CFRG] Re: [lamps] Re: Re: Cross-testing update on LAMPS Composite and cfrg-concrete-hybrid-kems
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/FV0O3A0-6jpMQmFh_FPasdw_FD8>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cfrg>
List-Help: <mailto:cfrg-request@irtf.org?subject=help>
List-Owner: <mailto:cfrg-owner@irtf.org>
List-Post: <mailto:cfrg@irtf.org>
List-Subscribe: <mailto:cfrg-join@irtf.org>
List-Unsubscribe: <mailto:cfrg-leave@irtf.org>

Am Mittwoch, dem 22.10.2025 um 07:46 -0500 schrieb Thad Thompson:
> > Implementations can obviously always go off-spec for keygen.
> 
> This seems like the heart of the issue. 
> 
> Let's say I get my PQ-HPKE library implemented and tested and it
> works fine with all the test vectors. But in prod we're only allowed
> to use EC private keys forged in the fires of Mount Doom. One does
> not simply tell their boss (and customers) "no problem, we'll just go
> off spec." 
> 
> It would go a long way if there were a section clearly explaining the
> security impact of using EC keys generated elsewhere, making it an
> 'in-spec' option.
> 
> Best
> -Thad

+1

I have to admit, that in my HPKE implementation I did not even notice
(or have enforced) that X25519 keys generated through other means
cannot be used.
Is this a MUST requirement? Where is the reasoning in particlar for
X25519 and X448? If it is a MUST, somewhere in the document should be
an explanation on why it is done such that other KEMs can make an
informed decision how to place limitations on their (private) keys in a
similar fashion.

BR

> 
> 
> On Tue, Oct 21, 2025 at 6:06 PM Filippo Valsorda
> <filippo@ml.filippo.io> wrote:
> > Hi Mike,
> > 
> > Since this thread is about hybrid KEMs and not HPKE DHKEM, I think
> > you are confusing the DeriveKeyPair function of RFC 9180 with the
> > CG framework DeriveKeyPair function of draft-irtf-cfrg-hybrid-kems-
> > 06, Section 5.5, which references the RandomScalar function
> > of draft-irtf-cfrg-concrete-hybrid-kems-01, Section 3.1.1. (I also
> > find it hard to navigate the split in documents.)
> > 
> > I have reproduced them below for you. I am certain you can
> > implement them with any major cryptography library. There is
> > nothing HPKE-specific about them. SP 800-56A, Section 5.6.1.2, only
> > specifies a random key generation algorithm (a pretty silly one,
> > IMHO, with the needless "d = c + 1" instead of checking "c > 0"),
> > so I am not sure what relevance it has here: there is no such thing
> > as a standard library function for SP 800-56A, Section
> > 5.6.1.2.{1,2} key derivation. If the argument is that no one should
> > be allowed to derive ECDH keys from a KDF because NIST doesn't like
> > that, I doubt many folks will find that argument persuasive.
> > 
> > Implementations can obviously always go off-spec for keygen if they
> > need to appease a regulator (or e.g. use hardware keys), though!
> > They will still interoperate.
> > 
> > Cheers,
> > Filippo
> > 
> > def DeriveKeyPair(seed):
> >     (ek_PQ, ek_T, dk_PQ, dk_T) = expandDecapsKeyG(seed)
> >     return (concat(ek_PQ, ek_T), seed)
> > def expandDecapsKeyG(seed):
> >     seed_full = PRG(seed)
> >     (seed_PQ, seed_T) = split(KEM_PQ.Nseed, Group_T.Nseed, seed_full)
> > 
> >     (ek_PQ, dk_PQ) = KEM_PQ.DeriveKeyPair(seed_PQ)
> >     dk_T = Group_T.RandomScalar(seed_T)
> >     ek_T = Group_T.Exp(Group_T.g, dk_T)
> > 
> >     return (ek_PQ, ek_T, dk_PQ, dk_T)
> > def RandomScalar(seed):
> >   state = XOF.Init(seed)
> >   sk = OS2IP(XOF.Read(state, Nscalar))
> >   while sk == 0 || sk >= order:
> >     sk = OS2IP(XOF.Read(state, Nscalar))
> >   return (sk, pk(sk))
> > 
> > (The XOF is SHAKE256, Nseed/Nscalar is 32 for P-256, and 48 for P-
> > 384.)
> > 
> > 2025-10-22 00:31 GMT+02:00 Mike Ounsworth
> > <ounsworth+ietf@gmail.com>:
> > > Hi Watson,
> > > 
> > > SP 800-56A section 5.6.1 defines the FIPS-approved ways of
> > > deriving a ECDH key. You can't derive your keys as described in
> > > rfc9180 7.1.3 and claim that it is "ECDH" as defined in SP 800-
> > > 56A, because it isn't. That's not a FIPS-allowed way to derive EC
> > > keys, and that's the whole story.
> > > 
> > > On Tue, 21 Oct 2025 at 14:23, Watson Ladd <watsonbladd@gmail.com>
> > > wrote:
> > > > On Tue, Oct 21, 2025 at 12:14 PM Mike Ounsworth
> > > > <ounsworth+ietf@gmail.com> wrote:
> > > > >
> > > > > Follow-up: I see that DHKEM.DeriveKeyPair(ikm) is defined in
> > > > RFC9180:
> > > > > https://datatracker.ietf.org/doc/html/rfc9180#derive-key-pair
> > > > >
> > > > > That makes liberal use of HPKE's LabelledExtract(), which
> > > > fully explains why this is not compatible with the python API.
> > > > >
> > > > > That means that a seed-based key derivation is defined for P-
> > > > 256, P-384, and P-521, but only within the confines of the
> > > > DHKEM primitive within the HPKE protocol. It is still the case
> > > > that a seed-based key derivation is not defined for ECDH in
> > > > general.
> > > > >
> > > > > So, on that grounds, I object to draft-irtf-cfrg-concrete-
> > > > hybrid-kems RECOMMENDING a seed-based priv on exactly the same
> > > > grounds that anyone else would object to it RECOMMENDING an
> > > > ASN.1 based encoding: this is a CFRG document that normatively
> > > > depends on a building block that only exists in one single IETF
> > > > protocol, and most importantly to me, does not exist in FIPS or
> > > > current cryptographic libraries.
> > > >  
> > > > I don't understand: HKDF (or the underlying hash function worst
> > > > case)
> > > > absolutely does exist in current cryptographic libraries. If
> > > > the
> > > > argument is that a private key generated one way won't work
> > > > when moved
> > > > to a different system, that's a slightly different matter.
> > > >  
> > > > >
> > > > > On Tue, 21 Oct 2025 at 13:34, Mike Ounsworth
> > > > <ounsworth+ietf@gmail.com> wrote:
> > > > >>
> > > > >> Hi CFRG and HPKE,
> > > > >>
> > > > >> I just want to give an update on this. Richard and I did
> > > > some more cross-testing this week, and we are at an impasse on
> > > > the SEC-P curves, and it has to do with the seeds. The CFRG
> > > > /HPKE draft stores the hybrid private keys as a seed, so you
> > > > have to re-derive the P256 half from a seed. My problem is that
> > > > ECDH is a thing that has been standardized for like 20 years in
> > > > [SEC1] and [SP.800-56A], and those two documents do not specify
> > > > or allow a seed-based EC keygen, and as a consequence, many
> > > > crypto libraries don't support a seed-based EC keygen API. For
> > > > example, I'm doing my reference implementation for Composites
> > > > on top of the core python cryptography library, and I cannot
> > > > implement the CRFG / HPKE draft that way. Python crypto has
> > > > this:
> > > > >>
> > > > https://cryptography.io/en/latest/hazmat/primitives/asymmetric/ec/#cryptography.hazmat.primitives.asymmetric.ec.derive_private_key
> > > > >> but that appears to not derive the same keys as Richard's
> > > > implementation.
> > > > >>
> > > > >> The issue is that EC.derive_priv_from_seed() is not a
> > > > standardized function. You can probably infer from a careful
> > > > read of [SEC1] or [SP.800-56A] what it needs to be, but it is
> > > > not actually standardized or FIPS-allowed. It requires mucking
> > > > around with EC point multiplication. The fact that it's not a
> > > > standardized thing means that I will likely not be the last
> > > > person to have interop problems with this. Maybe my issues are
> > > > as simple as not using that python ec.derive_private_key()
> > > > properly, maybe his scalar is 'big' rather than 'little' or
> > > > something. If that's the case, I'd be happy -- but this is the
> > > > kind of mess you get into when you use non-standardized APIs
> > > > for existing 20 year-old primitives.
> > > > >>
> > > > >> So at this point, I think we have to declare non-
> > > > compatibility between LAMPS and HPKE Hybrid KEMs. Since our X-
> > > > Wings are compatible, we know that our QSF frameworks are
> > > > identical, so in principle our P256's should work too, but
> > > > we're been incapable of testing it because this off-spec seed
> > > > stuff is getting in the way.
> > > > >>
> > > > >> On Thu, 16 Oct 2025 at 17:40, Tushar Patel
> > > > <tjpatel.tl@gmail.com> wrote:
> > > > >>>
> > > > >>> Sorry, jumping in a running train and
> > > > >>> many years ago while working through JSON bindings for the
> > > > tests, I ran into a sign bit conversion error on big numbers
> > > > and had to rewrite part of the library, the fixed code is with
> > > > a previous employer, 64-bit and 128-bit in JSON libs are a mess
> > > > or sign bit issues in general.
> > > > >>>
> > > > >>> Also, please make sure that you are parsing the compressed
> > > > notations for ECC correctly, some libraries pack those
> > > > incorrectly and also wrote my own ASN.1 parsers for some
> > > > elements, you might be surprised where I hit these areas, can’t
> > > > disclose, though both were from reputed organizations.
> > > > >>>
> > > > >>> Last, please make sure you have matching generators and
> > > > incorporate the affine and infinity checks, these may translate
> > > > to all sorts of weird issues that are impossible to debug
> > > > through OSS macros in most cases.
> > > > >>>
> > > > >>> There is substandard ECC, ECDSA and ECDHE at many places in
> > > > OSS libs and you may have to debug these.
> > > > >>>
> > > > >>> Personally, I think NIST should mandate pristine
> > > > implementations as companies spend a lot more time fixing other
> > > > implementations than their own.
> > > > >>>
> > > > >>> Hope it’s Useful,
> > > > >>> Tushar
> > > > >>>
> > > > >>> On Thu, Oct 16, 2025 at 8:45 AM Mike Ounsworth
> > > > <ounsworth+ietf@gmail.com> wrote:
> > > > >>>>
> > > > >>>> Thanks Filippo,
> > > > >>>>
> > > > >>>> Richard and I did some debugging last night. He gave me
> > > > new test vectors that include that bug fix to the P256 / P384
> > > > constants.
> > > > >>>>
> > > > >>>> My current theory is that the code I quickly whipped up to
> > > > do a P256 private key expansion from seed does not match
> > > > Richard's. Since this is wholly out of scope for LAMPS
> > > > Composite (we store the full P256 private key), I'm hoping that
> > > > Richard can give me a dump of intermediate values that includes
> > > > the expanded P256 / P384 private key so that we don't need to
> > > > debug through the P256-from-seed stuff. Anyway, this is all
> > > > good validation of both our test vectors.
> > > > >>>>
> > > > >>>> Anyway, making progress!
> > > > >>>>
> > > > >>>> On Thu, 16 Oct 2025 at 10:29, Filippo Valsorda
> > > > <filippo@ml.filippo.io> wrote:
> > > > >>>>>
> > > > >>>>> 2025-10-16 03:55 GMT+02:00 Mike Ounsworth
> > > > <ounsworth+ietf@gmail.com>:
> > > > >>>>>
> > > > >>>>> Results: we are cross-compatible on X-Wing, but not on
> > > > P256 (and that's after hacking my script to use the CFRG label
> > > > not the LAMPS label, so there's clearly some other bug at play,
> > > > but I have no idea what, so of course I assume it's on the cfrg
> > > > reference impl side 😋).
> > > > >>>>>
> > > > >>>>>
> > > > >>>>> Could be
> > > > https://github.com/cfrg/draft-irtf-cfrg-concrete-hybrid-kems/pull/21
> > > > .
> > > > >>>>
> > > > >>>> _______________________________________________
> > > > >>>> CFRG mailing list -- cfrg@irtf.org
> > > > >>>> To unsubscribe send an email to cfrg-leave@irtf.org
> > > > >
> > > > > _______________________________________________
> > > > > Spasm mailing list -- spasm@ietf.org
> > > > > To unsubscribe send an email to spasm-leave@ietf.org
> > > >  
> > > >  
> > > >  
> > > > -- 
> > > > Astra mortemque praestare gradatim
> > 
> > 
> > _______________________________________________
> > CFRG mailing list -- cfrg@irtf.org
> > To unsubscribe send an email to cfrg-leave@irtf.org
> _______________________________________________
> CFRG mailing list -- cfrg@irtf.org
> To unsubscribe send an email to cfrg-leave@irtf.org