From 9ebb11bb535af52e20fa7fb67ad0e299cfcedab4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Meusel?= Date: Thu, 17 Oct 2024 13:44:58 +0200 Subject: [PATCH] Update example to prefer ML-KEM over Kyber-R3 --- src/examples/tls_13_hybrid_key_exchange_client.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/examples/tls_13_hybrid_key_exchange_client.cpp b/src/examples/tls_13_hybrid_key_exchange_client.cpp index a61bc33cf5..251c4a827c 100644 --- a/src/examples/tls_13_hybrid_key_exchange_client.cpp +++ b/src/examples/tls_13_hybrid_key_exchange_client.cpp @@ -54,16 +54,17 @@ class Client_Policy : public Botan::TLS::Default_Policy { // additional to the default (classical) key exchange groups std::vector key_exchange_groups() const override { auto groups = Botan::TLS::Default_Policy::key_exchange_groups(); + groups.push_back(Botan::TLS::Group_Params::HYBRID_X25519_ML_KEM_768); + groups.push_back(Botan::TLS::Group_Params::HYBRID_SECP256R1_ML_KEM_768); groups.push_back(Botan::TLS::Group_Params::HYBRID_X25519_KYBER_768_R3_OQS); - groups.push_back(Botan::TLS::Group_Params::HYBRID_X25519_KYBER_512_R3_OQS); + groups.push_back(Botan::TLS::Group_Params::HYBRID_SECP256R1_KYBER_768_R3_OQS); return groups; } // Define that the client should exclusively pre-offer hybrid groups // in its initial Client Hello. std::vector key_exchange_groups_to_offer() const override { - return {Botan::TLS::Group_Params::HYBRID_X25519_KYBER_768_R3_OQS, - Botan::TLS::Group_Params::HYBRID_X25519_KYBER_512_R3_OQS}; + return {Botan::TLS::Group_Params::HYBRID_X25519_ML_KEM_768}; } };