forked from wolfSSL/wolfssl
Merge pull request #6478 from SparkiDev/kyber_fixes_1
Kyber: allow compilation with limited sizes with liboqs
This commit is contained in:
@@ -1115,8 +1115,7 @@ done
|
|||||||
if test "$ENABLED_KYBER" != "no"
|
if test "$ENABLED_KYBER" != "no"
|
||||||
then
|
then
|
||||||
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_HAVE_KYBER"
|
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_HAVE_KYBER"
|
||||||
if test "$ENABLED_WC_KYBER" = "yes"
|
|
||||||
then
|
|
||||||
if test "$ENABLED_KYBER512" = ""; then
|
if test "$ENABLED_KYBER512" = ""; then
|
||||||
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_NO_KYBER512"
|
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_NO_KYBER512"
|
||||||
fi
|
fi
|
||||||
@@ -1127,6 +1126,8 @@ then
|
|||||||
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_NO_KYBER1024"
|
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_NO_KYBER1024"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "$ENABLED_WC_KYBER" = "yes"
|
||||||
|
then
|
||||||
test "$enable_sha3" = "" && enable_sha3=yes
|
test "$enable_sha3" = "" && enable_sha3=yes
|
||||||
test "$enable_shake128" = "" && enable_shake128=yes
|
test "$enable_shake128" = "" && enable_shake128=yes
|
||||||
test "$enable_shake256" = "" && enable_shake256=yes
|
test "$enable_shake256" = "" && enable_shake256=yes
|
||||||
|
@@ -761,7 +761,8 @@ WOLFSSL_API int wc_DhPrivKeyToDer(DhKey* key, byte* out, word32* outSz);
|
|||||||
(defined(HAVE_CURVE25519) && defined(HAVE_CURVE25519_KEY_IMPORT)) || \
|
(defined(HAVE_CURVE25519) && defined(HAVE_CURVE25519_KEY_IMPORT)) || \
|
||||||
(defined(HAVE_ED448) && defined(HAVE_ED448_KEY_IMPORT)) || \
|
(defined(HAVE_ED448) && defined(HAVE_ED448_KEY_IMPORT)) || \
|
||||||
(defined(HAVE_CURVE448) && defined(HAVE_CURVE448_KEY_IMPORT)) || \
|
(defined(HAVE_CURVE448) && defined(HAVE_CURVE448_KEY_IMPORT)) || \
|
||||||
(defined(HAVE_PQC)))
|
(defined(HAVE_PQC) && (defined(HAVE_FALCON) || \
|
||||||
|
defined(HAVE_DILITHIUM) || defined(HAVE_SPHINCS))))
|
||||||
#define WC_ENABLE_ASYM_KEY_IMPORT
|
#define WC_ENABLE_ASYM_KEY_IMPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -2923,11 +2923,13 @@ extern void uITRON4_free(void *p) ;
|
|||||||
#define HAVE_FALCON
|
#define HAVE_FALCON
|
||||||
#define HAVE_DILITHIUM
|
#define HAVE_DILITHIUM
|
||||||
#define HAVE_SPHINCS
|
#define HAVE_SPHINCS
|
||||||
|
#ifndef WOLFSSL_HAVE_KYBER
|
||||||
#define WOLFSSL_HAVE_KYBER
|
#define WOLFSSL_HAVE_KYBER
|
||||||
#define WOLFSSL_KYBER512
|
#define WOLFSSL_KYBER512
|
||||||
#define WOLFSSL_KYBER768
|
#define WOLFSSL_KYBER768
|
||||||
#define WOLFSSL_KYBER1024
|
#define WOLFSSL_KYBER1024
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_PQM4
|
#ifdef HAVE_PQM4
|
||||||
#define HAVE_PQC
|
#define HAVE_PQC
|
||||||
|
Reference in New Issue
Block a user