| 1 |
[//]: # (SPDX-License-Identifier: CC-BY-4.0) |
| 2 |
|
| 3 |
|
| 4 |
This directory contains a minimal example for building mldsa-native using only the deterministic API, |
| 5 |
without requiring a `randombytes()` implementation. |
| 6 |
|
| 7 |
## Use Case |
| 8 |
|
| 9 |
Use this approach when: |
| 10 |
- Your application manages its own entropy/randomness externally |
| 11 |
- You only need `crypto_sign_keypair_internal` and `crypto_sign_signature_internal` (deterministic variants) |
| 12 |
|
| 13 |
## Components |
| 14 |
|
| 15 |
1. mldsa-native source tree: [`mldsa/src/`](../../mldsa/src) and [`mldsa/src/fips202/`](../../mldsa/src/fips202) |
| 16 |
2. Your application source code |
| 17 |
|
| 18 |
No `randombytes()` implementation is required. |
| 19 |
|
| 20 |
## Configuration |
| 21 |
|
| 22 |
The configuration file [mldsa_native_config.h](mldsa_native/mldsa_native_config.h) sets: |
| 23 |
- `MLD_CONFIG_NO_RANDOMIZED_API`: Disables `crypto_sign_keypair`, `crypto_sign_signature`, etc. |
| 24 |
- `MLD_CONFIG_PARAMETER_SET`: Security level (default 65) |
| 25 |
- `MLD_CONFIG_NAMESPACE_PREFIX`: Symbol prefix (set to `mldsa`) |
| 26 |
|
| 27 |
## Notes |
| 28 |
|
| 29 |
- This is incompatible with `MLD_CONFIG_KEYGEN_PCT` (pairwise consistency test) |
| 30 |
|
| 31 |
## Usage |
| 32 |
|
| 33 |
```bash |
| 34 |
make build # Build the example |
| 35 |
make run # Run the example |
| 36 |
``` |