Skip to content

Commit

Permalink
Update example to prefer ML-KEM over Kyber-R3
Browse files Browse the repository at this point in the history
  • Loading branch information
reneme committed Oct 17, 2024
1 parent 42c73be commit 88ef044
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/examples/tls_13_hybrid_key_exchange_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,17 @@ class Client_Policy : public Botan::TLS::Default_Policy {
// additional to the default (classical) key exchange groups
std::vector<Botan::TLS::Group_Params> 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<Botan::TLS::Group_Params> 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};
}
};

Expand Down

0 comments on commit 88ef044

Please sign in to comment.