Skip to content

Commit ee7e1bf

Browse files
authored
Merge pull request #537 from pq-code-package/mldsa-native-api-header
Add mldsa-native.h API header file
2 parents d518e10 + 070d7bd commit ee7e1bf

File tree

9 files changed

+582
-9
lines changed

9 files changed

+582
-9
lines changed

BIBLIOGRAPHY.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ source code and documentation.
4949
- [README.md](README.md)
5050
- [examples/bring_your_own_fips202/mldsa_native/common.h](examples/bring_your_own_fips202/mldsa_native/common.h)
5151
- [examples/bring_your_own_fips202/mldsa_native/config.h](examples/bring_your_own_fips202/mldsa_native/config.h)
52+
- [examples/bring_your_own_fips202/mldsa_native/mldsa_native.h](examples/bring_your_own_fips202/mldsa_native/mldsa_native.h)
5253
- [examples/bring_your_own_fips202/mldsa_native/ntt.h](examples/bring_your_own_fips202/mldsa_native/ntt.h)
5354
- [examples/bring_your_own_fips202/mldsa_native/poly.c](examples/bring_your_own_fips202/mldsa_native/poly.c)
5455
- [examples/bring_your_own_fips202/mldsa_native/poly_kl.c](examples/bring_your_own_fips202/mldsa_native/poly_kl.c)
@@ -60,6 +61,7 @@ source code and documentation.
6061
- [mldsa/config.h](mldsa/config.h)
6162
- [mldsa/fips202/fips202.c](mldsa/fips202/fips202.c)
6263
- [mldsa/fips202/fips202x4.c](mldsa/fips202/fips202x4.c)
64+
- [mldsa/mldsa_native.h](mldsa/mldsa_native.h)
6365
- [mldsa/ntt.h](mldsa/ntt.h)
6466
- [mldsa/poly.c](mldsa/poly.c)
6567
- [mldsa/poly_kl.c](mldsa/poly_kl.c)

examples/basic/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ MLD_SOURCE=$(wildcard \
6161
mldsa_native/mldsa/**/**/*.c \
6262
mldsa_native/mldsa/**/**/**/*.c)
6363

64+
INC=-Imldsa_native/mldsa/
65+
6466
# Part B:
6567
#
6668
# Random number generator
@@ -102,7 +104,7 @@ $(BINARY_NAME_FULL_87): CFLAGS += -DMLD_CONFIG_PARAMETER_SET=87
102104
$(BINARIES_FULL): $(ALL_SOURCE)
103105
echo "$@"
104106
mkdir -p $(BUILD_DIR)
105-
$(CC) $(CFLAGS) $^ -o $@
107+
$(CC) $(CFLAGS) $(INC) $^ -o $@
106108

107109
all: build
108110

examples/basic/main.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
* This requires specifying the parameter set and namespace prefix
1414
* used for the build.
1515
*/
16-
17-
#include "../../mldsa/sign.h"
16+
#define MLD_CONFIG_API_PARAMETER_SET MLD_CONFIG_PARAMETER_SET
17+
#define MLD_CONFIG_API_NAMESPACE_PREFIX mldsa
18+
#include <mldsa_native.h>
1819
#include "expected_signatures.h"
1920
#include "test_only_rng/notrandombytes.h"
2021

examples/bring_your_own_fips202/main.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
* This requires specifying the parameter set and namespace prefix
1414
* used for the build.
1515
*/
16-
17-
#include "../../mldsa/sign.h"
16+
#define MLD_CONFIG_API_PARAMETER_SET MLD_CONFIG_PARAMETER_SET
17+
#define MLD_CONFIG_API_NAMESPACE_PREFIX mldsa
18+
#include <mldsa_native.h>
1819
#include "expected_signatures.h"
1920
#include "test_only_rng/notrandombytes.h"
2021

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../mldsa/mldsa_native.h

0 commit comments

Comments
 (0)