Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate 0xFE30 X25519/Kyber512 code point #4347

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/examples/tls_13_hybrid_key_exchange_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ 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_KYBER_512_R3_CLOUDFLARE);
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);
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_512_R3_CLOUDFLARE,
return {Botan::TLS::Group_Params::HYBRID_X25519_KYBER_768_R3_OQS,
Botan::TLS::Group_Params::HYBRID_X25519_KYBER_512_R3_OQS};
}
};
Expand Down
7 changes: 6 additions & 1 deletion src/lib/tls/tls_algos.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ enum class Group_Params_Code : uint16_t {

// Cloudflare code points for hybrid PQC
// https://blog.cloudflare.com/post-quantum-for-all/
HYBRID_X25519_KYBER_512_R3_CLOUDFLARE = 0xFE30,
HYBRID_X25519_KYBER_512_R3_CLOUDFLARE BOTAN_DEPRECATED("removed without replacement") = 0xFE30,
reneme marked this conversation as resolved.
Show resolved Hide resolved

// libOQS defines those in:
// https://github.com/open-quantum-safe/oqs-provider/blob/main/ALGORITHMS.md
Expand Down Expand Up @@ -213,6 +213,9 @@ class BOTAN_PUBLIC_API(3, 2) Group_Params final {
constexpr bool is_post_quantum() const { return is_pure_kyber() || is_pure_frodokem() || is_pqc_hybrid(); }

constexpr bool is_pqc_hybrid() const {
BOTAN_DIAGNOSTIC_PUSH
BOTAN_DIAGNOSTIC_IGNORE_DEPRECATED_DECLARATIONS

return m_code == Group_Params_Code::HYBRID_X25519_KYBER_512_R3_CLOUDFLARE ||
m_code == Group_Params_Code::HYBRID_X25519_KYBER_512_R3_OQS ||
m_code == Group_Params_Code::HYBRID_X25519_KYBER_768_R3_OQS ||
Expand All @@ -231,6 +234,8 @@ class BOTAN_PUBLIC_API(3, 2) Group_Params final {
m_code == Group_Params_Code::HYBRID_SECP521R1_KYBER_1024_R3_OQS ||
m_code == Group_Params_Code::HYBRID_SECP521R1_eFRODOKEM_1344_SHAKE_OQS ||
m_code == Group_Params_Code::HYBRID_SECP521R1_eFRODOKEM_1344_AES_OQS;

BOTAN_DIAGNOSTIC_POP
}

constexpr bool is_kem() const { return is_pure_kyber() || is_pure_frodokem() || is_pqc_hybrid(); }
Expand Down
1 change: 0 additions & 1 deletion src/scripts/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1323,7 +1323,6 @@ def get_oqs_rootca():
return get_oqs_resource("/CA.crt")

test_cfg = [
TestConfig("pq.cloudflareresearch.com", "x25519/Kyber-512-r3/cloudflare"),
TestConfig("pq.cloudflareresearch.com", "x25519/Kyber-768-r3"),
TestConfig("google.com", "x25519/Kyber-768-r3"),

Expand Down
Loading