Skip to content

Commit 5cac01c

Browse files
hanno-beckermkannwischer
authored andcommitted
Add README to mldsa/
Fixes #781 Signed-off-by: Hanno Becker <beckphan@amazon.co.uk>
1 parent 5dc4211 commit 5cac01c

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

mldsa/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[//]: # (SPDX-License-Identifier: CC-BY-4.0)
2+
3+
# mldsa-native source tree
4+
5+
This is the main source tree of mldsa-native.
6+
7+
## Building
8+
9+
To build mldsa-native for a fixed parameter set (ML-DSA-44/65/87), build the compilation units in `src/*` separately, and link to an RNG and your application. See [examples/basic](../examples/basic) for a simple example.
10+
11+
Alternatively, you can use the auto-generated helper files [mldsa_native.c](mldsa_native.c) and [mldsa_native_asm.S](mldsa_native_asm.S), which bundle all *.c and *.S files together. See [examples/monolithic_build](../examples/monolithic_build) and [examples/monolithic_build_native](../examples/monolithic_build_native) for examples with and without native code.
12+
13+
## Configuration
14+
15+
The build is configured by [mldsa_native_config.h](mldsa_native_config.h), or by the file pointed to by `MLD_CONFIG_FILE`. Note in particular `MLD_CONFIG_PARAMETER_SET` and `MLD_CONFIG_NAMESPACE_PREFIX`, which set the parameter set and namespace prefix, respectively.
16+
17+
## API
18+
19+
The public API is defined in [mldsa_native.h](mldsa_native.h).
20+
21+
## Supporting multiple parameter sets
22+
23+
If you want to support multiple parameter sets, build the library once per parameter set you want to support. Set `MLD_CONFIG_MULTILEVEL_WITH_SHARED` for one of the builds, and `MLD_CONFIG_MULTILEVEL_NO_SHARED` for the others, to avoid duplicating shared functionality. Finally, link with RNG and your application as before. This is demonstrated in the examples [examples/multilevel_build](../examples/multilevel_build), [examples/multilevel_build_native](../examples/multilevel_build_native), [examples/monolithic_build_multilevel](../examples/monolithic_build_multilevel) and [examples/monolithic_build_multilevel_native](../examples/monolithic_build_multilevel_native).

0 commit comments

Comments
 (0)