Skip to content

Commit 6bed80f

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 6bed80f

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

tools/keytools/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ LDFLAGS =
1717
OBJDIR = ./
1818
LIBS =
1919

20-
ML_DSA_LEVEL?=5
20+
ML_DSA_LEVEL?=2
2121
CFLAGS+=-DML_DSA_LEVEL=$(ML_DSA_LEVEL)
2222

2323
LMS_LEVELS?=1

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)