Add native OpenSSL 3.5 X25519MLKEM768 KEM backend - #170
Conversation
Adds fizz::openssl::OpenSSLKemKeyExchange implementing the KeyExchange interface for the native X25519MLKEM768 hybrid group available in stock OpenSSL 3.5+. OpenSSL performs the X25519 + ML-KEM-768 combine internally (Option A), so no liboqs/libsodium hybrid is needed. - Client keygen + decapsulate, server encapsulate; KEM roles mapped onto KeyExchangeRole. clone() uses EVP_PKEY_up_ref. - Gated behind OPENSSL_VERSION_NUMBER >= 0x30500000L plus a runtime provider-availability check; non-3.5 builds are unaffected. - MultiBackendFactory prefers the native path when available, falling back to the existing liboqs path otherwise. - Adds round-trip, clone, size, negative, and negotiation unit tests; registered in CMake, FizzSources, and BUCK. Issue: facebookincubator#169
|
Hi @adityasoni99! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
Summary
Adds a native OpenSSL 3.5+ ML-KEM backend for the
X25519MLKEM768hybrid group, so post-quantum key exchange no longer requires liboqs when a 3.5+ provider is available.fizz::openssl::OpenSSLKemKeyExchangeimplements theKeyExchangeinterface using stock OpenSSL public APIs (EVP_PKEY_CTX_new_from_name/EVP_PKEY_keygen+EVP_PKEY_encapsulate/EVP_PKEY_decapsulate). OpenSSL performs the X25519 + ML-KEM-768 combine internally, so no fizz-side hybrid is needed.Details
KeyExchangeRole.clone()usesEVP_PKEY_up_ref.OPENSSL_VERSION_NUMBER >= 0x30500000Lplus a runtime provider-availability check; non-3.5 builds are unaffected.MultiBackendFactoryprefers the native path when available and falls back to the existing liboqs path otherwise.Testing
Built against OpenSSL 3.5.8 from source. New suite passes 6/6; baseline ECKeyExchange (54/54) and X25519 (4/4) unaffected.
Closes #169