This directory contains a minimal example for how to build mldsa-native for a single security level.
Use this approach when:
- You need only one ML-DSA parameter set (44, 65, or 87)
- You want to build the mldsa-native C files separately, not as a single compilation unit.
- You're using C only, no native backends.
- mldsa-native source tree:
mldsa/src/andmldsa/src/fips202/ - A secure random number generator implementing
randombytes.h - Your application source code
The configuration file mldsa_native_config.h sets:
MLD_CONFIG_PARAMETER_SET: Security level (44, 65, or 87). Default is 65.MLD_CONFIG_NAMESPACE_PREFIX: Symbol prefix for the API. Set tomldsain this example.
To change the security level, modify MLD_CONFIG_PARAMETER_SET in the config file or pass it via CFLAGS.
make build # Build the example
make run # Run the exampleThe randombytes() implementation in test_only_rng/ is for TESTING ONLY.
You MUST provide a cryptographically secure RNG for production use.