Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions .github/actions/config-variations/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ runs:
shell: bash
run: |
make clean
CFLAGS='-Itest -DMLD_CONFIG_FILE=\"break_pct_config.h\"' make func -j4
CFLAGS='-Itest -DMLD_CONFIG_FILE=\"configs/break_pct_config.h\"' make func -j4
# PCT breakage is done at runtime via MLD_BREAK_PCT
make run_func # Should be OK
MLD_BREAK_PCT=0 make run_func # Should be OK
Expand All @@ -53,7 +53,7 @@ runs:
with:
gh_token: ${{ inputs.gh_token }}
compile_mode: native
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"custom_heap_alloc_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"configs/custom_heap_alloc_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
ldflags: "-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
func: true
kat: true
Expand All @@ -69,7 +69,7 @@ runs:
with:
gh_token: ${{ inputs.gh_token }}
compile_mode: native
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"custom_zeroize_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"configs/custom_zeroize_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
ldflags: "-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
func: true
kat: true
Expand All @@ -84,7 +84,7 @@ runs:
with:
gh_token: ${{ inputs.gh_token }}
compile_mode: native
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"custom_native_capability_config_1.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"configs/custom_native_capability_config_1.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
ldflags: "-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
func: true
kat: true
Expand All @@ -99,7 +99,7 @@ runs:
with:
gh_token: ${{ inputs.gh_token }}
compile_mode: native
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"custom_native_capability_config_0.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"configs/custom_native_capability_config_0.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
ldflags: "-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
func: true
kat: true
Expand All @@ -114,7 +114,7 @@ runs:
with:
gh_token: ${{ inputs.gh_token }}
compile_mode: native
cflags: "-std=c11 -march=armv8.4-a+sha3 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"custom_native_capability_config_ID_AA64PFR1_EL1.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
cflags: "-std=c11 -march=armv8.4-a+sha3 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"configs/custom_native_capability_config_ID_AA64PFR1_EL1.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
ldflags: "-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
func: true
kat: true
Expand All @@ -129,7 +129,7 @@ runs:
with:
gh_token: ${{ inputs.gh_token }}
compile_mode: native
cflags: "-std=c11 -mavx2 -mbmi2 -mpopcnt -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"custom_native_capability_config_CPUID_AVX2.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
cflags: "-std=c11 -mavx2 -mbmi2 -mpopcnt -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"configs/custom_native_capability_config_CPUID_AVX2.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
ldflags: "-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
func: true
kat: true
Expand All @@ -144,7 +144,7 @@ runs:
with:
gh_token: ${{ inputs.gh_token }}
compile_mode: native
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"no_asm_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"configs/no_asm_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
ldflags: "-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
func: true
kat: true
Expand All @@ -159,7 +159,7 @@ runs:
with:
gh_token: ${{ inputs.gh_token }}
compile_mode: native
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"serial_fips202_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"configs/serial_fips202_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
ldflags: "-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
func: true
kat: true
Expand All @@ -174,7 +174,7 @@ runs:
with:
gh_token: ${{ inputs.gh_token }}
compile_mode: native
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"custom_randombytes_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"configs/custom_randombytes_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
ldflags: "-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
func: true
kat: true
Expand All @@ -189,7 +189,7 @@ runs:
with:
gh_token: ${{ inputs.gh_token }}
compile_mode: native
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"custom_memcpy_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"configs/custom_memcpy_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
ldflags: "-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
func: true
kat: true
Expand All @@ -204,7 +204,7 @@ runs:
with:
gh_token: ${{ inputs.gh_token }}
compile_mode: native
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"custom_memset_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"configs/custom_memset_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
ldflags: "-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
func: true
kat: true
Expand All @@ -219,7 +219,7 @@ runs:
with:
gh_token: ${{ inputs.gh_token }}
compile_mode: native
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"custom_stdlib_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
cflags: "-std=c11 -D_GNU_SOURCE -Itest -DMLD_CONFIG_FILE=\\\\\\\"configs/custom_stdlib_config.h\\\\\\\" -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
ldflags: "-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
func: true
kat: true
Expand Down
58 changes: 29 additions & 29 deletions BIBLIOGRAPHY.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,21 @@ source code and documentation.
- [integration/liboqs/config_x86_64.h](integration/liboqs/config_x86_64.h)
- [mldsa/mldsa_native_config.h](mldsa/mldsa_native_config.h)
- [mldsa/src/sign.c](mldsa/src/sign.c)
- [test/break_pct_config.h](test/break_pct_config.h)
- [test/custom_heap_alloc_config.h](test/custom_heap_alloc_config.h)
- [test/custom_memcpy_config.h](test/custom_memcpy_config.h)
- [test/custom_memset_config.h](test/custom_memset_config.h)
- [test/custom_native_capability_config_0.h](test/custom_native_capability_config_0.h)
- [test/custom_native_capability_config_1.h](test/custom_native_capability_config_1.h)
- [test/custom_native_capability_config_CPUID_AVX2.h](test/custom_native_capability_config_CPUID_AVX2.h)
- [test/custom_native_capability_config_ID_AA64PFR1_EL1.h](test/custom_native_capability_config_ID_AA64PFR1_EL1.h)
- [test/custom_randombytes_config.h](test/custom_randombytes_config.h)
- [test/custom_stdlib_config.h](test/custom_stdlib_config.h)
- [test/custom_zeroize_config.h](test/custom_zeroize_config.h)
- [test/no_asm_config.h](test/no_asm_config.h)
- [test/serial_fips202_config.h](test/serial_fips202_config.h)
- [test/test_alloc_config.h](test/test_alloc_config.h)
- [test/test_rng_fail_config.h](test/test_rng_fail_config.h)
- [test/configs/break_pct_config.h](test/configs/break_pct_config.h)
- [test/configs/custom_heap_alloc_config.h](test/configs/custom_heap_alloc_config.h)
- [test/configs/custom_memcpy_config.h](test/configs/custom_memcpy_config.h)
- [test/configs/custom_memset_config.h](test/configs/custom_memset_config.h)
- [test/configs/custom_native_capability_config_0.h](test/configs/custom_native_capability_config_0.h)
- [test/configs/custom_native_capability_config_1.h](test/configs/custom_native_capability_config_1.h)
- [test/configs/custom_native_capability_config_CPUID_AVX2.h](test/configs/custom_native_capability_config_CPUID_AVX2.h)
- [test/configs/custom_native_capability_config_ID_AA64PFR1_EL1.h](test/configs/custom_native_capability_config_ID_AA64PFR1_EL1.h)
- [test/configs/custom_randombytes_config.h](test/configs/custom_randombytes_config.h)
- [test/configs/custom_stdlib_config.h](test/configs/custom_stdlib_config.h)
- [test/configs/custom_zeroize_config.h](test/configs/custom_zeroize_config.h)
- [test/configs/no_asm_config.h](test/configs/no_asm_config.h)
- [test/configs/serial_fips202_config.h](test/configs/serial_fips202_config.h)
- [test/configs/test_alloc_config.h](test/configs/test_alloc_config.h)
- [test/configs/test_rng_fail_config.h](test/configs/test_rng_fail_config.h)

### `FIPS202`

Expand Down Expand Up @@ -95,20 +95,20 @@ source code and documentation.
- [mldsa/src/rounding.h](mldsa/src/rounding.h)
- [mldsa/src/sign.c](mldsa/src/sign.c)
- [mldsa/src/sign.h](mldsa/src/sign.h)
- [test/break_pct_config.h](test/break_pct_config.h)
- [test/custom_memcpy_config.h](test/custom_memcpy_config.h)
- [test/custom_memset_config.h](test/custom_memset_config.h)
- [test/custom_native_capability_config_0.h](test/custom_native_capability_config_0.h)
- [test/custom_native_capability_config_1.h](test/custom_native_capability_config_1.h)
- [test/custom_native_capability_config_CPUID_AVX2.h](test/custom_native_capability_config_CPUID_AVX2.h)
- [test/custom_native_capability_config_ID_AA64PFR1_EL1.h](test/custom_native_capability_config_ID_AA64PFR1_EL1.h)
- [test/custom_randombytes_config.h](test/custom_randombytes_config.h)
- [test/custom_stdlib_config.h](test/custom_stdlib_config.h)
- [test/custom_zeroize_config.h](test/custom_zeroize_config.h)
- [test/no_asm_config.h](test/no_asm_config.h)
- [test/serial_fips202_config.h](test/serial_fips202_config.h)
- [test/test_alloc_config.h](test/test_alloc_config.h)
- [test/test_rng_fail_config.h](test/test_rng_fail_config.h)
- [test/configs/break_pct_config.h](test/configs/break_pct_config.h)
- [test/configs/custom_memcpy_config.h](test/configs/custom_memcpy_config.h)
- [test/configs/custom_memset_config.h](test/configs/custom_memset_config.h)
- [test/configs/custom_native_capability_config_0.h](test/configs/custom_native_capability_config_0.h)
- [test/configs/custom_native_capability_config_1.h](test/configs/custom_native_capability_config_1.h)
- [test/configs/custom_native_capability_config_CPUID_AVX2.h](test/configs/custom_native_capability_config_CPUID_AVX2.h)
- [test/configs/custom_native_capability_config_ID_AA64PFR1_EL1.h](test/configs/custom_native_capability_config_ID_AA64PFR1_EL1.h)
- [test/configs/custom_randombytes_config.h](test/configs/custom_randombytes_config.h)
- [test/configs/custom_stdlib_config.h](test/configs/custom_stdlib_config.h)
- [test/configs/custom_zeroize_config.h](test/configs/custom_zeroize_config.h)
- [test/configs/no_asm_config.h](test/configs/no_asm_config.h)
- [test/configs/serial_fips202_config.h](test/configs/serial_fips202_config.h)
- [test/configs/test_alloc_config.h](test/configs/test_alloc_config.h)
- [test/configs/test_rng_fail_config.h](test/configs/test_rng_fail_config.h)

### `HYBRID`

Expand Down
2 changes: 1 addition & 1 deletion scripts/autogen
Original file line number Diff line number Diff line change
Expand Up @@ -3054,7 +3054,7 @@ def gen_test_config(config_path, config_spec, default_config_content):
def gen_test_configs():
"""Generate all test configuration files from metadata."""
# Load metadata
metadata = yaml.safe_load(read_file("test/configs.yml"))
metadata = yaml.safe_load(read_file("test/configs/configs.yml"))

# Load default config
default_config = read_file("mldsa/mldsa_native_config.h")
Expand Down
File renamed without changes.
28 changes: 14 additions & 14 deletions test/configs.yml → test/configs/configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Each entry describes how a test config differs from mldsa/mldsa_native_config.h

configs:
- path: test/no_asm_config.h
- path: test/configs/no_asm_config.h
description: "Test configuration with no assembly code"
defines:
MLD_CONFIG_NO_ASM: true
Expand All @@ -23,12 +23,12 @@ configs:
}
#endif

- path: test/serial_fips202_config.h
- path: test/configs/serial_fips202_config.h
description: "Test configuration with serial FIPS202 only"
defines:
MLD_CONFIG_SERIAL_FIPS202_ONLY: true

- path: test/custom_randombytes_config.h
- path: test/configs/custom_randombytes_config.h
description: "Test configuration with custom randombytes"
defines:
MLD_CONFIG_CUSTOM_RANDOMBYTES:
Expand All @@ -44,7 +44,7 @@ configs:
}
#endif /* !__ASSEMBLER__ */

- path: test/custom_zeroize_config.h
- path: test/configs/custom_zeroize_config.h
description: "Test configuration with custom zeroize"
defines:
MLD_CONFIG_CUSTOM_ZEROIZE:
Expand All @@ -60,7 +60,7 @@ configs:
}
#endif

- path: test/custom_memcpy_config.h
- path: test/configs/custom_memcpy_config.h
description: "Test configuration with custom memcpy"
defines:
MLD_CONFIG_CUSTOM_MEMCPY:
Expand All @@ -83,7 +83,7 @@ configs:
}
#endif /* !__ASSEMBLER__ */

- path: test/custom_memset_config.h
- path: test/configs/custom_memset_config.h
description: "Test configuration with custom memset"
defines:
MLD_CONFIG_CUSTOM_MEMSET:
Expand All @@ -105,7 +105,7 @@ configs:
}
#endif

- path: test/custom_stdlib_config.h
- path: test/configs/custom_stdlib_config.h
description: "Test configuration with custom stdlib functions"
defines:
MLD_CONFIG_CUSTOM_MEMCPY:
Expand Down Expand Up @@ -146,7 +146,7 @@ configs:
}
#endif

- path: test/break_pct_config.h
- path: test/configs/break_pct_config.h
description: "Test configuration for PCT breakage testing"
defines:
MLD_CONFIG_KEYGEN_PCT: true
Expand All @@ -165,7 +165,7 @@ configs:
}
#endif

- path: test/custom_native_capability_config_0.h
- path: test/configs/custom_native_capability_config_0.h
description: "Test configuration with custom capability function returning 0"
defines:
MLD_CONFIG_CUSTOM_CAPABILITY_FUNC:
Expand All @@ -182,7 +182,7 @@ configs:
}
#endif /* !__ASSEMBLER__ */

- path: test/custom_native_capability_config_1.h
- path: test/configs/custom_native_capability_config_1.h
description: "Test configuration with custom capability function returning 1"
defines:
MLD_CONFIG_CUSTOM_CAPABILITY_FUNC:
Expand All @@ -198,7 +198,7 @@ configs:
}
#endif /* !__ASSEMBLER__ */

- path: test/custom_native_capability_config_CPUID_AVX2.h
- path: test/configs/custom_native_capability_config_CPUID_AVX2.h
description: "Test configuration with CPUID-based AVX2 capability detection"
defines:
MLD_CONFIG_CUSTOM_CAPABILITY_FUNC:
Expand Down Expand Up @@ -246,7 +246,7 @@ configs:
}
#endif /* !__ASSEMBLER__ */

- path: test/custom_native_capability_config_ID_AA64PFR1_EL1.h
- path: test/configs/custom_native_capability_config_ID_AA64PFR1_EL1.h
description: "Test configuration with ARM system register capability detection"
defines:
MLD_CONFIG_CUSTOM_CAPABILITY_FUNC:
Expand Down Expand Up @@ -405,7 +405,7 @@ configs:
MLD_CONFIG_FILE:
comment: "/* No need to set this -- we _are_ already in a custom config */"

- path: test/test_alloc_config.h
- path: test/configs/test_alloc_config.h
description: "Using custom allocation that can be made fail at specific invocation"
defines:
MLD_CONFIG_NAMESPACE_PREFIX: mld
Expand All @@ -427,7 +427,7 @@ configs:
MLD_CONFIG_FILE:
comment: "/* No need to set this -- we _are_ already in a custom config */"

- path: test/test_rng_fail_config.h
- path: test/configs/test_rng_fail_config.h
description: "Using custom randombytes that can fail at specific invocation"
defines:
MLD_CONFIG_NAMESPACE_PREFIX: mld
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading