Skip to content

Commit 25b2c66

Browse files
committed
Kyber: Implementation in wolfSSL
Put Kyber implementation into wolfSSL.
1 parent 5dba7d3 commit 25b2c66

5 files changed

Lines changed: 32351 additions & 25 deletions

File tree

configure.ac

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,10 +1121,6 @@ do
11211121
;;
11221122
no)
11231123
;;
1124-
wolfssl)
1125-
ENABLED_WC_KYBER=yes
1126-
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_WC_KYBER"
1127-
;;
11281124
small)
11291125
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_KYBER_SMALL"
11301126
;;
@@ -1146,6 +1142,12 @@ done
11461142
if test "$ENABLED_KYBER" != "no"
11471143
then
11481144
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_HAVE_KYBER"
1145+
# Use liboqs if specified.
1146+
if test "$ENABLED_LIBOQS" = "no"; then
1147+
ENABLED_WC_KYBER=yes
1148+
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_WC_KYBER"
1149+
AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_WC_KYBER"
1150+
fi
11491151

11501152
if test "$ENABLED_KYBER512" = ""; then
11511153
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_NO_KYBER512"
@@ -1162,12 +1164,6 @@ then
11621164
test "$enable_sha3" = "" && enable_sha3=yes
11631165
test "$enable_shake128" = "" && enable_shake128=yes
11641166
test "$enable_shake256" = "" && enable_shake256=yes
1165-
else
1166-
# Default is to use liboqs. Make sure its enabled.
1167-
if test "$ENABLED_LIBOQS" = "no"; then
1168-
AC_MSG_ERROR([The default implementation for kyber is liboqs.
1169-
Please use --with-liboqs.])
1170-
fi
11711167
fi
11721168
fi
11731169

0 commit comments

Comments
 (0)