Skip to content

Commit

Permalink
Dilithum, Kyber: Update to final specification
Browse files Browse the repository at this point in the history
FIPS 203 and FIPS 204 final specification changes.
  • Loading branch information
SparkiDev committed Aug 16, 2024
1 parent 8b57e3e commit 40472e7
Show file tree
Hide file tree
Showing 10 changed files with 8,778 additions and 7,358 deletions.
8 changes: 4 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1240,8 +1240,8 @@ do
1024)
ENABLED_KYBER1024=yes
;;
ml-kem)
ENABLED_ML_KEM=yes
original)
ENABLED_ORIGINAL=yes
;;
*)
AC_MSG_ERROR([Invalid choice for KYBER []: $ENABLED_KYBER.])
Expand Down Expand Up @@ -1269,8 +1269,8 @@ then
if test "$ENABLED_KYBER1024" = ""; then
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_NO_KYBER1024"
fi
if test "$ENABLED_ML_KEM" = "yes"; then
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ML_KEM"
if test "$ENABLED_ORIGINAL" = "yes"; then
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_KYBER_ORIGINAL"
fi

if test "$ENABLED_WC_KYBER" = "yes"
Expand Down
9,769 changes: 4,664 additions & 5,105 deletions tests/api.c

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions wolfcrypt/benchmark/benchmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,11 @@
#define BENCH_KYBER1024 0x00000080
#define BENCH_KYBER (BENCH_KYBER512 | BENCH_KYBER768 | \
BENCH_KYBER1024)
#define BENCH_ML_KEM_512 0x00000020
#define BENCH_ML_KEM_768 0x00000040
#define BENCH_ML_KEM_1024 0x00000080
#define BENCH_ML_KEM (BENCH_ML_KEM_512 | BENCH_ML_KEM_768 | \
BENCH_ML_KEM_1024)
#define BENCH_FALCON_LEVEL1_SIGN 0x00000001
#define BENCH_FALCON_LEVEL5_SIGN 0x00000002
#define BENCH_DILITHIUM_LEVEL2_SIGN 0x04000000
Expand Down Expand Up @@ -1087,6 +1092,10 @@ static const bench_pq_alg bench_pq_asym_opt[] = {
{ "-kyber512", BENCH_KYBER512 },
{ "-kyber768", BENCH_KYBER768 },
{ "-kyber1024", BENCH_KYBER1024 },
{ "-ml-kem", BENCH_ML_KEM },
{ "-ml-kem-512", BENCH_ML_KEM_512 },
{ "-ml-kem-768", BENCH_ML_KEM_768 },
{ "-ml-kem-1024", BENCH_ML_KEM_1024 },
#endif
#if defined(HAVE_FALCON)
{ "-falcon_level1", BENCH_FALCON_LEVEL1_SIGN },
Expand Down
Loading

0 comments on commit 40472e7

Please sign in to comment.