Skip to content

Commit

Permalink
ML-DSA default is level 2. The keytools must be able to support all M…
Browse files Browse the repository at this point in the history
…L-DSA levels at run-time using `ML_DSA_LEVEL` environment variable. wolfBoot needs to be built with the correct level specified in the .config.
  • Loading branch information
dgarske committed Dec 5, 2024
1 parent 4991eab commit 6bed80f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tools/keytools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ LDFLAGS =
OBJDIR = ./
LIBS =

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

LMS_LEVELS?=1
Expand Down
7 changes: 5 additions & 2 deletions tools/keytools/user_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,13 @@
#if 0
#define WOLFSSL_DILITHIUM_FIPS204_DRAFT
#endif

/* Default the keygen/sign tool to use ML-DSA level 2 */
#ifndef ML_DSA_LEVEL
#define ML_DSA_LEVEL 5
#define ML_DSA_LEVEL 2
#endif
/* dilithium needs these sha functions. */

/* Dilithium needs SHAKE128 */
#define WOLFSSL_SHAKE128

/* LMS */
Expand Down

0 comments on commit 6bed80f

Please sign in to comment.