Merged, thanks! On Thu, Dec 03, 2026 at 10:30:46AM +0000, Christopher Staite wrote: > Subject: Re: FIPS check misses PQC NIDs > Sorry, CPU overloaded due to a build and the client frizzed out. Pause > build, then send. > > Thanks, Chris. >
> From ab6b46ab2427bd3c2b77ba817d6c7aa83bab8570 Mon Sep 17 00:00:00 2001 > From: Chris Staite <[email protected]> > Date: Thu, 3 Dec 2026 09:21:17 +0000 > Subject: [PATCH] BUG/MEDIUM: ssl: allow the ML-KEM groups in the FIPS curve > check > > Since commit 96c7759f3 ("MEDIUM: ssl: add FIPS elliptic curve check for > AWS-LC"), ssl_fips_check_curves() only accepts P-256, P-384 and P-521 > when the library runs in FIPS mode, and refuses to start on anything > else. This also rejects the ML-KEM based key exchange groups, which makes > it impossible to enable post-quantum key exchange in FIPS mode: > > ssl-default-server-curves SecP256r1MLKEM768:X25519MLKEM768:P-256:P-384 > > [ALERT] 'server <CLT-OCSP-CHK>/<HTTPSCLIENT>' : FIPS mode active but > non-FIPS curve(s) configured: 'SecP256r1MLKEM768', 'X25519MLKEM768'. > > This was observed with AWS-LC FIPS 4.2.0. The same applies to "curves" > on bind and server lines and to ssl-default-bind-curves. > > These groups are in fact fine in FIPS mode. ML-KEM is standardized in > FIPS 203, and NIST SP 800-56C Rev. 2 allows a shared secret made of > several components to be used in key derivation as long as one of them > is generated by an approved scheme, which is the case of ML-KEM. This > makes X25519MLKEM768 acceptable despite X25519 alone not being approved. > For SecP256r1MLKEM768 and SecP384r1MLKEM1024 both components are > approved anyway. AWS-LC itself does not restrict these groups when built > in FIPS mode: they are part of its default group list and its service > indicator reports ML-KEM as approved. > > The impact is significant since X25519MLKEM768 is the only post-quantum > hybrid group implemented by Chromium and the only one enabled by default > in Firefox (which only uses SecP256r1MLKEM768 after a configuration > change), so browsers cannot get a post-quantum key exchange from a FIPS > HAProxy without it. > > Let's add NID_X25519MLKEM768, NID_SecP256r1MLKEM768, > NID_SecP384r1MLKEM1024 and NID_MLKEM512/768/1024 to the list of approved > NIDs, each one being guarded by #ifdef since they depend on the AWS-LC > version. Everything else (X25519 alone, X448, brainpool, P-224, the > pre-standard Kyber drafts) is still rejected. > > This must be backported to 3.5. > --- > src/fips.c | 27 ++++++++++++++++++++++++++- > 1 file changed, 26 insertions(+), 1 deletion(-) > > diff --git a/src/fips.c b/src/fips.c > index 04e14cfc3..5321d87bb 100644 > --- a/src/fips.c > +++ b/src/fips.c > @@ -22,11 +22,36 @@ static const int fips_approved_cipher_nids[] = { > NID_undef > }; > > -/* FIPS-approved elliptic curve NIDs (NIST P-curves). NID_undef terminates > the list. */ > +/* FIPS-approved elliptic curve and key exchange group NIDs. NID_undef > + * terminates the list. Besides the NIST P-curves, this includes ML-KEM > + * (FIPS 203) and the hybrid groups combining it with an ECDH group: per > + * NIST SP 800-56C Rev. 2 a combined shared secret remains approved as long > + * as one of the components is, which is the case of ML-KEM. This matches > + * AWS-LC, which does not restrict these groups in FIPS mode. The macros are > + * guarded since they depend on the AWS-LC version. > + */ > static const int fips_approved_curve_nids[] = { > NID_X9_62_prime256v1, /* P-256 */ > NID_secp384r1, /* P-384 */ > NID_secp521r1, /* P-521 */ > +#ifdef NID_MLKEM512 > + NID_MLKEM512, > +#endif > +#ifdef NID_MLKEM768 > + NID_MLKEM768, > +#endif > +#ifdef NID_MLKEM1024 > + NID_MLKEM1024, > +#endif > +#ifdef NID_X25519MLKEM768 > + NID_X25519MLKEM768, > +#endif > +#ifdef NID_SecP256r1MLKEM768 > + NID_SecP256r1MLKEM768, > +#endif > +#ifdef NID_SecP384r1MLKEM1024 > + NID_SecP384r1MLKEM1024, > +#endif > NID_undef > }; > > -- > 2.43.0 > > > > > > On 3 Dec 2026, at 09:59, William Lallemand <[email protected]> wrote: > > > > On Thu, Dec 03, 2026 at 09:32:20AM +0000, Christopher Staite wrote: > >> Subject: FIPS check misses PQC NIDs Hi all, > >> > >> The fips.c checks in 3.5 fail to account for the PQC algorithms which is a > >> bit of an issue especially given all the hype around this recently. Please > >> see attached a patch to add the allowed algorithms to the list as > >> recommended > >> by NIST. > >> > >> Patch generated by Claude under my supervision and review. > >> > >> Thanks, Chris. > >> > > > > Hi Christopher, > > > > That's a good idea to add PQC in the list indeed. I think you made a mistake > > with your attachment though, could you send the patch again? > > > > Thanks. > > > > -- > > William Lallemand > -- William Lallemand

