Config: Add MLD_CONFIG_NO_RANDOMIZED_API
#619
Merged
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.
This adds the MLD_CONFIG_NO_RANDOMIZED_API configuration option to the config
file aligning with mlkem-native.
MLD_CONFIG_NO_RANDOMIZED_API allows to exclude all top-level APIs requiring
randombytes() from a mldsa-native build. This way consumers only requiring
the deterministic internal APIs do not have to provide a randomytes
implementation.
The excluded APIs are currently crypto_sign_keypair, crypto_sign,
crypto_sign_signature, and crypto_sign_signature_extmu.
Currently, this option is incompatible with the MLD_CONFIG_KEYGEN_PCT
configuration option at that relies on crypto_sign_signature.
A corresponding error is added in case both configuration options are set.
The
basic_deterministicexample is added to excercise the configuration option.MLD_CONFIG_NO_RANDOMIZED_APIoption #597basic_deterministic#598