Skip to content

Commit bf074d2

Browse files
authored
Merge pull request #7877 from SparkiDev/ml_dsa_ml_kem_final
Dilithum, Kyber: Update to final specification
2 parents bcbb544 + b17b190 commit bf074d2

16 files changed

Lines changed: 17791 additions & 11139 deletions

File tree

configure.ac

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,8 +1240,8 @@ do
12401240
1024)
12411241
ENABLED_KYBER1024=yes
12421242
;;
1243-
ml-kem)
1244-
ENABLED_ML_KEM=yes
1243+
original)
1244+
ENABLED_ORIGINAL=yes
12451245
;;
12461246
*)
12471247
AC_MSG_ERROR([Invalid choice for KYBER []: $ENABLED_KYBER.])
@@ -1251,7 +1251,6 @@ done
12511251

12521252
if test "$ENABLED_KYBER" != "no"
12531253
then
1254-
AS_IF([ test "$ENABLED_EXPERIMENTAL" != "yes" ],[ AC_MSG_ERROR([KYBER requires --enable-experimental.]) ])
12551254
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_HAVE_KYBER"
12561255
# Use liboqs if specified.
12571256
if test "$ENABLED_LIBOQS" = "no"; then
@@ -1269,8 +1268,8 @@ then
12691268
if test "$ENABLED_KYBER1024" = ""; then
12701269
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_NO_KYBER1024"
12711270
fi
1272-
if test "$ENABLED_ML_KEM" = "yes"; then
1273-
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ML_KEM"
1271+
if test "$ENABLED_ORIGINAL" = "yes"; then
1272+
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_KYBER_ORIGINAL"
12741273
fi
12751274

12761275
if test "$ENABLED_WC_KYBER" = "yes"
@@ -1346,7 +1345,6 @@ done
13461345

13471346
if test "$ENABLED_DILITHIUM" != "no"
13481347
then
1349-
AS_IF([ test "$ENABLED_EXPERIMENTAL" != "yes" ],[ AC_MSG_ERROR([DILITHIUM requires --enable-experimental.]) ])
13501348
AM_CFLAGS="$AM_CFLAGS -DHAVE_DILITHIUM"
13511349

13521350
if test "$ENABLED_MLDSA44" = ""; then

tests/api.c

Lines changed: 13257 additions & 8775 deletions
Large diffs are not rendered by default.

wolfcrypt/benchmark/benchmark.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,11 @@
685685
#define BENCH_KYBER1024 0x00000080
686686
#define BENCH_KYBER (BENCH_KYBER512 | BENCH_KYBER768 | \
687687
BENCH_KYBER1024)
688+
#define BENCH_ML_KEM_512 0x00000020
689+
#define BENCH_ML_KEM_768 0x00000040
690+
#define BENCH_ML_KEM_1024 0x00000080
691+
#define BENCH_ML_KEM (BENCH_ML_KEM_512 | BENCH_ML_KEM_768 | \
692+
BENCH_ML_KEM_1024)
688693
#define BENCH_FALCON_LEVEL1_SIGN 0x00000001
689694
#define BENCH_FALCON_LEVEL5_SIGN 0x00000002
690695
#define BENCH_DILITHIUM_LEVEL2_SIGN 0x04000000
@@ -1087,6 +1092,10 @@ static const bench_pq_alg bench_pq_asym_opt[] = {
10871092
{ "-kyber512", BENCH_KYBER512 },
10881093
{ "-kyber768", BENCH_KYBER768 },
10891094
{ "-kyber1024", BENCH_KYBER1024 },
1095+
{ "-ml-kem", BENCH_ML_KEM },
1096+
{ "-ml-kem-512", BENCH_ML_KEM_512 },
1097+
{ "-ml-kem-768", BENCH_ML_KEM_768 },
1098+
{ "-ml-kem-1024", BENCH_ML_KEM_1024 },
10901099
#endif
10911100
#if defined(HAVE_FALCON)
10921101
{ "-falcon_level1", BENCH_FALCON_LEVEL1_SIGN },

wolfcrypt/src/aes_gcm_asm.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; /* aes_gcm_asm.asm */
22
; /*
3-
; * Copyright (C) 2006-2024 wolfSSL Inc.
3+
; * Copyright (C) 2006-2024 wolfSSL Inc.
44
; *
55
; * This file is part of wolfSSL.
66
; *

wolfcrypt/src/aes_xts_asm.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; /* aes_xts_asm.asm */
22
; /*
3-
; * Copyright (C) 2006-2024 wolfSSL Inc.
3+
; * Copyright (C) 2006-2024 wolfSSL Inc.
44
; *
55
; * This file is part of wolfSSL.
66
; *

wolfcrypt/src/chacha_asm.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; /* chacha_asm.asm */
22
; /*
3-
; * Copyright (C) 2006-2024 wolfSSL Inc.
3+
; * Copyright (C) 2006-2024 wolfSSL Inc.
44
; *
55
; * This file is part of wolfSSL.
66
; *

0 commit comments

Comments
 (0)