Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dilithum, Kyber: Update to final specification #7877

Merged
merged 2 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 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 All @@ -1251,7 +1251,6 @@ done

if test "$ENABLED_KYBER" != "no"
then
AS_IF([ test "$ENABLED_EXPERIMENTAL" != "yes" ],[ AC_MSG_ERROR([KYBER requires --enable-experimental.]) ])
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_HAVE_KYBER"
# Use liboqs if specified.
if test "$ENABLED_LIBOQS" = "no"; then
Expand All @@ -1269,8 +1268,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 Expand Up @@ -1346,7 +1345,6 @@ done

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

if test "$ENABLED_MLDSA44" = ""; then
Expand Down
22,032 changes: 13,257 additions & 8,775 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
2 changes: 1 addition & 1 deletion wolfcrypt/src/aes_gcm_asm.asm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; /* aes_gcm_asm.asm */
; /*
; * Copyright (C) 2006-2024 wolfSSL Inc.
; * Copyright (C) 2006-2024 wolfSSL Inc.
; *
; * This file is part of wolfSSL.
; *
Expand Down
2 changes: 1 addition & 1 deletion wolfcrypt/src/aes_xts_asm.asm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; /* aes_xts_asm.asm */
; /*
; * Copyright (C) 2006-2024 wolfSSL Inc.
; * Copyright (C) 2006-2024 wolfSSL Inc.
; *
; * This file is part of wolfSSL.
; *
Expand Down
2 changes: 1 addition & 1 deletion wolfcrypt/src/chacha_asm.asm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; /* chacha_asm.asm */
; /*
; * Copyright (C) 2006-2024 wolfSSL Inc.
; * Copyright (C) 2006-2024 wolfSSL Inc.
; *
; * This file is part of wolfSSL.
; *
Expand Down
Loading