Commit Graph

12 Commits

Author SHA1 Message Date
Bas Westerbaan 47c33f6428 pq patch: also enable P256Kyber768Draft00 by default 2025-10-28 10:54:23 +00:00
Bas Westerbaan 410a96752b pq patch: enable PQ by default like upstream
The big diff is misleading. Applying each patch to the base 478b28ab12f
and comparing them, we see:

git range-diff 478b28ab12f2001a03261624261fd041f5439706..adcd4022f75953605a9bf9f6a4a45c0b4fd8ed94 478b28ab12f2001a03261624261fd041f5439706..6f1b1e1f451e61cd2bda0922eecaa8387397ac5a
1:  adcd4022f ! 1:  6f1b1e1f4 Add additional post-quantum key agreements
    @@ Commit message

         This patch adds:

    -    1. Support for MLKEM768X25519 under the codepoint 0x11ec. The version
    -       of BoringSSL we patch against did not support it yet.
    +    1. Support for X25519MLKEM768 under the codepoint 0x11ec. The version
    +       of BoringSSL we patch against did not support it yet. Like recent
    +       upstream, enable by default.

         2. Supports for P256Kyber768Draft00 under 0xfe32, which we temporarily
            need for compliance reasons.  (Note that this is not the codepoint
    @@ ssl/extensions.cc: static bool tls1_check_duplicate_extensions(const CBS *cbs) {
            return true;
          default:
            return false;
    +@@ ssl/extensions.cc: bool ssl_client_hello_get_extension(const SSL_CLIENT_HELLO *client_hello,
    + }
    +
    + static const uint16_t kDefaultGroups[] = {
    ++    SSL_GROUP_X25519_MLKEM768,
    +     SSL_GROUP_X25519,
    +     SSL_GROUP_SECP256R1,
    +     SSL_GROUP_SECP384R1,

      ## ssl/ssl_key_share.cc ##
     @@
2025-10-28 10:54:23 +00:00
Bas Westerbaan 21735accf8 pq: fix MSVC C4146 warning 2025-09-30 16:22:47 +02:00
Alessandro Ghedini 4cb7e260a8 Clean-up legacy FIPS options
Per BoringSSL's FIPS policy, its `main` branch is the "update branch"
for FedRAMP compliance's purposes.

This means that we can stop using a specific BoringSSL branch when
enabling FIPS, as well as a number of hacks that allowed us to build
more recent BoringSSL versions with an older pre-compiled FIPS modules.

This also required slightly updating the main BoringSSL submodule, as
the previous version had an issue when building with the FIPS option
enabled. This is turn required some changes to the PQ patch as well as
some APIs that don't seem to be exposed publicly, as well as changing
some paths in the other patches.

In order to allow a smooth upgrade of internal projects, the `fips-compat`
feature is reduced in scope and renamed to `legacy-compat-deprecated` so
that we can incrementally upgrade internal BoringSSL forks. In practice
this shouldn't really be something anyone else would need, since in
order to work it requires a specific mix of BoringSSL version and
backported patches.
2025-09-26 17:12:23 +01:00
Bas Westerbaan b1a7434c19 boring-pq.patch Fix by not updating crypto_test_data.cc
crypto_test_data.cc is not included anymore since 2475ef386b
2024-09-19 00:17:37 +02:00
Bas Westerbaan 6d3639f173 Add post-quantum key agreement X25519MLKEM768
This is the successor of X25519Kyber768Draft00.

Spec:

https://datatracker.ietf.org/doc/draft-kwiatkowski-tls-ecdhe-mlkem/02/

IANA has assigned the codepoint.

https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-8

Upstream BoringSSL support landed in.

7fb4d3da50

The version of BoringSSL we patch does not include it, so we add it manually.

Chrome and Firefox are planning to enable in October.

This PR is based on the IPD-Wing patch reviewed here:

https://github.com/cloudflare/boring/pull/243

There are two changes. First we simplify the patch a bit as we do not
need IPD-Wing. Secondly, we perform the encapsulation key check, which
was a last minute addition of NIST. We perform this check also for Kyber.
2024-09-18 12:00:27 +02:00
Bas Westerbaan 2c0a14253a Revert "PQ: fix timing sidechannels and add IPDWing"
For TLS, early adopters prefer X25519MLKEM768. Remove IPDWing in
preparation for adding X25519MLKEM768.

https://datatracker.ietf.org/doc/draft-kwiatkowski-tls-ecdhe-mlkem/

This reverts commit 4725a930d5.
2024-09-18 12:00:27 +02:00
Bas Westerbaan 4725a930d5 PQ: fix timing sidechannels and add IPDWing
Fix three potential timing sidechannels. These don't affect ephemeral
usage of Kyber as in TLS, but it's good practice to get rid of them anyway.

Also adds IPDWing, a preliminary version of X-Wing using the initial public
draft (IPD) of ML-KEM. Don't use it.
2024-07-08 19:47:43 +01:00
Ivan Nikulin 2475ef386b Reduce release bundle size by excluding PQ test data 2023-08-01 17:51:44 +01:00
Ivan Nikulin 0b542999d4 Address review comments 2023-07-10 14:00:52 +01:00
Ivan Nikulin d1ee9bfd86 Use workspace metadata for crates 2023-07-10 11:38:18 +01:00
Ivan Nikulin c4e8a94a69 Add RPK and PQ crypto features 2023-07-07 13:50:36 +01:00