Skip to content

Commit 03fe315

Browse files
committed
Move sources to mldsa/src
To align with mlkem-native and to enable the monobuild, we move the sources to mldsa/src/ Signed-off-by: Matthias J. Kannwischer <[email protected]>
1 parent af0bc37 commit 03fe315

File tree

325 files changed

+482
-466
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

325 files changed

+482
-466
lines changed

.github/actions/config-variations/action.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ runs:
3535
shell: bash
3636
run: |
3737
make clean
38-
CFLAGS='-DMLD_CONFIG_FILE=\"../test/break_pct_config.h\"' make func -j4
38+
CFLAGS='-DMLD_CONFIG_FILE=\"../../test/break_pct_config.h\"' make func -j4
3939
# PCT breakage is done at runtime via MLD_BREAK_PCT
4040
make run_func # Should be OK
4141
MLD_BREAK_PCT=0 make run_func # Should be OK
@@ -51,7 +51,7 @@ runs:
5151
with:
5252
gh_token: ${{ inputs.gh_token }}
5353
compile_mode: native
54-
cflags: "-std=c11 -D_GNU_SOURCE -DMLD_CONFIG_FILE=\\\\\\\"../test/custom_zeroize_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
54+
cflags: "-std=c11 -D_GNU_SOURCE -DMLD_CONFIG_FILE=\\\\\\\"../../test/custom_zeroize_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
5555
ldflags: "-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
5656
func: true
5757
kat: true
@@ -64,7 +64,7 @@ runs:
6464
with:
6565
gh_token: ${{ inputs.gh_token }}
6666
compile_mode: native
67-
cflags: "-std=c11 -D_GNU_SOURCE -DMLD_CONFIG_FILE=\\\\\\\"../test/no_asm_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
67+
cflags: "-std=c11 -D_GNU_SOURCE -DMLD_CONFIG_FILE=\\\\\\\"../../test/no_asm_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
6868
ldflags: "-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
6969
func: true
7070
kat: true
@@ -77,7 +77,7 @@ runs:
7777
with:
7878
gh_token: ${{ inputs.gh_token }}
7979
compile_mode: native
80-
cflags: "-std=c11 -D_GNU_SOURCE -DMLD_CONFIG_FILE=\\\\\\\"../test/custom_randombytes_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
80+
cflags: "-std=c11 -D_GNU_SOURCE -DMLD_CONFIG_FILE=\\\\\\\"../../test/custom_randombytes_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
8181
ldflags: "-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
8282
func: true
8383
kat: true
@@ -90,7 +90,7 @@ runs:
9090
with:
9191
gh_token: ${{ inputs.gh_token }}
9292
compile_mode: native
93-
cflags: "-std=c11 -D_GNU_SOURCE -DMLD_CONFIG_FILE=\\\\\\\"../test/custom_memcpy_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
93+
cflags: "-std=c11 -D_GNU_SOURCE -DMLD_CONFIG_FILE=\\\\\\\"../../test/custom_memcpy_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
9494
ldflags: "-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
9595
func: true
9696
kat: true
@@ -103,7 +103,7 @@ runs:
103103
with:
104104
gh_token: ${{ inputs.gh_token }}
105105
compile_mode: native
106-
cflags: "-std=c11 -D_GNU_SOURCE -DMLD_CONFIG_FILE=\\\\\\\"../test/custom_memset_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
106+
cflags: "-std=c11 -D_GNU_SOURCE -DMLD_CONFIG_FILE=\\\\\\\"../../test/custom_memset_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
107107
ldflags: "-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
108108
func: true
109109
kat: true
@@ -116,7 +116,7 @@ runs:
116116
with:
117117
gh_token: ${{ inputs.gh_token }}
118118
compile_mode: native
119-
cflags: "-std=c11 -D_GNU_SOURCE -DMLD_CONFIG_FILE=\\\\\\\"../test/custom_stdlib_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
119+
cflags: "-std=c11 -D_GNU_SOURCE -DMLD_CONFIG_FILE=\\\\\\\"../../test/custom_stdlib_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
120120
ldflags: "-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
121121
func: true
122122
kat: true

BIBLIOGRAPHY.md

Lines changed: 1 addition & 1 deletion

FIPS202.md

Lines changed: 3 additions & 3 deletions

Makefile.Microsoft_nmake

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Copyright (c) The mldsa-native project authors
33
# SPDX-License-Identifier: Apache-2.0 OR ISC OR MIT
44

5-
CFLAGS = /nologo /O2 /Imldsa /Imlmdsa/fips202 /Imldsa/fips202/native /Imldsa/native
5+
CFLAGS = /nologo /O2 /Imldsa /Imldsa/src/ /Imlmdsa/src/fips202 /Imldsa/src/fips202/native /Imldsa/src/native
66

77
OBJ_FILES = .\mldsa\*.obj \
88
.\mldsa\fips202\*.obj
@@ -29,11 +29,11 @@ OPT = 0
2929
$(CC) $(CFLAGS) /c /Fo$(BUILD_DIR)\randombytes\ $<
3030

3131
# compilation for mldsa44
32-
{mldsa}.c{$(MLDSA44_BUILD_DIR)\mldsa}.obj::
32+
{mldsa\src}.c{$(MLDSA44_BUILD_DIR)\mldsa}.obj::
3333
@if NOT EXIST $(MLDSA44_BUILD_DIR)\mldsa mkdir $(MLDSA44_BUILD_DIR)\mldsa
3434
$(CC) $(CFLAGS) /D MLD_CONFIG_PARAMETER_SET=44 /c /Fo$(MLDSA44_BUILD_DIR)\mldsa\ $<
3535

36-
{mldsa\fips202}.c{$(MLDSA44_BUILD_DIR)\mldsa\fips202}.obj::
36+
{mldsa\src\fips202}.c{$(MLDSA44_BUILD_DIR)\mldsa\fips202}.obj::
3737
@if NOT EXIST $(MLDSA44_BUILD_DIR)\mldsa\fips202 mkdir $(MLDSA44_BUILD_DIR)\mldsa\fips202
3838
$(CC) $(CFLAGS) /D MLD_CONFIG_PARAMETER_SET=44 /c /Fo$(MLDSA44_BUILD_DIR)\mldsa\fips202\ $<
3939

@@ -42,11 +42,11 @@ OPT = 0
4242
$(CC) $(CFLAGS) /D MLD_CONFIG_PARAMETER_SET=44 /c /Fo$(MLDSA44_BUILD_DIR)\test\ $<
4343

4444
# compilation for mldsa65
45-
{mldsa}.c{$(MLDSA65_BUILD_DIR)\mldsa}.obj::
45+
{mldsa\src}.c{$(MLDSA65_BUILD_DIR)\mldsa}.obj::
4646
@if NOT EXIST $(MLDSA65_BUILD_DIR)\mldsa mkdir $(MLDSA65_BUILD_DIR)\mldsa
4747
$(CC) $(CFLAGS) /D MLD_CONFIG_PARAMETER_SET=65 /c /Fo$(MLDSA65_BUILD_DIR)\mldsa\ $<
4848

49-
{mldsa\fips202}.c{$(MLDSA65_BUILD_DIR)\mldsa\fips202}.obj::
49+
{mldsa\src\fips202}.c{$(MLDSA65_BUILD_DIR)\mldsa\fips202}.obj::
5050
@if NOT EXIST $(MLDSA65_BUILD_DIR)\mldsa\fips202 mkdir $(MLDSA65_BUILD_DIR)\mldsa\fips202
5151
$(CC) $(CFLAGS) /D MLD_CONFIG_PARAMETER_SET=65 /c /Fo$(MLDSA65_BUILD_DIR)\mldsa\fips202\ $<
5252

@@ -55,11 +55,11 @@ OPT = 0
5555
$(CC) $(CFLAGS) /D MLD_CONFIG_PARAMETER_SET=65 /c /Fo$(MLDSA65_BUILD_DIR)\test\ $<
5656

5757
# compilation for mldsa87
58-
{mldsa}.c{$(MLDSA87_BUILD_DIR)\mldsa}.obj::
58+
{mldsa\src}.c{$(MLDSA87_BUILD_DIR)\mldsa}.obj::
5959
@if NOT EXIST $(MLDSA87_BUILD_DIR)\mldsa mkdir $(MLDSA87_BUILD_DIR)\mldsa
6060
$(CC) $(CFLAGS) /D MLD_CONFIG_PARAMETER_SET=87 /c /Fo$(MLDSA87_BUILD_DIR)\mldsa\ $<
6161

62-
{mldsa\fips202}.c{$(MLDSA87_BUILD_DIR)\mldsa\fips202}.obj::
62+
{mldsa\src\fips202}.c{$(MLDSA87_BUILD_DIR)\mldsa\fips202}.obj::
6363
@if NOT EXIST $(MLDSA87_BUILD_DIR)\mldsa\fips202 mkdir $(MLDSA87_BUILD_DIR)\mldsa\fips202
6464
$(CC) $(CFLAGS) /D MLD_CONFIG_PARAMETER_SET=87 /c /Fo$(MLDSA87_BUILD_DIR)\mldsa\fips202\ $<
6565

README.md

Lines changed: 3 additions & 3 deletions

examples/basic/README.md

Lines changed: 2 additions & 2 deletions

examples/bring_your_own_fips202/README.md

Lines changed: 3 additions & 3 deletions

examples/bring_your_own_fips202/mldsa_native/cbmc.h

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/bring_your_own_fips202/mldsa_native/common.h

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/bring_your_own_fips202/mldsa_native/config.h

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)