Repository navigation
cmake: turn crypto-refresh and PQC off on Botan without the SEC1 FFI loaders - #2602
Merged
Merged
Conversation
…loaders The botan_pubkey_load_ec*_sec1() FFI functions, which exdsa_ecdhkem.cpp uses to load the raw point encodings, first exist in Botan 3.10.0. The feature detection only checked the BOTAN_HAS_* module macros, so Botan 3.5-3.9 with all the required modules (HKDF, ED448, X448, ARGON2 and the FIPS 203/204/205 APIs) passed the configure and then failed to compile exdsa_ecdhkem.cpp, breaking the system-Botan builds on Fedora 43/44 and rawhide. Probe the FFI symbol directly and turn ENABLE_CRYPTO_REFRESH and ENABLE_PQC off with a warning when it is missing, the same way the other soft-off cases work. Both flags go off together because the source list compiles exdsa_ecdhkem.cpp when either one is enabled. Update the docs that stated the Botan 3.6+/3.7.0 floors.
kwkwan
approved these changes
Nov 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The system-Botan builds on Fedora 43/44 and rawhide have been failing for the last few days with
at
src/lib/crypto/exdsa_ecdhkem.cpp. This PR fixes the detection so those builds configure cleanly again.Root cause
exdsa_ecdhkem.cpploads the raw SEC1 point encodings through thebotan_pubkey_load_ec*_sec1()FFI functions. Upstream Botan added those functions in 3.10.0 (randombit/botan commitb24417ca9b, between 3.9.0 and 3.10.0).Our feature detection only checks the
BOTAN_HAS_*module macros inbotan/build.h. A Botan 3.5 to 3.9 build has all the modules we probe (HKDF, ED448, X448, ARGON2, and even the FIPS 203/204/205 APIs for PQC), so the configure passes, and the build then fails at the missing FFI declaration. The soft-off added in 4320a0a never had a chance because the check did not cover this requirement.Fix
Probe
botan_pubkey_load_ecdsa_sec1directly withcheck_cxx_symbol_existsagainstbotan/ffi.h, linking the detected Botan library. When it is missing, turnENABLE_CRYPTO_REFRESHandENABLE_PQCoff with a warning, the same way the other soft-off cases work. Both flags go off together because the source list compilesexdsa_ecdhkem.cppwhen either one is enabled.I also updated the docs that stated the Botan 3.6+/3.7.0 floors, since the effective floor for crypto-refresh and PQC on the Botan backend is now spelled out as 3.10.0+.
Verification
ENABLE_CRYPTO_REFRESH=OnandENABLE_PQC=Onstay on, full build succeeds, and the 14 PQC/KEM tests pass (test_exdsa,test_dilithium_exdsa_direct, and the rest of the pqc/exdsa/ecdhkem set).