Skip to content

Commit cc17b31

Browse files
committed
ML-DSA default is level 2. The keytools must be able to support all ML-DSA levels at run-time using ML_DSA_LEVEL environment variable. wolfBoot needs to be built with the correct level specified in the .config.
1 parent 4991eab commit cc17b31

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

tools/keytools/Makefile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ LDFLAGS =
1717
OBJDIR = ./
1818
LIBS =
1919

20-
ML_DSA_LEVEL?=5
21-
CFLAGS+=-DML_DSA_LEVEL=$(ML_DSA_LEVEL)
22-
2320
LMS_LEVELS?=1
2421
LMS_HEIGHT?=10
2522
LMS_WINTERNITZ?=8

tools/keytools/user_settings.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,13 @@
8686
#if 0
8787
#define WOLFSSL_DILITHIUM_FIPS204_DRAFT
8888
#endif
89+
90+
/* Default the keygen/sign tool to use ML-DSA level 2 */
8991
#ifndef ML_DSA_LEVEL
90-
#define ML_DSA_LEVEL 5
92+
#define ML_DSA_LEVEL 2
9193
#endif
92-
/* dilithium needs these sha functions. */
94+
95+
/* Dilithium needs SHAKE128 */
9396
#define WOLFSSL_SHAKE128
9497

9598
/* LMS */

0 commit comments

Comments
 (0)