From 3e3a00dafdc1aa5a917c481cf7a09ebc91ad0244 Mon Sep 17 00:00:00 2001 From: Sean Parkinson Date: Thu, 6 Jun 2024 22:07:26 +1000 Subject: [PATCH] Dilithium/ML-DSA: Implementation of ML-DSA-44/65/87 Impemented FIPS 204 (Draft) Module-Lattice-Based Signature Standard. Implementation include making a key, signing and verification. Make key API added. Updated liboqs calls to use ML-DSA implementation instead of Dilithium. --- configure.ac | 99 +- src/include.am | 4 + src/internal.c | 84 +- src/ssl.c | 46 +- src/ssl_certman.c | 2 - src/ssl_load.c | 28 +- src/tls.c | 55 +- src/tls13.c | 97 +- src/x509.c | 18 +- tests/api.c | 1471 ++++++- wolfcrypt/benchmark/benchmark.c | 1323 +++++- wolfcrypt/src/asn.c | 233 +- wolfcrypt/src/cryptocb.c | 10 +- wolfcrypt/src/dilithium.c | 7082 ++++++++++++++++++++++++++++--- wolfcrypt/test/test.c | 1856 ++++++++ wolfssl/certs_test.h | 3535 +++++++-------- wolfssl/internal.h | 42 +- wolfssl/wolfcrypt/asn.h | 26 +- wolfssl/wolfcrypt/asn_public.h | 6 +- wolfssl/wolfcrypt/cryptocb.h | 19 +- wolfssl/wolfcrypt/dilithium.h | 677 ++- wolfssl/wolfcrypt/settings.h | 5 +- wolfssl/wolfcrypt/types.h | 10 +- 23 files changed, 13869 insertions(+), 2859 deletions(-) diff --git a/configure.ac b/configure.ac index 4108d2b53a..921956ac67 100644 --- a/configure.ac +++ b/configure.ac @@ -1172,8 +1172,7 @@ AC_ARG_WITH([liboqs], # KYBER # Used: -# - SHA3, Shake128 and Shake256, or -# - SHA256, SHA512, AES-CTR +# - SHA3, Shake128 and Shake256 AC_ARG_ENABLE([kyber], [AS_HELP_STRING([--enable-kyber],[Enable KYBER (requires --enable-experimental) (default: disabled)])], [ ENABLED_KYBER=$enableval ], @@ -1238,6 +1237,100 @@ then fi fi +# Dilithium +# - SHA3, Shake128, Shake256 and AES-CTR +AC_ARG_ENABLE([dilithium], + [AS_HELP_STRING([--enable-dilithium],[Enable DILITHIUM (requires --enable-experimental) (default: disabled)])], + [ ENABLED_DILITHIUM=$enableval ], + [ ENABLED_DILITHIUM=no ] + ) + +ENABLED_DILITHIUM_OPTS=$ENABLED_DILITHIUM +ENABLED_DILITHIUM_MAKE_KEY=no +ENABLED_DILITHIUM_SIGN=no +ENABLED_DILITHIUM_VERIFY=no +for v in `echo $ENABLED_DILITHIUM_OPTS | tr "," " "` +do + case $v in + yes) + ENABLED_MLDSA44=yes + ENABLED_MLDSA65=yes + ENABLED_MLDSA87=yes + ENABLED_DILITHIUM_MAKE_KEY=yes + ENABLED_DILITHIUM_SIGN=yes + ENABLED_DILITHIUM_VERIFY=yes + ;; + no) + ;; + all) + ENABLED_DILITHIUM_MAKE_KEY=yes + ENABLED_DILITHIUM_SIGN=yes + ENABLED_DILITHIUM_VERIFY=yes + ;; + make) + ENABLED_DILITHIUM_MAKE_KEY=yes + ;; + sign) + ENABLED_DILITHIUM_SIGN=yes + ;; + verify) + ENABLED_DILITHIUM_VERIFY=yes + ;; + verify-only) + ENABLED_DILITHIUM_MAKE_KEY=no + ENABLED_DILITHIUM_SIGN=no + ENABLED_DILITHIUM_VERIFY=yes + AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DILITHIUM_VERIFY_ONLY" + ;; + small) + AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DILITHIUM_SMALL" + ;; + 44) + ENABLED_MLDSA44=yes + ;; + 65) + ENABLED_MLDSA65=yes + ;; + 87) + ENABLED_MLDSA87=yes + ;; + *) + AC_MSG_ERROR([Invalid choice for DILITHIUM [all,make,sign,verify,verify-only,small,44,65,87]: $ENABLED_DILITHIUM.]) + break;; + esac +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 + AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_NO_ML_DSA_44" + fi + if test "$ENABLED_MLDSA65" = ""; then + AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_NO_ML_DSA_65" + fi + if test "$ENABLED_MLDSA87" = ""; then + AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_NO_ML_DSA_87" + fi + if test "$ENABLED_DILITHIUM_MAKE_KEY" = "no"; then + AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DILITHIUM_NO_MAKE_KEY" + fi + if test "$ENABLED_DILITHIUM_SIGN" = "no"; then + AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DILITHIUM_NO_SIGN" + fi + if test "$ENABLED_DILITHIUM_VERIFY" = "no"; then + AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DILITHIUM_NO_VERIFY" + fi + + if test "$ENABLED_LIBOQS" = "no"; then + AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_WC_DILITHIUM" + test "$enable_sha3" = "" && enable_sha3=yes + test "$enable_shake128" = "" && enable_shake128=yes + test "$enable_shake256" = "" && enable_shake256=yes + fi +fi # XMSS AC_ARG_ENABLE([xmss], @@ -9519,6 +9612,7 @@ AM_CONDITIONAL([BUILD_CURVE448_SMALL],[test "x$ENABLED_CURVE448_SMALL" = "xyes" AM_CONDITIONAL([BUILD_WC_LMS],[test "x$ENABLED_WC_LMS" != "xno" || test "x$ENABLED_USERSETTINGS" = "xyes"]) AM_CONDITIONAL([BUILD_WC_XMSS],[test "x$ENABLED_WC_XMSS" != "xno" || test "x$ENABLED_USERSETTINGS" = "xyes"]) AM_CONDITIONAL([BUILD_WC_KYBER],[test "x$ENABLED_WC_KYBER" != "xno" || test "x$ENABLED_USERSETTINGS" = "xyes"]) +AM_CONDITIONAL([BUILD_DILITHIUM],[test "x$ENABLED_DILITHIUM" != "xno" || test "x$ENABLED_USERSETTINGS" = "xyes"]) AM_CONDITIONAL([BUILD_ECCSI],[test "x$ENABLED_ECCSI" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"]) AM_CONDITIONAL([BUILD_SAKKE],[test "x$ENABLED_SAKKE" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"]) AM_CONDITIONAL([BUILD_MEMORY],[test "x$ENABLED_MEMORY" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"]) @@ -10019,6 +10113,7 @@ echo " * XMSS_ROOT: $XMSS_ROOT" fi echo " * KYBER: $ENABLED_KYBER" echo " * KYBER wolfSSL impl: $ENABLED_WC_KYBER" +echo " * DILITHIUM: $ENABLED_DILITHIUM" echo " * ECCSI $ENABLED_ECCSI" echo " * SAKKE $ENABLED_SAKKE" echo " * ASN: $ENABLED_ASN" diff --git a/src/include.am b/src/include.am index d724927fee..28677d23ef 100644 --- a/src/include.am +++ b/src/include.am @@ -980,6 +980,10 @@ endif endif endif +if BUILD_DILITHIUM +src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/dilithium.c +endif + if BUILD_WC_LMS src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/wc_lms.c src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/wc_lms_impl.c diff --git a/src/internal.c b/src/internal.c index f5e1d89ef4..2f6417a57f 100644 --- a/src/internal.c +++ b/src/internal.c @@ -2228,7 +2228,6 @@ int InitSSL_Side(WOLFSSL* ssl, word16 side) ssl->options.haveECC = 1; /* server turns on with ECC key cert */ } #endif -#ifdef HAVE_PQC #ifdef HAVE_FALCON if (ssl->options.side == WOLFSSL_CLIENT_END) { ssl->options.haveFalconSig = 1; /* always on client side */ @@ -2239,7 +2238,6 @@ int InitSSL_Side(WOLFSSL* ssl, word16 side) ssl->options.haveDilithiumSig = 1; /* always on client side */ } #endif /* HAVE_DILITHIUM */ -#endif /* HAVE_PQC */ #if defined(HAVE_EXTENDED_MASTER) && !defined(NO_WOLFSSL_CLIENT) if (ssl->options.side == WOLFSSL_CLIENT_END) { @@ -2326,14 +2324,12 @@ int InitSSL_Ctx(WOLFSSL_CTX* ctx, WOLFSSL_METHOD* method, void* heap) ctx->minEccKeySz = MIN_ECCKEY_SZ; ctx->eccTempKeySz = ECDHE_SIZE; #endif -#ifdef HAVE_PQC #ifdef HAVE_FALCON ctx->minFalconKeySz = MIN_FALCONKEY_SZ; #endif /* HAVE_FALCON */ #ifdef HAVE_DILITHIUM ctx->minDilithiumKeySz = MIN_DILITHIUMKEY_SZ; #endif /* HAVE_DILITHIUM */ -#endif /* HAVE_PQC */ ctx->verifyDepth = MAX_CHAIN_DEPTH; #ifdef OPENSSL_EXTRA ctx->cbioFlag = WOLFSSL_CBIO_NONE; @@ -2397,7 +2393,6 @@ int InitSSL_Ctx(WOLFSSL_CTX* ctx, WOLFSSL_METHOD* method, void* heap) wolfSSL_CTX_set_server_cert_type(ctx, NULL, 0); /* set to default */ #endif /* HAVE_RPK */ -#ifdef HAVE_PQC #ifdef HAVE_FALCON if (method->side == WOLFSSL_CLIENT_END) ctx->haveFalconSig = 1; /* always on client side */ @@ -2408,7 +2403,6 @@ int InitSSL_Ctx(WOLFSSL_CTX* ctx, WOLFSSL_METHOD* method, void* heap) ctx->haveDilithiumSig = 1; /* always on client side */ /* server can turn on by loading key */ #endif /* HAVE_DILITHIUM */ -#endif /* HAVE_PQC */ #ifdef HAVE_ECC if (method->side == WOLFSSL_CLIENT_END) { ctx->haveECDSAsig = 1; /* always on client side */ @@ -3074,7 +3068,6 @@ static WC_INLINE void AddSuiteHashSigAlgo(byte* hashSigAlgo, byte macAlgo, } else #endif - #ifdef HAVE_PQC #ifdef HAVE_FALCON if (sigAlgo == falcon_level1_sa_algo) { ADD_HASH_SIG_ALGO(hashSigAlgo, inOutIdx, @@ -3104,7 +3097,6 @@ static WC_INLINE void AddSuiteHashSigAlgo(byte* hashSigAlgo, byte macAlgo, } else #endif /* HAVE_DILITHIUM */ - #endif /* HAVE_PQC */ #ifdef WC_RSA_PSS if (sigAlgo == rsa_pss_sa_algo) { /* RSA PSS is sig then mac */ @@ -3165,7 +3157,6 @@ void InitSuitesHashSigAlgo(byte* hashSigAlgo, int haveSig, int tls1_2, &idx); } #endif -#if defined(HAVE_PQC) #ifdef HAVE_FALCON if (haveSig & SIG_FALCON) { AddSuiteHashSigAlgo(hashSigAlgo, no_mac, falcon_level1_sa_algo, keySz, @@ -3184,7 +3175,6 @@ void InitSuitesHashSigAlgo(byte* hashSigAlgo, int haveSig, int tls1_2, keySz, &idx); } #endif /* HAVE_DILITHIUM */ -#endif /* HAVE_PQC */ if (haveSig & SIG_RSA) { #ifdef WC_RSA_PSS if (tls1_2) { @@ -4395,7 +4385,7 @@ void DecodeSigAlg(const byte* input, byte* hashAlgo, byte* hsType) } break; #endif -#ifdef HAVE_PQC +#if defined(HAVE_FALCON) || defined(HAVE_DILITHIUM) case PQC_SA_MAJOR: /* Hash performed as part of sign/verify operation. * However, if we want a dual alg signature with a @@ -6772,14 +6762,12 @@ int SetSSL_CTX(WOLFSSL* ssl, WOLFSSL_CTX* ctx, int writeDup) #ifdef HAVE_ECC ssl->options.minEccKeySz = ctx->minEccKeySz; #endif -#ifdef HAVE_PQC #ifdef HAVE_FALCON ssl->options.minFalconKeySz = ctx->minFalconKeySz; #endif /* HAVE_FALCON */ #ifdef HAVE_DILITHIUM ssl->options.minDilithiumKeySz = ctx->minDilithiumKeySz; #endif /* HAVE_DILITHIUM */ -#endif /* HAVE_PQC */ #if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL) ssl->options.verifyDepth = ctx->verifyDepth; #endif @@ -7758,7 +7746,6 @@ void FreeKey(WOLFSSL* ssl, int type, void** pKey) wc_curve448_free((curve448_key*)*pKey); break; #endif /* HAVE_CURVE448 */ - #if defined(HAVE_PQC) #if defined(HAVE_FALCON) case DYNAMIC_TYPE_FALCON: wc_falcon_free((falcon_key*)*pKey); @@ -7769,7 +7756,6 @@ void FreeKey(WOLFSSL* ssl, int type, void** pKey) wc_dilithium_free((dilithium_key*)*pKey); break; #endif /* HAVE_DILITHIUM */ - #endif /* HAVE_PQC */ #ifndef NO_DH case DYNAMIC_TYPE_DH: wc_FreeDhKey((DhKey*)*pKey); @@ -7845,7 +7831,6 @@ int AllocKey(WOLFSSL* ssl, int type, void** pKey) sz = sizeof(curve448_key); break; #endif /* HAVE_CURVE448 */ - #if defined(HAVE_PQC) #if defined(HAVE_FALCON) case DYNAMIC_TYPE_FALCON: sz = sizeof(falcon_key); @@ -7856,7 +7841,6 @@ int AllocKey(WOLFSSL* ssl, int type, void** pKey) sz = sizeof(dilithium_key); break; #endif /* HAVE_DILITHIUM */ - #endif /* HAVE_PQC */ #ifndef NO_DH case DYNAMIC_TYPE_DH: sz = sizeof(DhKey); @@ -7920,7 +7904,6 @@ int AllocKey(WOLFSSL* ssl, int type, void** pKey) ret = 0; break; #endif /* HAVE_CURVE448 */ - #if defined(HAVE_PQC) #if defined(HAVE_FALCON) case DYNAMIC_TYPE_FALCON: wc_falcon_init_ex((falcon_key*)*pKey, ssl->heap, ssl->devId); @@ -7933,7 +7916,6 @@ int AllocKey(WOLFSSL* ssl, int type, void** pKey) ret = 0; break; #endif /* HAVE_DILITHIUM */ - #endif /* HAVE_PQC */ #ifdef HAVE_CURVE448 case DYNAMIC_TYPE_CURVE448: wc_curve448_init((curve448_key*)*pKey); @@ -7959,8 +7941,7 @@ int AllocKey(WOLFSSL* ssl, int type, void** pKey) #if !defined(NO_RSA) || defined(HAVE_ECC) || defined(HAVE_ED25519) || \ defined(HAVE_CURVE25519) || defined(HAVE_ED448) || \ - defined(HAVE_CURVE448) || (defined(HAVE_PQC) && defined(HAVE_FALCON)) || \ - (defined(HAVE_PQC) && defined(HAVE_DILITHIUM)) + defined(HAVE_CURVE448) || defined(HAVE_FALCON) || defined(HAVE_DILITHIUM) static int ReuseKey(WOLFSSL* ssl, int type, void* pKey) { int ret = 0; @@ -8006,12 +7987,18 @@ static int ReuseKey(WOLFSSL* ssl, int type, void* pKey) ret = wc_curve448_init((curve448_key*)pKey); break; #endif /* HAVE_CURVE448 */ - #if defined(HAVE_PQC) && defined(HAVE_FALCON) + #if defined(HAVE_FALCON) case DYNAMIC_TYPE_FALCON: wc_falcon_free((falcon_key*)pKey); ret = wc_falcon_init((falcon_key*)pKey); break; - #endif /* HAVE_PQC && HAVE_FALCON */ + #endif /* HAVE_FALCON */ + #if defined(HAVE_DILITHIUM) + case DYNAMIC_TYPE_DILITHIUM: + wc_dilithium_free((dilithium_key*)pKey); + ret = wc_dilithium_init((dilithium_key*)pKey); + break; + #endif /* HAVE_DILITHIUM */ #ifndef NO_DH case DYNAMIC_TYPE_DH: wc_FreeDhKey((DhKey*)pKey); @@ -8305,7 +8292,7 @@ void SSL_ResourceFree(WOLFSSL* ssl) } #endif #endif -#if defined(HAVE_PQC) && defined(HAVE_FALCON) +#if defined(HAVE_FALCON) FreeKey(ssl, DYNAMIC_TYPE_FALCON, (void**)&ssl->peerFalconKey); ssl->peerFalconKeyPresent = 0; #endif @@ -8556,10 +8543,10 @@ void FreeHandshakeResources(WOLFSSL* ssl) FreeKey(ssl, DYNAMIC_TYPE_ED448, (void**)&ssl->peerEd448Key); ssl->peerEd448KeyPresent = 0; #endif /* HAVE_ED448 */ -#if defined(HAVE_PQC) && defined(HAVE_FALCON) +#if defined(HAVE_FALCON) FreeKey(ssl, DYNAMIC_TYPE_FALCON, (void**)&ssl->peerFalconKey); ssl->peerFalconKeyPresent = 0; -#endif /* HAVE_PQC */ +#endif /* HAVE_FALCON */ } #ifdef HAVE_ECC @@ -14274,7 +14261,6 @@ static int ProcessPeerCertCheckKey(WOLFSSL* ssl, ProcPeerCertArgs* args) } break; #endif /* HAVE_ED448 */ - #if defined(HAVE_PQC) #if defined(HAVE_FALCON) case FALCON_LEVEL1k: if (ssl->options.minFalconKeySz < 0 || @@ -14293,7 +14279,6 @@ static int ProcessPeerCertCheckKey(WOLFSSL* ssl, ProcPeerCertArgs* args) } break; #endif /* HAVE_FALCON */ - #endif /* HAVE_PQC */ #if defined(HAVE_DILITHIUM) case DILITHIUM_LEVEL2k: if (ssl->options.minDilithiumKeySz < 0 || @@ -15774,7 +15759,6 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx, break; } #endif /* HAVE_ED448 && HAVE_ED448_KEY_IMPORT */ - #if defined(HAVE_PQC) #if defined(HAVE_FALCON) case FALCON_LEVEL1k: case FALCON_LEVEL5k: @@ -15824,7 +15808,8 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx, break; } #endif /* HAVE_FALCON */ - #if defined(HAVE_DILITHIUM) + #if defined(HAVE_DILITHIUM) && \ + !defined(WOLFSSL_DILITHIUM_NO_VERIFY) case DILITHIUM_LEVEL2k: case DILITHIUM_LEVEL3k: case DILITHIUM_LEVEL5k: @@ -15877,7 +15862,6 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx, break; } #endif /* HAVE_DILITHIUM */ - #endif /* HAVE_PQC */ default: break; } @@ -26870,14 +26854,12 @@ static int ParseCipherList(Suites* suites, defined(HAVE_ED448) haveSig |= SIG_ECDSA; #endif - #if defined(HAVE_PQC) #ifdef HAVE_FALCON haveSig |= SIG_FALCON; #endif /* HAVE_FALCON */ #ifdef HAVE_DILITHIUM haveSig |= SIG_DILITHIUM; #endif /* HAVE_DILITHIUM */ - #endif /* HAVE_PQC */ } else #ifdef BUILD_TLS_SM4_GCM_SM3 @@ -27109,14 +27091,12 @@ int SetCipherListFromBytes(WOLFSSL_CTX* ctx, Suites* suites, const byte* list, #if defined(HAVE_ECC) || defined(HAVE_ED25519) || defined(HAVE_ED448) haveECDSAsig = 1; #endif - #if defined(HAVE_PQC) #ifdef HAVE_FALCON haveFalconSig = 1; #endif /* HAVE_FALCON */ #ifdef HAVE_DILITHIUM haveDilithiumSig = 1; #endif /* HAVE_DILITHIUM */ - #endif /* HAVE_PQC */ } else #endif /* WOLFSSL_TLS13 */ @@ -27357,7 +27337,6 @@ static int MatchSigAlgo(WOLFSSL* ssl, int sigAlgo) return sigAlgo == ed448_sa_algo; } #endif -#ifdef HAVE_PQC #ifdef HAVE_FALCON if (ssl->pkCurveOID == CTC_FALCON_LEVEL1) { /* Certificate has Falcon level 1 key, only match with Falcon level 1 @@ -27384,7 +27363,6 @@ static int MatchSigAlgo(WOLFSSL* ssl, int sigAlgo) return sigAlgo == dilithium_level5_sa_algo; } #endif /* HAVE_DILITHIUM */ -#endif /* HAVE_PQC */ #ifdef WC_RSA_PSS /* RSA certificate and PSS sig alg. */ if (ssl->options.sigAlgo == rsa_sa_algo) { @@ -27494,7 +27472,6 @@ int PickHashSigAlgo(WOLFSSL* ssl, const byte* hashSigAlgo, word32 hashSigAlgoSz) break; } #endif - #if defined(HAVE_PQC) #if defined(HAVE_FALCON) if (ssl->pkCurveOID == CTC_FALCON_LEVEL1 || ssl->pkCurveOID == CTC_FALCON_LEVEL5 ) { @@ -27516,7 +27493,6 @@ int PickHashSigAlgo(WOLFSSL* ssl, const byte* hashSigAlgo, word32 hashSigAlgoSz) break; } #endif /* HAVE_DILITHIUM */ - #endif /* HAVE_PQC */ #if defined(WOLFSSL_ECDSA_MATCH_HASH) && defined(USE_ECDSA_KEYSZ_HASH_ALGO) #error "WOLFSSL_ECDSA_MATCH_HASH and USE_ECDSA_KEYSZ_HASH_ALGO cannot " @@ -27926,7 +27902,7 @@ int CreateDevPrivateKey(void** pkey, byte* data, word32 length, int hsType, #endif } else if (hsType == DYNAMIC_TYPE_DILITHIUM) { -#if defined(HAVE_PQC) && defined(HAVE_DILITHIUM) +#if defined(HAVE_DILITHIUM) dilithium_key* dilithiumKey; dilithiumKey = (dilithium_key*)XMALLOC(sizeof(dilithium_key), heap, @@ -27951,7 +27927,7 @@ int CreateDevPrivateKey(void** pkey, byte* data, word32 length, int hsType, #endif } else if (hsType == DYNAMIC_TYPE_FALCON) { -#if defined(HAVE_PQC) && defined(HAVE_FALCON) +#if defined(HAVE_FALCON) falcon_key* falconKey; falconKey = (falcon_key*)XMALLOC(sizeof(falcon_key), heap, @@ -28088,7 +28064,7 @@ int DecodePrivateKey(WOLFSSL *ssl, word32* length) } else if ((ssl->buffers.keyType == falcon_level1_sa_algo) || (ssl->buffers.keyType == falcon_level5_sa_algo)) { - #if defined(HAVE_PQC) && defined(HAVE_FALCON) + #if defined(HAVE_FALCON) if (ssl->buffers.keyLabel) { ret = wc_falcon_init_label((falcon_key*)ssl->hsKey, (char*)ssl->buffers.key->buffer, @@ -28124,7 +28100,7 @@ int DecodePrivateKey(WOLFSSL *ssl, word32* length) else if ((ssl->buffers.keyType == dilithium_level2_sa_algo) || (ssl->buffers.keyType == dilithium_level3_sa_algo) || (ssl->buffers.keyType == dilithium_level5_sa_algo)) { - #if defined(HAVE_PQC) && defined(HAVE_DILITHIUM) + #if defined(HAVE_DILITHIUM) && !defined(WOLFSSL_DILITHIUM_NO_SIGN) if (ssl->buffers.keyLabel) { ret = wc_dilithium_init_label((dilithium_key*)ssl->hsKey, (char*)ssl->buffers.key->buffer, @@ -28394,7 +28370,6 @@ int DecodePrivateKey(WOLFSSL *ssl, word32* length) } } #endif /* HAVE_ED448 && HAVE_ED448_KEY_IMPORT */ -#if defined(HAVE_PQC) #if defined(HAVE_FALCON) #if !defined(NO_RSA) || defined(HAVE_ECC) FreeKey(ssl, ssl->hsType, (void**)&ssl->hsKey); @@ -28461,7 +28436,7 @@ int DecodePrivateKey(WOLFSSL *ssl, word32* length) } } #endif /* HAVE_FALCON */ -#if defined(HAVE_DILITHIUM) +#if defined(HAVE_DILITHIUM) && !defined(WOLFSSL_DILITHIUM_NO_SIGN) #if !defined(NO_RSA) || defined(HAVE_ECC) FreeKey(ssl, ssl->hsType, (void**)&ssl->hsKey); #endif @@ -28513,9 +28488,9 @@ int DecodePrivateKey(WOLFSSL *ssl, word32* length) /* Set start of data to beginning of buffer. */ idx = 0; /* Decode the key assuming it is a Dilithium private key. */ - ret = wc_dilithium_import_private_only(ssl->buffers.key->buffer, - ssl->buffers.key->length, - (dilithium_key*)ssl->hsKey); + ret = wc_dilithium_import_private(ssl->buffers.key->buffer, + ssl->buffers.key->length, + (dilithium_key*)ssl->hsKey); if (ret == 0) { WOLFSSL_MSG("Using Dilithium private key"); @@ -28533,7 +28508,6 @@ int DecodePrivateKey(WOLFSSL *ssl, word32* length) } } #endif /* HAVE_DILITHIUM */ -#endif /* HAVE_PQC */ (void)idx; (void)keySz; @@ -28640,7 +28614,7 @@ int DecodeAltPrivateKey(WOLFSSL *ssl, word32* length) } else if ((ssl->buffers.altKeyType == falcon_level1_sa_algo) || (ssl->buffers.altKeyType == falcon_level5_sa_algo)) { - #if defined(HAVE_PQC) && defined(HAVE_FALCON) + #if defined(HAVE_FALCON) if (ssl->buffers.altKeyLabel) { ret = wc_falcon_init_label((falcon_key*)ssl->hsAltKey, (char*)ssl->buffers.altKey->buffer, @@ -28676,7 +28650,7 @@ int DecodeAltPrivateKey(WOLFSSL *ssl, word32* length) else if ((ssl->buffers.altKeyType == dilithium_level2_sa_algo) || (ssl->buffers.altKeyType == dilithium_level3_sa_algo) || (ssl->buffers.altKeyType == dilithium_level5_sa_algo)) { - #if defined(HAVE_PQC) && defined(HAVE_DILITHIUM) + #if defined(HAVE_DILITHIUM) if (ssl->buffers.altKeyLabel) { ret = wc_dilithium_init_label((dilithium_key*)ssl->hsAltKey, (char*)ssl->buffers.altKey->buffer, @@ -28831,7 +28805,6 @@ int DecodeAltPrivateKey(WOLFSSL *ssl, word32* length) } } #endif -#if defined(HAVE_PQC) #if defined(HAVE_FALCON) #if !defined(NO_RSA) || defined(HAVE_ECC) FreeKey(ssl, ssl->hsAltType, (void**)&ssl->hsAltKey); @@ -28942,9 +28915,9 @@ int DecodeAltPrivateKey(WOLFSSL *ssl, word32* length) /* Set start of data to beginning of buffer. */ idx = 0; /* Decode the key assuming it is a Dilithium private key. */ - ret = wc_dilithium_import_private_only(ssl->buffers.altKey->buffer, - ssl->buffers.altKey->length, - (dilithium_key*)ssl->hsAltKey); + ret = wc_dilithium_import_private(ssl->buffers.altKey->buffer, + ssl->buffers.altKey->length, + (dilithium_key*)ssl->hsAltKey); if (ret == 0) { WOLFSSL_MSG("Using Dilithium private key"); @@ -28962,7 +28935,6 @@ int DecodeAltPrivateKey(WOLFSSL *ssl, word32* length) } } #endif /* HAVE_DILITHIUM */ -#endif /* HAVE_PQC */ (void)idx; (void)keySz; diff --git a/src/ssl.c b/src/ssl.c index 672e41cc49..6d2cb27f29 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -116,7 +116,6 @@ #include #include #include - #if defined(HAVE_PQC) #if defined(HAVE_FALCON) #include #endif /* HAVE_FALCON */ @@ -126,7 +125,6 @@ #if defined(HAVE_SPHINCS) #include #endif /* HAVE_SPHINCS */ - #endif /* HAVE_PQC */ #if defined(OPENSSL_ALL) || defined(HAVE_STUNNEL) #ifdef HAVE_OCSP #include @@ -3269,11 +3267,11 @@ static int isValidCurveGroup(word16 name) case WOLFSSL_FFDHE_6144: case WOLFSSL_FFDHE_8192: -#ifdef HAVE_PQC +#ifdef WOLFSSL_HAVE_KYBER case WOLFSSL_KYBER_LEVEL1: case WOLFSSL_KYBER_LEVEL3: case WOLFSSL_KYBER_LEVEL5: - #ifdef HAVE_LIBOQS + #if defined(WOLFSSL_WC_KYBER) || defined(HAVE_LIBOQS) case WOLFSSL_P256_KYBER_LEVEL1: case WOLFSSL_P384_KYBER_LEVEL3: case WOLFSSL_P521_KYBER_LEVEL5: @@ -5370,7 +5368,6 @@ int AddCA(WOLFSSL_CERT_MANAGER* cm, DerBuffer** pDer, int type, int verify) } break; #endif /* HAVE_ED448 */ - #if defined(HAVE_PQC) #if defined(HAVE_FALCON) case FALCON_LEVEL1k: if (cm->minFalconKeySz < 0 || @@ -5410,7 +5407,6 @@ int AddCA(WOLFSSL_CERT_MANAGER* cm, DerBuffer** pDer, int type, int verify) } break; #endif /* HAVE_DILITHIUM */ - #endif /* HAVE_PQC */ default: WOLFSSL_MSG("\tNo key size check done on CA"); @@ -6124,14 +6120,14 @@ static int check_cert_key_dev(word32 keyOID, byte* privKey, word32 privSz, type = DYNAMIC_TYPE_ECC; } #endif -#if defined(HAVE_PQC) && defined(HAVE_DILITHIUM) +#if defined(HAVE_DILITHIUM) if ((keyOID == DILITHIUM_LEVEL2k) || (keyOID == DILITHIUM_LEVEL3k) || (keyOID == DILITHIUM_LEVEL5k)) { type = DYNAMIC_TYPE_DILITHIUM; } #endif -#if defined(HAVE_PQC) && defined(HAVE_FALCON) +#if defined(HAVE_FALCON) if ((keyOID == FALCON_LEVEL1k) || (keyOID == FALCON_LEVEL5k)) { type = DYNAMIC_TYPE_FALCON; @@ -6156,7 +6152,7 @@ static int check_cert_key_dev(word32 keyOID, byte* privKey, word32 privSz, ret = wc_CryptoCb_EccCheckPrivKey((ecc_key*)pkey, pubKey, pubSz); } #endif - #if defined(HAVE_PQC) && defined(HAVE_DILITHIUM) + #if defined(HAVE_DILITHIUM) if ((keyOID == DILITHIUM_LEVEL2k) || (keyOID == DILITHIUM_LEVEL3k) || (keyOID == DILITHIUM_LEVEL5k)) { @@ -6165,7 +6161,7 @@ static int check_cert_key_dev(word32 keyOID, byte* privKey, word32 privSz, pubKey, pubSz); } #endif - #if defined(HAVE_PQC) && defined(HAVE_FALCON) + #if defined(HAVE_FALCON) if ((keyOID == FALCON_LEVEL1k) || (keyOID == FALCON_LEVEL5k)) { ret = wc_CryptoCb_PqcSignatureCheckPrivKey(pkey, @@ -6195,14 +6191,14 @@ static int check_cert_key_dev(word32 keyOID, byte* privKey, word32 privSz, wc_ecc_free((ecc_key*)pkey); } #endif - #if defined(HAVE_PQC) && defined(HAVE_DILITHIUM) + #if defined(HAVE_DILITHIUM) if ((keyOID == DILITHIUM_LEVEL2k) || (keyOID == DILITHIUM_LEVEL3k) || (keyOID == DILITHIUM_LEVEL5k)) { wc_dilithium_free((dilithium_key*)pkey); } #endif - #if defined(HAVE_PQC) && defined(HAVE_FALCON) + #if defined(HAVE_FALCON) if ((keyOID == FALCON_LEVEL1k) || (keyOID == FALCON_LEVEL5k)) { wc_falcon_free((falcon_key*)pkey); @@ -6919,7 +6915,6 @@ static int d2iTryAltDhKey(WOLFSSL_EVP_PKEY** out, const unsigned char* mem, #endif /* !HAVE_FIPS || HAVE_FIPS_VERSION > 2 */ #endif /* !NO_DH && OPENSSL_EXTRA && WOLFSSL_DH_EXTRA */ -#ifdef HAVE_PQC #ifdef HAVE_FALCON static int d2iTryFalconKey(WOLFSSL_EVP_PKEY** out, const unsigned char* mem, long memSz, int priv) @@ -7025,16 +7020,16 @@ static int d2iTryDilithiumKey(WOLFSSL_EVP_PKEY** out, const unsigned char* mem, /* Test if Dilithium key. Try all levels. */ if (priv) { isDilithium = ((wc_dilithium_set_level(dilithium, 2) == 0) && - (wc_dilithium_import_private_only(mem, + (wc_dilithium_import_private(mem, (word32)memSz, dilithium) == 0)); if (!isDilithium) { isDilithium = ((wc_dilithium_set_level(dilithium, 3) == 0) && - (wc_dilithium_import_private_only(mem, + (wc_dilithium_import_private(mem, (word32)memSz, dilithium) == 0)); } if (!isDilithium) { isDilithium = ((wc_dilithium_set_level(dilithium, 5) == 0) && - (wc_dilithium_import_private_only(mem, + (wc_dilithium_import_private(mem, (word32)memSz, dilithium) == 0)); } } @@ -7082,7 +7077,6 @@ static int d2iTryDilithiumKey(WOLFSSL_EVP_PKEY** out, const unsigned char* mem, return 1; } #endif /* HAVE_DILITHIUM */ -#endif /* HAVE_PQC */ static WOLFSSL_EVP_PKEY* d2iGenericKey(WOLFSSL_EVP_PKEY** out, const unsigned char** in, long inSz, int priv) @@ -7138,7 +7132,6 @@ static WOLFSSL_EVP_PKEY* d2iGenericKey(WOLFSSL_EVP_PKEY** out, #endif /* !HAVE_FIPS || HAVE_FIPS_VERSION > 2 */ #endif /* !NO_DH && OPENSSL_EXTRA && WOLFSSL_DH_EXTRA */ -#ifdef HAVE_PQC #ifdef HAVE_FALCON if (d2iTryFalconKey(&pkey, *in, inSz, priv) >= 0) { ; @@ -7151,7 +7144,6 @@ static WOLFSSL_EVP_PKEY* d2iGenericKey(WOLFSSL_EVP_PKEY** out, } else #endif /* HAVE_DILITHIUM */ -#endif /* HAVE_PQC */ { WOLFSSL_MSG("wolfSSL_d2i_PUBKEY couldn't determine key type"); } @@ -14263,7 +14255,7 @@ const char* wolfSSL_get_curve_name(WOLFSSL* ssl) if (ssl == NULL) return NULL; -#if defined(WOLFSSL_TLS13) && defined(HAVE_PQC) +#if defined(WOLFSSL_TLS13) && defined(WOLFSSL_HAVE_KYBER) /* Check for post-quantum groups. Return now because we do not want the ECC * check to override this result in the case of a hybrid. */ if (IsAtLeastTLSv1_3(ssl->version)) { @@ -14288,20 +14280,26 @@ const char* wolfSSL_get_curve_name(WOLFSSL* ssl) #ifdef WOLFSSL_KYBER512 case WOLFSSL_KYBER_LEVEL1: return "KYBER_LEVEL1"; + case WOLFSSL_P256_KYBER_LEVEL1: + return "P256_KYBER_LEVEL1"; #endif #ifdef WOLFSSL_KYBER768 case WOLFSSL_KYBER_LEVEL3: return "KYBER_LEVEL3"; + case WOLFSSL_P384_KYBER_LEVEL3: + return "P384_KYBER_LEVEL3"; #endif #ifdef WOLFSSL_KYBER1024 case WOLFSSL_KYBER_LEVEL5: return "KYBER_LEVEL5"; + case WOLFSSL_P521_KYBER_LEVEL5: + return "P521_KYBER_LEVEL5"; #endif #endif } } +#endif /* WOLFSSL_TLS13 && WOLFSSL_HAVE_KYBER */ -#endif /* WOLFSSL_TLS13 && HAVE_PQC */ #ifdef HAVE_FFDHE if (ssl->namedGroup != 0) { cName = wolfssl_ffdhe_name(ssl->namedGroup); @@ -17197,7 +17195,6 @@ const WOLFSSL_ObjectInfo wolfssl_object_info[] = { #ifdef HAVE_ED25519 { NID_ED25519, ED25519k, oidKeyType, "ED25519", "ED25519"}, #endif - #ifdef HAVE_PQC #ifdef HAVE_FALCON { CTC_FALCON_LEVEL1, FALCON_LEVEL1k, oidKeyType, "Falcon Level 1", "Falcon Level 1"}, @@ -17212,7 +17209,6 @@ const WOLFSSL_ObjectInfo wolfssl_object_info[] = { { CTC_DILITHIUM_LEVEL5, DILITHIUM_LEVEL5k, oidKeyType, "Dilithium Level 5", "Dilithium Level 5"}, #endif /* HAVE_DILITHIUM */ - #endif /* HAVE_PQC */ /* oidCurveType */ #ifdef HAVE_ECC @@ -21475,11 +21471,11 @@ const WOLF_EC_NIST_NAME kNistCurves[] = { #ifdef HAVE_CURVE448 {CURVE_NAME("X448"), NID_X448, WOLFSSL_ECC_X448}, #endif -#ifdef HAVE_PQC +#ifdef WOLFSSL_HAVE_KYBER {CURVE_NAME("KYBER_LEVEL1"), WOLFSSL_KYBER_LEVEL1, WOLFSSL_KYBER_LEVEL1}, {CURVE_NAME("KYBER_LEVEL3"), WOLFSSL_KYBER_LEVEL3, WOLFSSL_KYBER_LEVEL1}, {CURVE_NAME("KYBER_LEVEL5"), WOLFSSL_KYBER_LEVEL5, WOLFSSL_KYBER_LEVEL1}, -#ifdef HAVE_LIBOQS +#if defined(WOLFSSL_WC_KYBER) || defined(HAVE_LIBOQS) {CURVE_NAME("P256_KYBER_LEVEL1"), WOLFSSL_P256_KYBER_LEVEL1, WOLFSSL_P256_KYBER_LEVEL1}, {CURVE_NAME("P384_KYBER_LEVEL3"), WOLFSSL_P384_KYBER_LEVEL3, WOLFSSL_P256_KYBER_LEVEL1}, {CURVE_NAME("P521_KYBER_LEVEL5"), WOLFSSL_P521_KYBER_LEVEL5, WOLFSSL_P256_KYBER_LEVEL1}, diff --git a/src/ssl_certman.c b/src/ssl_certman.c index e074996afc..d9af7bc66b 100644 --- a/src/ssl_certman.c +++ b/src/ssl_certman.c @@ -141,14 +141,12 @@ WOLFSSL_CERT_MANAGER* wolfSSL_CertManagerNew_ex(void* heap) #ifdef HAVE_ECC cm->minEccKeySz = MIN_ECCKEY_SZ; #endif - #ifdef HAVE_PQC #ifdef HAVE_FALCON cm->minFalconKeySz = MIN_FALCONKEY_SZ; #endif /* HAVE_FALCON */ #ifdef HAVE_DILITHIUM cm->minDilithiumKeySz = MIN_DILITHIUMKEY_SZ; #endif /* HAVE_DILITHIUM */ - #endif /* HAVE_PQC */ /* Set heap hint to use in certificate manager operations. */ cm->heap = heap; diff --git a/src/ssl_load.c b/src/ssl_load.c index 34e7ee2f7a..6b8da4cae4 100644 --- a/src/ssl_load.c +++ b/src/ssl_load.c @@ -852,7 +852,6 @@ static int ProcessBufferTryDecodeEd448(WOLFSSL_CTX* ctx, WOLFSSL* ssl, } #endif /* HAVE_ED448 && HAVE_ED448_KEY_IMPORT */ -#if defined(HAVE_PQC) #if defined(HAVE_FALCON) /* See if DER data is an Falcon private key. * @@ -943,7 +942,7 @@ static int ProcessBufferTryDecodeFalcon(WOLFSSL_CTX* ctx, WOLFSSL* ssl, } #endif -#if defined(HAVE_DILITHIUM) +#if defined(HAVE_DILITHIUM) && !defined(WOLFSSL_DILITHIUM_NO_SIGN) /* See if DER data is an Dilithium private key. * * Checks size meets minimum Falcon key size. @@ -997,7 +996,7 @@ static int ProcessBufferTryDecodeDilithium(WOLFSSL_CTX* ctx, WOLFSSL* ssl, if (ret == 0) { /* Decode as a Dilithium private key. */ - ret = wc_dilithium_import_private_only(der->buffer, der->length, key); + ret = wc_dilithium_import_private(der->buffer, der->length, key); if (ret == 0) { /* Get the minimum Dilithium key size from SSL or SSL context * object. */ @@ -1040,7 +1039,6 @@ static int ProcessBufferTryDecodeDilithium(WOLFSSL_CTX* ctx, WOLFSSL* ssl, return ret; } #endif /* HAVE_DILITHIUM */ -#endif /* HAVE_PQC */ /* Try to decode DER data is a known private key. * @@ -1143,7 +1141,6 @@ static int ProcessBufferTryDecode(WOLFSSL_CTX* ctx, WOLFSSL* ssl, keyType, keySz); } #endif /* HAVE_ED448 && HAVE_ED448_KEY_IMPORT */ -#if defined(HAVE_PQC) #if defined(HAVE_FALCON) /* Try Falcon if key format is Falcon level 1k or 5k or yet unknown. */ if ((ret == 0) && ((*keyFormat == 0) || (*keyFormat == FALCON_LEVEL1k) || @@ -1152,7 +1149,7 @@ static int ProcessBufferTryDecode(WOLFSSL_CTX* ctx, WOLFSSL* ssl, keyType, keySz); } #endif /* HAVE_FALCON */ -#if defined(HAVE_DILITHIUM) +#if defined(HAVE_DILITHIUM) && !defined(WOLFSSL_DILITHIUM_NO_SIGN) /* Try Falcon if key format is Dilithium level 2k, 3k or 5k or yet unknown. */ if ((ret == 0) && ((*keyFormat == 0) || (*keyFormat == DILITHIUM_LEVEL2k) || @@ -1162,7 +1159,6 @@ static int ProcessBufferTryDecode(WOLFSSL_CTX* ctx, WOLFSSL* ssl, keyType, keySz); } #endif /* HAVE_DILITHIUM */ -#endif /* HAVE_PQC */ /* Check we know the format. */ if ((ret == 0) && (*keyFormat == 0)) { @@ -1467,8 +1463,7 @@ static void wolfssl_set_have_from_key_oid(WOLFSSL_CTX* ctx, WOLFSSL* ssl, } break; #endif - #ifdef HAVE_PQC - #ifdef HAVE_FALCON + #ifdef HAVE_FALCON case FALCON_LEVEL1k: case FALCON_LEVEL5k: if (ssl != NULL) { @@ -1478,8 +1473,8 @@ static void wolfssl_set_have_from_key_oid(WOLFSSL_CTX* ctx, WOLFSSL* ssl, ctx->haveFalconSig = 1; } break; - #endif /* HAVE_FALCON */ - #ifdef HAVE_DILITHIUM + #endif /* HAVE_FALCON */ + #ifdef HAVE_DILITHIUM case DILITHIUM_LEVEL2k: case DILITHIUM_LEVEL3k: case DILITHIUM_LEVEL5k: @@ -1490,8 +1485,7 @@ static void wolfssl_set_have_from_key_oid(WOLFSSL_CTX* ctx, WOLFSSL* ssl, ctx->haveDilithiumSig = 1; } break; - #endif /* HAVE_DILITHIUM */ - #endif /* HAVE_PQC */ + #endif /* HAVE_DILITHIUM */ default: WOLFSSL_MSG("Cert key not supported"); break; @@ -1539,7 +1533,6 @@ static void ProcessBufferCertSetHave(WOLFSSL_CTX* ctx, WOLFSSL* ssl, ctx->haveECDSAsig = 1; } break; -#ifdef HAVE_PQC #ifdef HAVE_FALCON case CTC_FALCON_LEVEL1: case CTC_FALCON_LEVEL5: @@ -1565,14 +1558,13 @@ static void ProcessBufferCertSetHave(WOLFSSL_CTX* ctx, WOLFSSL* ssl, } break; #endif -#endif default: WOLFSSL_MSG("Cert signature not supported"); break; } #if defined(HAVE_ECC) || defined(HAVE_ED25519) || defined(HAVE_ED448) || \ - (defined(HAVE_PQC) && defined(HAVE_LIBOQS)) || !defined(NO_RSA) + defined(HAVE_FALCON) || defined(HAVE_DILITHIUM) || !defined(NO_RSA) #if defined(HAVE_ECC) || defined(HAVE_ED25519) || defined(HAVE_ED448) /* Set the private key curve OID. */ if (ssl != NULL) { @@ -1702,7 +1694,6 @@ static int ProcessBufferCertPublicKey(WOLFSSL_CTX* ctx, WOLFSSL* ssl, } break; #endif /* HAVE_ED448 */ - #if defined(HAVE_PQC) #if defined(HAVE_FALCON) case FALCON_LEVEL1k: keyType = falcon_level1_sa_algo; @@ -1757,7 +1748,6 @@ static int ProcessBufferCertPublicKey(WOLFSSL_CTX* ctx, WOLFSSL* ssl, } break; #endif /* HAVE_DILITHIUM */ - #endif /* HAVE_PQC */ default: WOLFSSL_MSG("No key size check done on public key in certificate"); @@ -1893,7 +1883,6 @@ static int ProcessBufferCertAltPublicKey(WOLFSSL_CTX* ctx, WOLFSSL* ssl, } break; #endif /* HAVE_ED448 */ - #if defined(HAVE_PQC) #if defined(HAVE_FALCON) case FALCON_LEVEL1k: keyType = falcon_level1_sa_algo; @@ -1948,7 +1937,6 @@ static int ProcessBufferCertAltPublicKey(WOLFSSL_CTX* ctx, WOLFSSL* ssl, } break; #endif /* HAVE_DILITHIUM */ - #endif /* HAVE_PQC */ default: /* In this case, there was an OID that we didn't recognize. diff --git a/src/tls.c b/src/tls.c index 567f831349..c653eee41c 100644 --- a/src/tls.c +++ b/src/tls.c @@ -48,7 +48,7 @@ #ifdef HAVE_CURVE448 #include #endif -#ifdef HAVE_PQC +#ifdef WOLFSSL_HAVE_KYBER #include #ifdef WOLFSSL_WC_KYBER #include @@ -4032,7 +4032,7 @@ int TLSX_UseCertificateStatusRequestV2(TLSX** extensions, byte status_type, #ifdef HAVE_SUPPORTED_CURVES #if !defined(HAVE_ECC) && !defined(HAVE_CURVE25519) && !defined(HAVE_CURVE448) \ - && !defined(HAVE_FFDHE) && !defined(HAVE_PQC) + && !defined(HAVE_FFDHE) && !defined(WOLFSSL_HAVE_KYBER) #error Elliptic Curves Extension requires Elliptic Curve Cryptography or liboqs groups. \ Use --enable-ecc and/or --enable-liboqs in the configure script or \ define HAVE_ECC. Alternatively use FFDHE for DH cipher suites. @@ -7671,7 +7671,7 @@ static int TLSX_KeyShare_GenEccKey(WOLFSSL *ssl, KeyShareEntry* kse) return ret; } -#ifdef HAVE_PQC +#ifdef WOLFSSL_HAVE_KYBER static int kyber_id2type(int id, int *type) { int ret = 0; @@ -7874,7 +7874,7 @@ static int TLSX_KeyShare_GenPqcKey(WOLFSSL *ssl, KeyShareEntry* kse) return ret; } -#endif /* HAVE_PQC */ +#endif /* WOLFSSL_HAVE_KYBER */ /* Generate a secret/key using the key share entry. * @@ -7891,7 +7891,7 @@ int TLSX_KeyShare_GenKey(WOLFSSL *ssl, KeyShareEntry *kse) ret = TLSX_KeyShare_GenX25519Key(ssl, kse); else if (kse->group == WOLFSSL_ECC_X448) ret = TLSX_KeyShare_GenX448Key(ssl, kse); -#ifdef HAVE_PQC +#ifdef WOLFSSL_HAVE_KYBER else if (WOLFSSL_NAMED_GROUP_IS_PQC(kse->group)) ret = TLSX_KeyShare_GenPqcKey(ssl, kse); #endif @@ -7929,7 +7929,7 @@ static void TLSX_KeyShare_FreeAll(KeyShareEntry* list, void* heap) wc_curve448_free((curve448_key*)current->key); #endif } -#ifdef HAVE_PQC +#ifdef WOLFSSL_HAVE_KYBER else if (WOLFSSL_NAMED_GROUP_IS_PQC(current->group)) { if (current->key != NULL) { ForceZero((byte*)current->key, current->keyLen); @@ -8484,7 +8484,7 @@ static int TLSX_KeyShare_ProcessEcc(WOLFSSL* ssl, KeyShareEntry* keyShareEntry) return ret; } -#ifdef HAVE_PQC +#ifdef WOLFSSL_HAVE_KYBER /* Process the Kyber key share extension on the client side. * * ssl The SSL/TLS object. @@ -8653,7 +8653,7 @@ static int TLSX_KeyShare_ProcessPqc(WOLFSSL* ssl, KeyShareEntry* keyShareEntry) wc_KyberKey_Free(kem); return ret; } -#endif /* HAVE_PQC */ +#endif /* WOLFSSL_HAVE_KYBER */ /* Process the key share extension on the client side. * @@ -8679,7 +8679,7 @@ static int TLSX_KeyShare_Process(WOLFSSL* ssl, KeyShareEntry* keyShareEntry) ret = TLSX_KeyShare_ProcessX25519(ssl, keyShareEntry); else if (keyShareEntry->group == WOLFSSL_ECC_X448) ret = TLSX_KeyShare_ProcessX448(ssl, keyShareEntry); -#ifdef HAVE_PQC +#ifdef WOLFSSL_HAVE_KYBER else if (WOLFSSL_NAMED_GROUP_IS_PQC(keyShareEntry->group)) ret = TLSX_KeyShare_ProcessPqc(ssl, keyShareEntry); #endif @@ -8730,7 +8730,7 @@ static int TLSX_KeyShareEntry_Parse(const WOLFSSL* ssl, const byte* input, if (keLen > length - offset) return BUFFER_ERROR; -#ifdef HAVE_PQC +#ifdef WOLFSSL_HAVE_KYBER if (WOLFSSL_NAMED_GROUP_IS_PQC(group) && ssl->options.side == WOLFSSL_SERVER_END) { /* For KEMs, the public key is not stored. Casting away const because @@ -8909,7 +8909,7 @@ int TLSX_KeyShare_Parse(WOLFSSL* ssl, const byte* input, word16 length, /* Not in list sent if there isn't a private key. */ if (keyShareEntry == NULL || (keyShareEntry->key == NULL - #if !defined(NO_DH) || defined(HAVE_PQC) + #if !defined(NO_DH) || defined(WOLFSSL_HAVE_KYBER) && keyShareEntry->privKey == NULL #endif )) { @@ -9001,7 +9001,7 @@ static int TLSX_KeyShare_New(KeyShareEntry** list, int group, void *heap, return 0; } -#ifdef HAVE_PQC +#ifdef WOLFSSL_HAVE_KYBER static int server_generate_pqc_ciphertext(WOLFSSL* ssl, KeyShareEntry* keyShareEntry, byte* data, word16 len) { @@ -9162,7 +9162,7 @@ static int server_generate_pqc_ciphertext(WOLFSSL* ssl, wc_KyberKey_Free(kem); return ret; } -#endif /* HAVE_PQC */ +#endif /* WOLFSSL_HAVE_KYBER */ /* Use the data to create a new key share object in the extensions. * @@ -9211,7 +9211,7 @@ int TLSX_KeyShare_Use(const WOLFSSL* ssl, word16 group, word16 len, byte* data, } -#ifdef HAVE_PQC +#ifdef WOLFSSL_HAVE_KYBER if (WOLFSSL_NAMED_GROUP_IS_PQC(group) && ssl->options.side == WOLFSSL_SERVER_END) { ret = server_generate_pqc_ciphertext((WOLFSSL*)ssl, keyShareEntry, data, @@ -9378,16 +9378,19 @@ static int TLSX_KeyShare_IsSupported(int namedGroup) break; #endif #endif - #ifdef HAVE_PQC +#ifdef WOLFSSL_HAVE_KYBER #ifdef WOLFSSL_WC_KYBER #ifdef WOLFSSL_KYBER512 case WOLFSSL_KYBER_LEVEL1: + case WOLFSSL_P256_KYBER_LEVEL1: #endif #ifdef WOLFSSL_KYBER768 case WOLFSSL_KYBER_LEVEL3: + case WOLFSSL_P384_KYBER_LEVEL3: #endif #ifdef WOLFSSL_KYBER1024 case WOLFSSL_KYBER_LEVEL5: + case WOLFSSL_P521_KYBER_LEVEL5: #endif break; #elif defined(HAVE_LIBOQS) @@ -9415,7 +9418,7 @@ static int TLSX_KeyShare_IsSupported(int namedGroup) case WOLFSSL_KYBER_LEVEL1: break; #endif - #endif /* HAVE_PQC */ +#endif default: return 0; } @@ -9464,12 +9467,15 @@ static const word16 preferredGroup[] = { #ifdef WOLFSSL_WC_KYBER #ifdef WOLFSSL_KYBER512 WOLFSSL_KYBER_LEVEL1, + WOLFSSL_P256_KYBER_LEVEL1, #endif #ifdef WOLFSSL_KYBER768 WOLFSSL_KYBER_LEVEL3, + WOLFSSL_P384_KYBER_LEVEL3, #endif #ifdef WOLFSSL_KYBER1024 WOLFSSL_KYBER_LEVEL5, + WOLFSSL_P521_KYBER_LEVEL5, #endif #elif defined(HAVE_LIBOQS) /* These require a runtime call to TLSX_KeyShare_IsSupported to use */ @@ -9787,7 +9793,7 @@ int TLSX_KeyShare_Choose(const WOLFSSL *ssl, TLSX* extensions, if (!WOLFSSL_NAMED_GROUP_IS_FFHDE(clientKSE->group)) { /* Check max value supported. */ if (clientKSE->group > WOLFSSL_ECC_MAX) { -#ifdef HAVE_PQC +#ifdef WOLFSSL_HAVE_KYBER if (!WOLFSSL_NAMED_GROUP_IS_PQC(clientKSE->group)) #endif continue; @@ -9852,7 +9858,7 @@ int TLSX_KeyShare_Setup(WOLFSSL *ssl, KeyShareEntry* clientKSE) return ret; if (clientKSE->key == NULL) { -#ifdef HAVE_PQC +#ifdef WOLFSSL_HAVE_KYBER if (WOLFSSL_NAMED_GROUP_IS_PQC(clientKSE->group)) { /* Going to need the public key (AKA ciphertext). */ serverKSE->pubKey = clientKSE->pubKey; @@ -13076,22 +13082,31 @@ static int TLSX_PopulateSupportedGroups(WOLFSSL* ssl, TLSX** extensions) #endif #endif -#ifdef HAVE_PQC +#ifdef WOLFSSL_HAVE_KYBER #ifdef WOLFSSL_WC_KYBER #ifdef WOLFSSL_KYBER512 if (ret == WOLFSSL_SUCCESS) ret = TLSX_UseSupportedCurve(extensions, WOLFSSL_KYBER_LEVEL1, ssl->heap); + if (ret == WOLFSSL_SUCCESS) + ret = TLSX_UseSupportedCurve(extensions, WOLFSSL_P256_KYBER_LEVEL1, + ssl->heap); #endif #ifdef WOLFSSL_KYBER768 if (ret == WOLFSSL_SUCCESS) ret = TLSX_UseSupportedCurve(extensions, WOLFSSL_KYBER_LEVEL3, ssl->heap); + if (ret == WOLFSSL_SUCCESS) + ret = TLSX_UseSupportedCurve(extensions, WOLFSSL_P384_KYBER_LEVEL3, + ssl->heap); #endif #ifdef WOLFSSL_KYBER768 if (ret == WOLFSSL_SUCCESS) ret = TLSX_UseSupportedCurve(extensions, WOLFSSL_KYBER_LEVEL5, ssl->heap); + if (ret == WOLFSSL_SUCCESS) + ret = TLSX_UseSupportedCurve(extensions, WOLFSSL_P521_KYBER_LEVEL5, + ssl->heap); #endif #elif defined(HAVE_LIBOQS) ret = TLSX_UseSupportedCurve(extensions, WOLFSSL_KYBER_LEVEL1, ssl->heap); @@ -13113,7 +13128,7 @@ static int TLSX_PopulateSupportedGroups(WOLFSSL* ssl, TLSX** extensions) #elif defined(HAVE_PQM4) ret = TLSX_UseSupportedCurve(extensions, WOLFSSL_KYBER_LEVEL1, ssl->heap); #endif /* HAVE_LIBOQS */ -#endif /* HAVE_PQC */ +#endif /* WOLFSSL_HAVE_KYBER */ (void)ssl; (void)extensions; diff --git a/src/tls13.c b/src/tls13.c index 81e640698f..585b02958a 100644 --- a/src/tls13.c +++ b/src/tls13.c @@ -189,7 +189,7 @@ static const byte #ifndef NO_CERTS #if !defined(NO_RSA) || defined(HAVE_ECC) || defined(HAVE_ED25519) || \ - defined(HAVE_ED448) || defined(HAVE_PQC) + defined(HAVE_ED448) || defined(HAVE_FALCON) || defined(HAVE_DILITHIUM) static WC_INLINE int GetMsgHash(WOLFSSL* ssl, byte* hash); @@ -7751,7 +7751,7 @@ static int SendTls13CertificateRequest(WOLFSSL* ssl, byte* reqCtx, #ifndef NO_CERTS #if !defined(NO_RSA) || defined(HAVE_ECC) || defined(HAVE_ED25519) || \ - defined(HAVE_ED448) || defined(HAVE_PQC) + defined(HAVE_ED448) || defined(HAVE_FALCON) || defined(HAVE_DILITHIUM) /* Encode the signature algorithm into buffer. * * hashalgo The hash algorithm. @@ -7796,8 +7796,7 @@ static WC_INLINE void EncodeSigAlg(byte hashAlgo, byte hsType, byte* output) output[1] = hashAlgo; break; #endif -#ifdef HAVE_PQC - #ifdef HAVE_FALCON +#ifdef HAVE_FALCON case falcon_level1_sa_algo: output[0] = FALCON_LEVEL1_SA_MAJOR; output[1] = FALCON_LEVEL1_SA_MINOR; @@ -7806,8 +7805,8 @@ static WC_INLINE void EncodeSigAlg(byte hashAlgo, byte hsType, byte* output) output[0] = FALCON_LEVEL5_SA_MAJOR; output[1] = FALCON_LEVEL5_SA_MINOR; break; - #endif - #ifdef HAVE_DILITHIUM +#endif +#ifdef HAVE_DILITHIUM case dilithium_level2_sa_algo: output[0] = DILITHIUM_LEVEL2_SA_MAJOR; output[1] = DILITHIUM_LEVEL2_SA_MINOR; @@ -7820,7 +7819,6 @@ static WC_INLINE void EncodeSigAlg(byte hashAlgo, byte hsType, byte* output) output[0] = DILITHIUM_LEVEL5_SA_MAJOR; output[1] = DILITHIUM_LEVEL5_SA_MINOR; break; - #endif #endif default: break; @@ -7964,7 +7962,7 @@ static WC_INLINE int DecodeTls13SigAlg(byte* input, byte* hashAlgo, else ret = INVALID_PARAMETER; break; -#ifdef HAVE_PQC +#if defined(HAVE_FALCON) || defined(HAVE_DILITHIUM) case PQC_SA_MAJOR: #if defined(HAVE_FALCON) if (input[1] == FALCON_LEVEL1_SA_MINOR) { @@ -8747,7 +8745,8 @@ static int SendTls13Certificate(WOLFSSL* ssl) } #if (!defined(NO_RSA) || defined(HAVE_ECC) || defined(HAVE_ED25519) || \ - defined(HAVE_ED448) || defined(HAVE_PQC)) && \ + defined(HAVE_ED448) || defined(HAVE_FALCON) || \ + defined(HAVE_DILITHIUM)) && \ (!defined(NO_WOLFSSL_SERVER) || !defined(WOLFSSL_NO_CLIENT_AUTH)) typedef struct Scv13Args { byte* output; /* not allocated */ @@ -8987,8 +8986,7 @@ static int SendTls13CertificateVerify(WOLFSSL* ssl) else if (ssl->hsType == DYNAMIC_TYPE_ED448) args->sigAlgo = ed448_sa_algo; #endif - #if defined(HAVE_PQC) - #if defined(HAVE_FALCON) + #if defined(HAVE_FALCON) else if (ssl->hsType == DYNAMIC_TYPE_FALCON) { falcon_key* fkey = (falcon_key*)ssl->hsKey; byte level = 0; @@ -9005,8 +9003,8 @@ static int SendTls13CertificateVerify(WOLFSSL* ssl) ERROR_OUT(ALGO_ID_E, exit_scv); } } - #endif /* HAVE_FALCON */ - #if defined(HAVE_DILITHIUM) + #endif /* HAVE_FALCON */ + #if defined(HAVE_DILITHIUM) else if (ssl->hsType == DYNAMIC_TYPE_DILITHIUM) { dilithium_key* fkey = (dilithium_key*)ssl->hsKey; byte level = 0; @@ -9026,8 +9024,7 @@ static int SendTls13CertificateVerify(WOLFSSL* ssl) ERROR_OUT(ALGO_ID_E, exit_scv); } } - #endif /* HAVE_DILITHIUM */ - #endif /* HAVE_PQC */ + #endif /* HAVE_DILITHIUM */ else { ERROR_OUT(ALGO_ID_E, exit_scv); } @@ -9183,18 +9180,16 @@ static int SendTls13CertificateVerify(WOLFSSL* ssl) } #endif /* HAVE_ED448 */ - #if defined(HAVE_PQC) - #if defined(HAVE_FALCON) + #if defined(HAVE_FALCON) if (ssl->hsType == DYNAMIC_TYPE_FALCON) { args->sigLen = FALCON_MAX_SIG_SIZE; } - #endif /* HAVE_FALCON */ - #if defined(HAVE_DILITHIUM) + #endif /* HAVE_FALCON */ + #if defined(HAVE_DILITHIUM) if (ssl->hsType == DYNAMIC_TYPE_DILITHIUM) { args->sigLen = DILITHIUM_MAX_SIG_SIZE; } - #endif /* HAVE_DILITHIUM */ - #endif /* HAVE_PQC */ + #endif /* HAVE_DILITHIUM */ #ifdef WOLFSSL_DUAL_ALG_CERTS if (ssl->sigSpec != NULL && @@ -9300,24 +9295,22 @@ static int SendTls13CertificateVerify(WOLFSSL* ssl) args->length = (word16)args->sigLen; } #endif - #if defined(HAVE_PQC) - #if defined(HAVE_FALCON) + #if defined(HAVE_FALCON) if (ssl->hsType == DYNAMIC_TYPE_FALCON) { ret = wc_falcon_sign_msg(args->sigData, args->sigDataSz, sigOut, &args->sigLen, (falcon_key*)ssl->hsKey, ssl->rng); args->length = (word16)args->sigLen; } - #endif /* HAVE_FALCON */ - #if defined(HAVE_DILITHIUM) + #endif /* HAVE_FALCON */ + #if defined(HAVE_DILITHIUM) && !defined(WOLFSSL_DILITHIUM_NO_SIGN) if (ssl->hsType == DYNAMIC_TYPE_DILITHIUM) { ret = wc_dilithium_sign_msg(args->sigData, args->sigDataSz, sigOut, &args->sigLen, (dilithium_key*)ssl->hsKey, ssl->rng); args->length = (word16)args->sigLen; } - #endif /* HAVE_DILITHIUM */ - #endif /* HAVE_PQC */ + #endif /* HAVE_DILITHIUM */ #ifndef NO_RSA if (ssl->hsType == DYNAMIC_TYPE_RSA) { ret = RsaSign(ssl, rsaSigBuf->buffer, (word32)rsaSigBuf->length, @@ -9375,8 +9368,7 @@ static int SendTls13CertificateVerify(WOLFSSL* ssl) } } #endif /* !NO_RSA */ - #if defined(HAVE_PQC) - #if defined(HAVE_FALCON) + #if defined(HAVE_FALCON) if (ssl->hsAltType == DYNAMIC_TYPE_FALCON) { ret = wc_falcon_sign_msg(args->altSigData, args->altSigDataSz, sigOut, @@ -9384,8 +9376,8 @@ static int SendTls13CertificateVerify(WOLFSSL* ssl) (falcon_key*)ssl->hsAltKey, ssl->rng); } - #endif /* HAVE_FALCON */ - #if defined(HAVE_DILITHIUM) + #endif /* HAVE_FALCON */ + #if defined(HAVE_DILITHIUM) && !defined(WOLFSSL_DILITHIUM_NO_SIGN) if (ssl->hsAltType == DYNAMIC_TYPE_DILITHIUM) { ret = wc_dilithium_sign_msg(args->altSigData, args->altSigDataSz, sigOut, @@ -9393,8 +9385,7 @@ static int SendTls13CertificateVerify(WOLFSSL* ssl) (dilithium_key*)ssl->hsAltKey, ssl->rng); } - #endif /* HAVE_DILITHIUM */ - #endif /* HAVE_PQC */ + #endif /* HAVE_DILITHIUM */ /* Check for error */ if (ret != 0) { @@ -10051,7 +10042,7 @@ static int DoTls13CertificateVerify(WOLFSSL* ssl, byte* input, ssl->peerEccDsaKeyPresent; } #endif - #ifdef HAVE_PQC + #ifdef HAVE_FALCON if (ssl->options.peerSigAlgo == falcon_level1_sa_algo) { WOLFSSL_MSG("Peer sent Falcon Level 1 sig"); validSigAlgo = (ssl->peerFalconKey != NULL) && @@ -10062,6 +10053,8 @@ static int DoTls13CertificateVerify(WOLFSSL* ssl, byte* input, validSigAlgo = (ssl->peerFalconKey != NULL) && ssl->peerFalconKeyPresent; } + #endif + #ifdef HAVE_DILITHIUM if (ssl->options.peerSigAlgo == dilithium_level2_sa_algo) { WOLFSSL_MSG("Peer sent Dilithium Level 2 sig"); validSigAlgo = (ssl->peerDilithiumKey != NULL) && @@ -10326,7 +10319,7 @@ static int DoTls13CertificateVerify(WOLFSSL* ssl, byte* input, } } #endif - #if defined(HAVE_PQC) && defined(HAVE_FALCON) + #if defined(HAVE_FALCON) if (((ssl->options.peerSigAlgo == falcon_level1_sa_algo) || (ssl->options.peerSigAlgo == falcon_level5_sa_algo)) && (ssl->peerFalconKeyPresent)) { @@ -10346,8 +10339,8 @@ static int DoTls13CertificateVerify(WOLFSSL* ssl, byte* input, ssl->peerFalconKeyPresent = 0; } } - #endif /* HAVE_PQC && HAVE_FALCON */ - #if defined(HAVE_PQC) && defined(HAVE_DILITHIUM) + #endif /* HAVE_FALCON */ + #if defined(HAVE_DILITHIUM) && !defined(WOLFSSL_DILITHIUM_NO_VERIFY) if (((ssl->options.peerSigAlgo == dilithium_level2_sa_algo) || (ssl->options.peerSigAlgo == dilithium_level3_sa_algo) || (ssl->options.peerSigAlgo == dilithium_level5_sa_algo)) && @@ -10368,7 +10361,7 @@ static int DoTls13CertificateVerify(WOLFSSL* ssl, byte* input, ssl->peerDilithiumKeyPresent = 0; } } - #endif /* HAVE_PQC && HAVE_DILITHIUM */ + #endif /* HAVE_DILITHIUM */ /* Check for error */ if (ret != 0) { @@ -10428,7 +10421,7 @@ static int DoTls13CertificateVerify(WOLFSSL* ssl, byte* input, } } #endif /* HAVE_ECC */ - #if defined(HAVE_PQC) && defined(HAVE_FALCON) + #if defined(HAVE_FALCON) if (((args->altSigAlgo == falcon_level1_sa_algo) || (args->altSigAlgo == falcon_level5_sa_algo)) && (ssl->peerFalconKeyPresent)) { @@ -10448,8 +10441,8 @@ static int DoTls13CertificateVerify(WOLFSSL* ssl, byte* input, ssl->peerFalconKeyPresent = 0; } } - #endif /* HAVE_PQC && HAVE_FALCON */ - #if defined(HAVE_PQC) && defined(HAVE_DILITHIUM) + #endif /* HAVE_FALCON */ + #if defined(HAVE_DILITHIUM) && !defined(WOLFSSL_DILITHIUM_NO_VERIFY) if (((args->altSigAlgo == dilithium_level2_sa_algo) || (args->altSigAlgo == dilithium_level3_sa_algo) || (args->altSigAlgo == dilithium_level5_sa_algo)) && @@ -10470,7 +10463,7 @@ static int DoTls13CertificateVerify(WOLFSSL* ssl, byte* input, ssl->peerDilithiumKeyPresent = 0; } } - #endif /* HAVE_PQC && HAVE_DILITHIUM */ + #endif /* HAVE_DILITHIUM */ /* Check for error */ if (ret != 0) { @@ -12513,7 +12506,7 @@ int DoTls13HandShakeMsgType(WOLFSSL* ssl, byte* input, word32* inOutIdx, #endif #if !defined(NO_RSA) || defined(HAVE_ECC) || defined(HAVE_ED25519) || \ - defined(HAVE_ED448) || defined(HAVE_PQC) + defined(HAVE_ED448) || defined(HAVE_FALCON) || defined(HAVE_DILITHIUM) case certificate_verify: WOLFSSL_MSG("processing certificate verify"); ret = DoTls13CertificateVerify(ssl, input, inOutIdx, size); @@ -13150,8 +13143,8 @@ int wolfSSL_connect_TLSv13(WOLFSSL* ssl) case FIRST_REPLY_THIRD: #if (!defined(NO_CERTS) && (!defined(NO_RSA) || defined(HAVE_ECC) || \ defined(HAVE_ED25519) || defined(HAVE_ED448) || \ - defined(HAVE_PQC))) && (!defined(NO_WOLFSSL_SERVER) || \ - !defined(WOLFSSL_NO_CLIENT_AUTH)) + defined(HAVE_FALCON) || defined(HAVE_DILITHIUM))) && \ + (!defined(NO_WOLFSSL_SERVER) || !defined(WOLFSSL_NO_CLIENT_AUTH)) if (!ssl->options.resuming && ssl->options.sendVerify) { ssl->error = SendTls13CertificateVerify(ssl); if (ssl->error != 0) { @@ -13369,7 +13362,7 @@ int wolfSSL_UseKeyShare(WOLFSSL* ssl, word16 group) } #endif -#ifdef HAVE_PQC +#if defined(WOLFSSL_HAVE_KYBER) if (WOLFSSL_NAMED_GROUP_IS_PQC(group)) { if (ssl->ctx != NULL && ssl->ctx->method != NULL && @@ -13378,10 +13371,11 @@ int wolfSSL_UseKeyShare(WOLFSSL* ssl, word16 group) } if (ssl->options.side == WOLFSSL_SERVER_END) { - /* If I am the server of a KEM connection, do not do keygen because I'm - * going to encapsulate with the client's public key. Note that I might - * be the client and ssl->option.side has not been properly set yet. In - * that case the KeyGen operation will be deferred to connection time. */ + /* If I am the server of a KEM connection, do not do keygen because + * I'm going to encapsulate with the client's public key. Note that + * I might be the client and ssl->option.side has not been properly + * set yet. In that case the KeyGen operation will be deferred to + * connection time. */ return WOLFSSL_SUCCESS; } } @@ -14292,7 +14286,8 @@ int wolfSSL_accept_TLSv13(WOLFSSL* ssl) case TLS13_CERT_SENT : #if !defined(NO_CERTS) && (!defined(NO_RSA) || defined(HAVE_ECC) || \ - defined(HAVE_ED25519) || defined(HAVE_ED448) || defined(HAVE_PQC)) + defined(HAVE_ED25519) || defined(HAVE_ED448) || defined(HAVE_FALCON) || \ + defined(HAVE_DILITHIUM)) if (!ssl->options.resuming && ssl->options.sendVerify) { if ((ssl->error = SendTls13CertificateVerify(ssl)) != 0) { WOLFSSL_ERROR(ssl->error); diff --git a/src/x509.c b/src/x509.c index 2fcc5d9318..2cdd0be9d5 100644 --- a/src/x509.c +++ b/src/x509.c @@ -10191,13 +10191,13 @@ WOLF_STACK_OF(WOLFSSL_X509)* wolfSSL_X509_chain_up_ref( #ifndef NO_DSA DsaKey* dsa = NULL; #endif - #if defined(HAVE_PQC) && defined(HAVE_FALCON) + #if defined(HAVE_FALCON) falcon_key* falcon = NULL; #endif - #if defined(HAVE_PQC) && defined(HAVE_DILITHIUM) + #if defined(HAVE_DILITHIUM) dilithium_key* dilithium = NULL; #endif - #if defined(HAVE_PQC) && defined(HAVE_SPHINCS) + #if defined(HAVE_SPHINCS) sphincs_key* sphincs = NULL; #endif WC_RNG rng; @@ -10326,7 +10326,7 @@ WOLF_STACK_OF(WOLFSSL_X509)* wolfSSL_X509_chain_up_ref( key = (void*)dsa; } #endif - #if defined(HAVE_PQC) && defined(HAVE_FALCON) + #if defined(HAVE_FALCON) if ((x509->pubKeyOID == FALCON_LEVEL1k) || (x509->pubKeyOID == FALCON_LEVEL5k)) { falcon = (falcon_key*)XMALLOC(sizeof(falcon_key), NULL, @@ -10365,7 +10365,7 @@ WOLF_STACK_OF(WOLFSSL_X509)* wolfSSL_X509_chain_up_ref( key = (void*)falcon; } #endif - #if defined(HAVE_PQC) && defined(HAVE_DILITHIUM) + #if defined(HAVE_DILITHIUM) if ((x509->pubKeyOID == DILITHIUM_LEVEL2k) || (x509->pubKeyOID == DILITHIUM_LEVEL3k) || (x509->pubKeyOID == DILITHIUM_LEVEL5k)) { @@ -10409,7 +10409,7 @@ WOLF_STACK_OF(WOLFSSL_X509)* wolfSSL_X509_chain_up_ref( key = (void*)dilithium; } #endif - #if defined(HAVE_PQC) && defined(HAVE_SPHINCS) + #if defined(HAVE_SPHINCS) if ((x509->pubKeyOID == SPHINCS_FAST_LEVEL1k) || (x509->pubKeyOID == SPHINCS_FAST_LEVEL3k) || (x509->pubKeyOID == SPHINCS_FAST_LEVEL5k) || @@ -10568,14 +10568,14 @@ WOLF_STACK_OF(WOLFSSL_X509)* wolfSSL_X509_chain_up_ref( XFREE(dsa, NULL, DYNAMIC_TYPE_DSA); } #endif - #if defined(HAVE_PQC) && defined(HAVE_FALCON) + #if defined(HAVE_FALCON) if ((x509->pubKeyOID == FALCON_LEVEL1k) || (x509->pubKeyOID == FALCON_LEVEL5k)) { wc_falcon_free(falcon); XFREE(falcon, NULL, DYNAMIC_TYPE_FALCON); } #endif - #if defined(HAVE_PQC) && defined(HAVE_DILITHIUM) + #if defined(HAVE_DILITHIUM) if ((x509->pubKeyOID == DILITHIUM_LEVEL2k) || (x509->pubKeyOID == DILITHIUM_LEVEL3k) || (x509->pubKeyOID == DILITHIUM_LEVEL5k)) { @@ -10583,7 +10583,7 @@ WOLF_STACK_OF(WOLFSSL_X509)* wolfSSL_X509_chain_up_ref( XFREE(dilithium, NULL, DYNAMIC_TYPE_DILITHIUM); } #endif - #if defined(HAVE_PQC) && defined(HAVE_SPHINCS) + #if defined(HAVE_SPHINCS) if ((x509->pubKeyOID == SPHINCS_FAST_LEVEL1k) || (x509->pubKeyOID == SPHINCS_FAST_LEVEL3k) || (x509->pubKeyOID == SPHINCS_FAST_LEVEL5k) || diff --git a/tests/api.c b/tests/api.c index 9044c9f5a1..995d7c4da1 100644 --- a/tests/api.c +++ b/tests/api.c @@ -293,6 +293,10 @@ #include #endif +#ifdef HAVE_DILITHIUM + #include +#endif + #ifdef HAVE_PKCS12 #include #endif @@ -26973,6 +26977,1457 @@ static int test_wc_Curve448PrivateKeyToDer(void) return EXPECT_RESULT(); } /* End wc_Curve448PrivateKeyToDer*/ +#if defined(HAVE_DILITHIUM) && defined(WOLFSSL_WC_DILITHIUM) && \ + !defined(WOLFSSL_DILITHIUM_NO_VERIFY) && !defined(WOLFSSL_NO_ML_DSA_44) +static const byte ml_dsa_44_pub_key[] = { + 0xf1, 0xdf, 0x1e, 0xfc, 0x6b, 0x41, 0xe7, + 0x5e, 0xcb, 0xb5, 0xb5, 0xd2, 0x3c, 0xc8, + 0xd3, 0x99, 0x73, 0x36, 0x9a, 0x0b, 0x32, + 0x71, 0x7a, 0x9f, 0x6d, 0x66, 0x07, 0xb8, + 0x31, 0x5f, 0x25, 0xb6, 0x2e, 0xee, 0x4f, + 0x63, 0x13, 0x02, 0x45, 0x3c, 0xd1, 0x3d, + 0x79, 0x6b, 0x3c, 0xfe, 0xd9, 0x2f, 0x39, + 0xe8, 0x62, 0x60, 0xf0, 0x04, 0x83, 0x28, + 0xaa, 0xdc, 0x15, 0x90, 0xef, 0x55, 0x48, + 0xf9, 0xd2, 0xcd, 0x53, 0x87, 0x0e, 0x42, + 0xba, 0x16, 0x87, 0x7b, 0x32, 0xa8, 0xbf, + 0xed, 0x32, 0xa1, 0x19, 0x66, 0x44, 0xfe, + 0x57, 0xec, 0x26, 0xed, 0x9e, 0x73, 0xa0, + 0x87, 0xe8, 0x8a, 0x93, 0x3c, 0xec, 0x1d, + 0xa0, 0xcc, 0x2e, 0x0d, 0x37, 0x5b, 0xb1, + 0x74, 0x77, 0x18, 0x4b, 0xde, 0x4b, 0xc9, + 0xac, 0xf8, 0xda, 0x23, 0x7a, 0x2a, 0x39, + 0xfa, 0x96, 0x01, 0xff, 0xf0, 0xc7, 0xa7, + 0x34, 0xca, 0x9d, 0xe9, 0xda, 0x4d, 0x85, + 0x00, 0xc9, 0xe9, 0xcf, 0xb0, 0x3e, 0x21, + 0xe6, 0xae, 0x52, 0x67, 0x4f, 0xe3, 0x93, + 0x2f, 0x50, 0x47, 0xdd, 0x89, 0xa2, 0x48, + 0xf8, 0xfe, 0x93, 0xfe, 0xce, 0x68, 0x9c, + 0xe9, 0x4d, 0xdd, 0xbd, 0x9f, 0xeb, 0x14, + 0x8d, 0x38, 0x7a, 0xc6, 0xf2, 0x50, 0x00, + 0x91, 0x65, 0xd0, 0xd1, 0xeb, 0x51, 0xab, + 0x3a, 0x0e, 0x45, 0x5c, 0xbd, 0x65, 0xf5, + 0x78, 0xc6, 0xa0, 0xaa, 0xae, 0x50, 0xf2, + 0x19, 0x1f, 0x90, 0x1a, 0x9f, 0x34, 0xa0, + 0xa1, 0x95, 0x94, 0x86, 0x30, 0xc2, 0xb2, + 0x95, 0x82, 0x13, 0xf6, 0x73, 0xe2, 0x03, + 0xe3, 0x7c, 0x09, 0x8e, 0x5d, 0x07, 0xd6, + 0x33, 0x93, 0x8a, 0x1b, 0x67, 0xc9, 0xb1, + 0x76, 0x74, 0x1c, 0x22, 0x58, 0x05, 0x5a, + 0xa8, 0x83, 0x68, 0xce, 0x64, 0xfc, 0x52, + 0x7f, 0x35, 0x80, 0x6e, 0xdf, 0xf5, 0x2d, + 0xd2, 0xd1, 0x17, 0xdc, 0xce, 0x95, 0xe8, + 0xe6, 0x42, 0xb1, 0xb1, 0x61, 0xc1, 0x24, + 0x79, 0x1c, 0x51, 0xfc, 0x3c, 0xba, 0x40, + 0xf7, 0x70, 0x35, 0x22, 0x73, 0x31, 0x53, + 0x21, 0xea, 0x09, 0xf7, 0xaa, 0x07, 0xb8, + 0xfa, 0x0b, 0xa0, 0xa9, 0xb4, 0x8c, 0x83, + 0xbb, 0x25, 0xfe, 0x39, 0x29, 0xef, 0x34, + 0xd5, 0xe2, 0xc7, 0x9e, 0x87, 0xbd, 0x50, + 0x86, 0x71, 0x12, 0x3e, 0x8a, 0x78, 0xe2, + 0xb3, 0xe1, 0xfa, 0x5b, 0x73, 0x3b, 0x34, + 0x9f, 0x4e, 0x7d, 0xd5, 0x1b, 0xb9, 0x8e, + 0x43, 0x76, 0xef, 0x3e, 0x37, 0x70, 0x33, + 0x36, 0xd1, 0xa1, 0xba, 0x1b, 0xb1, 0x79, + 0xfb, 0x2c, 0xb1, 0x9b, 0xc3, 0x1b, 0x26, + 0x83, 0x89, 0x4d, 0x53, 0x40, 0xa5, 0xf9, + 0x8b, 0xe2, 0xec, 0x30, 0x1f, 0xf6, 0x16, + 0xd6, 0x55, 0xce, 0x0e, 0x1b, 0xed, 0xe0, + 0xeb, 0xc9, 0x7a, 0x2e, 0x1a, 0x85, 0x81, + 0xa4, 0xe2, 0xa8, 0xbe, 0x9f, 0xac, 0x0b, + 0x23, 0xb4, 0xbb, 0xc2, 0x0f, 0x66, 0x43, + 0x45, 0x93, 0x20, 0x37, 0x4d, 0x47, 0x23, + 0x7f, 0x4a, 0x5e, 0x8b, 0x19, 0xec, 0xd9, + 0x57, 0x69, 0xc4, 0x91, 0xb0, 0xcd, 0x25, + 0x2a, 0x7d, 0x52, 0xdb, 0x59, 0x18, 0x8b, + 0x96, 0xad, 0x75, 0x21, 0x81, 0x1a, 0x2c, + 0xb3, 0x26, 0x30, 0x78, 0x19, 0x2b, 0x22, + 0x74, 0x6e, 0x92, 0x57, 0xec, 0x3c, 0x75, + 0x8b, 0xd8, 0x4b, 0x7c, 0xd1, 0x72, 0x1b, + 0x1f, 0xed, 0xae, 0x15, 0x82, 0xd3, 0xf6, + 0xaf, 0x01, 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0x60, + 0xd3, 0xd8, 0x76, 0xf0, 0x51, 0x04, 0xc7, + 0xcb, 0x68, 0x0f, 0xd8, 0x4b, 0x22, 0xb2, + 0x51, 0x87, 0xe9, 0x1e, 0x05, 0x3d, 0xe2, + 0x8a, 0x6b, 0xb8, 0x96, 0xd6, 0xe0, 0x6e, + 0x38, 0x74, 0x96, 0xad, 0x7e, 0x4f, 0x52, + 0x35, 0xcf, 0x4a, 0x50, 0xe7, 0x60, 0x2e, + 0x58, 0xcf, 0xdc, 0x7a, 0x9a, 0x21, 0x76, + 0x1d, 0x2c, 0xd1, 0x98, 0xab, 0xab, 0xed, + 0xf9, 0xec, 0xd5, 0x7b, 0x09, 0xad, 0x2e, + 0xad, 0x5a, 0xdc, 0xad, 0xd6, 0x46, 0xba, + 0x2d, 0x55, 0xf7, 0x0c, 0x9a, 0x23, 0x10, + 0x50, 0x3e, 0x4f, 0xe1, 0xeb, 0x58, 0x8a, + 0xc0, 0x17, 0x48, 0x41, 0x40, 0x65, 0x0b, + 0xfb, 0x43, 0x9e, 0xf0, 0x37, 0x4a, 0x89, + 0x4e, 0x71, 0xad, 0x44, 0x19, 0x13, 0xbb, + 0x4a, 0x63, 0x83, 0x9e, 0x6a, 0x49, 0x1b, + 0x28, 0xb0, 0x8e, 0x9c, 0x7b, 0xaf, 0xf9, + 0x57, 0x5d, 0x35, 0x16, 0x5c, 0xa7, 0x5e, + 0xd1, 0x0d, 0x83, 0xdc, 0x49, 0xdd, 0x40, + 0x58, 0x9c, 0x97, 0x91, 0xa6, 0xb0, 0x68, + 0xb0, 0xfa, 0x9e, 0xc0, 0x3f, 0x81, 0xc6, + 0xce, 0x58, 0xc5, 0x87, 0xc6, 0xf4, 0x06, + 0xec, 0x91, 0x57, 0x81, 0xce, 0x3a, 0xe8, + 0xf1, 0x29, 0x3f, 0x01, 0x93, 0xf0, 0x74, + 0x22, 0xea, 0x6b, 0x06, 0xd8, 0x65, 0xdb, + 0xd7, 0x41, 0xd9, 0x60, 0x23, 0xe7, 0x83, + 0xc8, 0x69, 0x6b, 0x90, 0xc5, 0xc7, 0xb9, + 0xd5, 0xba, 0x79, 0xc9, 0x4a, 0x87, 0x23, + 0x1c, 0x95, 0x78, 0xf3, 0x73, 0x10, 0xbe, + 0xb2, 0x0f, 0x32, 0xec, 0xff, 0x15, 0x51, + 0x4d, 0xb5, 0x48, 0x3c, 0xca, 0x4c, 0x5b, + 0x32, 0x29, 0x47, 0x21, 0xba, 0x2a, 0x5d, + 0xc9, 0x59, 0xfa, 0x8f, 0x33, 0x10, 0x83, + 0x40, 0x80, 0xf3, 0xce, 0xee, 0x6d, 0xcd, + 0x9c, 0xbb, 0x23, 0x0b, 0x45, 0xba, 0x7a, + 0x07, 0xdc, 0x4d, 0x57, 0x97, 0xb4, 0xa4, + 0xef, 0x94, 0xe8, 0x43, 0xfe, 0x18, 0x47, + 0x1a, 0xb0, 0xf6, 0xb6, 0x0b, 0x55, 0x05, + 0xbd, 0x67, 0x2d, 0x37, 0x27, 0x17, 0x13, + 0x65, 0x22, 0xf2, 0x7c, 0xf7, 0x47, 0xd2, + 0x85, 0x63, 0x98, 0x83, 0xd2, 0xc1, 0xbf, + 0x8f, 0x4c, 0xda, 0xbf, 0xa4, 0x10, 0x6b, + 0x4e, 0x6b, 0x78, 0x5e, 0x3f, 0x7a, 0xec, + 0x15, 0x84, 0xbe, 0x1a, 0x94, 0xa2, 0x2b, + 0xb5, 0x3e, 0x55, 0x86, 0x51, 0xec, 0x2e, + 0x62, 0xcb, 0xd6, 0x9f, 0xe5, 0xa4, 0xb8, + 0xc0, 0xaa, 0x4e, 0x6d, 0x8a, 0xb1, 0xd6, + 0xf7, 0x8d, 0x1c, 0x04, 0x32, 0x8b, 0x20, + 0xf5, 0x80, 0x33, 0xbd, 0xcc, 0x3e, 0x4c, + 0x16, 0x04, 0xab, 0xd8, 0x64, 0x6d, 0xf9, + 0xc9, 0x15, 0x7d, 0x4b, 0x00, 0x86, 0xb2, + 0x70, 0x1d, 0x20, 0xcb, 0x7a, 0xed, 0x7e, + 0x81, 0x7f, 0x41, 0x33, 0xb8, 0x7b, 0xc0, + 0xa3, 0xbd, 0x12, 0xd1, 0x67, 0x48, 0xa0, + 0xb9, 0xeb, 0xd5, 0x29, 0xab, 0x91, 0x9c, + 0xa2, 0x2f, 0x8e, 0x01, 0x1c, 0x88, 0xc1, + 0x3e, 0x34, 0x47, 0x36, 0x8a, 0x35, 0x6c, + 0x2f, 0xc1, 0x8a, 0xb6, 0xd0, 0xa5, 0x01, + 0x82, 0xee, 0x4f, 0x44, 0xb9, 0xcd, 0x16, + 0x9c, 0x3a, 0xf8, 0xe9, 0x2a, 0xd2, 0xb6, + 0x1d, 0xfd, 0x3c, 0x06, 0xdc, 0x42, 0xdd, + 0x2d, 0x60, 0x6a, 0x44, 0x21, 0xc3, 0x37, + 0x75, 0x79, 0xc5, 0x29, 0x5c, 0x7e, 0xf5, + 0x86, 0xbb, 0x56, 0x05, 0x21, 0x46, 0xaf, + 0x6d, 0x3a, 0xa2, 0x9e, 0x11, 0x6d, 0x9e, + 0x05, 0x74, 0x8a, 0xfe, 0x84, 0x88, 0x3e, + 0x76, 0xb4, 0xef, 0x2f, 0xeb, 0x52, 0xcd, + 0x97, 0x82, 0xba, 0x0c, 0xcc, 0xcb, 0x72, + 0x8d, 0x8d, 0xd2, 0x32, 0x7c, 0x41, 0x39, + 0xa6, 0x22, 0xb7, 0xdc, 0x3f, 0x39, 0x43, + 0xf5, 0xee, 0x0c, 0xfc, 0xbb, 0x2b, 0x43, + 0xe8, 0xce, 0xae, 0x0c, 0xd9, 0x15, 0x22, + 0x32, 0xbd, 0x69, 0xad, 0x76, 0xd9, 0xdf, + 0x81, 0xdf, 0x24, 0x76, 0x7b, 0x53, 0x0b, + 0xe6, 0xc7, 0x6c, 0x38, 0x2c, 0xbf, 0x28, + 0x95, 0x03, 0x18, 0xef, 0x98, 0x88, 0xc2, + 0x6b, 0x1a, 0xf5, 0xb4, 0xf9, 0x19, 0x76, + 0x25, 0x1d, 0xcf, 0x9b, 0xcd, 0x4c, 0x00, + 0x06, 0xde, 0x55, 0x58, 0x95, 0x9a, 0x06, + 0xfb, 0xf9, 0x88, 0x20, 0x85, 0x80, 0xe3, + 0x27, 0xdf, 0xc5, 0x20, 0x29, 0x7c, 0x58, + 0x02, 0x07, 0x2e, 0xd2, 0xeb, 0xdc, 0x68, + 0x58, 0x91, 0x08, 0x71, 0x16, 0xb3, 0x82, + 0x2f, 0x6c, 0x45, 0xcd, 0xbe, 0xe5, 0x0c, + 0x07, 0x77, 0x95, 0x3b, 0x2c, 0x59, 0x8e, + 0xba, 0x07, 0xa8, 0xa1, 0xc6, 0xe5, 0x6a, + 0x49, 0xb5, 0x85, 0xf2, 0x70, 0x05, 0x22, + 0xc4, 0x2f, 0x8d, 0xdd, 0x48, 0x8d, 0x87, + 0xfa, 0xb6, 0xf8, 0x59, 0xc8, 0xb1, 0x18, + 0x03, 0x5f, 0xce, 0x53, 0x28, 0x96, 0x15, + 0xd4, 0xb4, 0x10, 0x2c, 0xe2, 0x22, 0x9e, + 0x88, 0xe5, 0xcd, 0xda, 0xfc, 0xf9, 0x64, + 0xa4, 0x7b, 0xfb, 0xeb, 0xa8, 0x6a, 0xb6, + 0xf6, 0x17, 0x84, 0x26, 0x3d, 0xe4, 0x66, + 0x7e, 0x5c, 0x85, 0x01, 0xaf, 0xdc, 0xdb, + 0x48, 0x33, 0x4a, 0x20, 0x7c, 0x22, 0x1b, + 0xd5, 0xeb, 0x2d, +}; +static const byte ml_dsa_44_good_sig[] = { + 0xfc, 0x2d, 0xa0, 0x06, 0x85, 0xc2, 0xfc, + 0x92, 0x47, 0x77, 0x0b, 0x39, 0xbf, 0xe5, + 0xba, 0xd4, 0x44, 0xbf, 0xde, 0xce, 0x1f, + 0x04, 0xa2, 0x87, 0xed, 0x4a, 0xce, 0x0e, + 0xf3, 0x95, 0x61, 0x1e, 0x66, 0x4e, 0x9a, + 0x5d, 0x00, 0x31, 0x32, 0xf0, 0x90, 0x3d, + 0x7e, 0xf2, 0x9d, 0xe2, 0x93, 0xa1, 0xc8, + 0x64, 0x36, 0xf2, 0x59, 0xc7, 0x9e, 0xb6, + 0xb3, 0x6f, 0xe5, 0x80, 0x8d, 0x92, 0x77, + 0xd6, 0xb6, 0xe4, 0xc5, 0x5e, 0x79, 0x45, + 0x4b, 0xd0, 0xfe, 0x53, 0x55, 0xb6, 0x66, + 0x88, 0xfe, 0x95, 0x40, 0x07, 0xfd, 0xdb, + 0x40, 0x33, 0x39, 0x67, 0x03, 0x30, 0x8e, + 0x80, 0x4e, 0xa7, 0x0e, 0xe4, 0x05, 0x04, + 0xc5, 0x33, 0x72, 0x47, 0x5b, 0x85, 0x0f, + 0xe1, 0xeb, 0x98, 0x1a, 0x76, 0x79, 0x84, + 0xce, 0x26, 0x66, 0xe8, 0x92, 0xc9, 0x1f, + 0x40, 0x96, 0x72, 0xfe, 0x61, 0xae, 0xba, + 0x84, 0x70, 0xb7, 0x92, 0x2f, 0x7e, 0xc8, + 0xe8, 0xe4, 0x34, 0x73, 0xd4, 0x69, 0x57, + 0x3e, 0x28, 0x2b, 0x18, 0x0f, 0xef, 0xb1, + 0x06, 0xe2, 0xf8, 0x79, 0x70, 0x5a, 0x84, + 0x84, 0x6c, 0xb3, 0x57, 0x5b, 0x18, 0x42, + 0xdf, 0xd5, 0xdb, 0xf8, 0x35, 0x5f, 0x7b, + 0x23, 0x25, 0x2f, 0x0f, 0x17, 0x0b, 0x9a, + 0xb6, 0xe8, 0x31, 0x30, 0x6b, 0x90, 0x06, + 0x2c, 0xfd, 0xca, 0xaa, 0xa6, 0xc3, 0xdc, + 0x88, 0xa7, 0x31, 0x74, 0x67, 0xe2, 0x64, + 0x8f, 0x5c, 0xc4, 0xc0, 0x4d, 0x34, 0x15, + 0x0d, 0xd2, 0x23, 0x69, 0xfc, 0x6e, 0xbb, + 0x82, 0xca, 0xc4, 0xee, 0xf1, 0x14, 0xc1, + 0xd4, 0x5a, 0x71, 0x78, 0x9b, 0x40, 0x01, + 0xb9, 0xe4, 0x6e, 0x68, 0xf6, 0x13, 0xca, + 0xc1, 0xea, 0x70, 0x71, 0x3d, 0xc9, 0x1a, + 0x62, 0xb9, 0xa9, 0xe0, 0x1e, 0xe2, 0x34, + 0xf2, 0x9a, 0xf7, 0x23, 0xb3, 0xc1, 0xca, + 0x35, 0x0e, 0x5e, 0xa7, 0xd1, 0x3d, 0xea, + 0x51, 0xdc, 0xe2, 0x0e, 0xfc, 0x7d, 0x26, + 0x75, 0xec, 0x9a, 0x6e, 0x40, 0x1f, 0x60, + 0x06, 0xd7, 0x56, 0xf8, 0xa4, 0x2a, 0x82, + 0x9c, 0xef, 0x51, 0x4a, 0xe1, 0x01, 0x2b, + 0xb0, 0x8b, 0x34, 0x7b, 0xe1, 0x63, 0xa4, + 0xcc, 0x72, 0x81, 0xd9, 0xb4, 0x20, 0xcc, + 0x60, 0xe2, 0x15, 0x6d, 0xc7, 0x6c, 0x75, + 0x65, 0x4d, 0xb6, 0xc0, 0x36, 0x49, 0x87, + 0x06, 0x3e, 0xca, 0x1c, 0x32, 0x36, 0x2f, + 0xe3, 0xf6, 0x06, 0x0a, 0xb1, 0xd2, 0xfb, + 0xee, 0x4e, 0xd7, 0xce, 0x65, 0xcc, 0x89, + 0xf2, 0x77, 0x14, 0x27, 0x27, 0x84, 0x52, + 0x97, 0x1b, 0x89, 0x17, 0x31, 0x8d, 0xc4, + 0x0f, 0xc7, 0xc6, 0x45, 0x44, 0x9a, 0x97, + 0xd3, 0x88, 0x71, 0x73, 0x97, 0x64, 0xa6, + 0xe6, 0x3d, 0xf2, 0xd3, 0x7f, 0x7f, 0xfa, + 0x4f, 0xf4, 0xe9, 0x76, 0x8a, 0x2a, 0xfe, + 0x28, 0x8e, 0xa5, 0xb3, 0x46, 0x2b, 0xad, + 0x50, 0x5e, 0x12, 0xcd, 0xf8, 0x46, 0xe4, + 0x06, 0x12, 0xc2, 0xb8, 0xcd, 0x04, 0x76, + 0x07, 0x7c, 0xed, 0x2f, 0x0f, 0xd6, 0x97, + 0x31, 0xa4, 0x0c, 0x18, 0x85, 0x75, 0xd3, + 0x55, 0xfd, 0xe3, 0x1a, 0xbf, 0x43, 0xde, + 0x20, 0xa9, 0x19, 0xcd, 0x03, 0x01, 0xdf, + 0x04, 0x71, 0x09, 0x94, 0x99, 0x51, 0xb0, + 0x8e, 0x32, 0x80, 0xe6, 0x64, 0x4b, 0xdf, + 0xa5, 0xec, 0xfa, 0xce, 0xf6, 0xf3, 0xce, + 0x51, 0xe8, 0x6d, 0x03, 0x1e, 0x69, 0x59, + 0xef, 0x20, 0x98, 0x71, 0xe2, 0xc3, 0xec, + 0x19, 0x03, 0xa9, 0x2d, 0x12, 0x21, 0x79, + 0x7e, 0xb0, 0xcb, 0x76, 0x68, 0x2f, 0x11, + 0x01, 0x2b, 0x11, 0xef, 0xd6, 0xb7, 0x8b, + 0x5e, 0x31, 0x78, 0x7b, 0x2d, 0xe6, 0x4a, + 0xfb, 0xc1, 0xbb, 0x78, 0x92, 0x11, 0xcb, + 0x91, 0x97, 0x52, 0x1b, 0x8e, 0xfb, 0x59, + 0x02, 0x22, 0xbe, 0xf7, 0x33, 0xaa, 0x7b, + 0xfd, 0x93, 0xf7, 0xa8, 0x9b, 0xfc, 0x99, + 0x36, 0x22, 0x04, 0x1e, 0xdc, 0xa3, 0x2b, + 0xe6, 0xac, 0x2e, 0x4b, 0x38, 0x0a, 0x25, + 0xde, 0x3d, 0x8e, 0x0b, 0x95, 0x04, 0x48, + 0x3d, 0x66, 0x52, 0x99, 0x79, 0xe1, 0x8d, + 0xe0, 0xa7, 0xd5, 0x23, 0x0d, 0x45, 0x89, + 0x88, 0xa9, 0x59, 0x4e, 0xc7, 0x64, 0x39, + 0x93, 0xdd, 0xcb, 0xfe, 0x97, 0xe7, 0x7d, + 0xab, 0x61, 0x08, 0xf7, 0x7a, 0xff, 0x10, + 0x1d, 0x8d, 0x11, 0xa9, 0x97, 0xbd, 0x16, + 0xb5, 0x6c, 0x84, 0x71, 0x61, 0x72, 0x36, + 0x51, 0xe7, 0x43, 0x8b, 0x15, 0xb2, 0x48, + 0x6a, 0x14, 0x8a, 0xbe, 0x92, 0xa7, 0xfa, + 0xce, 0x02, 0x1a, 0x7f, 0xc5, 0xdb, 0x76, + 0x0a, 0x4c, 0xc7, 0x20, 0x2a, 0x34, 0xf4, + 0x92, 0x3b, 0x34, 0x69, 0x71, 0x3d, 0xe1, + 0xf2, 0x2f, 0x52, 0xe1, 0x48, 0xbe, 0x27, + 0x47, 0x1d, 0x55, 0x96, 0x6e, 0xa3, 0x39, + 0xc6, 0xd8, 0x12, 0xe0, 0xb2, 0x93, 0x56, + 0xef, 0x10, 0xf4, 0xa6, 0xf4, 0x5f, 0xa9, + 0xfd, 0x5d, 0x01, 0x87, 0xb8, 0xe5, 0x4f, + 0x86, 0x2c, 0xa5, 0x09, 0xfc, 0x29, 0x84, + 0x5b, 0x44, 0xf9, 0x8d, 0x9c, 0xbb, 0x19, + 0x97, 0x52, 0xbb, 0xac, 0x19, 0x57, 0x68, + 0x7d, 0x74, 0xb5, 0x4f, 0xda, 0x8a, 0x9c, + 0xcf, 0x5d, 0x7b, 0xd9, 0xf0, 0xb3, 0x11, + 0x76, 0x50, 0x03, 0x06, 0x44, 0xe7, 0x68, + 0x35, 0xe9, 0x14, 0x20, 0xbd, 0x0d, 0x90, + 0x96, 0x21, 0xa1, 0x17, 0x8f, 0xf7, 0x50, + 0x6c, 0xc0, 0x76, 0x3d, 0x34, 0x8d, 0xf2, + 0x75, 0xf0, 0xa2, 0x6c, 0x8a, 0xc1, 0x56, + 0x95, 0xb2, 0xd9, 0x87, 0xf2, 0xe4, 0x80, + 0x25, 0xc7, 0x97, 0xd2, 0xd2, 0xf8, 0x1c, + 0x7a, 0x48, 0x70, 0x99, 0x6b, 0xf2, 0x50, + 0x83, 0xf3, 0x10, 0xb1, 0x9b, 0x6d, 0x75, + 0x53, 0x86, 0x23, 0xc9, 0x60, 0x4d, 0x73, + 0xc7, 0x52, 0x90, 0x12, 0x6b, 0x92, 0x2d, + 0x35, 0xbc, 0x4d, 0x86, 0x67, 0xfe, 0x35, + 0x11, 0x6c, 0xbb, 0x9b, 0x76, 0xaf, 0x26, + 0xae, 0x50, 0x23, 0x76, 0x68, 0x16, 0x80, + 0xf0, 0xa4, 0xcc, 0x76, 0x6b, 0xf3, 0x99, + 0x04, 0x8b, 0x39, 0xf2, 0xa6, 0xa9, 0x72, + 0x6f, 0xbe, 0xa8, 0xdb, 0x53, 0xf3, 0x93, + 0x00, 0xac, 0x3e, 0x8f, 0xdd, 0x68, 0x9e, + 0x2f, 0xe3, 0x48, 0x0b, 0x11, 0xe2, 0x9a, + 0xfa, 0x98, 0x32, 0x40, 0x26, 0xf8, 0x83, + 0xc6, 0x00, 0x02, 0x7d, 0xb5, 0xd2, 0xd4, + 0xdd, 0xc6, 0x02, 0xec, 0xb3, 0x98, 0xd6, + 0x8e, 0xab, 0x75, 0x06, 0x37, 0x97, 0x4c, + 0x50, 0xc5, 0xe1, 0x43, 0x34, 0xd6, 0xbd, + 0xb6, 0xfc, 0xb7, 0x04, 0x0d, 0xd8, 0x35, + 0xb4, 0x3e, 0x0e, 0x43, 0x22, 0x83, 0xf5, + 0x5d, 0x2e, 0x0a, 0x8f, 0xa0, 0xec, 0x17, + 0xd9, 0xa1, 0x84, 0x98, 0x32, 0x5c, 0x99, + 0x66, 0x05, 0x70, 0x9a, 0xa4, 0x9b, 0xbe, + 0xd3, 0x3d, 0x2a, 0x13, 0xb1, 0x96, 0x37, + 0x4f, 0xe7, 0x6f, 0x6b, 0x5e, 0x80, 0xe4, + 0xb6, 0x98, 0x56, 0xed, 0xff, 0x5b, 0x21, + 0x5f, 0x79, 0x9a, 0x0f, 0x53, 0x69, 0x76, + 0xdb, 0xc0, 0x12, 0x9c, 0xed, 0xd4, 0x00, + 0x64, 0xca, 0xf4, 0xc3, 0x17, 0x49, 0xbb, + 0xef, 0xbc, 0x7b, 0x73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fc, 0x65, 0x45, 0x8c, 0x1b, + 0x5c, 0x65, 0xc4, 0x5d, 0x99, 0x9a, 0xed, + 0x62, 0xd6, 0x74, 0x43, 0xac, 0x5e, 0x0c, + 0xfd, 0x7d, 0xf2, 0x4f, 0xc3, 0x02, 0xc8, + 0x24, 0xa7, 0x17, 0x49, 0xf9, 0xdd, 0xc9, + 0x64, 0x71, 0x08, 0xb9, 0xac, 0x47, 0x3d, + 0x6a, 0x4f, 0xdc, 0xa6, 0x56, 0x00, 0x01, + 0x53, 0x2d, 0xca, 0x32, 0x4e, 0x40, 0xec, + 0x14, 0x03, 0x69, 0x75, 0xfa, 0x93, 0x49, + 0x98, 0x04, 0x25, 0x29, 0xe5, 0x78, 0x6e, + 0x3e, 0x99, 0x58, 0x18, 0x48, 0xf3, 0x29, + 0x56, 0x8d, 0x23, 0xd1, 0x5d, 0xb2, 0x2a, + 0x74, 0xa7, 0x53, 0xc5, 0xc6, 0xc4, 0x12, + 0xfe, 0x65, 0x6c, 0xde, 0xc3, 0x6c, 0x18, + 0xde, 0xc3, 0x97, 0xaa, 0xed, 0x69, 0x3c, + 0x4d, 0xc9, 0xa9, 0x63, 0xa9, 0x4d, 0x91, + 0x63, 0xa3, 0x1c, 0x87, 0x36, 0x19, 0x4a, + 0xc5, 0xd1, 0xcb, 0xf4, 0x88, 0xfd, 0xa0, + 0x9b, 0x37, 0x9a, 0x7e, 0xcc, 0x09, 0xac, + 0x3b, 0xf0, 0xf5, 0xb5, 0x15, 0x72, 0x47, + 0xb0, 0x42, 0x0d, 0xed, 0x19, 0x42, 0x93, + 0x5a, 0x56, 0xbf, 0x2c, 0x4b, 0xec, 0xf4, + 0x13, 0x30, 0x0b, 0xdf, 0x0e, 0xc1, 0x22, + 0xa5, 0x6c, 0xf4, 0xcf, 0x09, 0x83, 0xe2, + 0xd0, 0x05, 0x62, 0x8d, 0xda, 0xea, 0x79, + 0xa9, 0x6c, 0xe1, 0x90, 0xc0, 0xe7, 0x6d, + 0x63, 0x8e, 0xe5, 0xe0, 0xa9, 0x67, 0x80, + 0xb7, 0x80, 0x43, 0xfc, 0xa1, 0x11, 0x6d, + 0xc9, 0x91, 0xa3, 0xcb, 0x1a, 0x6e, 0xf8, + 0x6e, 0xdb, 0xf0, 0x7d, 0xeb, 0x45, 0x6a, + 0xee, 0xd8, 0x3e, 0x6b, 0x9a, 0xc4, 0xcd, + 0x7b, 0x35, 0x19, 0x73, 0x14, 0x22, 0x47, + 0x86, 0x54, 0x34, 0xc9, 0x02, 0x49, 0xe6, + 0xb9, 0x45, 0xf7, 0x2c, 0xf7, 0xa4, 0x12, + 0xc4, 0x7a, 0x95, 0x41, 0x54, 0x8d, 0x51, + 0xc5, 0x1a, 0x19, 0x75, 0x0c, 0x11, 0x03, + 0xd0, 0x6f, 0x56, 0x04, 0xb2, 0x87, 0x21, + 0xdb, 0x47, 0xed, 0x9b, 0xe8, 0xec, 0xa3, + 0xe1, 0x74, 0x3e, 0x21, 0x50, 0xf2, 0x09, + 0x2c, 0x5e, 0x3d, 0xca, 0xa7, 0x31, 0x7c, + 0xbd, 0xe4, 0xf1, 0x15, 0x0d, 0xe6, 0x3d, + 0x4c, 0x8e, 0x36, 0x45, 0xf7, 0x08, 0x3d, + 0x56, 0x63, 0xb6, 0x99, 0x46, 0x34, 0x48, + 0xfa, 0xcf, 0x88, 0xe5, 0x43, 0xf7, 0x88, + 0xd5, 0x55, 0x13, 0xfe, 0x79, 0x02, 0x49, + 0x1e, 0x82, 0x45, 0x45, 0x29, 0x8e, 0x0a, + 0x7c, 0x77, 0x51, 0x1b, 0x8e, 0x75, 0xd5, + 0xd6, 0x61, 0xff, 0xa5, 0xfe, 0x59, 0x48, + 0xbf, 0xfc, 0xf2, 0xcd, 0x37, 0x09, 0x4c, + 0xb6, 0xfc, 0xb0, 0x20, 0x5f, 0x12, 0x7a, + 0x3f, 0x64, 0x96, 0xdb, 0xc8, 0xe8, 0xd0, + 0x11, 0x19, 0x47, 0x95, 0x2d, 0x3d, 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 0xe4, 0x65, 0xfb, 0x8a, + 0x07, 0x1a, 0x54, 0xf5, 0x4b, 0x65, 0xad, + 0x64, 0x91, 0x6e, 0x23, 0x98, 0x31, 0x26, + 0x79, 0x70, 0x94, 0xff, 0xc0, 0x65, 0x70, + 0xb4, 0x9d, 0x74, 0x8e, 0x76, 0x6b, 0x9a, + 0x24, 0x28, 0x0d, 0x8a, 0x93, 0x87, 0x18, + 0x04, 0x10, 0xfd, 0x0b, 0xaf, 0xd3, 0x92, + 0xbb, 0xb5, 0x41, 0xd2, 0x87, 0xc7, 0x69, + 0x89, 0x0c, 0x52, 0xf8, 0x46, 0x70, 0x8e, + 0xf0, 0x99, 0x96, 0x57, 0x40, 0x9c, 0xef, + 0x9a, 0xc2, 0x63, 0x47, 0x13, 0x11, 0x68, + 0x40, 0xab, 0x36, 0x16, 0x53, 0xd6, 0x8f, + 0x58, 0x5a, 0xdd, 0x0c, 0xd7, 0x17, 0x6a, + 0x39, 0x34, 0xf1, 0xe7, 0x75, 0x3b, 0x41, + 0x7e, 0x5a, 0x70, 0xfe, 0x5b, 0x08, 0x30, + 0xf4, 0x7b, 0x1d, 0xd0, 0x70, 0xae, 0x18, + 0xad, 0xd4, 0xff, 0xbb, 0xa4, 0x31, 0xec, + 0x28, 0x72, 0x64, 0x9a, 0x24, 0x16, 0x30, + 0xe4, 0xc5, 0x3c, 0xb0, 0x3c, 0x81, 0x4f, + 0xb9, 0xfc, 0xe1, 0x3a, 0x05, 0x17, 0xb2, + 0x18, 0x4c, 0x98, 0x3b, 0xfc, 0x93, 0xf0, + 0x0d, 0xb6, 0x3c, 0x54, 0x7b, 0x10, 0xfd, + 0x7f, 0x63, 0xfe, 0xa5, 0xc6, 0xb5, 0x24, + 0xb4, 0xf2, 0x2f, 0xb2, 0x6f, 0x7f, 0xdb, + 0x01, 0xdb, 0xaf, 0x57, 0xdc, 0xdb, 0xf4, + 0xc8, 0x31, 0xb0, 0xdd, 0x05, 0x8b, 0x9b, + 0x6e, 0x7c, 0x5e, 0x5e, 0x31, 0x2c, 0x7f, + 0xbb, 0xa4, 0x26, 0x88, 0xe1, 0x55, 0x3d, + 0x8d, 0x36, 0x69, 0xb7, 0xc8, 0xcc, 0x05, + 0xfe, 0x6e, 0xcc, 0xcb, 0xfd, 0x81, 0x14, + 0x8b, 0xbc, 0x0c, 0xd4, 0x7e, 0xb4, 0x13, + 0xc0, 0xe2, 0x51, 0xf4, 0x07, 0xde, 0xc4, + 0x1c, 0xf0, 0xc8, 0x92, 0xd4, 0x38, 0xd7, + 0x1e, 0x57, 0xa7, 0x4b, 0xc7, 0xf8, 0xca, + 0xcc, 0x61, 0x86, 0x96, 0x50, 0x4e, 0x6a, + 0x71, 0xbd, 0x5f, 0xc6, 0x48, 0x8b, 0x6f, + 0xeb, 0x53, 0x50, 0xea, 0x35, 0x39, 0x79, + 0xcc, 0xee, 0xae, 0x81, 0x0f, 0xe2, 0xd2, + 0xbb, 0x81, 0x03, 0x8a, 0xeb, 0x98, 0xc2, + 0xad, 0xb7, 0xc0, 0x14, 0x68, 0xb9, 0x7e, + 0x8e, 0x30, 0x11, 0x43, 0x59, 0x8f, 0x04, + 0x2f, 0x7a, 0x99, 0x36, 0xd0, 0x75, 0x07, + 0x6b, 0x8e, 0xc2, 0x10, 0xac, 0xc6, 0x4d, + 0x30, 0x91, 0x9f, 0xde, 0x33, 0x0e, 0xe7, + 0xbc, 0xe5, 0x94, 0xbf, 0x80, 0xdb, 0xb7, + 0xe0, 0x8f, 0xb7, 0x74, 0xc3, 0x77, 0x18, + 0x76, 0x33, 0x34, 0xb8, 0xe4, 0x81, 0xa5, + 0xd9, 0xf7, 0x78, 0xba, 0xec, 0x62, 0x34, + 0xcb, 0x54, 0xbe, 0x90, 0xc1, 0x56, 0x59, + 0x22, 0x94, 0x5b, 0x1a, 0x8f, 0xc6, 0x8f, + 0xf2, 0x84, 0x1f, 0x61, 0x4e, 0xeb, 0x98, + 0x72, 0xdd, 0xde, 0xc9, 0xc6, 0xab, 0xd1, + 0xad, 0xd1, 0x02, 0x60, 0x82, 0x89, 0xba, + 0xf5, 0x1a, 0x6b, 0xde, 0x96, 0x19, 0x64, + 0x44, 0x0a, 0xd6, 0x27, 0x9f, 0x67, 0x96, + 0x44, 0xcc, 0x4b, 0xfd, 0x8f, 0x9e, 0xa1, + 0x1f, 0x06, 0xac, 0x2e, 0xcf, 0xdb, 0xc7, + 0x08, 0x5e, 0xe3, 0xa2, 0x59, 0xa2, 0x22, + 0xf1, 0x7a, 0xce, 0xf5, 0x30, 0x53, 0xc0, + 0xbb, 0x36, 0x13, 0x95, 0x69, 0xe2, 0x28, + 0x47, 0xad, 0xb1, 0x82, 0xfd, 0x14, 0xf6, + 0x6e, 0xed, 0x5b, 0xe0, 0xeb, 0x13, 0x5c, + 0xc6, 0x72, 0xd5, 0x2c, 0xd0, 0xae, 0xc3, + 0xad, 0xa9, 0x60, 0x2a, 0x68, 0x7b, 0x03, + 0x54, 0xc5, 0xd1, 0x71, 0xc4, 0x99, 0x48, + 0x75, 0x18, 0x1e, 0xda, 0x0a, 0x8b, 0xe1, + 0x2d, 0x67, 0x1f, 0xae, 0x91, 0xc0, 0x37, + 0x39, 0x8c, 0x7c, 0x9e, 0x42, 0xd3, 0x6e, + 0xaf, 0x7e, 0x8e, 0xa0, 0x01, 0x45, 0xc1, + 0xc6, 0xef, 0xc6, 0x2e, 0x87, 0x7b, 0x5a, + 0x60, 0xe0, 0xec, 0x3b, 0x76, 0x8e, 0xb3, + 0x0d, 0x57, 0x86, 0xa2, 0xc9, 0x1a, 0x1b, + 0x38, 0x6b, 0x75, 0x7a, 0x81, 0x8b, 0x97, + 0x99, 0xa1, 0xbb, 0xd8, 0xda, 0xdf, 0xea, + 0xef, 0xf0, 0xf9, 0x01, 0x08, 0x11, 0x18, + 0x26, 0x36, 0x4b, 0x52, 0x56, 0x68, 0x7b, + 0x98, 0xca, 0xd3, 0xd6, 0xef, 0xf6, 0x05, + 0x07, 0x09, 0x10, 0x1f, 0x21, 0x28, 0x32, + 0x39, 0x3a, 0x3c, 0x54, 0x77, 0x7b, 0x81, + 0x99, 0xa9, 0xb0, 0xb2, 0xce, 0xe5, 0xe7, + 0x1f, 0x23, 0x3f, 0x4e, 0x50, 0x5d, 0x71, + 0x7a, 0x7c, 0x91, 0xa7, 0xab, 0xae, 0xd0, + 0xd6, 0xe1, 0xe6, 0xf1, 0xf3, 0xfa, 0x00, + 0x00, 0x13, 0x24, 0x3a, 0x4e, +}; +#endif + +static int test_wc_dilithium(void) +{ + EXPECT_DECLS; +#if defined(HAVE_DILITHIUM) && defined(WOLFSSL_WC_DILITHIUM) + dilithium_key* key; + byte level; +#if !defined(WOLFSSL_DILITHIUM_NO_MAKE_KEY) || \ + !defined(WOLFSSL_DILITHIUM_NO_SIGN) + WC_RNG rng; +#endif +#ifndef WOLFSSL_DILITHIUM_NO_SIGN + byte* privKey = NULL; + word32 privKeyLen = DILITHIUM_MAX_KEY_SIZE; +#endif +#ifndef WOLFSSL_DILITHIUM_NO_VERIFY + byte* pubKey = NULL; + word32 pubKeyLen = DILITHIUM_MAX_PUB_KEY_SIZE; +#endif + + key = (dilithium_key*)XMALLOC(sizeof(*key), NULL, DYNAMIC_TYPE_TMP_BUFFER); + ExpectNotNull(key); + privKey = (byte*)XMALLOC(DILITHIUM_MAX_KEY_SIZE, NULL, + DYNAMIC_TYPE_TMP_BUFFER); + ExpectNotNull(privKey); + pubKey = (byte*)XMALLOC(DILITHIUM_MAX_PUB_KEY_SIZE, NULL, + DYNAMIC_TYPE_TMP_BUFFER); + ExpectNotNull(pubKey); + + if (key != NULL) { + XMEMSET(key, 0, sizeof(*key)); + } +#if !defined(WOLFSSL_DILITHIUM_NO_MAKE_KEY) || \ + !defined(WOLFSSL_DILITHIUM_NO_SIGN) + XMEMSET(&rng, 0, sizeof(WC_RNG)); +#endif + +#if !defined(WOLFSSL_DILITHIUM_NO_MAKE_KEY) || \ + !defined(WOLFSSL_DILITHIUM_NO_SIGN) + ExpectIntEQ(wc_InitRng(&rng), 0); +#endif + + ExpectIntEQ(wc_dilithium_init(NULL), BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_init_ex(NULL, NULL, INVALID_DEVID), BAD_FUNC_ARG); + wc_dilithium_free(NULL); + + ExpectIntEQ(wc_dilithium_init(key), 0); + wc_dilithium_free(key); + ExpectIntEQ(wc_dilithium_init_ex(key, NULL, INVALID_DEVID), 0); + +#ifndef WOLFSSL_DILITHIUM_NO_VERIFY + ExpectIntEQ(wc_dilithium_export_public(key, pubKey, &pubKeyLen), + BAD_FUNC_ARG); +#endif +#ifndef WOLFSSL_DILITHIUM_NO_SIGN + ExpectIntEQ(wc_dilithium_export_private(key, privKey, &privKeyLen), + BAD_FUNC_ARG); +#endif + +#ifdef WOLFSSL_DILITHIUM_PRIVATE_KEY + ExpectIntEQ(wc_dilithium_size(NULL), BAD_FUNC_ARG); +#ifdef WOLFSSL_DILITHIUM_PUBLIC_KEY + ExpectIntEQ(wc_dilithium_priv_size(NULL), BAD_FUNC_ARG); +#endif +#endif +#ifdef WOLFSSL_DILITHIUM_PUBLIC_KEY + ExpectIntEQ(wc_dilithium_pub_size(NULL), BAD_FUNC_ARG); +#endif +#if !defined(WOLFSSL_DILITHIUM_NO_SIGN) || !defined(WOLFSSL_DILITHIUM_NO_VERIFY) + ExpectIntEQ(wc_dilithium_sig_size(NULL), BAD_FUNC_ARG); +#endif +#ifdef WOLFSSL_DILITHIUM_PRIVATE_KEY + ExpectIntEQ(wc_dilithium_size(key), BAD_FUNC_ARG); +#ifdef WOLFSSL_DILITHIUM_PUBLIC_KEY + ExpectIntEQ(wc_dilithium_priv_size(key), BAD_FUNC_ARG); +#endif +#endif +#ifdef WOLFSSL_DILITHIUM_PUBLIC_KEY + ExpectIntEQ(wc_dilithium_pub_size(key), BAD_FUNC_ARG); +#endif +#if !defined(WOLFSSL_DILITHIUM_NO_SIGN) || !defined(WOLFSSL_DILITHIUM_NO_VERIFY) + ExpectIntEQ(wc_dilithium_sig_size(key), BAD_FUNC_ARG); +#endif + + ExpectIntEQ(wc_dilithium_set_level(NULL, 0), BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_set_level(key, 0), BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_set_level(NULL, WC_ML_DSA_44), BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_set_level(key, 1), BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_set_level(key, 4), BAD_FUNC_ARG); + + ExpectIntEQ(wc_dilithium_get_level(NULL, NULL), BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_get_level(key, NULL), BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_get_level(NULL, &level), BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_get_level(key, &level), BAD_FUNC_ARG); + +#ifndef WOLFSSL_NO_ML_DSA_87 + ExpectIntEQ(wc_dilithium_set_level(key, WC_ML_DSA_87), 0); + ExpectIntEQ(wc_dilithium_get_level(key, &level), 0); + ExpectIntEQ(level, WC_ML_DSA_87); +#ifdef WOLFSSL_DILITHIUM_PRIVATE_KEY + ExpectIntEQ(wc_dilithium_size(key), DILITHIUM_LEVEL5_KEY_SIZE); +#ifdef WOLFSSL_DILITHIUM_PUBLIC_KEY + ExpectIntEQ(wc_dilithium_priv_size(key), DILITHIUM_LEVEL5_PRV_KEY_SIZE); +#endif +#endif +#ifdef WOLFSSL_DILITHIUM_PUBLIC_KEY + ExpectIntEQ(wc_dilithium_pub_size(key), DILITHIUM_LEVEL5_PUB_KEY_SIZE); +#endif +#if !defined(WOLFSSL_DILITHIUM_NO_SIGN) || !defined(WOLFSSL_DILITHIUM_NO_VERIFY) + ExpectIntEQ(wc_dilithium_sig_size(key), DILITHIUM_LEVEL5_SIG_SIZE); +#endif +#else + ExpectIntEQ(wc_dilithium_set_level(key, WC_ML_DSA_87), NOT_COMPILED_IN); +#endif +#ifndef WOLFSSL_NO_ML_DSA_65 + ExpectIntEQ(wc_dilithium_set_level(key, WC_ML_DSA_65), 0); + ExpectIntEQ(wc_dilithium_get_level(key, &level), 0); + ExpectIntEQ(level, WC_ML_DSA_65); +#ifdef WOLFSSL_DILITHIUM_PRIVATE_KEY + ExpectIntEQ(wc_dilithium_size(key), DILITHIUM_LEVEL3_KEY_SIZE); +#ifdef WOLFSSL_DILITHIUM_PUBLIC_KEY + ExpectIntEQ(wc_dilithium_priv_size(key), DILITHIUM_LEVEL3_PRV_KEY_SIZE); +#endif +#endif +#ifdef WOLFSSL_DILITHIUM_PUBLIC_KEY + ExpectIntEQ(wc_dilithium_pub_size(key), DILITHIUM_LEVEL3_PUB_KEY_SIZE); +#endif +#if !defined(WOLFSSL_DILITHIUM_NO_SIGN) || !defined(WOLFSSL_DILITHIUM_NO_VERIFY) + ExpectIntEQ(wc_dilithium_sig_size(key), DILITHIUM_LEVEL3_SIG_SIZE); +#endif +#else + ExpectIntEQ(wc_dilithium_set_level(key, WC_ML_DSA_65), NOT_COMPILED_IN); +#endif +#ifndef WOLFSSL_NO_ML_DSA_44 + ExpectIntEQ(wc_dilithium_set_level(key, WC_ML_DSA_44), 0); + ExpectIntEQ(wc_dilithium_get_level(key, &level), 0); + ExpectIntEQ(level, WC_ML_DSA_44); +#ifdef WOLFSSL_DILITHIUM_PRIVATE_KEY + ExpectIntEQ(wc_dilithium_size(key), DILITHIUM_LEVEL2_KEY_SIZE); +#ifdef WOLFSSL_DILITHIUM_PUBLIC_KEY + ExpectIntEQ(wc_dilithium_priv_size(key), DILITHIUM_LEVEL2_PRV_KEY_SIZE); +#endif +#endif +#ifdef WOLFSSL_DILITHIUM_PUBLIC_KEY + ExpectIntEQ(wc_dilithium_pub_size(key), DILITHIUM_LEVEL2_PUB_KEY_SIZE); +#endif +#if !defined(WOLFSSL_DILITHIUM_NO_SIGN) || !defined(WOLFSSL_DILITHIUM_NO_VERIFY) + ExpectIntEQ(wc_dilithium_sig_size(key), DILITHIUM_LEVEL2_SIG_SIZE); +#endif +#else + ExpectIntEQ(wc_dilithium_set_level(key, WC_ML_DSA_44), NOT_COMPILED_IN); +#endif + +#ifndef WOLFSSL_DILITHIUM_NO_VERIFY + ExpectIntEQ(wc_dilithium_export_public(key, pubKey, &pubKeyLen), + BAD_FUNC_ARG); +#endif +#ifndef WOLFSSL_DILITHIUM_NO_SIGN + ExpectIntEQ(wc_dilithium_export_private(key, privKey, &privKeyLen), + BAD_FUNC_ARG); +#endif + + wc_dilithium_free(key); +#if !defined(WOLFSSL_DILITHIUM_NO_MAKE_KEY) || \ + !defined(WOLFSSL_DILITHIUM_NO_SIGN) + wc_FreeRng(&rng); +#endif + XFREE(pubKey, NULL, DYNAMIC_TYPE_TMP_BUFFER); + XFREE(privKey, NULL, DYNAMIC_TYPE_TMP_BUFFER); + XFREE(key, NULL, DYNAMIC_TYPE_TMP_BUFFER); +#endif + return EXPECT_RESULT(); +} + +static int test_wc_dilithium_make_key(void) +{ + EXPECT_DECLS; +#if defined(HAVE_DILITHIUM) && defined(WOLFSSL_WC_DILITHIUM) && \ + !defined(WOLFSSL_DILITHIUM_NO_MAKE_KEY) + dilithium_key* key; + WC_RNG rng; + + key = (dilithium_key*)XMALLOC(sizeof(*key), NULL, DYNAMIC_TYPE_TMP_BUFFER); + ExpectNotNull(key); + + if (key != NULL) { + XMEMSET(key, 0, sizeof(*key)); + } + XMEMSET(&rng, 0, sizeof(WC_RNG)); + + ExpectIntEQ(wc_InitRng(&rng), 0); + ExpectIntEQ(wc_dilithium_init(key), 0); + + ExpectIntEQ(wc_dilithium_make_key(key, &rng), BAD_STATE_E); + +#ifndef WOLFSSL_NO_ML_DSA_44 + ExpectIntEQ(wc_dilithium_set_level(key, WC_ML_DSA_44), 0); +#elif !defined(WOLFSSL_NO_ML_DSA_65) + ExpectIntEQ(wc_dilithium_set_level(key, WC_ML_DSA_65), 0); +#else + ExpectIntEQ(wc_dilithium_set_level(key, WC_ML_DSA_87), 0); +#endif + + ExpectIntEQ(wc_dilithium_make_key(NULL, NULL), BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_make_key(key, NULL), BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_make_key(NULL, &rng), BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_make_key(key, &rng), 0); + + wc_dilithium_free(key); + wc_FreeRng(&rng); + XFREE(key, NULL, DYNAMIC_TYPE_TMP_BUFFER); +#endif + return EXPECT_RESULT(); +} + +static int test_wc_dilithium_sign(void) +{ + EXPECT_DECLS; +#if defined(HAVE_DILITHIUM) && defined(WOLFSSL_WC_DILITHIUM) && \ + !defined(WOLFSSL_DILITHIUM_NO_SIGN) + dilithium_key* key; + dilithium_key* importKey = NULL; + WC_RNG rng; + byte* privKey = NULL; + word32 privKeyLen = DILITHIUM_MAX_KEY_SIZE; + word32 badKeyLen; + byte msg[32]; + byte* sig = NULL; + word32 sigLen = DILITHIUM_MAX_SIG_SIZE; + + key = (dilithium_key*)XMALLOC(sizeof(*key), NULL, DYNAMIC_TYPE_TMP_BUFFER); + ExpectNotNull(key); + importKey = (dilithium_key*)XMALLOC(sizeof(*key), NULL, + DYNAMIC_TYPE_TMP_BUFFER); + ExpectNotNull(importKey); + privKey = (byte*)XMALLOC(DILITHIUM_MAX_KEY_SIZE, NULL, + DYNAMIC_TYPE_TMP_BUFFER); + ExpectNotNull(privKey); + sig = (byte*)XMALLOC(DILITHIUM_MAX_SIG_SIZE, NULL, + DYNAMIC_TYPE_TMP_BUFFER); + ExpectNotNull(sig); + + if (key != NULL) { + XMEMSET(key, 0, sizeof(*key)); + } + if (importKey != NULL) { + XMEMSET(importKey, 0, sizeof(*importKey)); + } + XMEMSET(&rng, 0, sizeof(WC_RNG)); + XMEMSET(msg, 0x55, sizeof(msg)); + + ExpectIntEQ(wc_InitRng(&rng), 0); + ExpectIntEQ(wc_dilithium_init(key), 0); + +#ifndef WOLFSSL_NO_ML_DSA_44 + ExpectIntEQ(wc_dilithium_set_level(key, WC_ML_DSA_44), 0); +#elif !defined(WOLFSSL_NO_ML_DSA_65) + ExpectIntEQ(wc_dilithium_set_level(key, WC_ML_DSA_65), 0); +#else + ExpectIntEQ(wc_dilithium_set_level(key, WC_ML_DSA_87), 0); +#endif + +#ifdef WOLFSSL_DILITHIUM_NO_MAKE_KEY +#ifndef WOLFSSL_NO_ML_DSA_44 + ExpectIntEQ(wc_dilithium_import_private(bench_dilithium_level2_key, + sizeof_bench_dilithium_level2_key, key), 0); +#elif !defined(WOLFSSL_NO_ML_DSA_65) + ExpectIntEQ(wc_dilithium_import_private(bench_dilithium_level3_key, + sizeof_bench_dilithium_level3_key, key), 0); +#else + ExpectIntEQ(wc_dilithium_import_private(bench_dilithium_level5_key, + sizeof_bench_dilithium_level5_key, key), 0); +#endif +#else + ExpectIntEQ(wc_dilithium_make_key(key, &rng), 0); +#endif + + ExpectIntEQ(wc_dilithium_sign_msg(NULL, 32, NULL, NULL, NULL, NULL), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_sign_msg(msg, 32, NULL, NULL, NULL, NULL), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_sign_msg(NULL, 32, sig, NULL, NULL, NULL), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_sign_msg(NULL, 32, NULL, &sigLen, NULL, NULL), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_sign_msg(NULL, 32, NULL, NULL, key, NULL), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_sign_msg(NULL, 32, NULL, NULL, NULL, &rng), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_sign_msg(NULL, 32, sig, &sigLen, key, &rng), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_sign_msg(msg, 32, NULL, &sigLen, key, &rng), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_sign_msg(msg, 32, sig, NULL, key, &rng), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_sign_msg(msg, 32, sig, &sigLen, NULL, &rng), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_sign_msg(msg, 32, sig, &sigLen, key, NULL), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_sign_msg(msg, 32, sig, &sigLen, key, &rng), 0); + + ExpectIntEQ(wc_dilithium_export_private(NULL, NULL, NULL), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_export_private(key, NULL, NULL), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_export_private(NULL, privKey, NULL), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_export_private(NULL, NULL, &privKeyLen), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_export_private(NULL, privKey, &privKeyLen), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_export_private(key, NULL, &privKeyLen), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_export_private(key, privKey, NULL), + BAD_FUNC_ARG); + badKeyLen = 0; + ExpectIntEQ(wc_dilithium_export_private(key, privKey, &badKeyLen), + BUFFER_E); +#ifndef WOLFSSL_NO_ML_DSA_44 + ExpectIntEQ(badKeyLen, DILITHIUM_LEVEL2_KEY_SIZE); +#elif !defined(WOLFSSL_NO_ML_DSA_65) + ExpectIntEQ(badKeyLen, DILITHIUM_LEVEL3_KEY_SIZE); +#else + ExpectIntEQ(badKeyLen, DILITHIUM_LEVEL5_KEY_SIZE); +#endif + ExpectIntEQ(wc_dilithium_export_private(key, privKey, &privKeyLen), + 0); +#ifndef WOLFSSL_NO_ML_DSA_44 + ExpectIntEQ(privKeyLen, DILITHIUM_LEVEL2_KEY_SIZE); +#elif !defined(WOLFSSL_NO_ML_DSA_65) + ExpectIntEQ(privKeyLen, DILITHIUM_LEVEL3_KEY_SIZE); +#else + ExpectIntEQ(privKeyLen, DILITHIUM_LEVEL5_KEY_SIZE); +#endif + + ExpectIntEQ(wc_dilithium_init(importKey), 0); + ExpectIntEQ(wc_dilithium_import_private(privKey, privKeyLen, importKey), + BAD_FUNC_ARG); +#ifndef WOLFSSL_NO_ML_DSA_44 + ExpectIntEQ(wc_dilithium_set_level(importKey, WC_ML_DSA_44), 0); +#elif !defined(WOLFSSL_NO_ML_DSA_65) + ExpectIntEQ(wc_dilithium_set_level(importKey, WC_ML_DSA_65), 0); +#else + ExpectIntEQ(wc_dilithium_set_level(importKey, WC_ML_DSA_87), 0); +#endif + ExpectIntEQ(wc_dilithium_import_private(NULL, 0, NULL), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_import_private(privKey, 0, NULL), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_import_private(NULL, privKeyLen, NULL), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_import_private(NULL, 0, importKey), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_import_private(NULL, privKeyLen, importKey), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_import_private(privKey, 0, importKey), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_import_private(privKey, privKeyLen, NULL), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_import_private(privKey, privKeyLen, importKey), + 0); + ExpectIntEQ(wc_dilithium_sign_msg(msg, 32, sig, &sigLen, key, &rng), 0); +#ifdef WOLFSSL_DILITHIUM_CHECK_KEY + ExpectIntEQ(wc_dilithium_check_key(importKey), PUBLIC_KEY_E); +#endif + wc_dilithium_free(importKey); + + wc_dilithium_free(key); + wc_FreeRng(&rng); + + XFREE(sig, NULL, DYNAMIC_TYPE_TMP_BUFFER); + XFREE(privKey, NULL, DYNAMIC_TYPE_TMP_BUFFER); + XFREE(importKey, NULL, DYNAMIC_TYPE_TMP_BUFFER); + XFREE(key, NULL, DYNAMIC_TYPE_TMP_BUFFER); +#endif + return EXPECT_RESULT(); +} + +static int test_wc_dilithium_verify(void) +{ + EXPECT_DECLS; +#if defined(HAVE_DILITHIUM) && defined(WOLFSSL_WC_DILITHIUM) && \ + !defined(WOLFSSL_DILITHIUM_NO_VERIFY) && \ + (!defined(WOLFSSL_NO_ML_DSA_44) || !defined(WOLFSSL_DILITHIUM_NO_SIGN)) + dilithium_key* key; + dilithium_key* importKey = NULL; + WC_RNG rng; + byte* pubKey = NULL; + word32 pubKeyLen = DILITHIUM_MAX_PUB_KEY_SIZE; + word32 badKeyLen; + byte msg[32]; + byte* sig = NULL; + word32 sigLen = DILITHIUM_MAX_SIG_SIZE; + int res; +#ifndef WOLFSSL_NO_ML_DSA_44 + byte b; +#endif + + key = (dilithium_key*)XMALLOC(sizeof(*key), NULL, DYNAMIC_TYPE_TMP_BUFFER); + ExpectNotNull(key); + importKey = (dilithium_key*)XMALLOC(sizeof(*key), NULL, + DYNAMIC_TYPE_TMP_BUFFER); + ExpectNotNull(importKey); + pubKey = (byte*)XMALLOC(DILITHIUM_MAX_PUB_KEY_SIZE, NULL, + DYNAMIC_TYPE_TMP_BUFFER); + ExpectNotNull(pubKey); + sig = (byte*)XMALLOC(DILITHIUM_MAX_SIG_SIZE, NULL, + DYNAMIC_TYPE_TMP_BUFFER); + ExpectNotNull(sig); + + if (key != NULL) { + XMEMSET(key, 0, sizeof(*key)); + } + if (importKey != NULL) { + XMEMSET(importKey, 0, sizeof(*importKey)); + } + XMEMSET(&rng, 0, sizeof(WC_RNG)); + XMEMSET(msg, 0x55, sizeof(msg)); + + ExpectIntEQ(wc_InitRng(&rng), 0); + ExpectIntEQ(wc_dilithium_init(key), 0); + +#ifndef WOLFSSL_NO_ML_DSA_44 + ExpectIntEQ(wc_dilithium_set_level(key, WC_ML_DSA_44), 0); +#elif !defined(WOLFSSL_NO_ML_DSA_65) + ExpectIntEQ(wc_dilithium_set_level(key, WC_ML_DSA_65), 0); +#else + ExpectIntEQ(wc_dilithium_set_level(key, WC_ML_DSA_87), 0); +#endif + +#if !defined(WOLFSSL_NO_ML_DSA_44) + ExpectIntEQ(wc_dilithium_import_public(ml_dsa_44_pub_key, + (word32)sizeof(ml_dsa_44_pub_key), key), 0); + XMEMCPY(sig, ml_dsa_44_good_sig, sizeof(ml_dsa_44_good_sig)); + sigLen = (word32)sizeof(ml_dsa_44_good_sig); +#else +#ifdef WOLFSSL_DILITHIUM_NO_MAKE_KEY +#ifndef WOLFSSL_NO_ML_DSA_65 + ExpectIntEQ(wc_dilithium_import_public(bench_dilithium_level3_pub_key, + sizeof_bench_dilithium_level3_pub_key, key), 0); +#else + ExpectIntEQ(wc_dilithium_import_public(bench_dilithium_level5_pub_key, + sizeof_bench_dilithium_level5_pub_key, key), 0); +#endif /* !WOLFSSL_NO_ML_DSA_65 */ +#else + ExpectIntEQ(wc_dilithium_make_key(key, &rng), 0); +#endif /* WOLFSSL_DILITHIUM_NO_MAKE_KEY */ + + ExpectIntEQ(wc_dilithium_sign_msg(msg, 32, sig, &sigLen, key, &rng), 0); +#endif /* !WOLFSSL_NO_ML_DSA_44 */ + + ExpectIntEQ(wc_dilithium_export_public(NULL, NULL, NULL), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_export_public(key, NULL, NULL), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_export_public(NULL, pubKey, NULL), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_export_public(NULL, NULL, &pubKeyLen), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_export_public(NULL, pubKey, &pubKeyLen), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_export_public(key, NULL, &pubKeyLen), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_export_public(key, pubKey, NULL), + BAD_FUNC_ARG); + badKeyLen = 0; + ExpectIntEQ(wc_dilithium_export_public(key, pubKey, &badKeyLen), + BUFFER_E); +#ifndef WOLFSSL_NO_ML_DSA_44 + ExpectIntEQ(badKeyLen, DILITHIUM_LEVEL2_PUB_KEY_SIZE); +#elif !defined(WOLFSSL_NO_ML_DSA_65) + ExpectIntEQ(badKeyLen, DILITHIUM_LEVEL3_PUB_KEY_SIZE); +#else + ExpectIntEQ(badKeyLen, DILITHIUM_LEVEL5_PUB_KEY_SIZE); +#endif + ExpectIntEQ(wc_dilithium_export_public(key, pubKey, &pubKeyLen), 0); +#ifndef WOLFSSL_NO_ML_DSA_44 + ExpectIntEQ(pubKeyLen, DILITHIUM_LEVEL2_PUB_KEY_SIZE); +#elif !defined(WOLFSSL_NO_ML_DSA_65) + ExpectIntEQ(pubKeyLen, DILITHIUM_LEVEL3_PUB_KEY_SIZE); +#else + ExpectIntEQ(pubKeyLen, DILITHIUM_LEVEL5_PUB_KEY_SIZE); +#endif + + ExpectIntEQ(wc_dilithium_verify_msg(NULL, 0, NULL, 32, NULL, NULL), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_verify_msg(sig, 0, NULL, 32, NULL, NULL), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_verify_msg(NULL, 0, msg, 32, NULL, NULL), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_verify_msg(NULL, 0, NULL, 32, &res, NULL), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_verify_msg(NULL, 0, NULL, 32, NULL, key), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_verify_msg(NULL, sigLen, msg, 32, &res, key), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_verify_msg(sig, 0, msg, 32, &res, key), + BUFFER_E); + ExpectIntEQ(wc_dilithium_verify_msg(sig, sigLen, NULL, 32, &res, key), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_verify_msg(sig, sigLen, msg, 32, NULL, key), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_verify_msg(sig, sigLen, msg, 32, &res, NULL), + BAD_FUNC_ARG); + res = 0; + ExpectIntEQ(wc_dilithium_verify_msg(sig, sigLen, msg, 32, &res, key), 0); + ExpectIntEQ(res, 1); + + ExpectIntEQ(wc_dilithium_init(importKey), 0); + ExpectIntEQ(wc_dilithium_import_public(pubKey, pubKeyLen, importKey), + BAD_FUNC_ARG); +#ifndef WOLFSSL_NO_ML_DSA_44 + ExpectIntEQ(wc_dilithium_set_level(importKey, WC_ML_DSA_44), 0); +#elif !defined(WOLFSSL_NO_ML_DSA_65) + ExpectIntEQ(wc_dilithium_set_level(importKey, WC_ML_DSA_65), 0); +#else + ExpectIntEQ(wc_dilithium_set_level(importKey, WC_ML_DSA_87), 0); +#endif + ExpectIntEQ(wc_dilithium_import_public(NULL, 0, NULL), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_import_public(pubKey, 0, NULL), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_import_public(NULL, pubKeyLen, NULL), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_import_public(NULL, 0, importKey), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_import_public(NULL, pubKeyLen, importKey), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_import_public(pubKey, 0, importKey), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_import_public(pubKey, pubKeyLen, NULL), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_import_public(pubKey, pubKeyLen, importKey), 0); + res = 0; + ExpectIntEQ(wc_dilithium_verify_msg(sig, sigLen, msg, 32, &res, importKey), + 0); + ExpectIntEQ(res, 1); +#ifdef WOLFSSL_DILITHIUM_CHECK_KEY + ExpectIntEQ(wc_dilithium_check_key(importKey), BAD_FUNC_ARG); +#endif + wc_dilithium_free(importKey); + +#ifndef WOLFSSL_NO_ML_DSA_44 + if (sig[sigLen - 5] == 0) { + /* Unused hints meant to be 0. */ + sig[sigLen - 5] = 0xff; + res = 1; + ExpectIntEQ(wc_dilithium_verify_msg(sig, sigLen, msg, 32, &res, key), + SIG_VERIFY_E); + ExpectIntEQ(res, 0); + sig[sigLen - 5] = 0x00; + } + + /* Last count of hints must be less than PARAMS_ML_DSA_44_OMEGA == 80 */ + b = sig[sigLen - 1]; + sig[sigLen - 1] = 0xff; + res = 1; + ExpectIntEQ(wc_dilithium_verify_msg(sig, sigLen, msg, 32, &res, key), + SIG_VERIFY_E); + ExpectIntEQ(res, 0); + sig[sigLen - 1] = b; + + if (sig[sigLen - 4] > 1) { + /* Index must be less than previous. */ + b = sig[sigLen - 84]; + sig[sigLen - 84] = 0xff; + res = 1; + ExpectIntEQ(wc_dilithium_verify_msg(sig, sigLen, msg, 32, &res, key), + SIG_VERIFY_E); + ExpectIntEQ(res, 0); + sig[sigLen - 84] = b; + } + + /* Mess up commit hash. */ + sig[0] ^= 0x80; + res = 1; + ExpectIntEQ(wc_dilithium_verify_msg(sig, sigLen, msg, 32, &res, key), 0); + ExpectIntEQ(res, 0); + sig[0] ^= 0x80; + + /* Mess up z. */ + sig[100] ^= 0x80; + res = 1; + ExpectIntEQ(wc_dilithium_verify_msg(sig, sigLen, msg, 32, &res, key), 0); + ExpectIntEQ(res, 0); + sig[100] ^= 0x80; +#endif + + wc_dilithium_free(key); + wc_FreeRng(&rng); + + XFREE(sig, NULL, DYNAMIC_TYPE_TMP_BUFFER); + XFREE(pubKey, NULL, DYNAMIC_TYPE_TMP_BUFFER); + XFREE(importKey, NULL, DYNAMIC_TYPE_TMP_BUFFER); + XFREE(key, NULL, DYNAMIC_TYPE_TMP_BUFFER); +#endif + return EXPECT_RESULT(); +} + +static int test_wc_dilithium_check_key(void) +{ + EXPECT_DECLS; +#if defined(HAVE_DILITHIUM) && defined(WOLFSSL_WC_DILITHIUM) && \ + defined(WOLFSSL_DILITHIUM_CHECK_KEY) && \ + !defined(WOLFSSL_DILITHIUM_NO_MAKE_KEY) + dilithium_key* checkKey; + WC_RNG rng; + byte* privCheckKey = NULL; + word32 privCheckKeyLen = DILITHIUM_MAX_KEY_SIZE; + byte* pubCheckKey = NULL; + word32 pubCheckKeyLen = DILITHIUM_MAX_PUB_KEY_SIZE; + + checkKey = (dilithium_key*)XMALLOC(sizeof(*checkKey), NULL, + DYNAMIC_TYPE_TMP_BUFFER); + ExpectNotNull(checkKey); + privCheckKey = (byte*)XMALLOC(DILITHIUM_MAX_KEY_SIZE, NULL, + DYNAMIC_TYPE_TMP_BUFFER); + ExpectNotNull(privCheckKey); + pubCheckKey = (byte*)XMALLOC(DILITHIUM_MAX_PUB_KEY_SIZE, NULL, + DYNAMIC_TYPE_TMP_BUFFER); + ExpectNotNull(pubCheckKey); + + if (checkKey != NULL) { + XMEMSET(checkKey, 0, sizeof(*checkKey)); + } + XMEMSET(&rng, 0, sizeof(WC_RNG)); + + ExpectIntEQ(wc_InitRng(&rng), 0); + + ExpectIntEQ(wc_dilithium_check_key(NULL), BAD_FUNC_ARG); + + ExpectIntEQ(wc_dilithium_init(checkKey), 0); + + ExpectIntEQ(wc_dilithium_export_key(NULL, privCheckKey, + &privCheckKeyLen, pubCheckKey, &pubCheckKeyLen), BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_import_key(privCheckKey, + privCheckKeyLen, pubCheckKey, pubCheckKeyLen, NULL), BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_export_key(checkKey, privCheckKey, + &privCheckKeyLen, pubCheckKey, &pubCheckKeyLen), BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_import_key(privCheckKey, + privCheckKeyLen, pubCheckKey, pubCheckKeyLen, checkKey), BAD_FUNC_ARG); + +#ifndef WOLFSSL_NO_ML_DSA_44 + ExpectIntEQ(wc_dilithium_set_level(checkKey, WC_ML_DSA_44), 0); +#elif !defined(WOLFSSL_NO_ML_DSA_65) + ExpectIntEQ(wc_dilithium_set_level(checkKey, WC_ML_DSA_65), 0); +#else + ExpectIntEQ(wc_dilithium_set_level(checkKey, WC_ML_DSA_87), 0); +#endif + ExpectIntEQ(wc_dilithium_make_key(checkKey, &rng), 0); + + ExpectIntEQ(wc_dilithium_export_key(NULL, NULL, NULL, NULL, NULL), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_export_key(checkKey, NULL, NULL, NULL, NULL), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_export_key(NULL, privCheckKey, NULL, NULL, NULL), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_export_key(NULL, NULL, &privCheckKeyLen, NULL, + NULL), BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_export_key(NULL, NULL, NULL, pubCheckKey, NULL), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_export_key(NULL, NULL, NULL, NULL, + &pubCheckKeyLen), BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_export_key(NULL , privCheckKey, + &privCheckKeyLen, pubCheckKey, &pubCheckKeyLen), BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_export_key(checkKey, NULL , + &privCheckKeyLen, pubCheckKey, &pubCheckKeyLen), BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_export_key(checkKey, privCheckKey, + NULL , pubCheckKey, &pubCheckKeyLen), BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_export_key(checkKey, privCheckKey, + &privCheckKeyLen, NULL , &pubCheckKeyLen), BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_export_key(checkKey, privCheckKey, + &privCheckKeyLen, pubCheckKey, NULL ), BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_export_key(checkKey, privCheckKey, + &privCheckKeyLen, pubCheckKey, &pubCheckKeyLen), 0); + + /* Modify hash. */ + pubCheckKey[0] ^= 0x80; + ExpectIntEQ(wc_dilithium_import_key(NULL, 0, NULL, 0, NULL), BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_import_key(privCheckKey, 0, NULL, 0, NULL), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_import_key(NULL, 0, pubCheckKey, 0, NULL), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_import_key(NULL, 0, NULL, 0, checkKey), + BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_import_key(NULL , + privCheckKeyLen, pubCheckKey, pubCheckKeyLen, checkKey), BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_import_key(privCheckKey, + 0 , pubCheckKey, pubCheckKeyLen, checkKey), BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_import_key(privCheckKey, + privCheckKeyLen, NULL , pubCheckKeyLen, checkKey), BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_import_key(privCheckKey, + privCheckKeyLen, pubCheckKey, 0 , checkKey), BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_import_key(privCheckKey, + privCheckKeyLen, pubCheckKey, pubCheckKeyLen, NULL ), BAD_FUNC_ARG); + ExpectIntEQ(wc_dilithium_import_key(privCheckKey, + privCheckKeyLen, pubCheckKey, pubCheckKeyLen, checkKey), 0); + ExpectIntEQ(wc_dilithium_check_key(checkKey), PUBLIC_KEY_E); + privCheckKey[0] ^= 0x80; + + /* Modify encoded t1. */ + pubCheckKey[48] ^= 0x80; + ExpectIntEQ(wc_dilithium_import_key(privCheckKey, + privCheckKeyLen,pubCheckKey, pubCheckKeyLen, checkKey), 0); + ExpectIntEQ(wc_dilithium_check_key(checkKey), PUBLIC_KEY_E); + privCheckKey[48] ^= 0x80; + + wc_dilithium_free(checkKey); + wc_FreeRng(&rng); + + XFREE(pubCheckKey, NULL, DYNAMIC_TYPE_TMP_BUFFER); + XFREE(privCheckKey, NULL, DYNAMIC_TYPE_TMP_BUFFER); + XFREE(checkKey, NULL, DYNAMIC_TYPE_TMP_BUFFER); +#endif + return EXPECT_RESULT(); +} + +static int test_wc_dilithium_der(void) +{ + EXPECT_DECLS; +#if defined(HAVE_DILITHIUM) && defined(WOLFSSL_WC_DILITHIUM) && \ + !defined(WOLFSSL_DILITHIUM_NO_ASN1) && \ + !defined(WOLFSSL_DILITHIUM_NO_MAKE_KEY) +#define DILITHIUM_MAX_DER_SIZE 8192 + dilithium_key* key; + WC_RNG rng; + byte* der = NULL; + int len; + int pubLen; + int pubDerLen; + int privDerLen; + int keyDerLen; + word32 idx; + +#ifndef WOLFSSL_NO_ML_DSA_44 + pubLen = DILITHIUM_LEVEL2_PUB_KEY_SIZE; + pubDerLen = DILITHIUM_LEVEL2_PUB_KEY_SIZE + 24; + privDerLen = DILITHIUM_LEVEL2_KEY_SIZE + 30; + keyDerLen = DILITHIUM_LEVEL2_PUB_KEY_SIZE + DILITHIUM_LEVEL2_KEY_SIZE + 34; +#elif !defined(WOLFSSL_NO_ML_DSA_65) + pubLen = DILITHIUM_LEVEL3_PUB_KEY_SIZE; + pubDerLen = DILITHIUM_LEVEL3_PUB_KEY_SIZE + 24; + privDerLen = DILITHIUM_LEVEL3_KEY_SIZE + 30; + keyDerLen = DILITHIUM_LEVEL3_PUB_KEY_SIZE + DILITHIUM_LEVEL3_KEY_SIZE + 34; +#else + pubLen = DILITHIUM_LEVEL5_PUB_KEY_SIZE; + pubDerLen = DILITHIUM_LEVEL5_PUB_KEY_SIZE + 24; + privDerLen = DILITHIUM_LEVEL5_KEY_SIZE + 30; + keyDerLen = DILITHIUM_LEVEL5_PUB_KEY_SIZE + DILITHIUM_LEVEL5_KEY_SIZE + 34; +#endif + + key = (dilithium_key*)XMALLOC(sizeof(*key), NULL, DYNAMIC_TYPE_TMP_BUFFER); + ExpectNotNull(key); + der = (byte*)XMALLOC(DILITHIUM_MAX_DER_SIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER); + ExpectNotNull(der); + + if (key != NULL) { + XMEMSET(key, 0, sizeof(*key)); + } + XMEMSET(&rng, 0, sizeof(WC_RNG)); + ExpectIntEQ(wc_InitRng(&rng), 0); + ExpectIntEQ(wc_dilithium_init(key), 0); + + ExpectIntEQ(wc_Dilithium_PublicKeyToDer(key, der, DILITHIUM_MAX_DER_SIZE, + 0), BAD_FUNC_ARG); + ExpectIntEQ(wc_Dilithium_PublicKeyToDer(key, der, DILITHIUM_MAX_DER_SIZE, + 1), BAD_FUNC_ARG); + ExpectIntEQ(wc_Dilithium_PrivateKeyToDer(key, der, DILITHIUM_MAX_DER_SIZE), + BAD_FUNC_ARG); + ExpectIntEQ(wc_Dilithium_PublicKeyDecode(der, &idx, key, pubDerLen), + BAD_FUNC_ARG); + ExpectIntEQ(wc_Dilithium_PrivateKeyDecode(der, &idx, key, privDerLen), + BAD_FUNC_ARG); + +#ifndef WOLFSSL_NO_ML_DSA_44 + ExpectIntEQ(wc_dilithium_set_level(key, WC_ML_DSA_44), 0); +#elif !defined(WOLFSSL_NO_ML_DSA_65) + ExpectIntEQ(wc_dilithium_set_level(key, WC_ML_DSA_65), 0); +#else + ExpectIntEQ(wc_dilithium_set_level(key, WC_ML_DSA_87), 0); +#endif + + ExpectIntEQ(wc_Dilithium_PublicKeyToDer(key, der, DILITHIUM_MAX_DER_SIZE, + 0), BAD_FUNC_ARG); + ExpectIntEQ(wc_Dilithium_PublicKeyToDer(key, der, DILITHIUM_MAX_DER_SIZE, + 1), BAD_FUNC_ARG); + ExpectIntEQ(wc_Dilithium_PrivateKeyToDer(key, der, DILITHIUM_MAX_DER_SIZE), + BAD_FUNC_ARG); + + ExpectIntEQ(wc_dilithium_make_key(key, &rng), 0); + + ExpectIntEQ(wc_Dilithium_PublicKeyToDer(NULL, NULL, 0 , + 0), BAD_FUNC_ARG); + ExpectIntEQ(wc_Dilithium_PublicKeyToDer(NULL, der , 0 , + 0), BAD_FUNC_ARG); + ExpectIntEQ(wc_Dilithium_PublicKeyToDer(NULL, NULL, DILITHIUM_MAX_DER_SIZE, + 0), BAD_FUNC_ARG); + ExpectIntEQ(wc_Dilithium_PublicKeyToDer(NULL, der , DILITHIUM_MAX_DER_SIZE, + 0), BAD_FUNC_ARG); + ExpectIntEQ(wc_Dilithium_PublicKeyToDer(key , der , 0 , + 0), BUFFER_E); + /* Get length only. */ + ExpectIntEQ(wc_Dilithium_PublicKeyToDer(key , NULL, 0 , + 0), pubLen); + ExpectIntEQ(wc_Dilithium_PublicKeyToDer(key , NULL, DILITHIUM_MAX_DER_SIZE, + 0), pubLen); + ExpectIntEQ(wc_Dilithium_PublicKeyToDer(key , NULL, 0 , + 1), pubDerLen); + ExpectIntEQ(wc_Dilithium_PublicKeyToDer(key , NULL, DILITHIUM_MAX_DER_SIZE, + 1), pubDerLen); + + ExpectIntEQ(wc_Dilithium_PrivateKeyToDer(NULL, NULL, + 0 ), BAD_FUNC_ARG); + ExpectIntEQ(wc_Dilithium_PrivateKeyToDer(key , NULL, + 0 ), BAD_FUNC_ARG); + ExpectIntEQ(wc_Dilithium_PrivateKeyToDer(NULL, der , + 0 ), BAD_FUNC_ARG); + ExpectIntEQ(wc_Dilithium_PrivateKeyToDer(NULL, NULL, + DILITHIUM_MAX_DER_SIZE), BAD_FUNC_ARG); + ExpectIntEQ(wc_Dilithium_PrivateKeyToDer(NULL, der , + DILITHIUM_MAX_DER_SIZE), BAD_FUNC_ARG); + ExpectIntEQ(wc_Dilithium_PrivateKeyToDer(key , der , + 0 ), BAD_FUNC_ARG); + /* Get length only. */ + ExpectIntEQ(wc_Dilithium_PrivateKeyToDer(key , NULL, + DILITHIUM_MAX_DER_SIZE), privDerLen); + + ExpectIntEQ(wc_Dilithium_KeyToDer(NULL, NULL, 0 ), + BAD_FUNC_ARG); + ExpectIntEQ(wc_Dilithium_KeyToDer(key , NULL, 0 ), + BAD_FUNC_ARG); + ExpectIntEQ(wc_Dilithium_KeyToDer(NULL, der , 0 ), + BAD_FUNC_ARG); + ExpectIntEQ(wc_Dilithium_KeyToDer(NULL, NULL, DILITHIUM_MAX_DER_SIZE), + BAD_FUNC_ARG); + ExpectIntEQ(wc_Dilithium_KeyToDer(NULL, der , DILITHIUM_MAX_DER_SIZE), + BAD_FUNC_ARG); + ExpectIntEQ(wc_Dilithium_KeyToDer(key , der , 0 ), + BAD_FUNC_ARG); + /* Get length only. */ + ExpectIntEQ(wc_Dilithium_KeyToDer(key , NULL, DILITHIUM_MAX_DER_SIZE), + keyDerLen); + + ExpectIntEQ(wc_Dilithium_PublicKeyDecode(NULL, NULL, NULL, 0 ), + BAD_FUNC_ARG); + ExpectIntEQ(wc_Dilithium_PublicKeyDecode(der , NULL, NULL, 0 ), + BAD_FUNC_ARG); + ExpectIntEQ(wc_Dilithium_PublicKeyDecode(NULL, &idx, NULL, 0 ), + BAD_FUNC_ARG); + ExpectIntEQ(wc_Dilithium_PublicKeyDecode(NULL, NULL, key , 0 ), + BAD_FUNC_ARG); + ExpectIntEQ(wc_Dilithium_PublicKeyDecode(NULL, NULL, NULL, pubDerLen), + BAD_FUNC_ARG); + ExpectIntEQ(wc_Dilithium_PublicKeyDecode(NULL, &idx, key , pubDerLen), + BAD_FUNC_ARG); + ExpectIntEQ(wc_Dilithium_PublicKeyDecode(der , NULL, key , pubDerLen), + BAD_FUNC_ARG); + ExpectIntEQ(wc_Dilithium_PublicKeyDecode(der , &idx, NULL, pubDerLen), + BAD_FUNC_ARG); + ExpectIntEQ(wc_Dilithium_PublicKeyDecode(der , &idx, key , 0 ), + BAD_FUNC_ARG); + + ExpectIntEQ(wc_Dilithium_PrivateKeyDecode(NULL, NULL, NULL, 0 ), + BAD_FUNC_ARG); + ExpectIntEQ(wc_Dilithium_PrivateKeyDecode(der , NULL, NULL, 0 ), + BAD_FUNC_ARG); + ExpectIntEQ(wc_Dilithium_PrivateKeyDecode(NULL, &idx, NULL, 0 ), + BAD_FUNC_ARG); + ExpectIntEQ(wc_Dilithium_PrivateKeyDecode(NULL, NULL, key , 0 ), + BAD_FUNC_ARG); + ExpectIntEQ(wc_Dilithium_PrivateKeyDecode(NULL, NULL, NULL, privDerLen), + BAD_FUNC_ARG); + ExpectIntEQ(wc_Dilithium_PrivateKeyDecode(NULL, &idx, key , privDerLen), + BAD_FUNC_ARG); + ExpectIntEQ(wc_Dilithium_PrivateKeyDecode(der , NULL, key , privDerLen), + BAD_FUNC_ARG); + ExpectIntEQ(wc_Dilithium_PrivateKeyDecode(der , &idx, NULL, privDerLen), + BAD_FUNC_ARG); + ExpectIntEQ(wc_Dilithium_PrivateKeyDecode(der , &idx, key , 0 ), + BAD_FUNC_ARG); + + ExpectIntEQ(len = wc_Dilithium_PublicKeyToDer(key, der, + DILITHIUM_MAX_DER_SIZE, 0), pubLen); + ExpectIntEQ(wc_dilithium_import_public(der, len, key), 0); + + ExpectIntEQ(len = wc_Dilithium_PublicKeyToDer(key, der, + DILITHIUM_MAX_DER_SIZE, 1), pubDerLen); + idx = 0; + ExpectIntEQ(wc_Dilithium_PublicKeyDecode(der, &idx, key, len), 0); + + ExpectIntEQ(len = wc_Dilithium_PrivateKeyToDer(key, der, + DILITHIUM_MAX_DER_SIZE), privDerLen); + idx = 0; + ExpectIntEQ(wc_Dilithium_PrivateKeyDecode(der, &idx, key, len), 0); + + ExpectIntEQ(len = wc_Dilithium_KeyToDer(key, der, DILITHIUM_MAX_DER_SIZE), + keyDerLen); + idx = 0; + ExpectIntEQ(wc_Dilithium_PrivateKeyDecode(der, &idx, key, len), 0); + + + wc_dilithium_free(key); + wc_FreeRng(&rng); + + XFREE(der, NULL, DYNAMIC_TYPE_TMP_BUFFER); + XFREE(key, NULL, DYNAMIC_TYPE_TMP_BUFFER); +#endif + return EXPECT_RESULT(); +} + /* * Testing wc_SetSubjectBuffer */ @@ -55975,7 +57430,7 @@ static int test_tls13_apis(void) #endif #if defined(HAVE_ECC) && defined(HAVE_SUPPORTED_CURVES) int groups[2] = { WOLFSSL_ECC_SECP256R1, -#ifdef HAVE_PQC +#ifdef WOLFSSL_HAVE_KYBER WOLFSSL_KYBER_LEVEL1 #else WOLFSSL_ECC_SECP256R1 @@ -56003,12 +57458,12 @@ static int test_tls13_apis(void) #endif #if (!defined(NO_ECC256) || defined(HAVE_ALL_CURVES)) && ECC_MIN_KEY_SZ <= 256 "P-256:secp256r1" -#if defined(HAVE_PQC) && defined(HAVE_LIBOQS) +#if defined(WOLFSSL_HAVE_KYBER) ":P256_KYBER_LEVEL1" #endif #endif #endif /* !defined(NO_ECC_SECP) */ -#ifdef HAVE_PQC +#if defined(WOLFSSL_HAVE_KYBER) ":KYBER_LEVEL1" #endif ""; @@ -56141,7 +57596,7 @@ static int test_tls13_apis(void) #endif #endif -#if defined(HAVE_PQC) +#if defined(WOLFSSL_HAVE_KYBER) ExpectIntEQ(wolfSSL_UseKeyShare(NULL, WOLFSSL_KYBER_LEVEL3), BAD_FUNC_ARG); #ifndef NO_WOLFSSL_SERVER ExpectIntEQ(wolfSSL_UseKeyShare(serverSsl, WOLFSSL_KYBER_LEVEL3), @@ -73231,6 +74686,14 @@ TEST_CASE testCases[] = { TEST_DECL(test_wc_Ed448PrivateKeyToDer), TEST_DECL(test_wc_Curve448PrivateKeyToDer), + /* Dilithium */ + TEST_DECL(test_wc_dilithium), + TEST_DECL(test_wc_dilithium_make_key), + TEST_DECL(test_wc_dilithium_sign), + TEST_DECL(test_wc_dilithium_verify), + TEST_DECL(test_wc_dilithium_check_key), + TEST_DECL(test_wc_dilithium_der), + /* Signature API */ TEST_DECL(test_wc_SignatureGetSize_ecc), TEST_DECL(test_wc_SignatureGetSize_rsa), diff --git a/wolfcrypt/benchmark/benchmark.c b/wolfcrypt/benchmark/benchmark.c index 4b6da128cf..48effdaf09 100644 --- a/wolfcrypt/benchmark/benchmark.c +++ b/wolfcrypt/benchmark/benchmark.c @@ -199,16 +199,14 @@ #include #endif -#if defined(HAVE_PQC) - #if defined(HAVE_FALCON) - #include - #endif - #if defined(HAVE_DILITHIUM) - #include - #endif - #if defined(HAVE_SPHINCS) - #include - #endif +#if defined(HAVE_FALCON) + #include +#endif +#if defined(HAVE_DILITHIUM) + #include +#endif +#if defined(HAVE_SPHINCS) + #include #endif #ifdef WOLF_CRYPTO_CB @@ -1062,7 +1060,7 @@ static const bench_pq_hash_sig_alg bench_pq_hash_sig_opt[] = { }; #endif /* BENCH_PQ_STATEFUL_HBS */ -#if defined(HAVE_PQC) && defined(HAVE_LIBOQS) +#if defined(HAVE_FALCON) || defined(HAVE_DILITHIUM) || defined(HAVE_SPHINCS) /* The post-quantum-specific mapping of command line option to bit values and * OQS name. */ typedef struct bench_pq_alg { @@ -1070,49 +1068,42 @@ typedef struct bench_pq_alg { const char* str; /* Bit values to set. */ word32 val; - const char* pqc_name; } bench_pq_alg; /* All recognized post-quantum asymmetric algorithm choosing command line * options. */ static const bench_pq_alg bench_pq_asym_opt[] = { - { "-pq", 0xffffffff, NULL}, -#ifdef HAVE_LIBOQS - { "-falcon_level1", BENCH_FALCON_LEVEL1_SIGN, - OQS_SIG_alg_falcon_512 }, - { "-falcon_level5", BENCH_FALCON_LEVEL5_SIGN, - OQS_SIG_alg_falcon_1024 }, - { "-dilithium_level2", BENCH_DILITHIUM_LEVEL2_SIGN, - OQS_SIG_alg_dilithium_2 }, - { "-dilithium_level3", BENCH_DILITHIUM_LEVEL3_SIGN, - OQS_SIG_alg_dilithium_3 }, - { "-dilithium_level5", BENCH_DILITHIUM_LEVEL5_SIGN, - OQS_SIG_alg_dilithium_5 }, -#endif /* HAVE_LIBOQS */ - { NULL, 0, NULL } + { "-pq", 0xffffffff }, +#if defined(HAVE_FALCON) + { "-falcon_level1", BENCH_FALCON_LEVEL1_SIGN }, + { "-falcon_level5", BENCH_FALCON_LEVEL5_SIGN }, +#endif +#if defined(HAVE_DILITHIUM) + { "-dilithium_level2", BENCH_DILITHIUM_LEVEL2_SIGN }, + { "-dilithium_level3", BENCH_DILITHIUM_LEVEL3_SIGN }, + { "-dilithium_level5", BENCH_DILITHIUM_LEVEL5_SIGN }, + { "-ml-dsa-44", BENCH_DILITHIUM_LEVEL2_SIGN }, + { "-ml-dsa-65", BENCH_DILITHIUM_LEVEL3_SIGN }, + { "-ml-dsa-87", BENCH_DILITHIUM_LEVEL5_SIGN }, +#endif + { NULL, 0 } }; -#if defined(HAVE_LIBOQS) && defined(HAVE_SPHINCS) +#if defined(HAVE_SPHINCS) /* All recognized post-quantum asymmetric algorithm choosing command line * options. (Part 2) */ static const bench_pq_alg bench_pq_asym_opt2[] = { - { "-pq", 0xffffffff, NULL}, - { "-sphincs_fast_level1", BENCH_SPHINCS_FAST_LEVEL1_SIGN, - OQS_SIG_alg_sphincs_shake_128f_simple }, - { "-sphincs_fast_level3", BENCH_SPHINCS_FAST_LEVEL3_SIGN, - OQS_SIG_alg_sphincs_shake_192f_simple }, - { "-sphincs_fast_level5", BENCH_SPHINCS_FAST_LEVEL5_SIGN, - OQS_SIG_alg_sphincs_shake_256f_simple }, - { "-sphincs_small_level1", BENCH_SPHINCS_SMALL_LEVEL1_SIGN, - OQS_SIG_alg_sphincs_shake_128s_simple }, - { "-sphincs_small_level3", BENCH_SPHINCS_SMALL_LEVEL3_SIGN, - OQS_SIG_alg_sphincs_shake_192s_simple }, - { "-sphincs_small_level5", BENCH_SPHINCS_SMALL_LEVEL5_SIGN, - OQS_SIG_alg_sphincs_shake_256s_simple }, - { NULL, 0, NULL } + { "-pq", 0xffffffff }, + { "-sphincs_fast_level1", BENCH_SPHINCS_FAST_LEVEL1_SIGN }, + { "-sphincs_fast_level3", BENCH_SPHINCS_FAST_LEVEL3_SIGN }, + { "-sphincs_fast_level5", BENCH_SPHINCS_FAST_LEVEL5_SIGN }, + { "-sphincs_small_level1", BENCH_SPHINCS_SMALL_LEVEL1_SIGN }, + { "-sphincs_small_level3", BENCH_SPHINCS_SMALL_LEVEL3_SIGN }, + { "-sphincs_small_level5", BENCH_SPHINCS_SMALL_LEVEL5_SIGN }, + { NULL, 0, } }; -#endif /* HAVE_LIBOQS && HAVE_SPHINCS */ -#endif /* HAVE_PQC */ +#endif /* HAVE_SPHINCS */ +#endif #ifdef HAVE_WNR const char* wnrConfigFile = "wnr-example.conf"; @@ -3778,7 +3769,6 @@ static void* benchmarks_do(void* args) #endif #endif -#if defined(HAVE_LIBOQS) #ifdef HAVE_FALCON if (bench_all || (bench_pq_asym_algs & BENCH_FALCON_LEVEL1_SIGN)) bench_falconKeySign(1); @@ -3786,13 +3776,19 @@ static void* benchmarks_do(void* args) bench_falconKeySign(5); #endif #ifdef HAVE_DILITHIUM +#ifndef WOLFSSL_NO_ML_DSA_44 if (bench_all || (bench_pq_asym_algs & BENCH_DILITHIUM_LEVEL2_SIGN)) bench_dilithiumKeySign(2); +#endif +#ifndef WOLFSSL_NO_ML_DSA_65 if (bench_all || (bench_pq_asym_algs & BENCH_DILITHIUM_LEVEL3_SIGN)) bench_dilithiumKeySign(3); +#endif +#ifndef WOLFSSL_NO_ML_DSA_87 if (bench_all || (bench_pq_asym_algs & BENCH_DILITHIUM_LEVEL5_SIGN)) bench_dilithiumKeySign(5); #endif +#endif #ifdef HAVE_SPHINCS if (bench_all || (bench_pq_asym_algs2 & BENCH_SPHINCS_FAST_LEVEL1_SIGN)) bench_sphincsKeySign(1, FAST_VARIANT); @@ -3807,7 +3803,6 @@ static void* benchmarks_do(void* args) if (bench_all || (bench_pq_asym_algs2 & BENCH_SPHINCS_SMALL_LEVEL5_SIGN)) bench_sphincsKeySign(5, SMALL_VARIANT); #endif -#endif /* HAVE_LIBOQS */ exit: /* free benchmark buffers */ @@ -12446,7 +12441,6 @@ void bench_sakke(void) #endif /* WOLFCRYPT_SAKKE_CLIENT */ #endif /* WOLFCRYPT_HAVE_SAKKE */ -#if defined(HAVE_PQC) && defined(HAVE_LIBOQS) #ifdef HAVE_FALCON void bench_falconKeySign(byte level) { @@ -12563,17 +12557,1100 @@ void bench_falconKeySign(byte level) #endif /* HAVE_FALCON */ #ifdef HAVE_DILITHIUM + +#if defined(WOLFSSL_DILITHIUM_NO_SIGN) && !defined(WOLFSSL_DILITHIUM_NO_VERIFY) + +#ifndef WOLFSSL_NO_ML_DSA_44 +static const unsigned char bench_dilithium_level2_sig[] = { + 0x5e, 0xc1, 0xce, 0x0e, 0x31, 0xea, 0x10, 0x52, 0xa3, 0x7a, + 0xfe, 0x4d, 0xac, 0x07, 0x89, 0x5a, 0x45, 0xbd, 0x5a, 0xe5, + 0x22, 0xed, 0x98, 0x4d, 0x2f, 0xc8, 0x27, 0x00, 0x99, 0x40, + 0x00, 0x79, 0xcd, 0x93, 0x27, 0xd0, 0x40, 0x33, 0x79, 0x4f, + 0xe5, 0x16, 0x89, 0x9f, 0xbd, 0xa6, 0x3f, 0xdd, 0x68, 0x74, + 0x73, 0xc3, 0x97, 0x54, 0x11, 0x1d, 0xc8, 0xb8, 0xc8, 0xfd, + 0x3a, 0xbe, 0xca, 0x17, 0x0f,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6, 0x66, + 0x6d, 0xdf, 0xd8, 0xf8, 0xd6, 0x85, 0xba, 0xba, 0x30, 0xa7, + 0xca, 0x34, 0xf4, 0x9a, 0xba, 0x0a, 0xfb, 0x0e, 0xa0, 0x65, + 0x98, 0x78, 0xee, 0xaa, 0x14, 0x6a, 0x99, 0x77, 0x67, 0xad, + 0x01, 0x95, 0x5e, 0x50, 0x22, 0xe9, 0x74, 0x95, 0xa7, 0x13, + 0x3f, 0xdd, 0xa6, 0x69, 0x64, 0xf6, 0x50, 0x06, 0x6d, 0xba, + 0x90, 0x5a, 0x8c, 0x81, 0xa0, 0xda, 0x55, 0xe9, 0x97, 0x0e, + 0xd7, 0x10, 0x8e, 0x1f, 0x23, 0x65, 0xd9, 0x14, 0xd4, 0xde, + 0xa5, 0xf9, 0xec, 0xb6, 0xad, 0x65, 0xce, 0x0b, 0x1b, 0x0a, + 0x4c, 0x7d, 0xb0, 0x97, 0xa6, 0xfe, 0x67, 0xfb, 0x4f, 0x8f, + 0x00, 0x92, 0xb6, 0x0d, 0x20, 0x78, 0x65, 0x1d, 0x9a, 0x56, + 0x57, 0xc6, 0x15, 0x88, 0xba, 0x55, 0x02, 0x7a, 0x9a, 0xac, + 0x50, 0x4c, 0xc7, 0x9e, 0x66, 0x8b, 0xfc, 0xf3, 0x67, 0x48, + 0x07, 0xbf, 0x84, 0x94, 0x9b, 0x22, 0x2a, 0xae, 0x1b, 0x25, + 0xe9, 0x94, 0x06, 0xa7, 0xe8, 0x61, 0x52, 0x89, 0xdc, 0x93, + 0x6e, 0x89, 0xdc, 0x30, 0x6e, 0xd9, 0xee, 0xcb, 0x12, 0x38, + 0x58, 0x9d, 0x8b, 0xc5, 0x05, 0x2c, 0x50, 0x4e, 0xc8, 0xc2, + 0xe0, 0x65, 0xb6, 0x49, 0xc4, 0xf0, 0x1e, 0x5c, 0x8e, 0x3c, + 0xe9, 0x77, 0xd2, 0x9e, 0xa8, 0xd5, 0xf5, 0xd9, 0xc5, 0xad, + 0x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0xc8, 0xac, 0x39, 0x9e, 0x87, 0x69, 0xc4, 0x3a, + 0xbc, 0x28, 0x7e, 0x36, 0x69, 0xfd, 0x20, 0x25, 0xac, 0xa3, + 0xa7, 0x37, 0x96, 0xe9, 0x8a, 0x65, 0xe4, 0xb0, 0x2a, 0x61, + 0x23, 0x28, 0x64, 0xff, 0x17, 0x6c, 0x36, 0x9e, 0x0a, 0xba, + 0xe4, 0x4b, 0xeb, 0x84, 0x24, 0x20, 0x57, 0x0f, 0x34, 0x05, + 0x95, 0x56, 0xc3, 0x2f, 0x2b, 0xf0, 0x36, 0xef, 0xca, 0x68, + 0xfe, 0x78, 0xf8, 0x98, 0x09, 0x4a, 0x25, 0xcc, 0x17, 0xbe, + 0x05, 0x00, 0xff, 0xf9, 0xa5, 0x5b, 0xe6, 0xaa, 0x5b, 0x56, + 0xb6, 0x89, 0x64, 0x9c, 0x16, 0x48, 0xe1, 0xcd, 0x67, 0x87, + 0xdd, 0xba, 0xbd, 0x02, 0x0d, 0xd8, 0xb4, 0xc9, 0x7c, 0x37, + 0x92, 0xd0, 0x39, 0x46, 0xd2, 0xc4, 0x78, 0x13, 0xf0, 0x76, + 0x45, 0x5f, 0xeb, 0x52, 0xd2, 0x3f, 0x61, 0x87, 0x34, 0x09, + 0xb7, 0x24, 0x4e, 0x93, 0xf3, 0xc5, 0x10, 0x19, 0x66, 0x66, + 0x3f, 0x15, 0xe3, 0x05, 0x55, 0x43, 0xb7, 0xf4, 0x62, 0x57, + 0xb4, 0xd9, 0xef, 0x46, 0x47, 0xb5, 0xfb, 0x79, 0xc9, 0x67, + 0xc5, 0xc3, 0x18, 0x91, 0x73, 0x75, 0xec, 0xd5, 0x68, 0x2b, + 0xf6, 0x42, 0xb4, 0xff, 0xfb, 0x27, 0x61, 0x77, 0x28, 0x10, + 0x6b, 0xce, 0x19, 0xad, 0x87, 0xc3, 0x85, 0xe3, 0x78, 0x00, + 0xdb, 0x21, 0xee, 0xd8, 0xfa, 0x9c, 0x81, 0x11, 0x97, 0xac, + 0xd0, 0x50, 0x89, 0x45, 0x23, 0xf6, 0x85, 0x7d, 0x60, 0xb2, + 0xad, 0x0c, 0x5d, 0xd8, 0x9e, 0xe4, 0xe1, 0x25, 0xb2, 0x13, + 0x1a, 0x54, 0x54, 0xfd, 0x7b, 0xab, 0x85, 0x20, 0xe8, 0xda, + 0x52, 0x0f, 0xac, 0x49, 0x70, 0xf1, 0x4c, 0x66, 0x74, 0x8c, + 0x87, 0x6e, 0xca, 0xc1, 0x0d, 0x92, 0xc0, 0xa8, 0x08, 0xfd, + 0x0f, 0x60, 0x55, 0xaf, 0x24, 0xcb, 0x04, 0xb7, 0xff, 0xa9, + 0xc5, 0x07, 0x26, 0xf6, 0xe2, 0x1e, 0x2f, 0xd1, 0x99, 0x6d, + 0xef, 0xc0, 0xdb, 0x5b, 0xf7, 0x06, 0x80, 0x92, 0x5f, 0x56, + 0x54, 0xdb, 0x2e, 0xba, 0x93, 0xb2, 0x94, 0xf2, 0xad, 0xbc, + 0x91, 0x6e, 0x4e, 0xce, 0x21, 0xc4, 0x8b, 0x18, 0xc4, 0xfc, + 0xab, 0xb4, 0x4f, 0xd7, 0xa2, 0xef, 0x55, 0x00, 0x6d, 0x34, + 0x17, 0x59, 0x8d, 0x79, 0x75, 0x02, 0xa3, 0x7a, 0x52, 0x57, + 0x5c, 0x26, 0xb9, 0xae, 0xd6, 0x19, 0x2e, 0x31, 0x02, 0x98, + 0x98, 0xe5, 0x3d, 0xc2, 0xa5, 0x56, 0xb6, 0x02, 0xae, 0x0d, + 0x3b, 0x35, 0x97, 0xd2, 0x43, 0x38, 0x8a, 0x65, 0xfa, 0x86, + 0x20, 0xb7, 0xb5, 0xb0, 0xda, 0x19, 0x01, 0x2f, 0x13, 0xb5, + 0x6d, 0xbd, 0xb2, 0x34, 0xa7, 0xff, 0xae, 0x7e, 0x8f, 0x98, + 0x1b, 0xc4, 0x27, 0xbd, 0xa9, 0x64, 0xdc, 0xab, 0x2a, 0xd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, 0x4e, 0xd5, 0x80, 0x4e, 0x59, 0x72, 0x5d, 0x8b, + 0xcb, 0x86, 0x3b, 0x57, 0xc4, 0xb2, 0x3d, 0xbc, 0x35, 0x6d, + 0xb1, 0x50, 0xf5, 0x8c, 0xf2, 0x89, 0x72, 0x20, 0xd0, 0x47, + 0x68, 0x13, 0x42, 0x25, 0x1a, 0xb6, 0xc5, 0x07, 0xdf, 0x45, + 0x11, 0xa9, 0x05, 0x5d, 0xad, 0xf0, 0x49, 0x9e, 0x70, 0x78, + 0xed, 0xe7, 0xf9, 0x00, 0x1f, 0x62, 0x76, 0x47, 0xb5, 0x48, + 0x4f, 0x2c, 0x2e, 0xe3, 0x78, 0x6a, 0x44, 0x46, 0x1e, 0x6b, + 0x00, 0x74, 0x54, 0xb9, 0xd1, 0x4f, 0x6d, 0x45, 0xc1, 0xa6, + 0x45, 0x2e, 0x1a, 0xaf, 0x94, 0x3f, 0xd0, 0x72, 0x67, 0x0d, + 0x2e, 0xa9, 0x8d, 0x16, 0xc4, 0x05, 0x01, 0x07, 0x13, 0x1b, + 0x1c, 0x3d, 0x43, 0x71, 0x91, 0x95, 0x9a, 0xae, 0xaf, 0xc4, + 0xe5, 0xe6, 0xe9, 0xff, 0x02, 0x0c, 0x0f, 0x3e, 0x62, 0x67, + 0x68, 0x81, 0xc7, 0xd0, 0xd8, 0xdd, 0xe0, 0xf5, 0x0b, 0x25, + 0x35, 0x45, 0x4a, 0x4b, 0x63, 0x74, 0x79, 0x7e, 0x82, 0xa2, + 0xaf, 0xc6, 0xc7, 0xcc, 0xd2, 0xfa, 0x2a, 0x2d, 0x2f, 0x32, + 0x35, 0x38, 0x3f, 0x4c, 0x7f, 0x80, 0x81, 0x8b, 0x9b, 0x9c, + 0x9d, 0xa7, 0xa9, 0xcb, 0xe9, 0xf0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x20, 0x32, 0x46, +}; +static const int sizeof_bench_dilithium_level2_sig = + sizeof(bench_dilithium_level2_sig); +#endif + +#ifndef WOLFSSL_NO_ML_DSA_65 +static const unsigned char bench_dilithium_level3_sig[] = { + 0x3e, 0xff, 0xf4, 0x48, 0x80, 0x2d, 0x88, 0x87, 0xf4, 0xcc, + 0xa4, 0x61, 0xe1, 0x27, 0x20, 0x55, 0x66, 0xc8, 0xfe, 0x3e, + 0xdd, 0xf5, 0x5c, 0x70, 0x6c, 0x54, 0xba, 0x50, 0x8a, 0xa2, + 0x4b, 0x88, 0xbc, 0xb8, 0x87, 0xf9, 0x4e, 0x50, 0x3a, 0x04, + 0x18, 0xb3, 0xf4, 0x5f, 0x77, 0x4a, 0x7e, 0xa8, 0xf5, 0xca, + 0x49, 0x00, 0xdc, 0x24, 0xaa, 0x05, 0x35, 0x0f, 0x34, 0xf7, + 0xbf, 0x09, 0xa6, 0xcf, 0x75, 0x37, 0x07, 0xcd, 0x07, 0x99, + 0x92, 0x1d, 0xc7, 0xc9, 0x17, 0x1c, 0xdd, 0x27, 0x8c, 0x66, + 0xf2, 0x8b, 0x75, 0xb0, 0x86, 0x2d, 0xbd, 0x51, 0x16, 0xc2, + 0x50, 0xe0, 0x7e, 0x0a, 0x21, 0x58, 0x93, 0x22, 0x06, 0xcb, + 0x85, 0x8b, 0xfd, 0x97, 0x61, 0xc0, 0xdb, 0xab, 0xfa, 0x4a, + 0x69, 0xef, 0x9c, 0xc1, 0x4e, 0xae, 0xb2, 0xb3, 0xa2, 0x74, + 0xa4, 0x94, 0x0a, 0xed, 0x39, 0x9e, 0xe8, 0x58, 0xeb, 0xfd, + 0x43, 0x05, 0x73, 0x38, 0xd6, 0xbb, 0xeb, 0xb9, 0x9d, 0x3b, + 0xf8, 0x85, 0xb4, 0x4b, 0x16, 0x5c, 0x9e, 0xfe, 0xb8, 0x13, + 0xf8, 0x68, 0x44, 0x90, 0x05, 0x61, 0xb3, 0xed, 0x6f, 0x47, + 0xc9, 0x50, 0xcf, 0x6c, 0xc0, 0xac, 0xdf, 0x4c, 0x4c, 0x1b, + 0x42, 0xce, 0x0a, 0x32, 0x69, 0xb0, 0xfd, 0x87, 0xef, 0xf3, + 0x9c, 0xcc, 0xba, 0x2f, 0x03, 0xd7, 0xdb, 0x76, 0xee, 0xa0, + 0x71, 0x4a, 0x80, 0xcb, 0x90, 0x9e, 0xbb, 0x8f, 0x00, 0x46, + 0x81, 0xe0, 0xde, 0xa6, 0x43, 0xb5, 0x37, 0x79, 0xf2, 0x35, + 0xce, 0x9e, 0xd2, 0xb1, 0x5b, 0xff, 0x91, 0xfb, 0x98, 0xc1, + 0xe1, 0x66, 0x2c, 0x00, 0x1b, 0x89, 0xf2, 0x57, 0x81, 0x73, + 0x7e, 0x9f, 0x8d, 0x50, 0xd0, 0xe0, 0xe3, 0x93, 0xf2, 0x87, + 0x41, 0x64, 0x6c, 0xb7, 0x09, 0x60, 0x91, 0x4e, 0x0b, 0xbe, + 0xbe, 0xd4, 0x98, 0xfa, 0x14, 0x8c, 0x46, 0x09, 0xfa, 0xaa, + 0x82, 0xd6, 0xdd, 0x65, 0x93, 0x39, 0x45, 0x50, 0x90, 0x10, + 0xae, 0x1b, 0xff, 0xab, 0x7e, 0x86, 0xda, 0xb9, 0x4d, 0xf1, + 0xc2, 0x00, 0x54, 0x66, 0xee, 0x40, 0xc0, 0x56, 0x2f, 0xe8, + 0x43, 0x89, 0xbb, 0xb8, 0x59, 0x24, 0x63, 0x45, 0x9a, 0xde, + 0x08, 0xf3, 0x16, 0x94, 0xd2, 0x8d, 0xee, 0xf9, 0xbe, 0x4f, + 0x29, 0xe1, 0x4b, 0x5e, 0x2b, 0x14, 0xef, 0x66, 0xe2, 0x12, + 0xf8, 0x87, 0x2e, 0xb1, 0x75, 0x8b, 0x21, 0xb5, 0x8f, 0x8e, + 0xc5, 0x0e, 0x60, 0x27, 0x15, 0xbd, 0x72, 0xe4, 0x26, 0x4e, + 0x62, 0x7d, 0x3a, 0x46, 0x49, 0x93, 0xa9, 0x52, 0x7f, 0x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xff, 0x20, 0x00, 0xf8, 0x42, 0x7f, 0xd2, 0x25, 0x70, 0x90, + 0x88, 0xb3, 0x98, 0xac, 0xe9, 0xd9, 0xac, 0x58, 0xa6, 0x49, + 0xcc, 0x93, 0xa5, 0x04, 0x0c, 0x68, 0x53, 0x64, 0x72, 0x8c, + 0xfc, 0x8d, 0x61, 0xeb, 0x3f, 0x93, 0x8b, 0x85, 0x98, 0x05, + 0xce, 0x06, 0xd7, 0xbf, 0xbb, 0xa5, 0x22, 0xda, 0xe9, 0x8a, + 0x29, 0x30, 0x5e, 0x82, 0xe4, 0x46, 0x7c, 0x36, 0x5e, 0xf5, + 0xc7, 0xe3, 0x09, 0xdf, 0x20, 0x76, 0x73, 0x33, 0x31, 0x75, + 0xc2, 0x99, 0xe9, 0x74, 0x43, 0x82, 0xb1, 0xeb, 0x74, 0x6f, + 0xad, 0x59, 0x48, 0x12, 0xa0, 0x24, 0xe3, 0x38, 0x48, 0x61, + 0x0c, 0xf6, 0x38, 0x83, 0x3a, 0xcd, 0xd6, 0x45, 0x10, 0x0e, + 0x09, 0x79, 0x31, 0x30, 0x80, 0xfb, 0x34, 0x60, 0x1e, 0x72, + 0x98, 0xe9, 0x5c, 0xbf, 0xab, 0x21, 0x7f, 0xa3, 0x19, 0x7e, + 0x8c, 0xa9, 0xa7, 0xfc, 0x25, 0xe0, 0x8e, 0x6d, 0xa1, 0xb9, + 0x7b, 0x5b, 0x37, 0x33, 0x96, 0xd8, 0x6e, 0x7a, 0xce, 0xa6, + 0x1a, 0xbd, 0xe6, 0x6e, 0x62, 0xc4, 0x8c, 0x69, 0xfe, 0xe4, + 0xcb, 0x0a, 0xa1, 0x6c, 0x66, 0x0e, 0x1a, 0x5e, 0xb9, 0xd1, + 0x4a, 0xa3, 0x91, 0x39, 0xcf, 0x85, 0x07, 0x5b, 0xaf, 0x99, + 0x11, 0xca, 0xee, 0x6f, 0x2e, 0x33, 0xda, 0x60, 0xbf, 0xd6, + 0xa0, 0x7a, 0xd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e1, 0x40, 0xac, 0xc7, + 0x15, 0x05, 0x8a, 0xdf, 0xe5, 0x71, 0xd8, 0xe0, 0xd7, 0x9f, + 0x58, 0x03, 0xf4, 0xec, 0x99, 0x3c, 0xb0, 0xe0, 0x07, 0x42, + 0x9b, 0xa0, 0x10, 0x7c, 0x24, 0x60, 0x19, 0xe8, 0x84, 0xd4, + 0xb1, 0x86, 0x19, 0x0a, 0x52, 0x70, 0x6e, 0xc2, 0x3c, 0xe2, + 0x73, 0x8d, 0xfe, 0xf8, 0x7e, 0xdf, 0x78, 0xe7, 0x92, 0x36, + 0x10, 0xf7, 0x2d, 0x76, 0x93, 0x8a, 0x0f, 0x20, 0xc8, 0x30, + 0x59, 0x81, 0xff, 0x3b, 0x70, 0x22, 0xce, 0x6e, 0x23, 0x68, + 0x35, 0x59, 0x0e, 0xcf, 0xf8, 0xf6, 0xcd, 0x45, 0xb6, 0x41, + 0xba, 0xda, 0xe6, 0x35, 0x0b, 0xd1, 0xef, 0xa5, 0x7c, 0xe0, + 0xb9, 0x6f, 0x5b, 0xa9, 0xab, 0x87, 0xe3, 0x3b, 0x92, 0xce, + 0xbe, 0xfe, 0xf7, 0xab, 0x82, 0xa3, 0xe6, 0xbd, 0xfe, 0xce, + 0xa6, 0x17, 0xcb, 0x4c, 0xb4, 0x4c, 0xd6, 0xfe, 0xbb, 0x1c, + 0x10, 0xde, 0x29, 0x3e, 0x92, 0x66, 0x20, 0xf8, 0xee, 0x83, + 0x86, 0x66, 0xe0, 0x66, 0x97, 0x85, 0xaf, 0x3a, 0x8f, 0xa9, + 0x97, 0x09, 0xde, 0x77, 0xda, 0xb7, 0x81, 0x41, 0x10, 0xca, + 0x66, 0x00, 0xec, 0xf8, 0x46, 0x73, 0xa6, 0x24, 0x36, 0xec, + 0x25, 0xbe, 0x93, 0x5e, 0x74, 0x9f, 0xbe, 0xf4, 0x84, 0x15, + 0x9c, 0xc5, 0x43, 0xd9, 0xea, 0x5a, 0xcc, 0x2c, 0x4e, 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0x70, 0xd2, 0xbb, 0x15, 0x68, 0x49, 0xee, 0x6e, 0x1e, 0xc5, + 0x64, 0x4b, 0x26, 0x08, 0xe7, 0x32, 0x1c, 0x1d, 0x73, 0x8f, + 0x42, 0xfe, 0xeb, 0x67, 0x89, 0x42, 0x25, 0x40, 0xd6, 0x15, + 0x02, 0x55, 0x87, 0xe3, 0x87, 0xdd, 0x78, 0xc1, 0x01, 0x94, + 0xbc, 0x30, 0x5f, 0xbd, 0x89, 0xe1, 0xb0, 0x5c, 0xcd, 0xb7, + 0x68, 0xd5, 0xbb, 0xf4, 0xa0, 0x5d, 0x3d, 0xdd, 0x89, 0x12, + 0xc7, 0xb8, 0x5d, 0x51, 0x8a, 0xf4, 0xd5, 0x05, 0xc6, 0xdd, + 0x7b, 0x44, 0x38, 0xce, 0xb1, 0x24, 0x24, 0xe1, 0x9d, 0xc7, + 0x80, 0x86, 0x46, 0x2a, 0xd2, 0xa4, 0x0f, 0xec, 0xd3, 0x6b, + 0x31, 0xc0, 0x05, 0x31, 0xff, 0xf5, 0x1a, 0x33, 0x35, 0x68, + 0x2e, 0x68, 0x24, 0xbd, 0x62, 0xfc, 0x46, 0x79, 0x54, 0x5e, + 0x1e, 0x27, 0x93, 0x07, 0xed, 0x78, 0x94, 0x50, 0x42, 0x98, + 0x53, 0x88, 0xb7, 0x57, 0x04, 0x7d, 0xe2, 0xe1, 0xb5, 0x61, + 0x9e, 0x5a, 0x88, 0x31, 0x3e, 0x6c, 0x69, 0xbc, 0x8a, 0xe6, + 0xbc, 0x9d, 0x20, 0x7a, 0x86, 0xe5, 0x73, 0x93, 0x02, 0xc5, + 0xde, 0xdc, 0xcc, 0xbf, 0x89, 0x76, 0xdc, 0x4e, 0xa1, 0x89, + 0xe7, 0x95, 0x75, 0x01, 0xf7, 0x43, 0xaa, 0x3f, 0x1b, 0xb7, + 0x8c, 0x92, 0x66, 0x22, 0xbe, 0x34, 0xf1, 0x2f, 0xc3, 0xc7, + 0x21, 0xaf, 0x25, 0x57, 0x9a, 0x2c, 0x80, 0xf0, 0xb3, 0xdd, + 0xb3, 0xb2, 0x82, 0x97, 0x85, 0x73, 0xa9, 0x76, 0xe4, 0x37, + 0xa2, 0x65, 0xf9, 0xc1, 0x3d, 0x11, 0xbf, 0xcb, 0x3c, 0x8e, + 0xdd, 0xaf, 0x98, 0x57, 0x6a, 0xe1, 0x33, 0xe7, 0xf0, 0xff, + 0xed, 0x61, 0x53, 0xfe, 0x1e, 0x2d, 0x06, 0x2f, 0xb8, 0x9e, + 0xf9, 0xa5, 0x21, 0x06, 0xf3, 0x72, 0xf6, 0xa3, 0x77, 0xbb, + 0x63, 0x6e, 0x52, 0xb2, 0x42, 0x47, 0x9b, 0x92, 0x4c, 0xf8, + 0xd2, 0xe6, 0x02, 0xa5, 0x57, 0x2d, 0x6f, 0x30, 0x05, 0xe2, + 0xfd, 0x33, 0xe5, 0xb6, 0x23, 0x85, 0x89, 0x4a, 0x99, 0x20, + 0x33, 0xea, 0x2f, 0xcd, 0x28, 0x27, 0xff, 0xfd, 0x2e, 0x73, + 0x52, 0x29, 0x19, 0x7c, 0x65, 0xf5, 0x6a, 0xaa, 0x97, 0x6e, + 0xe9, 0x42, 0xa8, 0x55, 0x97, 0x56, 0x92, 0x9d, 0xd2, 0xd1, + 0xc4, 0x30, 0xaa, 0x95, 0x86, 0xba, 0x71, 0xdd, 0x2f, 0xf1, + 0xed, 0x66, 0x54, 0x78, 0x4b, 0x13, 0x31, 0xed, 0x9d, 0x2c, + 0xae, 0x0a, 0xc3, 0xca, 0xfb, 0x3f, 0x92, 0x92, 0x30, 0xa3, + 0x8e, 0xc8, 0x6d, 0x7b, 0x42, 0xd5, 0x5d, 0x99, 0x79, 0x42, + 0x28, 0x63, 0x9f, 0x97, 0x8e, 0x94, 0x6d, 0x1d, 0xb4, 0x21, + 0x39, 0xc7, 0x64, 0x48, 0x44, 0x5e, 0x15, 0x10, 0x45, 0x9f, + 0x8a, 0x01, 0x45, 0x20, 0x5c, 0xd1, 0x28, 0x0d, 0xe9, 0xfb, + 0xa9, 0x72, 0x68, 0x07, 0x31, 0x20, 0x75, 0x76, 0x82, 0x76, + 0x5d, 0x7c, 0xc1, 0x5d, 0x42, 0x40, 0xfd, 0x06, 0xa9, 0x66, + 0xb0, 0x36, 0x55, 0x86, 0x6c, 0x96, 0xbd, 0xb8, 0xf7, 0x36, + 0x87, 0xf2, 0xa1, 0x37, 0xd8, 0x2d, 0x83, 0xf5, 0xdc, 0xd8, + 0xde, 0x9e, 0x69, 0xd6, 0xe1, 0x0d, 0xd5, 0x93, 0xc5, 0xee, + 0xba, 0xd3, 0x40, 0x71, 0xbb, 0xc7, 0xbb, 0x50, 0x1a, 0x10, + 0x80, 0x99, 0x62, 0x1c, 0xe3, 0x1f, 0xa2, 0xcc, 0x98, 0xe1, + 0xaa, 0xff, 0xd9, 0x69, 0xe7, 0x87, 0x04, 0x87, 0x76, 0xec, + 0x55, 0x18, 0xaf, 0x82, 0x34, 0x4d, 0x4f, 0xf7, 0x57, 0x1f, + 0xa5, 0x43, 0xcc, 0xe9, 0x7a, 0x4a, 0xc8, 0xb4, 0x1f, 0x61, + 0x40, 0x5e, 0x1d, 0x11, 0xdd, 0xdc, 0xdc, 0xb4, 0x57, 0xf9, + 0x47, 0x96, 0xbc, 0x47, 0x29, 0xf8, 0xf2, 0x43, 0xc4, 0xa0, + 0x8c, 0x14, 0x5e, 0x73, 0x52, 0xac, 0xac, 0x39, 0x3b, 0x06, + 0x19, 0x1a, 0xca, 0x22, 0xc8, 0x96, 0x12, 0x2e, 0x4c, 0x7b, + 0xa0, 0x96, 0x53, 0x16, 0xce, 0x6d, 0x6e, 0xac, 0xb2, 0x07, + 0x17, 0x22, 0x07, 0x30, 0x20, 0x84, 0x9b, 0x0e, 0x92, 0x31, + 0x07, 0xe2, 0x77, 0xcd, 0x6a, 0x3e, 0x16, 0x4f, 0xd6, 0x12, + 0x88, 0x8a, 0x70, 0x5a, 0x87, 0xd8, 0xb9, 0xef,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x98, 0xa0, 0x40, 0x2d, 0xc6, 0x56, 0x49, 0xca, 0x60, 0x16, + 0x9c, 0x38, 0xc9, 0xfe, 0x99, 0x15, 0xfb, 0x79, 0x01, 0x33, + 0xcd, 0x54, 0x2f, 0xf3, 0x70, 0x37, 0x82, 0x36, 0x32, 0x76, + 0x8f, 0x63, 0x00, 0xa2, 0x42, 0xce, 0x39, 0x90, 0xfc, 0xf8, + 0xff, 0x34, 0x38, 0x0a, 0x17, 0x5e, 0x9d, 0x34, 0x86, 0xde, + 0x33, 0x45, 0xac, 0xbf, 0x81, 0xdf, 0xd2, 0xbc, 0xc7, 0xd7, + 0xd1, 0xee, 0xde, 0x2b, 0x5b, 0x50, 0x56, 0xb5, 0x88, 0x00, + 0x92, 0x76, 0x5a, 0x34, 0x0c, 0xfe, 0x8f, 0xc5, 0xa0, 0x92, + 0xb0, 0xed, 0x43, 0xe7, 0x81, 0x39, 0x36, 0x6e, 0xb7, 0x4d, + 0x5b, 0xcf, 0xc7, 0xf0, 0x83, 0xe5, 0xdc, 0xb7, 0x74, 0xf4, + 0xf3, 0xbd, 0xa8, 0xa6, 0x7b, 0xe0, 0xc5, 0x50, 0xaa, 0xc7, + 0x83, 0x4d, 0xd9, 0xc5, 0x97, 0x03, 0x7c, 0x0c, 0x3b, 0x3a, + 0x18, 0xb2, 0x8c, 0xee, 0x67, 0x91, 0x38, 0x84, 0x8f, 0xef, + 0xb4, 0xf4, 0xe4, 0x7c, 0x1a, 0x3f, 0xa3, 0x0a, 0xd9, 0xba, + 0xff, 0x56, 0xd8, 0xe2, 0x82, 0xfc, 0x58, 0x8f, 0xf6, 0x12, + 0x10, 0x65, 0x6a, 0x68, 0x53, 0x2d, 0x9f, 0x2c, 0x77, 0xd1, + 0xb8, 0x21, 0x8a, 0xcb, 0xe9, 0xd4, 0x25, 0x18, 0x22, 0x46, + 0x3e, 0x72, 0x29, 0x2a, 0x68, 0x70, 0x73, 0xe2, 0x61, 0xa2, + 0xa8, 0x1f, 0x24, 0x48, 0x92, 0xa0, 0xd4, 0xdd, 0xde, 0xe5, + 0x02, 0x1b, 0x59, 0x5c, 0x7e, 0x92, 0x9c, 0xd8, 0xf4, 0x2d, + 0x6b, 0x79, 0x7b, 0xc7, 0xcd, 0xef, 0x21, 0x2a, 0x50, 0x7e, + 0xba, 0xdd, 0x02, 0x45, 0x7e, 0xc1, 0xdd, 0xeb, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x03, 0x0c, 0x15, 0x1c, 0x22, 0x28, +}; +static const int sizeof_bench_dilithium_level3_sig = + sizeof(bench_dilithium_level3_sig); +#endif + +#ifndef WOLFSSL_NO_ML_DSA_87 +static const unsigned char bench_dilithium_level5_sig[] = { + 0x78, 0xed, 0x1a, 0x3f, 0x41, 0xab, 0xf8, 0x93, 0x80, 0xf0, + 0xc6, 0xbf, 0x4a, 0xde, 0xaf, 0x29, 0x93, 0xe5, 0x9a, 0xbf, + 0x38, 0x08, 0x18, 0x33, 0xca, 0x7d, 0x5e, 0x65, 0xa4, 0xd2, + 0xd7, 0x45, 0xe3, 0xe7, 0x58, 0xfb, 0x05, 0xab, 0x65, 0x57, + 0xac, 0x6f, 0xf5, 0x43, 0x28, 0x5f, 0x9c, 0x9a, 0x3e, 0x35, + 0x84, 0xe4, 0xef, 0xa5, 0x57, 0x17, 0xad, 0x51, 0x44, 0x70, + 0x09, 0x00, 0x81, 0xbe, 0xfe, 0x14, 0x01, 0xfe, 0x0c, 0x94, + 0xbe, 0xa9, 0x89, 0xfd, 0x47, 0xfc, 0xb9, 0xd8, 0x17, 0x4d, + 0xd8, 0x73, 0xd5, 0x50, 0x9f, 0x13, 0x6c, 0x07, 0x71, 0x47, + 0xaa, 0x3c, 0xc0, 0x64, 0x00, 0x19, 0x2e, 0x74, 0x51, 0x0e, + 0x0f, 0x25, 0x30, 0x7f, 0x13, 0x96, 0xc6, 0xc5, 0xbf, 0x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0xfd, 0x0d, 0x47, 0x33, 0xef, 0xb9, 0x75, 0x05, 0x86, 0x5d, + 0xd3, 0x98, 0xa6, 0x91, 0xe6, 0x8c, 0xe2, 0x71, 0x7a, 0x95, + 0xe0, 0x8c, 0x54, 0x4b, 0x68, 0x4d, 0x5a, 0xec, 0xad, 0xae, + 0x54, 0x4e, 0x3b, 0x0e, 0xcd, 0x70, 0xe6, 0x81, 0xbf, 0xf4, + 0x86, 0xab, 0xfe, 0xd8, 0xed, 0x69, 0xdd, 0x0f, 0x75, 0x8f, + 0x8e, 0xcd, 0x72, 0x40, 0x21, 0xee, 0x80, 0x6f, 0x9e, 0xa0, + 0x80, 0xf7, 0xf6, 0xa2, 0xf5, 0x04, 0x82, 0xea, 0xb6, 0xb1, + 0xa3, 0xfe, 0xa2, 0x2d, 0x83, 0xc7, 0x01, 0x4b, 0x27, 0x19, + 0x6a, 0x31, 0x04, 0x70, 0xce, 0x75, 0x22, 0x4b, 0x7a, 0x21, + 0x29, 0xfd, 0xe9, 0xcb, 0xbb, 0xca, 0x95, 0x0a, 0xd8, 0xcd, + 0x20, 0x2a, 0xb7, 0xbe, 0xdf, 0x2f, 0x0f, 0xfa, 0xf1, 0xc0, + 0x39, 0xf3, 0x74, 0x22, 0x05, 0x33, 0xca, 0x2a, 0x9c, 0x9f, + 0x06, 0x71, 0x90, 0x1e, 0x74, 0x4b, 0xbe, 0x9a, 0xc7, 0x1e, + 0x37, 0x9b, 0x96, 0x19, 0xfd, 0xa0, 0x61, 0x87, 0x93, 0xab, + 0x75, 0x79, 0xac, 0x2f, 0x83, 0xe1, 0x8c, 0x70, 0x54, 0x70, + 0x01, 0x93, 0xce, 0x76, 0x7a, 0x08, 0xe7, 0x75, 0xfb, 0x5e, + 0xa4, 0xcc, 0xd6, 0xeb, 0x90, 0xe2, 0x57, 0x07, 0x53, 0x88, + 0x8f, 0x7f, 0x29, 0x39, 0x80, 0xc4, 0x7f, 0x70, 0x6f, 0xff, + 0x44, 0x25, 0x2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 0x8d, 0x79, 0xb5, 0xdd, 0x47, 0x74, 0x6e, + 0xe8, 0x8f, 0x50, 0xf5, 0xa7, 0x9e, 0xd1, 0x74, 0x10, 0xbb, + 0xf4, 0x8f, 0x8f, 0x0d, 0xcd, 0x1f, 0xf6, 0x59, 0xb8, 0x6c, + 0xd2, 0x37, 0x83, 0x28, 0xb2, 0x36, 0xc1, 0x39, 0x5b, 0xde, + 0x59, 0xee, 0x77, 0xa2, 0x6e, 0x67, 0xc6, 0xea, 0x1d, 0x2b, + 0x41, 0x8f, 0x6f, 0x96, 0x94, 0x1b, 0x5d, 0xab, 0x30, 0x53, + 0x1e, 0xf8, 0x17, 0x06, 0xea, 0xcc, 0x98, 0xa8, 0xdf, 0x81, + 0xe1, 0x80, 0xb7, 0xad, 0x69, 0xcb, 0x8f, 0x81, 0x1e, 0x76, + 0x75, 0x3c, 0x11, 0x9b, 0x38, 0x95, 0xa7, 0x87, 0x1f, 0xd9, + 0x76, 0x82, 0x21, 0x13, 0x25, 0x20, 0x42, 0xd3, 0x8c, 0xd9, + 0x1c, 0x64, 0xed, 0xe9, 0x55, 0xb5, 0x29, 0x98, 0x85, 0x7c, + 0x01, 0x94, 0xaa, 0xdd, 0x8c, 0x78, 0x08, 0x99, 0x99, 0x5a, + 0xf6, 0x61, 0x4c, 0xe0, 0x99, 0xf8, 0x15, 0x74, 0x2e, 0x0d, + 0x14, 0x89, 0x11, 0x84, 0xcd, 0x78, 0x0c, 0x6b, 0x48, 0xde, + 0xb4, 0xd6, 0x05, 0xbd, 0x99, 0x58, 0xb7, 0xe5, 0xc5, 0x7a, + 0x43, 0x18, 0x55, 0x33, 0x16, 0x2b, 0xfa, 0x27, 0xf5, 0xbb, + 0xaa, 0x52, 0xb5, 0x28, 0x5c, 0xfe, 0x61, 0x7f, 0x7a, 0x70, + 0xc2, 0x32, 0x4b, 0x05, 0x8d, 0x7b, 0x4d, 0x22, 0x57, 0x25, + 0x40, 0x46, 0x7c, 0xad, 0x2f, 0x8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x21, + 0x3e, 0xdd, 0x7b, 0x1f, 0x19, 0x9f, 0x53, 0xe6, 0xab, 0xc0, + 0x56, 0xba, 0x80, 0x19, 0x5d, 0x3f, 0xc7, 0xe2, 0xfb, 0x8c, + 0xe2, 0x93, 0xe0, 0x31, 0xc9, 0x33, 0x31, 0x23, 0x31, 0xa1, + 0x36, 0x4c, 0x62, 0xd8, 0x0a, 0xfd, 0x85, 0x97, 0xae, 0xa9, + 0xe9, 0x58, 0x29, 0x17, 0x33, 0x09, 0x5a, 0x8e, 0xa3, 0x90, + 0x41, 0xd3, 0xfc, 0x24, 0x98, 0x61, 0x4d, 0x30, 0x1f, 0x76, + 0x8f, 0xfc, 0xd0, 0x96, 0x8b, 0x2e, 0x9b, 0x24, 0x73, 0x35, + 0x00, 0xb7, 0xf6, 0xe8, 0xba, 0xec, 0x98, 0x74, 0x41, 0xa4, + 0x47, 0x10, 0x0d, 0xbc, 0xba, 0xd1, 0xe7, 0xdb, 0x12, 0xcb, + 0x5f, 0x02, 0xb1, 0xa6, 0xa0, 0xd7, 0x28, 0x30, 0x3e, 0x0a, + 0x5c, 0x5f, 0xe6, 0x2f, 0x3c, 0xde, 0x46, 0x60, 0xaf, 0x07, + 0x5f, 0xed, 0x08, 0xc0, 0x06, 0x58, 0xba, 0xd7, 0x36, 0x5b, + 0xa0, 0x4a, 0xf7, 0xa1, 0x05, 0x9b, 0x00, 0xda, 0x49, 0xdc, + 0xbf, 0xea, 0xe1, 0x03, 0xda, 0x95, 0x95, 0xa0, 0xfa, 0x2e, + 0xf1, 0x60, 0x11, 0x47, 0xdd, 0xb3, 0xfb, 0x0b, 0xa2, 0x92, + 0xcf, 0x73, 0xbb, 0xce, 0x82, 0x71, 0xbc, 0xbd, 0x50, 0x64, + 0xf1, 0x96, 0x48, 0x48, 0x93, 0xf8, 0xdc, 0x1c, 0x18, 0x12, + 0xc6, 0x17, 0x6a, 0xa9, 0xc1, 0x4d, 0x6f, 0x76, 0xda, 0x2f, + 0x4e, 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 0x1f, 0x28, 0xbb, 0xcc, 0x1a, 0xd2, + 0x2d, 0xa6, 0x9e, 0xe0, 0xdc, 0xf0, 0x98, 0x16, 0x58, 0x88, + 0xc6, 0xf1, 0x81, 0x71, 0x91, 0x8f, 0xa2, 0xab, 0xa5, 0xe6, + 0x68, 0x1f, 0xa5, 0x86, 0xb5, 0xd9, 0x05, 0xba, 0x50, 0x67, + 0x0b, 0x1e, 0xfe, 0x42, 0x50, 0xf8, 0x01, 0xf8, 0x38, 0x92, + 0x57, 0x86, 0x08, 0x47, 0xee, 0x23, 0x11, 0x60, 0x61, 0x1a, + 0x77, 0x3c, 0x1a, 0x8e, 0x08, 0xe3, 0xaf, 0x84, 0x04, 0x75, + 0x15, 0x47, 0x7a, 0x83, 0x8e, 0x92, 0x3e, 0xe8, 0xf0, 0xc2, + 0x81, 0x89, 0x3b, 0x73, 0x81, 0xe5, 0xe8, 0x97, 0x97, 0x63, + 0x64, 0xf3, 0xa9, 0x1b, 0x61, 0x65, 0x7f, 0x0e, 0x47, 0x6b, + 0x14, 0x57, 0x29, 0x8f, 0x91, 0x35, 0x43, 0x10, 0x12, 0x86, + 0x99, 0xec, 0xc8, 0x9e, 0x67, 0x90, 0x20, 0x21, 0x3c, 0x83, + 0xdb, 0x73, 0x4e, 0x8e, 0x7d, 0x86, 0xde, 0xb8, 0xd8, 0xfa, + 0x23, 0x1f, 0x5a, 0xe4, 0xc7, 0x0c, 0x1d, 0x5e, 0xd1, 0x10, + 0x58, 0xd5, 0x86, 0xfa, 0x40, 0x30, 0x0a, 0x78, 0x0a, 0xa5, + 0x56, 0xd5, 0xe6, 0x86, 0xd4, 0x14, 0x77, 0x32, 0xcd, 0x07, + 0xf9, 0xbe, 0x7a, 0xd8, 0xbc, 0x91, 0xe0, 0xda, 0x76, 0x6b, + 0x97, 0x10, 0xda, 0xea, 0x27, 0xa2, 0x67, 0x6d, 0x94, 0x27, + 0x6e, 0xea, 0xca, 0x56, 0x45, 0x32, 0x1d, 0x38,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, 0xe7, 0x68, 0xf0, 0x31, + 0x4c, 0x9c, 0xb0, 0x5f, 0x89, 0xca, 0xfe, 0xc2, 0xf0, 0x1e, + 0xeb, 0xee, 0x75, 0x64, 0xea, 0x09, 0xd4, 0x1c, 0x72, 0x12, + 0xd4, 0x31, 0xf0, 0x89, 0x71, 0x74, 0x6e, 0x01, 0x32, 0xca, + 0x8a, 0x91, 0x0c, 0xdf, 0xd7, 0x05, 0xe9, 0x35, 0xed, 0x06, + 0x1a, 0x17, 0x5a, 0xf3, 0x65, 0xc5, 0xbd, 0x37, 0xf2, 0x53, + 0x49, 0x2f, 0xcd, 0xc6, 0x15, 0xb3, 0x36, 0x88, 0xd8, 0x7a, + 0x2f, 0xfa, 0x21, 0x7f, 0x55, 0x20, 0xc6, 0xf4, 0x23, 0x59, + 0x6b, 0x3c, 0xeb, 0xe5, 0xd3, 0x78, 0xdc, 0x31, 0xeb, 0x87, + 0x86, 0x3d, 0x7c, 0x10, 0x64, 0x66, 0xa4, 0xad, 0x07, 0xe1, + 0x93, 0x15, 0x07, 0x4c, 0xe4, 0xb4, 0x4a, 0x06, 0xca, 0x2a, + 0x50, 0xa2, 0x85, 0xc6, 0xa1, 0x19, 0x89, 0x7f, 0x8a, 0x05, + 0x00, 0x23, 0x72, 0x5f, 0x89, 0x74, 0x8e, 0x22, 0xa1, 0x5d, + 0x26, 0xf9, 0xfe, 0xdf, 0x6d, 0x98, 0x3a, 0xc4, 0x7c, 0x93, + 0xcf, 0xc4, 0xfe, 0xed, 0x98, 0xb0, 0x31, 0x4c, 0x81, 0x83, + 0x0d, 0x5d, 0x3d, 0x0c, 0x27, 0x4e, 0xca, 0xcf, 0x38, 0x0c, + 0x37, 0xb0, 0xf8, 0xc5, 0xc8, 0x52, 0x14, 0xec, 0x53, 0x80, + 0xb9, 0xd8, 0x8a, 0x05, 0x4e, 0x31, 0x3d, 0x67, 0x57, 0xf0, + 0x7a, 0xa2, 0xc5, 0xc9, 0x02, 0x25, 0x69, 0x83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0xf9, + 0x24, 0x96, 0x87, 0x2a, 0x91, 0x89, 0xb6, 0xce, 0x04, 0xdf, + 0xfc, 0x13, 0x42, 0x19, 0xba, 0x14, 0x46, 0x20, 0x08, 0x47, + 0xe1, 0x82, 0x57, 0x51, 0x74, 0x3b, 0x5b, 0x23, 0x5c, 0xb2, + 0x85, 0x8c, 0xed, 0xe6, 0xda, 0x4d, 0x56, 0xe8, 0x61, 0x31, + 0xec, 0x97, 0x27, 0xeb, 0xf2, 0xa7, 0x7c, 0x13, 0x1b, 0xc5, + 0x44, 0xfe, 0x63, 0x4b, 0x2b, 0x33, 0x22, 0x23, 0x60, 0x86, + 0x7c, 0x3b, 0x57, 0xba, 0x16, 0xde, 0x47, 0x04, 0x3e, 0x2b, + 0xe5, 0xbd, 0x23, 0xa0, 0xab, 0xdf, 0x5d, 0x6e, 0x20, 0xb1, + 0x37, 0x44, 0xcb, 0xbd, 0x03, 0xa9, 0x5c, 0xe6, 0x92, 0x5e, + 0x2f, 0x6f, 0x95, 0xc6, 0x5b, 0x6d, 0xab, 0x39, 0xdd, 0x1e, + 0x34, 0xd5, 0x21, 0xca, 0x92, 0xee, 0x59, 0xf0, 0xb9, 0x65, + 0xe6, 0x81, 0x49, 0xf8, 0x11, 0xec, 0x45, 0x14, 0x6a, 0x19, + 0xb4, 0xce, 0xbf, 0x9e, 0xf7, 0x32, 0x8d, 0x99, 0x78, 0xc3, + 0x07, 0x3d, 0xfd, 0x18, 0x2d, 0x0e, 0x06, 0x2f, 0x27, 0x24, + 0x6f, 0x16, 0xd8, 0x01, 0x33, 0xc8, 0xbb, 0x7f, 0x7d, 0xfa, + 0x73, 0xf6, 0x7d, 0x54, 0xf2, 0xd4, 0x8a, 0x53, 0xe1, 0x62, + 0x45, 0xf4, 0x01, 0xa6, 0x31, 0x6b, 0x3a, 0x06, 0x56, 0xfd, + 0x79, 0x7f, 0x58, 0xd8, 0x47, 0x33, 0x53, 0xc5, 0x78, 0x70, + 0xce, 0x81, 0x7f,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1, 0x69, 0xa8, 0xb8, 0xa9, 0x2e, + 0x9b, 0x7b, 0x89, 0x8d, 0xff, 0x86, 0x01, 0x51, 0x42, 0xde, + 0x04, 0xd6, 0x1d, 0xd1, 0x29, 0x8d, 0x42, 0x46, 0x5f, 0xd6, + 0x02, 0xde, 0x73, 0xee, 0x2d, 0xe9, 0x6e, 0xb0, 0x3f, 0xf0, + 0x47, 0x72, 0xfe, 0x45, 0xff, 0x05, 0x82, 0x2d, 0xc6, 0x4f, + 0xc9, 0xd3, 0xec, 0xf9, 0x5a, 0x22, 0x50, 0x6c, 0x4f, 0x1e, + 0xc8, 0x5f, 0xfc, 0x2c, 0x04, 0x4f, 0xdf, 0xce, 0xe4, 0x18, + 0xd2, 0xd7, 0x8b, 0x67, 0x83, 0x39, 0x96, 0x47, 0x5e, 0x5b, + 0xad, 0x7f, 0x5d, 0x42, 0x56, 0x97, 0x71, 0x39, 0x28, 0x44, + 0x9d, 0x35, 0xde, 0xde, 0x03, 0x20, 0x34, 0x44, 0xdb, 0xdf, + 0xfc, 0xff, 0x1e, 0x3d, 0x58, 0x5f, 0x7a, 0x8e, 0x90, 0xa1, + 0xd3, 0xeb, 0x0c, 0x23, 0x3f, 0x4e, 0x61, 0x77, 0x79, 0xb2, + 0xdc, 0xfb, 0x21, 0x46, 0x5c, 0x82, 0xb6, 0xf6, 0x34, 0x3c, + 0x3f, 0x45, 0x4b, 0x80, 0x9e, 0xa4, 0xe6, 0x02, 0x13, 0x38, + 0x40, 0x7e, 0x87, 0x92, 0x96, 0x51, 0x63, 0x87, 0xae, 0xc8, + 0x02, 0x6a, 0x70, 0xc8, 0xcd, 0xd0, 0xe2, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, + 0x12, 0x1c, 0x22, 0x2b, 0x33, 0x38, 0x3f, +}; +static const int sizeof_bench_dilithium_level5_sig = + sizeof(bench_dilithium_level5_sig); +#endif + +#endif /* !WOLFSSL_DILITHIUM_NO_VERIFY */ + + void bench_dilithiumKeySign(byte level) { int ret = 0; dilithium_key key; double start; int i, count; +#if !defined(WOLFSSL_DILITHIUM_NO_SIGN) || !defined(WOLFSSL_DILITHIUM_NO_VERIFY) byte sig[DILITHIUM_MAX_SIG_SIZE]; byte msg[512]; word32 x = 0; +#endif const char**desc = bench_desc_words[lng_index]; DECLARE_MULTI_VALUE_STATS_VARS() + byte params = 0; + + if (level == 2) { + params = 44; + } + else if (level == 3) { + params = 65; + } + else if (level == 5) { + params = 87; + } + +#if !defined(WOLFSSL_DILITHIUM_NO_SIGN) || !defined(WOLFSSL_DILITHIUM_NO_VERIFY) + /* make dummy msg */ + for (i = 0; i < (int)sizeof(msg); i++) { + msg[i] = (byte)i; + } +#endif ret = wc_dilithium_init(&key); if (ret != 0) { @@ -12586,46 +13663,77 @@ void bench_dilithiumKeySign(byte level) printf("wc_dilithium_set_level() failed %d\n", ret); } - if (ret == 0) { - ret = -1; - if (level == 2) { - ret = wc_dilithium_import_private_key(bench_dilithium_level2_key, - sizeof_bench_dilithium_level2_key, NULL, 0, &key); - } - else if (level == 3) { - ret = wc_dilithium_import_private_key(bench_dilithium_level3_key, - sizeof_bench_dilithium_level3_key, NULL, 0, &key); - } - else if (level == 5) { - ret = wc_dilithium_import_private_key(bench_dilithium_level5_key, - sizeof_bench_dilithium_level5_key, NULL, 0, &key); +#ifndef WOLFSSL_DILITHIUM_NO_MAKE_KEY + bench_stats_start(&count, &start); + do { + for (i = 0; i < agreeTimes; i++) { + ret = wc_dilithium_make_key(&key, GLOBAL_RNG); + if (ret != 0) { + printf("wc_dilithium_import_private_key failed %d\n", ret); + return; + } } + count += i; + } while (bench_stats_check(start) +#ifdef MULTI_VALUE_STATISTICS + || runs < minimum_runs +#endif + ); - if (ret != 0) { - printf("wc_dilithium_import_private_key failed %d\n", ret); - } + if (ret == 0) { + bench_stats_asym_finish("ML-DSA", params, desc[2], 0, count, + start, ret); + #ifdef MULTI_VALUE_STATISTICS + bench_multi_value_stats(max, min, sum, squareSum, runs); + #endif } - /* make dummy msg */ - for (i = 0; i < (int)sizeof(msg); i++) { - msg[i] = (byte)i; +#elif !defined WOLFSSL_DILITHIUM_NO_SIGN + +#ifndef WOLFSSL_NO_ML_DSA_44 + if (level == 2) { + ret = wc_dilithium_import_private(bench_dilithium_level2_key, + sizeof_bench_dilithium_level2_key, &key); } +#endif +#ifndef WOLFSSL_NO_ML_DSA_65 + if (level == 3) { + ret = wc_dilithium_import_private(bench_dilithium_level3_key, + sizeof_bench_dilithium_level3_key, &key); + } +#endif +#ifndef WOLFSSL_NO_ML_DSA_87 + if (level == 5) { + ret = wc_dilithium_import_private(bench_dilithium_level5_key, + sizeof_bench_dilithium_level5_key, &key); + } +#endif + if (ret != 0) { + printf("Failed to load private key\n"); + return; + } + +#endif + +#ifndef WOLFSSL_DILITHIUM_NO_SIGN + if (level == 2) { + x = DILITHIUM_LEVEL2_SIG_SIZE; + } + else if (level == 3) { + x = DILITHIUM_LEVEL3_SIG_SIZE; + } + else { + x = DILITHIUM_LEVEL5_SIG_SIZE; + } + + RESET_MULTI_VALUE_STATS_VARS(); bench_stats_start(&count, &start); do { for (i = 0; i < agreeTimes; i++) { if (ret == 0) { - if (level == 2) { - x = DILITHIUM_LEVEL2_SIG_SIZE; - } - else if (level == 3) { - x = DILITHIUM_LEVEL3_SIG_SIZE; - } - else { - x = DILITHIUM_LEVEL5_SIG_SIZE; - } - - ret = wc_dilithium_sign_msg(msg, sizeof(msg), sig, &x, &key, GLOBAL_RNG); + ret = wc_dilithium_sign_msg(msg, sizeof(msg), sig, &x, &key, + GLOBAL_RNG); if (ret != 0) { printf("wc_dilithium_sign_msg failed\n"); } @@ -12640,13 +13748,57 @@ void bench_dilithiumKeySign(byte level) ); if (ret == 0) { - bench_stats_asym_finish("DILITHIUM", level, desc[4], 0, count, start, + bench_stats_asym_finish("ML-DSA", params, desc[4], 0, count, start, ret); #ifdef MULTI_VALUE_STATISTICS bench_multi_value_stats(max, min, sum, squareSum, runs); #endif } +#endif + +#if !defined(WOLFSSL_DILITHIUM_NO_VERIFY) && \ + (defined(WOLFSSL_DILITHIUM_NO_SIGN) || \ + defined(WOLFSSL_DILITHIUM_NO_MAKE_KEY)) + +#ifndef WOLFSSL_NO_ML_DSA_44 + if (level == 2) { + #ifdef WOLFSSL_DILITHIUM_NO_SIGN + x = sizeof_bench_dilithium_level2_sig; + XMEMCPY(sig, bench_dilithium_level2_sig, x); + #endif + ret = wc_dilithium_import_public(bench_dilithium_level2_pubkey, + sizeof_bench_dilithium_level2_pubkey, &key); + } +#endif +#ifndef WOLFSSL_NO_ML_DSA_65 + if (level == 3) { + #ifdef WOLFSSL_DILITHIUM_NO_SIGN + x = sizeof_bench_dilithium_level3_sig; + XMEMCPY(sig, bench_dilithium_level3_sig, x); + #endif + ret = wc_dilithium_import_public(bench_dilithium_level3_pubkey, + sizeof_bench_dilithium_level3_pubkey, &key); + } +#endif +#ifndef WOLFSSL_NO_ML_DSA_87 + if (level == 5) { + #ifdef WOLFSSL_DILITHIUM_NO_SIGN + x = sizeof_bench_dilithium_level5_sig; + XMEMCPY(sig, bench_dilithium_level5_sig, x); + #endif + ret = wc_dilithium_import_public(bench_dilithium_level5_pubkey, + sizeof_bench_dilithium_level5_pubkey, &key); + } +#endif + if (ret != 0) { + printf("Failed to load public key\n"); + return; + } + +#endif + +#ifndef WOLFSSL_DILITHIUM_NO_VERIFY RESET_MULTI_VALUE_STATS_VARS(); bench_stats_start(&count, &start); @@ -12673,12 +13825,13 @@ void bench_dilithiumKeySign(byte level) ); if (ret == 0) { - bench_stats_asym_finish("DILITHIUM", level, desc[5], 0, count, start, + bench_stats_asym_finish("ML-DSA", params, desc[5], 0, count, start, ret); #ifdef MULTI_VALUE_STATISTICS bench_multi_value_stats(max, min, sum, squareSum, runs); #endif } +#endif wc_dilithium_free(&key); } @@ -12841,7 +13994,6 @@ void bench_sphincsKeySign(byte level, byte optim) wc_sphincs_free(&key); } #endif /* HAVE_SPHINCS */ -#endif /* HAVE_PQC */ #if defined(_WIN32) && !defined(INTIME_RTOS) @@ -13371,14 +14523,14 @@ static void Usage(void) print_alg(bench_asym_opt[i].str, &line); for (i=0; bench_other_opt[i].str != NULL; i++) print_alg(bench_other_opt[i].str, &line); -#if defined(HAVE_PQC) && defined(HAVE_LIBOQS) +#if defined(HAVE_FALCON) || defined(HAVE_DILITHIUM) || defined(HAVE_SPHINCS) for (i=0; bench_pq_asym_opt[i].str != NULL; i++) print_alg(bench_pq_asym_opt[i].str, &line); -#if defined(HAVE_LIBOQS) && defined(HAVE_SPHINCS) +#if defined(HAVE_SPHINCS) for (i=0; bench_pq_asym_opt2[i].str != NULL; i++) print_alg(bench_pq_asym_opt2[i].str, &line); -#endif /* HAVE_LIBOQS && HAVE_SPHINCS */ -#endif /* HAVE_PQC */ +#endif /* HAVE_SPHINCS */ +#endif #if defined(BENCH_PQ_STATEFUL_HBS) for (i=0; bench_pq_hash_sig_opt[i].str != NULL; i++) print_alg(bench_pq_hash_sig_opt[i].str, &line); @@ -13647,7 +14799,8 @@ int wolfcrypt_benchmark_main(int argc, char** argv) optMatched = 1; } } - #if defined(HAVE_PQC) && defined(HAVE_LIBOQS) + #if defined(HAVE_FALCON) || defined(HAVE_DILITHIUM) || \ + defined(HAVE_SPHINCS) /* Known asymmetric post-quantum algorithms */ for (i=0; !optMatched && bench_pq_asym_opt[i].str != NULL; i++) { if (string_matches(argv[1], bench_pq_asym_opt[i].str)) { @@ -13675,7 +14828,7 @@ int wolfcrypt_benchmark_main(int argc, char** argv) } } #endif - #endif /* HAVE_PQC */ + #endif /* Other known cryptographic algorithms */ for (i=0; !optMatched && bench_other_opt[i].str != NULL; i++) { if (string_matches(argv[1], bench_other_opt[i].str)) { diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index 11f8ae160b..7754f6ec53 100644 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -166,16 +166,14 @@ ASN Options: #include #endif -#ifdef HAVE_PQC - #if defined(HAVE_FALCON) +#if defined(HAVE_FALCON) #include - #endif - #if defined(HAVE_DILITHIUM) +#endif +#if defined(HAVE_DILITHIUM) #include - #endif - #if defined(HAVE_SPHINCS) +#endif +#if defined(HAVE_SPHINCS) #include - #endif #endif #ifdef WOLFSSL_QNX_CAAM @@ -4200,7 +4198,6 @@ static word32 SetBitString16Bit(word16 val, byte* output) #ifdef HAVE_ED448 static const byte sigEd448Oid[] = {43, 101, 113}; #endif /* HAVE_ED448 */ -#ifdef HAVE_PQC #ifdef HAVE_FALCON /* Falcon Level 1: 1 3 9999 3 6 */ static const byte sigFalcon_Level1Oid[] = {43, 206, 15, 3, 6}; @@ -4246,7 +4243,6 @@ static word32 SetBitString16Bit(word16 val, byte* output) static const byte sigSphincsSmall_Level5Oid[] = {43, 206, 15, 6, 9, 7}; #endif /* HAVE_SPHINCS */ -#endif /* HAVE_PQC */ /* keyType */ #ifndef NO_DSA @@ -4276,7 +4272,6 @@ static word32 SetBitString16Bit(word16 val, byte* output) #ifndef NO_DH static const byte keyDhOid[] = {42, 134, 72, 134, 247, 13, 1, 3, 1}; #endif /* !NO_DH */ -#ifdef HAVE_PQC #ifdef HAVE_FALCON /* Falcon Level 1: 1 3 9999 3 6 */ static const byte keyFalcon_Level1Oid[] = {43, 206, 15, 3, 6}; @@ -4322,7 +4317,6 @@ static word32 SetBitString16Bit(word16 val, byte* output) static const byte keySphincsSmall_Level5Oid[] = {43, 206, 15, 6, 9, 7}; #endif /* HAVE_SPHINCS */ -#endif /* HAVE_PQC */ /* curveType */ #ifdef HAVE_ECC @@ -4830,7 +4824,6 @@ const byte* OidFromId(word32 id, word32 type, word32* oidSz) *oidSz = sizeof(sigEd448Oid); break; #endif - #ifdef HAVE_PQC #ifdef HAVE_FALCON case CTC_FALCON_LEVEL1: oid = sigFalcon_Level1Oid; @@ -4881,7 +4874,6 @@ const byte* OidFromId(word32 id, word32 type, word32* oidSz) *oidSz = sizeof(sigSphincsSmall_Level5Oid); break; #endif /* HAVE_SPHINCS */ - #endif /* HAVE_PQC */ default: break; } @@ -4943,7 +4935,6 @@ const byte* OidFromId(word32 id, word32 type, word32* oidSz) *oidSz = sizeof(keyDhOid); break; #endif /* !NO_DH */ - #ifdef HAVE_PQC #ifdef HAVE_FALCON case FALCON_LEVEL1k: oid = keyFalcon_Level1Oid; @@ -4994,7 +4985,6 @@ const byte* OidFromId(word32 id, word32 type, word32* oidSz) *oidSz = sizeof(keySphincsSmall_Level5Oid); break; #endif /* HAVE_SPHINCS */ - #endif /* HAVE_PQC */ default: break; } @@ -5875,7 +5865,7 @@ static int GetOID(const byte* input, word32* inOutIdx, word32* oid, const byte* checkOid = NULL; word32 checkOidSz; #endif /* NO_VERIFY_OID */ -#ifdef HAVE_PQC +#if defined(HAVE_SPHINCS) word32 found_collision = 0; #endif (void)oidType; @@ -5887,7 +5877,7 @@ static int GetOID(const byte* input, word32* inOutIdx, word32* oid, actualOidSz = (word32)length; #endif /* NO_VERIFY_OID */ -#if defined(HAVE_PQC) && defined(HAVE_LIBOQS) && defined(HAVE_SPHINCS) +#if defined(HAVE_SPHINCS) /* Since we are summing it up, there could be collisions...and indeed there * are: SPHINCS_FAST_LEVEL1 and SPHINCS_FAST_LEVEL3. * @@ -5901,7 +5891,7 @@ static int GetOID(const byte* input, word32* inOutIdx, word32* oid, sizeof(sigSphincsFast_Level3Oid)) == 0) { found_collision = SPHINCS_FAST_LEVEL3k; } -#endif /* HAVE_PQC */ +#endif /* HAVE_SPHINCS */ /* Sum it up for now. */ while (length--) { @@ -5910,11 +5900,11 @@ static int GetOID(const byte* input, word32* inOutIdx, word32* oid, idx++; } -#ifdef HAVE_PQC +#ifdef HAVE_SPHINCS if (found_collision) { *oid = found_collision; } -#endif /* HAVE_PQC */ +#endif /* HAVE_SPHINCS */ /* Return the index after the OID data. */ *inOutIdx = idx; @@ -7565,7 +7555,6 @@ int wc_CheckPrivateKey(const byte* privKey, word32 privKeySz, } else #endif /* HAVE_ED448 && HAVE_ED448_KEY_IMPORT && !NO_ASN_CRYPT */ - #if defined(HAVE_PQC) #if defined(HAVE_FALCON) if ((ks == FALCON_LEVEL1k) || (ks == FALCON_LEVEL5k)) { #ifdef WOLFSSL_SMALL_STACK @@ -7627,7 +7616,8 @@ int wc_CheckPrivateKey(const byte* privKey, word32 privKeySz, } else #endif /* HAVE_FALCON */ - #if defined(HAVE_DILITHIUM) +#if defined(HAVE_DILITHIUM) && !defined(WOLFSSL_DILITHIUM_NO_SIGN) && \ + !defined(WOLFSSL_DILITHIUM_NO_VERIFY) && !defined(WOLFSSL_DILITHIUM_NO_ASN1) if ((ks == DILITHIUM_LEVEL2k) || (ks == DILITHIUM_LEVEL3k) || (ks == DILITHIUM_LEVEL5k)) { @@ -7685,7 +7675,7 @@ int wc_CheckPrivateKey(const byte* privKey, word32 privKeySz, #endif } else - #endif /* HAVE_DILITHIUM */ +#endif /* HAVE_DILITHIUM && !WOLFSSL_DILITHIUM_VERIFY_ONLY */ #if defined(HAVE_SPHINCS) if ((ks == SPHINCS_FAST_LEVEL1k) || (ks == SPHINCS_FAST_LEVEL3k) || @@ -7757,7 +7747,6 @@ int wc_CheckPrivateKey(const byte* privKey, word32 privKeySz, } else #endif /* HAVE_SPHINCS */ - #endif /* HAVE_PQC */ { ret = 0; } @@ -8102,7 +8091,6 @@ int wc_GetKeyOID(byte* key, word32 keySz, const byte** curveOID, word32* oidSz, XFREE(ed448, heap, DYNAMIC_TYPE_TMP_BUFFER); } #endif /* HAVE_ED448 && HAVE_ED448_KEY_IMPORT && !NO_ASN_CRYPT */ -#if defined(HAVE_PQC) #if defined(HAVE_FALCON) if (*algoID == 0) { falcon_key *falcon = (falcon_key *)XMALLOC(sizeof(*falcon), heap, @@ -8138,7 +8126,8 @@ int wc_GetKeyOID(byte* key, word32 keySz, const byte** curveOID, word32* oidSz, XFREE(falcon, heap, DYNAMIC_TYPE_TMP_BUFFER); } #endif /* HAVE_FALCON */ -#if defined(HAVE_DILITHIUM) +#if defined(HAVE_DILITHIUM) && !defined(WOLFSSL_DILITHIUM_NO_SIGN) && \ + !defined(WOLFSSL_DILITHIUM_NO_VERIFY) && !defined(WOLFSSL_DILITHIUM_NO_ASN1) if (*algoID == 0) { dilithium_key *dilithium = (dilithium_key *)XMALLOC(sizeof(*dilithium), heap, DYNAMIC_TYPE_TMP_BUFFER); @@ -8184,7 +8173,7 @@ int wc_GetKeyOID(byte* key, word32 keySz, const byte** curveOID, word32* oidSz, } XFREE(dilithium, heap, DYNAMIC_TYPE_TMP_BUFFER); } -#endif /* HAVE_DILITHIUM */ +#endif /* HAVE_DILITHIUM && !WOLFSSL_DILITHIUM_VERIFY_ONLY */ #if defined(HAVE_SPHINCS) if (*algoID == 0) { sphincs_key *sphincs = (sphincs_key *)XMALLOC(sizeof(*sphincs), @@ -8262,7 +8251,6 @@ int wc_GetKeyOID(byte* key, word32 keySz, const byte** curveOID, word32* oidSz, XFREE(sphincs, heap, DYNAMIC_TYPE_TMP_BUFFER); } #endif /* HAVE_SPHINCS */ -#endif /* HAVE_PQC */ /* if flag is not set then this is not a key that we understand. */ if (*algoID == 0) { @@ -11554,8 +11542,8 @@ static int GetCertHeader(DecodedCert* cert) } #endif -#if defined(HAVE_ED25519) || defined(HAVE_ED448) || (defined(HAVE_PQC) && \ - defined(HAVE_LIBOQS)) +#if defined(HAVE_ED25519) || defined(HAVE_ED448) || defined(HAVE_FALCON) || \ + defined(HAVE_DILITHIUM) || defined(HAVE_SPHINCS) /* Store the key data under the BIT_STRING in dynamically allocated data. * * @param [in, out] cert Certificate object. @@ -12628,7 +12616,6 @@ static int GetCertKey(DecodedCert* cert, const byte* source, word32* inOutIdx, ret = StoreKey(cert, source, &srcIdx, maxIdx); break; #endif /* HAVE_ED448 */ - #if defined(HAVE_PQC) && defined(HAVE_LIBOQS) #ifdef HAVE_FALCON case FALCON_LEVEL1k: cert->pkCurveOID = FALCON_LEVEL1k; @@ -12679,7 +12666,6 @@ static int GetCertKey(DecodedCert* cert, const byte* source, word32* inOutIdx, ret = StoreKey(cert, source, &srcIdx, maxIdx); break; #endif /* HAVE_SPHINCS */ - #endif /* HAVE_PQC */ #ifndef NO_DSA case DSAk: cert->publicKey = source + pubIdx; @@ -15983,7 +15969,6 @@ static WC_INLINE int IsSigAlgoECC(word32 algoOID) #ifdef HAVE_CURVE448 || (algoOID == X448k) #endif - #ifdef HAVE_PQC #ifdef HAVE_FACON || (algoOID == FALCON_LEVEL1k) || (algoOID == FALCON_LEVEL5k) @@ -16001,7 +15986,6 @@ static WC_INLINE int IsSigAlgoECC(word32 algoOID) || (algoOID == SPHINCS_SMALL_LEVEL3k) || (algoOID == SPHINCS_SMALL_LEVEL5k) #endif - #endif /* HAVE_PQC */ ); } @@ -16319,7 +16303,6 @@ void FreeSignatureCtx(SignatureCtx* sigCtx) sigCtx->key.ed448 = NULL; break; #endif /* HAVE_ED448 */ - #if defined(HAVE_PQC) #if defined(HAVE_FALCON) case FALCON_LEVEL1k: case FALCON_LEVEL5k: @@ -16352,7 +16335,6 @@ void FreeSignatureCtx(SignatureCtx* sigCtx) sigCtx->key.sphincs = NULL; break; #endif /* HAVE_SPHINCS */ - #endif /* HAVE_PQC */ default: break; } /* switch (keyOID) */ @@ -16498,7 +16480,6 @@ static int HashForSignature(const byte* buf, word32 bufSz, word32 sigOID, */ break; #endif - #ifdef HAVE_PQC #ifdef HAVE_FALCON case CTC_FALCON_LEVEL1: case CTC_FALCON_LEVEL5: @@ -16522,7 +16503,6 @@ static int HashForSignature(const byte* buf, word32 bufSz, word32 sigOID, /* Hashes done in signing operation. */ break; #endif - #endif /* HAVE_PQC */ default: ret = HASH_TYPE_E; @@ -16902,7 +16882,6 @@ static int ConfirmSignature(SignatureCtx* sigCtx, break; } #endif - #if defined(HAVE_PQC) #if defined(HAVE_FALCON) case FALCON_LEVEL1k: { @@ -16959,7 +16938,9 @@ static int ConfirmSignature(SignatureCtx* sigCtx, break; } #endif /* HAVE_FALCON */ - #if defined(HAVE_DILITHIUM) + #if defined(HAVE_DILITHIUM) && \ + !defined(WOLFSSL_DILITHIUM_NO_VERIFY) && \ + !defined(WOLFSSL_DILITHIUM_NO_ASN1) case DILITHIUM_LEVEL2k: { word32 idx = 0; @@ -17200,7 +17181,6 @@ static int ConfirmSignature(SignatureCtx* sigCtx, break; } #endif /* HAVE_SPHINCS */ - #endif /* HAVE_PQC */ default: WOLFSSL_MSG("Verify Key type unknown"); ret = ASN_UNKNOWN_OID_E; @@ -17356,7 +17336,6 @@ static int ConfirmSignature(SignatureCtx* sigCtx, break; } #endif - #if defined(HAVE_PQC) #if defined(HAVE_FALCON) case FALCON_LEVEL1k: case FALCON_LEVEL5k: @@ -17367,7 +17346,7 @@ static int ConfirmSignature(SignatureCtx* sigCtx, break; } #endif /* HAVE_FALCON */ - #if defined(HAVE_DILITHIUM) + #if defined(HAVE_DILITHIUM) && !defined(WOLFSSL_DILITHIUM_NO_VERIFY) case DILITHIUM_LEVEL2k: case DILITHIUM_LEVEL3k: case DILITHIUM_LEVEL5k: @@ -17392,7 +17371,6 @@ static int ConfirmSignature(SignatureCtx* sigCtx, break; } #endif /* HAVE_SPHINCS */ - #endif /* HAVE_PQC */ default: break; } /* switch (keyOID) */ @@ -17545,7 +17523,6 @@ static int ConfirmSignature(SignatureCtx* sigCtx, break; } #endif /* HAVE_ED448 */ - #ifdef HAVE_PQC #ifdef HAVE_FALCON case FALCON_LEVEL1k: { @@ -17675,7 +17652,6 @@ static int ConfirmSignature(SignatureCtx* sigCtx, break; } #endif /* HAVE_SPHINCS */ - #endif /* HAVE_PQC */ default: break; } /* switch (keyOID) */ @@ -24430,7 +24406,6 @@ wcchar END_PUB_KEY = "-----END PUBLIC KEY-----"; wcchar BEGIN_EDDSA_PRIV = "-----BEGIN EDDSA PRIVATE KEY-----"; wcchar END_EDDSA_PRIV = "-----END EDDSA PRIVATE KEY-----"; #endif -#if defined(HAVE_PQC) #if defined(HAVE_FALCON) wcchar BEGIN_FALCON_LEVEL1_PRIV = "-----BEGIN FALCON_LEVEL1 PRIVATE KEY-----"; wcchar END_FALCON_LEVEL1_PRIV = "-----END FALCON_LEVEL1 PRIVATE KEY-----"; @@ -24460,7 +24435,6 @@ wcchar END_PUB_KEY = "-----END PUBLIC KEY-----"; wcchar BEGIN_SPHINCS_SMALL_LEVEL5_PRIV = "-----BEGIN SPHINCS_SMALL_LEVEL5 PRIVATE KEY-----"; wcchar END_SPHINCS_SMALL_LEVEL5_PRIV = "-----END SPHINCS_SMALL_LEVEL5 PRIVATE KEY-----"; #endif /* HAVE_SPHINCS */ -#endif /* HAVE_PQC */ const int pem_struct_min_sz = XSTR_SIZEOF("-----BEGIN X509 CRL-----" "-----END X509 CRL-----"); @@ -24568,7 +24542,6 @@ int wc_PemGetHeaderFooter(int type, const char** header, const char** footer) ret = 0; break; #endif -#ifdef HAVE_PQC #ifdef HAVE_FALCON case FALCON_LEVEL1_TYPE: if (header) *header = BEGIN_FALCON_LEVEL1_PRIV; @@ -24630,7 +24603,6 @@ int wc_PemGetHeaderFooter(int type, const char** header, const char** footer) ret = 0; break; #endif /* HAVE_SPHINCS */ -#endif /* HAVE_PQC */ case PUBLICKEY_TYPE: case ECC_PUBLICKEY_TYPE: if (header) *header = BEGIN_PUB_KEY; @@ -28485,7 +28457,7 @@ static int EncodePublicKey(int keyType, byte* output, int outLen, } break; #endif - #if defined(HAVE_PQC) && defined(HAVE_FALCON) + #if defined(HAVE_FALCON) case FALCON_LEVEL1_KEY: case FALCON_LEVEL5_KEY: ret = wc_Falcon_PublicKeyToDer(falconKey, output, @@ -28494,8 +28466,8 @@ static int EncodePublicKey(int keyType, byte* output, int outLen, ret = PUBLIC_KEY_E; } break; - #endif /* HAVE_PQC && HAVE_FALCON */ - #if defined(HAVE_PQC) && defined(HAVE_DILITHIUM) + #endif /* HAVE_FALCON */ + #if defined(HAVE_DILITHIUM) && !defined(WOLFSSL_DILITHIUM_NO_ASN1) case DILITHIUM_LEVEL2_KEY: case DILITHIUM_LEVEL3_KEY: case DILITHIUM_LEVEL5_KEY: @@ -28505,8 +28477,8 @@ static int EncodePublicKey(int keyType, byte* output, int outLen, ret = PUBLIC_KEY_E; } break; - #endif /* HAVE_PQC && HAVE_DILITHIUM */ - #if defined(HAVE_PQC) && defined(HAVE_SPHINCS) + #endif /* HAVE_DILITHIUM */ + #if defined(HAVE_SPHINCS) case SPHINCS_FAST_LEVEL1_KEY: case SPHINCS_FAST_LEVEL3_KEY: case SPHINCS_FAST_LEVEL5_KEY: @@ -28519,7 +28491,7 @@ static int EncodePublicKey(int keyType, byte* output, int outLen, ret = PUBLIC_KEY_E; } break; - #endif /* HAVE_PQC && HAVE_SPHINCS */ + #endif /* HAVE_SPHINCS */ default: ret = PUBLIC_KEY_E; break; @@ -29308,7 +29280,6 @@ static int EncodeCert(Cert* cert, DerCert* der, RsaKey* rsaKey, ecc_key* eccKey, } #endif -#if defined(HAVE_PQC) #if defined(HAVE_FALCON) if ((cert->keyType == FALCON_LEVEL1_KEY) || (cert->keyType == FALCON_LEVEL5_KEY)) { @@ -29320,7 +29291,7 @@ static int EncodeCert(Cert* cert, DerCert* der, RsaKey* rsaKey, ecc_key* eccKey, (word32)sizeof(der->publicKey), 1); } #endif /* HAVE_FALCON */ -#if defined(HAVE_DILITHIUM) +#if defined(HAVE_DILITHIUM) && !defined(WOLFSSL_DILITHIUM_NO_ASN1) if ((cert->keyType == DILITHIUM_LEVEL2_KEY) || (cert->keyType == DILITHIUM_LEVEL3_KEY) || (cert->keyType == DILITHIUM_LEVEL5_KEY)) { @@ -29347,7 +29318,6 @@ static int EncodeCert(Cert* cert, DerCert* der, RsaKey* rsaKey, ecc_key* eccKey, (word32)sizeof(der->publicKey), 1); } #endif /* HAVE_SPHINCS */ -#endif /* HAVE_PQC */ if (der->publicKeySz <= 0) return PUBLIC_KEY_E; @@ -29853,7 +29823,6 @@ static int MakeSignature(CertSignCtx* certSignCtx, const byte* buf, word32 sz, } #endif /* HAVE_ED448 && HAVE_ED448_SIGN */ - #if defined(HAVE_PQC) #if defined(HAVE_FALCON) if (!rsaKey && !eccKey && !ed25519Key && !ed448Key && falconKey) { word32 outSz = sigSz; @@ -29880,7 +29849,6 @@ static int MakeSignature(CertSignCtx* certSignCtx, const byte* buf, word32 sz, ret = outSz; } #endif /* HAVE_SPHINCS */ - #endif /* HAVE_PQC */ break; } @@ -30097,7 +30065,6 @@ static int MakeAnyCert(Cert* cert, byte* derBuffer, word32 derSz, cert->keyType = ED25519_KEY; else if (ed448Key) cert->keyType = ED448_KEY; -#ifdef HAVE_PQC #ifdef HAVE_FALCON else if ((falconKey != NULL) && (falconKey->level == 1)) cert->keyType = FALCON_LEVEL1_KEY; @@ -30132,7 +30099,6 @@ static int MakeAnyCert(Cert* cert, byte* derBuffer, word32 derSz, && (sphincsKey->optim == SMALL_VARIANT)) cert->keyType = SPHINCS_SMALL_LEVEL5_KEY; #endif /* HAVE_SPHINCS */ -#endif /* HAVE_PQC */ else return BAD_FUNC_ARG; @@ -30192,7 +30158,6 @@ static int MakeAnyCert(Cert* cert, byte* derBuffer, word32 derSz, else if (ed448Key) { cert->keyType = ED448_KEY; } -#ifdef HAVE_PQC #ifdef HAVE_FALCON else if ((falconKey != NULL) && (falconKey->level == 1)) { cert->keyType = FALCON_LEVEL1_KEY; @@ -30238,7 +30203,6 @@ static int MakeAnyCert(Cert* cert, byte* derBuffer, word32 derSz, cert->keyType = SPHINCS_SMALL_LEVEL5_KEY; } #endif /* HAVE_SPHINCS */ -#endif /* HAVE_PQC */ else { ret = BAD_FUNC_ARG; } @@ -30813,7 +30777,6 @@ static int EncodeCertReq(Cert* cert, DerCert* der, RsaKey* rsaKey, (word32)sizeof(der->publicKey), 1); } #endif -#if defined(HAVE_PQC) #if defined(HAVE_FALCON) if ((cert->keyType == FALCON_LEVEL1_KEY) || (cert->keyType == FALCON_LEVEL5_KEY)) { @@ -30823,7 +30786,7 @@ static int EncodeCertReq(Cert* cert, DerCert* der, RsaKey* rsaKey, der->publicKey, (word32)sizeof(der->publicKey), 1); } #endif -#if defined(HAVE_DILITHIUM) +#if defined(HAVE_DILITHIUM) && !defined(WOLFSSL_DILITHIUM_NO_ASN1) if ((cert->keyType == DILITHIUM_LEVEL2_KEY) || (cert->keyType == DILITHIUM_LEVEL3_KEY) || (cert->keyType == DILITHIUM_LEVEL5_KEY)) { @@ -30846,7 +30809,6 @@ static int EncodeCertReq(Cert* cert, DerCert* der, RsaKey* rsaKey, der->publicKey, (word32)sizeof(der->publicKey), 1); } #endif -#endif /* HAVE_PQC */ if (der->publicKeySz <= 0) return PUBLIC_KEY_E; @@ -31172,7 +31134,6 @@ static int MakeCertReq(Cert* cert, byte* derBuffer, word32 derSz, cert->keyType = ED25519_KEY; else if (ed448Key) cert->keyType = ED448_KEY; -#ifdef HAVE_PQC #ifdef HAVE_FALCON else if ((falconKey != NULL) && (falconKey->level == 1)) cert->keyType = FALCON_LEVEL1_KEY; @@ -31207,7 +31168,6 @@ static int MakeCertReq(Cert* cert, byte* derBuffer, word32 derSz, && (sphincsKey->optim == SMALL_VARIANT)) cert->keyType = SPHINCS_SMALL_LEVEL5_KEY; #endif /* HAVE_SPHINCS */ -#endif /* HAVE_PQC */ else return BAD_FUNC_ARG; @@ -31268,7 +31228,6 @@ static int MakeCertReq(Cert* cert, byte* derBuffer, word32 derSz, else if (ed448Key != NULL) { cert->keyType = ED448_KEY; } -#ifdef HAVE_PQC #ifdef HAVE_FALCON else if ((falconKey != NULL) && (falconKey->level == 1)) { cert->keyType = FALCON_LEVEL1_KEY; @@ -31314,7 +31273,6 @@ static int MakeCertReq(Cert* cert, byte* derBuffer, word32 derSz, cert->keyType = SPHINCS_SMALL_LEVEL5_KEY; } #endif /* HAVE_SPHINCS */ -#endif /* HAVE_PQC */ else { ret = BAD_FUNC_ARG; } @@ -31853,14 +31811,13 @@ static int SetKeyIdFromPublicKey(Cert *cert, RsaKey *rsakey, ecc_key *eckey, bufferSz = wc_Ed448PublicKeyToDer(ed448Key, buf, MAX_PUBLIC_KEY_SZ, 0); } #endif -#if defined(HAVE_PQC) #if defined(HAVE_FALCON) if (falconKey != NULL) { bufferSz = wc_Falcon_PublicKeyToDer(falconKey, buf, MAX_PUBLIC_KEY_SZ, 0); } #endif -#if defined(HAVE_DILITHIUM) +#if defined(HAVE_DILITHIUM) && !defined(WOLFSSL_DILITHIUM_NO_ASN1) if (dilithiumKey != NULL) { bufferSz = wc_Dilithium_PublicKeyToDer(dilithiumKey, buf, MAX_PUBLIC_KEY_SZ, 0); @@ -31872,7 +31829,6 @@ static int SetKeyIdFromPublicKey(Cert *cert, RsaKey *rsakey, ecc_key *eckey, MAX_PUBLIC_KEY_SZ, 0); } #endif -#endif /* HAVE_PQC */ if (bufferSz <= 0) { XFREE(buf, cert->heap, DYNAMIC_TYPE_TMP_BUFFER); @@ -34785,13 +34741,11 @@ enum { || (defined(HAVE_CURVE25519) && defined(HAVE_CURVE25519_KEY_IMPORT)) \ || (defined(HAVE_ED448) && defined(HAVE_ED448_KEY_IMPORT)) \ || (defined(HAVE_CURVE448) && defined(HAVE_CURVE448_KEY_IMPORT)) \ - || (defined(HAVE_PQC) && defined(HAVE_FALCON)) \ - || (defined(HAVE_PQC) && defined(HAVE_DILITHIUM)) \ - || (defined(HAVE_PQC) && defined(HAVE_SPHINCS))) + || defined(HAVE_FALCON) || defined(HAVE_DILITHIUM) || defined(HAVE_SPHINCS)) -int DecodeAsymKey(const byte* input, word32* inOutIdx, word32 inSz, - byte* privKey, word32* privKeyLen, - byte* pubKey, word32* pubKeyLen, int keyType) +int DecodeAsymKey_Assign(const byte* input, word32* inOutIdx, word32 inSz, + const byte** privKey, word32* privKeyLen, + const byte** pubKey, word32* pubKeyLen, int keyType) { #ifndef WOLFSSL_ASN_TEMPLATE word32 oid; @@ -34846,12 +34800,9 @@ int DecodeAsymKey(const byte* input, word32* inOutIdx, word32 inSz, endKeyIdx = (int)*inOutIdx; } - if ((word32)privSz > *privKeyLen) - return BUFFER_E; - if (endKeyIdx == (int)*inOutIdx) { *privKeyLen = (word32)privSz; - XMEMCPY(privKey, priv, *privKeyLen); + *privKey = priv; if (pubKeyLen != NULL) *pubKeyLen = 0; } @@ -34865,17 +34816,14 @@ int DecodeAsymKey(const byte* input, word32* inOutIdx, word32 inSz, return ASN_PARSE_E; } - if ((word32)pubSz > *pubKeyLen) - return BUFFER_E; - pub = input + *inOutIdx; *inOutIdx += (word32)pubSz; *privKeyLen = (word32)privSz; - XMEMCPY(privKey, priv, *privKeyLen); + *privKey = priv; *pubKeyLen = (word32)pubSz; if (pubKey != NULL) - XMEMCPY(pubKey, pub, *pubKeyLen); + *pubKey = pub; } if (endKeyIdx != (int)*inOutIdx) return ASN_PARSE_E; @@ -34899,33 +34847,22 @@ int DecodeAsymKey(const byte* input, word32* inOutIdx, word32 inSz, } } } - /* Check the private value length is correct. */ - if ((ret == 0) && dataASN[EDKEYASN_IDX_PKEY_CURVEPKEY].data.ref.length - > *privKeyLen) { - ret = ASN_PARSE_E; + if (ret == 0) { + /* Import private value. */ + *privKeyLen = dataASN[EDKEYASN_IDX_PKEY_CURVEPKEY].data.ref.length; + *privKey = dataASN[EDKEYASN_IDX_PKEY_CURVEPKEY].data.ref.data; } if ((ret == 0) && dataASN[EDKEYASN_IDX_PUBKEY].tag == 0) { - *privKeyLen = dataASN[EDKEYASN_IDX_PKEY_CURVEPKEY].data.ref.length; - XMEMCPY(privKey, dataASN[EDKEYASN_IDX_PKEY_CURVEPKEY].data.ref.data, - *privKeyLen); + /* Set public length to 0 as not seen. */ if (pubKeyLen != NULL) *pubKeyLen = 0; } - else if ((ret == 0) && - (pubKeyLen != NULL) && - (dataASN[EDKEYASN_IDX_PUBKEY].data.ref.length > *pubKeyLen)) { - ret = ASN_PARSE_E; - } else if (ret == 0) { - /* Import private and public value. */ - *privKeyLen = dataASN[EDKEYASN_IDX_PKEY_CURVEPKEY].data.ref.length; - XMEMCPY(privKey, dataASN[EDKEYASN_IDX_PKEY_CURVEPKEY].data.ref.data, - *privKeyLen); + /* Import public value. */ if (pubKeyLen != NULL) *pubKeyLen = dataASN[EDKEYASN_IDX_PUBKEY].data.ref.length; if (pubKey != NULL && pubKeyLen != NULL) - XMEMCPY(pubKey, dataASN[EDKEYASN_IDX_PUBKEY].data.ref.data, - *pubKeyLen); + *pubKey = dataASN[EDKEYASN_IDX_PUBKEY].data.ref.data; } FREE_ASNGETDATA(dataASN, NULL); @@ -34933,8 +34870,46 @@ int DecodeAsymKey(const byte* input, word32* inOutIdx, word32 inSz, #endif /* WOLFSSL_ASN_TEMPLATE */ } -int DecodeAsymKeyPublic(const byte* input, word32* inOutIdx, word32 inSz, +int DecodeAsymKey(const byte* input, word32* inOutIdx, word32 inSz, + byte* privKey, word32* privKeyLen, byte* pubKey, word32* pubKeyLen, int keyType) +{ + int ret = 0; + const byte* privKeyPtr = NULL; + const byte* pubKeyPtr = NULL; + word32 privKeyPtrLen = 0; + word32 pubKeyPtrLen = 0; + + if (privKey == NULL) { + ret = BAD_FUNC_ARG; + } + + if (ret == 0) { + ret = DecodeAsymKey_Assign(input, inOutIdx, inSz, &privKeyPtr, + &privKeyPtrLen, &pubKeyPtr, &pubKeyPtrLen, keyType); + } + if ((ret == 0) && (privKeyPtrLen > *privKeyLen)) { + ret = BUFFER_E; + } + if ((ret == 0) && (pubKeyLen != NULL) && (pubKeyPtrLen > *pubKeyLen)) { + ret = BUFFER_E; + } + if ((ret == 0) && (privKeyPtr != NULL)) { + XMEMCPY(privKey, privKeyPtr, privKeyPtrLen); + *privKeyLen = privKeyPtrLen; + } + if ((ret == 0) && (pubKey != NULL) && (pubKeyPtr != NULL)) { + XMEMCPY(pubKey, pubKeyPtr, pubKeyPtrLen); + } + if ((ret == 0) && (pubKeyLen != NULL)) { + *pubKeyLen = pubKeyPtrLen; + } + + return ret; +} + +int DecodeAsymKeyPublic_Assign(const byte* input, word32* inOutIdx, word32 inSz, + const byte** pubKey, word32* pubKeyLen, int keyType) { int ret = 0; #ifndef WOLFSSL_ASN_TEMPLATE @@ -34967,17 +34942,13 @@ int DecodeAsymKeyPublic(const byte* input, word32* inOutIdx, word32 inSz, if (ret != 0) return ret; - /* check that the value found is not too large for pubKey buffer */ - if ((word32)length > *pubKeyLen) - return ASN_PARSE_E; - /* check that input buffer is exhausted */ if (*inOutIdx + (word32)length != inSz) return ASN_PARSE_E; /* This is the raw point data compressed or uncompressed. */ *pubKeyLen = (word32)length; - XMEMCPY(pubKey, input + *inOutIdx, *pubKeyLen); + *pubKey = input + *inOutIdx; #else len = inSz - *inOutIdx; @@ -34998,11 +34969,6 @@ int DecodeAsymKeyPublic(const byte* input, word32* inOutIdx, word32 inSz, if (*inOutIdx != inSz) ret = ASN_PARSE_E; } - /* Check the public value length is correct. */ - if ((ret == 0) && - (dataASN[EDPUBKEYASN_IDX_PUBKEY].data.ref.length > *pubKeyLen)) { - ret = ASN_PARSE_E; - } /* Check that the all the buffer was used. */ if ((ret == 0) && (GetASNItem_Length(dataASN[EDPUBKEYASN_IDX_SEQ], input) != len)) { @@ -35010,14 +34976,39 @@ int DecodeAsymKeyPublic(const byte* input, word32* inOutIdx, word32 inSz, } if (ret == 0) { *pubKeyLen = dataASN[EDPUBKEYASN_IDX_PUBKEY].data.ref.length; - XMEMCPY(pubKey, dataASN[EDPUBKEYASN_IDX_PUBKEY].data.ref.data, - *pubKeyLen); + *pubKey = dataASN[EDPUBKEYASN_IDX_PUBKEY].data.ref.data; } FREE_ASNGETDATA(dataASN, NULL); #endif /* WOLFSSL_ASN_TEMPLATE */ return ret; } + +int DecodeAsymKeyPublic(const byte* input, word32* inOutIdx, word32 inSz, + byte* pubKey, word32* pubKeyLen, int keyType) +{ + int ret = 0; + const byte* pubKeyPtr = NULL; + word32 pubKeyPtrLen = 0; + + if (pubKey == NULL) { + ret = BAD_FUNC_ARG; + } + + if (ret == 0) { + ret = DecodeAsymKeyPublic_Assign(input, inOutIdx, inSz, &pubKeyPtr, + &pubKeyPtrLen, keyType); + } + if ((ret == 0) && (pubKeyPtrLen > *pubKeyLen)) { + ret = BUFFER_E; + } + if ((ret == 0) && (pubKeyPtr != NULL)) { + XMEMCPY(pubKey, pubKeyPtr, pubKeyPtrLen); + *pubKeyLen = pubKeyPtrLen; + } + + return ret; +} #endif #endif /* WC_ENABLE_ASYM_KEY_IMPORT */ diff --git a/wolfcrypt/src/cryptocb.c b/wolfcrypt/src/cryptocb.c index a3d0a393a9..e4943abca1 100644 --- a/wolfcrypt/src/cryptocb.c +++ b/wolfcrypt/src/cryptocb.c @@ -785,7 +785,7 @@ int wc_CryptoCb_Ed25519Verify(const byte* sig, word32 sigLen, } #endif /* HAVE_ED25519 */ -#if defined(HAVE_PQC) && defined(WOLFSSL_HAVE_KYBER) +#if defined(WOLFSSL_HAVE_KYBER) int wc_CryptoCb_PqcKemGetDevId(int type, void* key) { int devId = INVALID_DEVID; @@ -794,11 +794,9 @@ int wc_CryptoCb_PqcKemGetDevId(int type, void* key) return devId; /* get devId */ -#if defined(WOLFSSL_HAVE_KYBER) if (type == WC_PQC_KEM_TYPE_KYBER) { devId = ((KyberKey*) key)->devId; } -#endif return devId; } @@ -906,9 +904,9 @@ int wc_CryptoCb_PqcDecapsulate(const byte* ciphertext, word32 ciphertextLen, return wc_CryptoCb_TranslateErrorCode(ret); } -#endif /* HAVE_PQC && WOLFSSL_HAVE_KYBER */ +#endif /* WOLFSSL_HAVE_KYBER */ -#if defined(HAVE_PQC) && (defined(HAVE_FALCON) || defined(HAVE_DILITHIUM)) +#if defined(HAVE_FALCON) || defined(HAVE_DILITHIUM) int wc_CryptoCb_PqcSigGetDevId(int type, void* key) { int devId = INVALID_DEVID; @@ -1068,7 +1066,7 @@ int wc_CryptoCb_PqcSignatureCheckPrivKey(void* key, int type, return wc_CryptoCb_TranslateErrorCode(ret); } -#endif /* HAVE_PQC && (HAVE_FALCON || HAVE_DILITHIUM) */ +#endif /* HAVE_FALCON || HAVE_DILITHIUM */ #ifndef NO_AES #ifdef HAVE_AESGCM diff --git a/wolfcrypt/src/dilithium.c b/wolfcrypt/src/dilithium.c index ef94ed8f83..fcd7b9d7d2 100644 --- a/wolfcrypt/src/dilithium.c +++ b/wolfcrypt/src/dilithium.c @@ -19,86 +19,5439 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA */ -/* Based on ed448.c and Reworked for Dilithium by Anthony Hu. */ +/* Based on ed448.c and Reworked for Dilithium by Anthony Hu. + * WolfSSL implementation by Sean Parkinson. + */ + +/* Possible Dilithium/ML-DSA options: + * + * HAVE_DILITHIUM Default: OFF + * Enables the code in this file to be compiled. + * WOLFSSL_WC_DILITHIUM Default: OFF + * Compiles the wolfSSL implementation of dilithium. + * + * WOLFSSL_NO_ML_DSA_44 Default: OFF + * Does not compile in parameter set ML-DSA-44 and any code specific to that + * parameter set. + * WOLFSSL_NO_ML_DSA_65 Default: OFF + * Does not compile in parameter set ML-DSA-65 and any code specific to that + * parameter set. + * WOLFSSL_NO_ML_DSA_87 Default: OFF + * Does not compile in parameter set ML-DSA-87 and any code specific to that + * parameter set. + * + * WOLFSSL_DILITHIUM_NO_LARGE_CODE Default: OFF + * Compiles smaller, fast code with speed trade-off. + * WOLFSSL_DILITHIUM_SMALL Default: OFF + * Compiles to small code size with a speed trade-off. + * WOLFSSL_DILITHIUM_VERIFY_ONLY Default: OFF + * Compiles in only the verification and public key operations. + * WOLFSSL_DILITHIUM_VERIFY_SMALL_MEM Default: OFF + * Compiles verification implementation that uses smaller amounts of memory. + * WOLFSSL_DILITHIUM_VERIFY_NO_MALLOC + * Only works with WOLFSSL_DILITHIUM_VERIFY_SMALL_MEM. + * Don't allocate memory with XMALLOC. Memory is pinned against key. + * WOLFSSL_DILITHIUM_ASSIGN_KEY + * Key data is assigned into Dilithium key rather than copied. + * Life of key data passed in is tightly coupled to life of Dilithium key. + * Cannot be used when make key is enabled. + * + * WOLFSSL_DILITHIUM_ALIGNMENT Default: 8 + * Use to indicate whether loading and storing of words needs to be aligned. + * Default is to use WOLFSSL_GENERAL_ALIGNMENT - should be 4 on some ARM CPUs. + * Set this value explicitly if specific Dilithium implementation alignment is + * needed. + * + * WOLFSSL_DILITHIUM_NO_ASN1 Default: OFF + * Disables any ASN.1 encoding or decoding code. + * + * WC_DILITHIUM_CACHE_MATRIX_A Default: OFF + * Enable caching of the A matrix on import. + * Less work is required in sign and verify operations. + * WC_DILITHIUM_CACHE_PRIV_VECTORS Default: OFF + * Enable caching of private key vectors on import. + * Enables WC_DILITHIUM_CACHE_MATRIX_A. + * Less work is required in sign operations. + * WC_DILITHIUM_CACHE_PUB_VECTORS Default: OFF + * Enable caching of public key vectors on import. + * Enables WC_DILITHIUM_CACHE_MATRIX_A. + * Less work is required in sign operations. + * + * DILITHIUM_MUL_SLOW Default: OFF + * Define when multiplying by Q / 44 is slower than masking. + * Only applies to ML-DSA-44. + * DILITHIUM_MUL_44_SLOW Default: OFF + * Define when multiplying by 44 is slower than by 11. + * Only applies to ML-DSA-44. + * DILITHIUM_MUL_11_SLOW Default: OFF + * Define when multiplying by 11 is slower than adding and shifting. + * Only applies to ML-DSA-44. + * DILITHIUM_MUL_QINV_SLOW Default: OFF + * Define when multiplying by QINV 0x3802001 is slower than add, subtract and + * shift equivalent. + * DILITHIUM_MUL_Q_SLOW Default: OFF + * Define when multiplying by Q 0x7fe001 is slower than add, subtract and + * shift equivalent. + */ + + +#ifdef HAVE_CONFIG_H + #include +#endif + +/* in case user set HAVE_PQC there */ +#include + +#ifndef WOLFSSL_DILITHIUM_NO_ASN1 +#include +#endif + +#if defined(HAVE_DILITHIUM) + +#ifdef HAVE_LIBOQS +#include +#endif + +#include +#include +#include +#ifdef NO_INLINE + #include +#else + #define WOLFSSL_MISC_INCLUDED + #include +#endif + +#ifdef WOLFSSL_WC_DILITHIUM + +#ifdef DEBUG_DILITHIUM +void print_polys(const char* name, const sword32* a, int d1, int d2); +void print_polys(const char* name, const sword32* a, int d1, int d2) +{ + int i; + int j; + int k; + + fprintf(stderr, "%s\n", name); + for (i = 0; i < d1; i++) { + for (j = 0; j < d2; j++) { + for (k = 0; k < 256; k++) { + fprintf(stderr, "%9d,", a[(i*d2*256) + (j*256) + k]); + if ((k % 8) == 7) fprintf(stderr, "\n"); + } + fprintf(stderr, "\n"); + } + } +} + +void print_data(const char* name, const byte* d, int len); +void print_data(const char* name, const byte* d, int len) +{ + int i; + + fprintf(stderr, "%s\n", name); + for (i = 0; i < len; i++) { + fprintf(stderr, "0x%02x,", d[i]); + if ((i % 16) == 15) fprintf(stderr, "\n"); + } + fprintf(stderr, "\n"); +} +#endif + +#if defined(WOLFSSL_NO_ML_DSA_44) && defined(WOLFSSL_NO_ML_DSA_65) && \ + defined(WOLFSSL_NO_ML_DSA_87) + #error "No Dilithium parameters chosen" +#endif + +#if defined(WOLFSSL_DILITHIUM_ASSIGN_KEY) && \ + !defined(WOLFSSL_DILITHIUM_NO_MAKE_KEY) + #error "Cannot use assign key when making keys" +#endif + + +/* Number of bytes from first block to use for sign. */ +#define DILITHIUM_SIGN_BYTES 8 + + +/* Length of seed in bytes when generating y. */ +#define DILITHIUM_Y_SEED_SZ (DILITHIUM_PRIV_RAND_SEED_SZ + 2) + + +/* Length of seed in bytes used in generating matrix a. */ +#define DILITHIUM_GEN_A_SEED_SZ (DILITHIUM_PUB_SEED_SZ + 2) +/* Length of seed in bytes used in generating vectors s1 and s2. */ +#define DILITHIUM_GEN_S_SEED_SZ (DILITHIUM_PRIV_SEED_SZ + 2) + + +/* MAX: (256 * 8 / (17 + 1)) = 576, or ((256 * 8 / (19 + 1)) = 640 + * but need blocks of 17 * 8 bytes: 5 * 17 * 8 = 680 */ +#define DILITHIUM_MAX_V_BLOCKS 5 +/* Maximum number of bytes to generate into v to make y. */ +#define DILITHIUM_MAX_V (DILITHIUM_MAX_V_BLOCKS * 8 * 17) + + +/* 2 blocks, each block 136 bytes = 272 bytes. + * ETA 2: Min req is 128 but reject rate is 2 in 16 so we need 146.3 on average. + * ETA 4: Min req is 128 but reject rate is 7 in 16 so we need 227.6 on average. + */ +#define DILITHIUM_GEN_S_NBLOCKS 2 +/* Number of bytes to generate with SHAKE-256 when generating s1 and s2. */ +#define DILITHIUM_GEN_S_BYTES \ + (DILITHIUM_GEN_S_NBLOCKS * WC_SHA3_256_COUNT * 8) +/* Number of bytes to a block of SHAKE-256 when generating s1 and s2. */ +#define DILITHIUM_GEN_S_BLOCK_BYTES (WC_SHA3_256_COUNT * 8) + + +/* The ML-DSA parameters sets. */ +static const wc_dilithium_params dilithium_params[] = { +#ifndef WOLFSSL_NO_ML_DSA_44 + { WC_ML_DSA_44, PARAMS_ML_DSA_44_K, PARAMS_ML_DSA_44_L, + PARAMS_ML_DSA_44_ETA, PARAMS_ML_DSA_44_ETA_BITS, + PARAMS_ML_DSA_44_TAU, PARAMS_ML_DSA_44_BETA, PARAMS_ML_DSA_44_OMEGA, + PARAMS_ML_DSA_44_LAMBDA, + PARAMS_ML_DSA_44_GAMMA1_BITS, PARAMS_ML_DSA_44_GAMMA2, + PARAMS_ML_DSA_44_W1_ENC_SZ, PARAMS_ML_DSA_44_A_SIZE, + PARAMS_ML_DSA_44_S1_SIZE, PARAMS_ML_DSA_44_S1_ENC_SIZE, + PARAMS_ML_DSA_44_S2_SIZE, PARAMS_ML_DSA_44_S2_ENC_SIZE, + PARAMS_ML_DSA_44_Z_ENC_SIZE, + PARAMS_ML_DSA_44_PK_SIZE, PARAMS_ML_DSA_44_SIG_SIZE }, +#endif +#ifndef WOLFSSL_NO_ML_DSA_65 + { WC_ML_DSA_65, PARAMS_ML_DSA_65_K, PARAMS_ML_DSA_65_L, + PARAMS_ML_DSA_65_ETA, PARAMS_ML_DSA_65_ETA_BITS, + PARAMS_ML_DSA_65_TAU, PARAMS_ML_DSA_65_BETA, PARAMS_ML_DSA_65_OMEGA, + PARAMS_ML_DSA_65_LAMBDA, + PARAMS_ML_DSA_65_GAMMA1_BITS, PARAMS_ML_DSA_65_GAMMA2, + PARAMS_ML_DSA_65_W1_ENC_SZ, PARAMS_ML_DSA_65_A_SIZE, + PARAMS_ML_DSA_65_S1_SIZE, PARAMS_ML_DSA_65_S1_ENC_SIZE, + PARAMS_ML_DSA_65_S2_SIZE, PARAMS_ML_DSA_65_S2_ENC_SIZE, + PARAMS_ML_DSA_65_Z_ENC_SIZE, + PARAMS_ML_DSA_65_PK_SIZE, PARAMS_ML_DSA_65_SIG_SIZE }, +#endif +#ifndef WOLFSSL_NO_ML_DSA_87 + { WC_ML_DSA_87, PARAMS_ML_DSA_87_K, PARAMS_ML_DSA_87_L, + PARAMS_ML_DSA_87_ETA, PARAMS_ML_DSA_87_ETA_BITS, + PARAMS_ML_DSA_87_TAU, PARAMS_ML_DSA_87_BETA, PARAMS_ML_DSA_87_OMEGA, + PARAMS_ML_DSA_87_LAMBDA, + PARAMS_ML_DSA_87_GAMMA1_BITS, PARAMS_ML_DSA_87_GAMMA2, + PARAMS_ML_DSA_87_W1_ENC_SZ, PARAMS_ML_DSA_87_A_SIZE, + PARAMS_ML_DSA_87_S1_SIZE, PARAMS_ML_DSA_87_S1_ENC_SIZE, + PARAMS_ML_DSA_87_S2_SIZE, PARAMS_ML_DSA_87_S2_ENC_SIZE, + PARAMS_ML_DSA_87_Z_ENC_SIZE, + PARAMS_ML_DSA_87_PK_SIZE, PARAMS_ML_DSA_87_SIG_SIZE }, +#endif +}; +/* Number of ML-DSA parameter sets compiled in. */ +#define DILITHIUM_PARAMS_CNT \ + ((unsigned int)(sizeof(dilithium_params) / sizeof(wc_dilithium_params))) + +/* Get the ML-DSA parameters that match the level. + * + * @param [in] level Level required. + * @param [out] params Parameter set. + * @return 0 on success. + * @return NOT_COMPILED_IN when parameters at level are not compiled in. + */ +static int dilithium_get_params(int level, const wc_dilithium_params** params) +{ + unsigned int i; + int ret = NOT_COMPILED_IN; + + for (i = 0; i < DILITHIUM_PARAMS_CNT; i++) { + if (dilithium_params[i].level == level) { + *params = &dilithium_params[i]; + ret = 0; + } + } + + return ret; +} + +/****************************************************************************** + * Hash operations + ******************************************************************************/ + +/* 256-bit hash using SHAKE-256. + * + * FIPS 204. 8.3: H(v,d) <- SHAKE256(v,d) + * + * @param [in, out] shake256 SHAKE-256 object. + * @param [in] data Buffer holding data to hash. + * @param [in] dataLen Length of data to hash in bytes. + * @param [out] hash Buffer to hold hash result. + * @param [in] hashLen Number of bytes of hash to return. + * @return 0 on success. + * @return Negative on error. + */ +static int dilithium_shake256(wc_Shake* shake256, const byte* data, + word32 dataLen, byte* hash, word32 hashLen) +{ + int ret; + + /* Initialize SHAKE-256 operation. */ + ret = wc_InitShake256(shake256, NULL, INVALID_DEVID); + if (ret == 0) { + /* Update with data. */ + ret = wc_Shake256_Update(shake256, data, dataLen); + } + if (ret == 0) { + /* Compute hash of data. */ + ret = wc_Shake256_Final(shake256, hash, hashLen); + } + + return ret; +} + +#if !defined(WOLFSSL_DILITHIUM_NO_SIGN) || !defined(WOLFSSL_DILITHIUM_NO_VERIFY) +/* 256-bit hash using SHAKE-256. + * + * FIPS 204. 8.3: H(v,d) <- SHAKE256(v,d) + * + * @param [in, out] shake256 SHAKE-256 object. + * @param [in] data1 First block of data to hash. + * @param [in] data1Len Length of first block in bytes. + * @param [in] data2 Second block of data to hash. + * @param [in] data2Len Length of second block in bytes. + * @param [out] hash Buffer to hold hash result. + * @param [in] hashLen Number of bytes of hash to return. + * @return 0 on success. + * @return Negative on error. + */ +static int dilithium_hash256(wc_Shake* shake256, const byte* data1, + word32 data1Len, const byte* data2, word32 data2Len, byte* hash, + word32 hashLen) +{ + int ret; + + /* Initialize SHAKE-256 operation. */ + ret = wc_InitShake256(shake256, NULL, INVALID_DEVID); + if (ret == 0) { + /* Update with first data. */ + ret = wc_Shake256_Update(shake256, data1, data1Len); + } + if (ret == 0) { + /* Update with second data. */ + ret = wc_Shake256_Update(shake256, data2, data2Len); + } + if (ret == 0) { + /* Compute hash of data. */ + ret = wc_Shake256_Final(shake256, hash, hashLen); + } + + return ret; +} +#endif + +#ifndef WOLFSSL_DILITHIUM_SMALL +/* 128-bit hash using SHAKE-128. + * + * FIPS 204. 8.3: H128(v,d) <- SHAKE128(v,d) + * + * @param [in, out] shake128 SHAKE-128 object. + * @param [in] in Block of data to hash. + * @param [in] inLen Length of data in bytes. + * @param [out] out Buffer to hold hash result. + * @param [in] outLen Number of hash blocks to return. + * @return 0 on success. + * @return Negative on error. + */ +static int dilithium_squeeze128(wc_Shake* shake128, const byte* in, + word32 inLen, byte* out, word32 outBlocks) +{ + int ret; + + /* Initialize SHAKE-128 operation. */ + ret = wc_InitShake128(shake128, NULL, INVALID_DEVID); + if (ret == 0) { + /* Absorb data - update plus final. */ + ret = wc_Shake128_Absorb(shake128, in, inLen); + } + if (ret == 0) { + /* Squeeze out hash data. */ + ret = wc_Shake128_SqueezeBlocks(shake128, out, outBlocks); + } + + return ret; +} +#endif /* WOLFSSL_DILITHIUM_SMALL */ + +#if !defined(WOLFSSL_DILITHIUM_NO_SIGN) || \ + (!defined(WOLFSSL_DILITHIUM_SMALL) && \ + !defined(WOLFSSL_DILITHIUM_NO_MAKE_KEY)) +/* 256-bit hash using SHAKE-256. + * + * FIPS 204. 8.3: H(v,d) <- SHAKE256(v,d) + * Using SqueezeBlocks interface to get larger amounts of output. + * + * @param [in, out] shake256 SHAKE-256 object. + * @param [in] in Block of data to hash. + * @param [in] inLen Length of data in bytes. + * @param [out] out Buffer to hold hash result. + * @param [in] outLen Number of hash blocks to return. + * @return 0 on success. + * @return Negative on hash error. + */ +static int dilithium_squeeze256(wc_Shake* shake256, const byte* in, + word32 inLen, byte* out, word32 outBlocks) +{ + int ret; + + /* Initialize SHAKE-256 operation. */ + ret = wc_InitShake256(shake256, NULL, INVALID_DEVID); + if (ret == 0) { + /* Absorb data - update plus final. */ + ret = wc_Shake256_Absorb(shake256, in, inLen); + } + if (ret == 0) { + /* Squeeze out hash data. */ + ret = wc_Shake256_SqueezeBlocks(shake256, out, outBlocks); + } + + return ret; +} +#endif + +/****************************************************************************** + * Encode/Decode operations + ******************************************************************************/ + +#ifndef WOLFSSL_DILITHIUM_NO_MAKE_KEY +/* Encode vector of polynomials with range -ETA..ETA. + * + * FIPS 204. 8.2: Algorithm 18 skEncode(rho, K, tr, s1, s2, t0) + * ... + * 2: for i from 0 to l - 1 do + * 3: sk <- sk || BitPack(s1[i], eta, eta) + * 4: end for + * ... + * OR + * ... + * 5: for i from 0 to k - 1 do + * 6: sk <- sk || BitPack(s2[i], eta, eta) + * 7: end for + * ... + * + * FIPS 204. 8.2: Algorithm 11 BitPack(w, a, b) + * 1: z <- () + * 2: for i from 0 to 255 do + * 3: z <- z||IntegerToBits(b - wi, bitlen(a + b)) + * 4: end for + * 5: return BitsToBytes(z) + * + * IntegerToBits makes bit array with width specified from integer. + * BitToBytes make a byte array from a bit array. + * + * @param [in] s Vector of polynomials to encode. + * @param [in] d Dimension of vector. + * @param [in] eta Range specifier of each value. + * @param [out] p Buffer to encode into. + */ +static void dilthium_vec_encode_eta_bits(const sword32* s, byte d, byte eta, + byte* p) +{ + unsigned int i; + unsigned int j; + +#if !defined(WOLFSSL_NO_ML_DSA_44) || !defined(WOLFSSL_NO_ML_DSA_87) + /* -2..2 */ + if (eta == DILITHIUM_ETA_2) { + /* Setp 2 or 5: For each polynomial of vector. */ + for (i = 0; i < d; i++) { + /* Step 3 or 6. + * 3 bits to encode each number. + * 8 numbers become 3 bytes. (8 * 3 bits = 3 * 8 bits) */ + for (j = 0; j < DILITHIUM_N; j += 8) { + /* Make value a positive integer. */ + byte s0 = 2 - s[j + 0]; + byte s1 = 2 - s[j + 1]; + byte s2 = 2 - s[j + 2]; + byte s3 = 2 - s[j + 3]; + byte s4 = 2 - s[j + 4]; + byte s5 = 2 - s[j + 5]; + byte s6 = 2 - s[j + 6]; + byte s7 = 2 - s[j + 7]; + + /* Pack 8 3-bit values into 3 bytes. */ + p[0] = (s0 >> 0) | (s1 << 3) | (s2 << 6); + p[1] = (s2 >> 2) | (s3 << 1) | (s4 << 4) | (s5 << 7); + p[2] = (s5 >> 1) | (s6 << 2) | (s7 << 5); + /* Move to next place to encode into. */ + p += DILITHIUM_ETA_2_BITS; + } + /* Next polynomial. */ + s += DILITHIUM_N; + } + } + else +#endif +#ifndef WOLFSSL_NO_ML_DSA_65 + /* -4..4 */ + if (eta == DILITHIUM_ETA_4) { + for (i = 0; i < d; i++) { + #ifdef WOLFSSL_DILITHIUM_SMALL + /* Step 3 or 6. + * 4 bits to encode each number. + * 2 numbers become 1 bytes. (2 * 4 bits = 1 * 8 bits) */ + for (j = 0; j < DILITHIUM_N / 2; j++) { + /* Make values positive and pack 2 4-bit values into 1 byte. */ + p[j] = (((byte)(4 - s[j * 2 + 0])) << 0) | + (((byte)(4 - s[j * 2 + 1])) << 4); + } + #else + /* Step 3 or 6. + * 4 bits to encode each number. + * 8 numbers become 4 bytes. (8 * 4 bits = 4 * 8 bits) */ + for (j = 0; j < DILITHIUM_N / 2; j += 4) { + /* Make values positive and pack 2 4-bit values into 1 byte. */ + p[j + 0] = (((byte)(4 - s[j * 2 + 0])) << 0) | + (((byte)(4 - s[j * 2 + 1])) << 4); + p[j + 1] = (((byte)(4 - s[j * 2 + 2])) << 0) | + (((byte)(4 - s[j * 2 + 3])) << 4); + p[j + 2] = (((byte)(4 - s[j * 2 + 4])) << 0) | + (((byte)(4 - s[j * 2 + 5])) << 4); + p[j + 3] = (((byte)(4 - s[j * 2 + 6])) << 0) | + (((byte)(4 - s[j * 2 + 7])) << 4); + } + #endif + /* Move to next place to encode into. */ + p += DILITHIUM_N / 2; + /* Next polynomial. */ + s += DILITHIUM_N; + } + } + else +#endif + { + } +} +#endif /* !WOLFSSL_DILITHIUM_NO_MAKE_KEY */ + +#if !defined(WOLFSSL_DILITHIUM_NO_SIGN) || defined(WOLFSSL_DILITHIUM_CHECK_KEY) +/* Decode vector of polynomials with range -ETA..ETA. + * + * FIPS 204. 8.2: Algorithm 19 skDecode(sk) + * ... + * 5: for i from 0 to l - 1 do + * 6: s1[i] <- BitUnpack(yi, eta, eta) + * 7: end for + * ... + * OR + * ... + * 8: for i from 0 to k - 1 do + * 9: s2[i] <- BitUnpack(zi, eta, eta) + * 10: end for + * ... + * Where y and z are arrays of bit arrays. + * + * @param [in] p Buffer of data to decode. + * @param [in] eta Range specifier of each value. + * @param [in] s Vector of decoded polynomials. + * @param [in] d Dimension of vector. + */ +static void dilithium_vec_decode_eta_bits(const byte* p, byte eta, sword32* s, + byte d) +{ + unsigned int i; + unsigned int j; + +#if !defined(WOLFSSL_NO_ML_DSA_44) || !defined(WOLFSSL_NO_ML_DSA_87) + /* -2..2 */ + if (eta == DILITHIUM_ETA_2) { + /* Step 5 or 8: For each polynomial of vector */ + for (i = 0; i < d; i++) { + /* Step 6 or 9. + * 3 bits to encode each number. + * 8 numbers from 3 bytes. (8 * 3 bits = 3 * 8 bits) */ + for (j = 0; j < DILITHIUM_N; j += 8) { + /* Get 3 bits and put in range of -2..2. */ + s[j + 0] = 2 - ((p[0] >> 0) & 0x7 ); + s[j + 1] = 2 - ((p[0] >> 3) & 0x7 ); + s[j + 2] = 2 - ((p[0] >> 6) | ((p[1] << 2) & 0x7)); + s[j + 3] = 2 - ((p[1] >> 1) & 0x7 ); + s[j + 4] = 2 - ((p[1] >> 4) & 0x7 ); + s[j + 5] = 2 - ((p[1] >> 7) | ((p[2] << 1) & 0x7)); + s[j + 6] = 2 - ((p[2] >> 2) & 0x7 ); + s[j + 7] = 2 - ((p[2] >> 5) & 0x7 ); + /* Move to next place to decode from. */ + p += DILITHIUM_ETA_2_BITS; + } + /* Next polynomial. */ + s += DILITHIUM_N; + } + } + else +#endif +#ifndef WOLFSSL_NO_ML_DSA_65 + /* -4..4 */ + if (eta == DILITHIUM_ETA_4) { + /* Step 5 or 8: For each polynomial of vector */ + for (i = 0; i < d; i++) { + #ifdef WOLFSSL_DILITHIUM_SMALL + /* Step 6 or 9. + * 4 bits to encode each number. + * 2 numbers from 1 bytes. (2 * 4 bits = 1 * 8 bits) */ + for (j = 0; j < DILITHIUM_N / 2; j++) { + /* Get 4 bits and put in range of -4..4. */ + s[j * 2 + 0] = 4 - (p[j] & 0xf); + s[j * 2 + 1] = 4 - (p[j] >> 4); + } + #else + /* Step 6 or 9. + * 4 bits to encode each number. + * 8 numbers from 4 bytes. (8 * 4 bits = 4 * 8 bits) */ + for (j = 0; j < DILITHIUM_N / 2; j += 4) { + /* Get 4 bits and put in range of -4..4. */ + s[j * 2 + 0] = 4 - (p[j + 0] & 0xf); + s[j * 2 + 1] = 4 - (p[j + 0] >> 4); + s[j * 2 + 2] = 4 - (p[j + 1] & 0xf); + s[j * 2 + 3] = 4 - (p[j + 1] >> 4); + s[j * 2 + 4] = 4 - (p[j + 2] & 0xf); + s[j * 2 + 5] = 4 - (p[j + 2] >> 4); + s[j * 2 + 6] = 4 - (p[j + 3] & 0xf); + s[j * 2 + 7] = 4 - (p[j + 3] >> 4); + } + #endif + /* Move to next place to decode from. */ + p += DILITHIUM_N / 2; + /* Next polynomial. */ + s += DILITHIUM_N; + } + } + else +#endif + { + } +} +#endif /* !WOLFSSL_DILITHIUM_NO_SIGN || WOLFSSL_DILITHIUM_CHECK_KEY */ + +#ifndef WOLFSSL_DILITHIUM_NO_MAKE_KEY +/* Encode t into t0 and t1. + * + * FIPS 204. 8.4: Algorithm 29 Power2Round(r) + * 1: r+ <- r mod q + * 2: r0 <- r+ mod +/- 2^d + * 3: return ((r+ - r0) / 2^d, r0) + * + * FIPS 204. 8.2: Algorithm 18 skEncode(rho, K, tr, s1, s2, t0) + * ... + * 8: for i form 0 to k - 1 do + * 9: sk <- sk || BitPack(t0[i], s^(d-1) - 1, 2^(d-1)) + * 10: end for + * + * FIPS 204. 8.2: Algorithm 16 pkEncode(rho, t1) + * ... + * 2: for i from 0 to k - 1 do + * 3: pk <- pk || SimpleBitPack(t1[i], 2^bitlen(q-1) - d - 1) + * 4: end for + * + * @param [in] t Vector of polynomials. + * @param [in] d Dimension of vector. + * @param [out] t0 Buffer to encode bottom part of value of t into. + * @param [out] t1 Buffer to encode top part of value of t into. + */ +static void dilithium_vec_encode_t0_t1(sword32* t, byte d, byte* t0, byte* t1) +{ + unsigned int i; + unsigned int j; + + /* Alg 18, Step 8 and Alg 16, Step 2. For each polynomial of vector. */ + for (i = 0; i < d; i++) { + /* Alg 18, Step 9 and Alg 16, Step 3. + * Do all polynomial values - 8 at a time. */ + for (j = 0; j < DILITHIUM_N; j += 8) { + /* Take 8 values of t and take top bits and make positive. */ + word16 n1_0 = (t[j + 0] + DILITHIUM_D_MAX_HALF - 1) >> DILITHIUM_D; + word16 n1_1 = (t[j + 1] + DILITHIUM_D_MAX_HALF - 1) >> DILITHIUM_D; + word16 n1_2 = (t[j + 2] + DILITHIUM_D_MAX_HALF - 1) >> DILITHIUM_D; + word16 n1_3 = (t[j + 3] + DILITHIUM_D_MAX_HALF - 1) >> DILITHIUM_D; + word16 n1_4 = (t[j + 4] + DILITHIUM_D_MAX_HALF - 1) >> DILITHIUM_D; + word16 n1_5 = (t[j + 5] + DILITHIUM_D_MAX_HALF - 1) >> DILITHIUM_D; + word16 n1_6 = (t[j + 6] + DILITHIUM_D_MAX_HALF - 1) >> DILITHIUM_D; + word16 n1_7 = (t[j + 7] + DILITHIUM_D_MAX_HALF - 1) >> DILITHIUM_D; + /* Take 8 values of t and take bottom bits and make positive. */ + word16 n0_0 = DILITHIUM_D_MAX_HALF - + (t[j + 0] - (n1_0 << DILITHIUM_D)); + word16 n0_1 = DILITHIUM_D_MAX_HALF - + (t[j + 1] - (n1_1 << DILITHIUM_D)); + word16 n0_2 = DILITHIUM_D_MAX_HALF - + (t[j + 2] - (n1_2 << DILITHIUM_D)); + word16 n0_3 = DILITHIUM_D_MAX_HALF - + (t[j + 3] - (n1_3 << DILITHIUM_D)); + word16 n0_4 = DILITHIUM_D_MAX_HALF - + (t[j + 4] - (n1_4 << DILITHIUM_D)); + word16 n0_5 = DILITHIUM_D_MAX_HALF - + (t[j + 5] - (n1_5 << DILITHIUM_D)); + word16 n0_6 = DILITHIUM_D_MAX_HALF - + (t[j + 6] - (n1_6 << DILITHIUM_D)); + word16 n0_7 = DILITHIUM_D_MAX_HALF - + (t[j + 7] - (n1_7 << DILITHIUM_D)); + + /* 13 bits per number. + * 8 numbers become 13 bytes. (8 * 13 bits = 13 * 8 bits) */ + #if defined(LITTLE_ENDIAN_ORDER) && (WOLFSSL_DILITHIUM_ALIGNMENT <= 2) + word32* tp; + #endif + #if defined(LITTLE_ENDIAN_ORDER) && (WOLFSSL_DILITHIUM_ALIGNMENT == 0) + tp = (word32*)t0; + tp[0] = (n0_0 ) | ((word32)n0_1 << 13) | ((word32)n0_2 << 26); + tp[1] = (n0_2 >> 6) | ((word32)n0_3 << 7) | ((word32)n0_4 << 20); + tp[2] = (n0_4 >> 12) | ((word32)n0_5 << 1) | + ((word32)n0_6 << 14) | ((word32)n0_7 << 27); + #else + t0[ 0] = (n0_0 << 0); + t0[ 1] = (n0_0 >> 8) | (n0_1 << 5); + t0[ 2] = (n0_1 >> 3) ; + t0[ 3] = (n0_1 >> 11) | (n0_2 << 2); + t0[ 4] = (n0_2 >> 6) | (n0_3 << 7); + t0[ 5] = (n0_3 >> 1) ; + t0[ 6] = (n0_3 >> 9) | (n0_4 << 4); + t0[ 7] = (n0_4 >> 4) ; + t0[ 8] = (n0_4 >> 12) | (n0_5 << 1); + t0[ 9] = (n0_5 >> 7) | (n0_6 << 6); + t0[10] = (n0_6 >> 2) ; + t0[11] = (n0_6 >> 10) | (n0_7 << 3); + #endif + t0[12] = (n0_7 >> 5) ; + + /* 10 bits per number. + * 8 bytes become 10 bytes. (8 * 10 bits = 10 * 8 bits) */ + #if defined(LITTLE_ENDIAN_ORDER) && (WOLFSSL_DILITHIUM_ALIGNMENT <= 2) + tp = (word32*)t1; + tp[0] = (n1_0 ) | ((word32)n1_1 << 10) | + ((word32)n1_2 << 20) | ((word32)n1_3 << 30); + tp[1] = (n1_3 >> 2) | ((word32)n1_4 << 8) | + ((word32)n1_5 << 18) | ((word32)n1_6 << 28); + #else + t1[0] = (n1_0 << 0); + t1[1] = (n1_0 >> 8) | (n1_1 << 2); + t1[2] = (n1_1 >> 6) | (n1_2 << 4); + t1[3] = (n1_2 >> 4) | (n1_3 << 6); + t1[4] = (n1_3 >> 2) ; + t1[5] = (n1_4 << 0); + t1[6] = (n1_4 >> 8) | (n1_5 << 2); + t1[7] = (n1_5 >> 6) | (n1_6 << 4); + #endif + t1[8] = (n1_6 >> 4) | (n1_7 << 6); + t1[9] = (n1_7 >> 2) ; + + /* Move to next place to encode bottom bits to. */ + t0 += DILITHIUM_D; + /* Move to next place to encode top bits to. */ + t1 += DILITHIUM_U; + } + /* Next polynomial. */ + t += DILITHIUM_N; + } +} +#endif /* !WOLFSSL_DILITHIUM_NO_MAKE_KEY */ + +#if !defined(WOLFSSL_DILITHIUM_NO_SIGN) || defined(WOLFSSL_DILITHIUM_CHECK_KEY) +/* Decode bottom D bits of t as t0. + * + * FIPS 204. 8.2: Algorithm 19 skDecode(sk) + * ... + * 11: for i from 0 to k - 1 do + * 12: t0[i] <- BitUnpack(wi, 2^(d-1) - 1, 2^(d-1) + * 13: end for + * ... + * + * @param [in] t0 Encoded values of t0. + * @param [in] d Dimensions of vector t0. + * @param [out] t Vector of polynomials. + */ +static void dilithium_vec_decode_t0(const byte* t0, byte d, sword32* t) +{ + unsigned int i; + + /* Step 11. For each polynomial of vector. */ + for (i = 0; i < d; i++) { + unsigned int j; + /* Step 12. Get 13 bits and convert to range (2^(d-1)-1)..2^(d-1). */ + for (j = 0; j < DILITHIUM_N; j += 8) { + /* 13 bits used per number. + * 8 numbers from 13 bytes. (8 * 13 bits = 13 * 8 bits) */ + #if defined(LITTLE_ENDIAN_ORDER) && (WOLFSSL_DILITHIUM_ALIGNMENT == 0) + word32 t32_2 = ((const word32*)t0)[2]; + #ifdef WC_64BIT_CPU + word64 t64 = *(const word64*)t0; + t[j + 0] = DILITHIUM_D_MAX_HALF - ( t64 & 0x1fff); + t[j + 1] = DILITHIUM_D_MAX_HALF - ((t64 >> 13) & 0x1fff); + t[j + 2] = DILITHIUM_D_MAX_HALF - ((t64 >> 26) & 0x1fff); + t[j + 3] = DILITHIUM_D_MAX_HALF - ((t64 >> 39) & 0x1fff); + t[j + 4] = DILITHIUM_D_MAX_HALF - + ((t64 >> 52) | ((t32_2 & 0x0001) << 12)); + #else + word32 t32_0 = ((const word32*)t0)[0]; + word32 t32_1 = ((const word32*)t0)[1]; + t[j + 0] = DILITHIUM_D_MAX_HALF - + ( t32_0 & 0x1fff); + t[j + 1] = DILITHIUM_D_MAX_HALF - + ((t32_0 >> 13) & 0x1fff); + t[j + 2] = DILITHIUM_D_MAX_HALF - + (( t32_0 >> 26 ) | ((t32_1 & 0x007f) << 6)); + t[j + 3] = DILITHIUM_D_MAX_HALF - + ((t32_1 >> 7) & 0x1fff); + t[j + 4] = DILITHIUM_D_MAX_HALF - + (( t32_1 >> 20 ) | ((t32_2 & 0x0001) << 12)); + #endif + t[j + 5] = DILITHIUM_D_MAX_HALF - + ((t32_2 >> 1) & 0x1fff); + t[j + 6] = DILITHIUM_D_MAX_HALF - + ((t32_2 >> 14) & 0x1fff); + t[j + 7] = DILITHIUM_D_MAX_HALF - + (( t32_2 >> 27 ) | ((word32)t0[12] ) << 5 ); + #else + t[j + 0] = DILITHIUM_D_MAX_HALF - + ((t0[ 0] ) | (((word16)(t0[ 1] & 0x1f)) << 8)); + t[j + 1] = DILITHIUM_D_MAX_HALF - + ((t0[ 1] >> 5) | (((word16)(t0[ 2] )) << 3) | + (((word16)(t0[ 3] & 0x03)) << 11)); + t[j + 2] = DILITHIUM_D_MAX_HALF - + ((t0[ 3] >> 2) | (((word16)(t0[ 4] & 0x7f)) << 6)); + t[j + 3] = DILITHIUM_D_MAX_HALF - + ((t0[ 4] >> 7) | (((word16)(t0[ 5] )) << 1) | + (((word16)(t0[ 6] & 0x0f)) << 9)); + t[j + 4] = DILITHIUM_D_MAX_HALF - + ((t0[ 6] >> 4) | (((word16)(t0[ 7] )) << 4) | + (((word16)(t0[ 8] & 0x01)) << 12)); + t[j + 5] = DILITHIUM_D_MAX_HALF - + ((t0[ 8] >> 1) | (((word16)(t0[ 9] & 0x3f)) << 7)); + t[j + 6] = DILITHIUM_D_MAX_HALF - + ((t0[ 9] >> 6) | (((word16)(t0[10] )) << 2) | + (((word16)(t0[11] & 0x07)) << 10)); + t[j + 7] = DILITHIUM_D_MAX_HALF - + ((t0[11] >> 3) | (((word16)(t0[12] )) << 5)); + #endif + /* Move to next place to decode from. */ + t0 += DILITHIUM_D; + } + /* Next polynomial. */ + t += DILITHIUM_N; + } +} +#endif /* !WOLFSSL_DILITHIUM_NO_SIGN || WOLFSSL_DILITHIUM_CHECK_KEY */ + +#if !defined(WOLFSSL_DILITHIUM_NO_VERIFY) || \ + defined(WOLFSSL_DILITHIUM_CHECK_KEY) +/* Decode top bits of t as t1. + * + * FIPS 204. 8.2: Algorithm 17 pkDecode(pk) + * ... + * 4: t1[i] <- SimpleBitUnpack(zi, 2^(bitlen(q-1)-d) - 1) + * ... + * + * @param [in] t1 Encoded values of t1. + * @param [out] t Polynomials. + */ +static void dilithium_decode_t1(const byte* t1, sword32* t) +{ + unsigned int j; + /* Step 4. Get 10 bits as a number. */ + for (j = 0; j < DILITHIUM_N; j += 8) { + /* 10 bits used per number. + * 8 numbers from 10 bytes. (8 * 10 bits = 10 * 8 bits) */ +#if defined(LITTLE_ENDIAN_ORDER) && (WOLFSSL_DILITHIUM_ALIGNMENT == 0) + #ifdef WC_64BIT_CPU + word64 t64 = *(const word64*) t1; + word16 t16 = *(const word16*)(t1 + 8); + t[j+0] = (sword32)( ( t64 & 0x03ff) << DILITHIUM_D); + t[j+1] = (sword32)( ((t64 >> 10) & 0x03ff) << DILITHIUM_D); + t[j+2] = (sword32)( ((t64 >> 20) & 0x03ff) << DILITHIUM_D); + t[j+3] = (sword32)( ((t64 >> 30) & 0x03ff) << DILITHIUM_D); + t[j+4] = (sword32)( ((t64 >> 40) & 0x03ff) << DILITHIUM_D); + t[j+5] = (sword32)( ((t64 >> 50) & 0x03ff) << DILITHIUM_D); + t[j+6] = (sword32)((((t64 >> 60)| (t16 << 4)) & 0x03ff) << DILITHIUM_D); + t[j+7] = (sword32)( ((t16 >> 6) & 0x03ff) << DILITHIUM_D); + #else + word32 t32 = *((const word32*)t1); + t[j + 0] = ( t32 & 0x03ff ) << + DILITHIUM_D; + t[j + 1] = ((t32 >> 10) & 0x03ff ) << + DILITHIUM_D; + t[j + 2] = ((t32 >> 20) & 0x03ff ) << + DILITHIUM_D; + t[j + 3] = ((t32 >> 30) | (((word16)t1[4]) << 2)) << + DILITHIUM_D; + t32 = *((const word32*)(t1 + 5)); + t[j + 4] = ( t32 & 0x03ff ) << + DILITHIUM_D; + t[j + 5] = ((t32 >> 10) & 0x03ff ) << + DILITHIUM_D; + t[j + 6] = ((t32 >> 20) & 0x03ff ) << + DILITHIUM_D; + t[j + 7] = ((t32 >> 30) | (((word16)t1[9]) << 2)) << + DILITHIUM_D; + #endif +#else + t[j + 0] = (sword32)((t1[0] >> 0) | (((word16)(t1[1] & 0x03)) << 8)) + << DILITHIUM_D; + t[j + 1] = (sword32)((t1[1] >> 2) | (((word16)(t1[2] & 0x0f)) << 6)) + << DILITHIUM_D; + t[j + 2] = (sword32)((t1[2] >> 4) | (((word16)(t1[3] & 0x3f)) << 4)) + << DILITHIUM_D; + t[j + 3] = (sword32)((t1[3] >> 6) | (((word16)(t1[4] )) << 2)) + << DILITHIUM_D; + t[j + 4] = (sword32)((t1[5] >> 0) | (((word16)(t1[6] & 0x03)) << 8)) + << DILITHIUM_D; + t[j + 5] = (sword32)((t1[6] >> 2) | (((word16)(t1[7] & 0x0f)) << 6)) + << DILITHIUM_D; + t[j + 6] = (sword32)((t1[7] >> 4) | (((word16)(t1[8] & 0x3f)) << 4)) + << DILITHIUM_D; + t[j + 7] = (sword32)((t1[8] >> 6) | (((word16)(t1[9] )) << 2)) + << DILITHIUM_D; +#endif + /* Move to next place to decode from. */ + t1 += DILITHIUM_U; + } +} +#endif + +#if (!defined(WOLFSSL_DILITHIUM_NO_VERIFY) && \ + !defined(WOLFSSL_DILITHIUM_VERIFY_SMALL_MEM)) || \ + defined(WOLFSSL_DILITHIUM_CHECK_KEY) +/* Decode top bits of t as t1. + * + * FIPS 204. 8.2: Algorithm 17 pkDecode(pk) + * ... + * 3: for i from 0 to k - 1 do + * 4: t1[i] <- SimpleBitUnpack(zi, 2^(bitlen(q-1)-d) - 1) + * 5: end for + * ... + * + * @param [in] t1 Encoded values of t1. + * @param [in] d Dimensions of vector t1. + * @param [out] t Vector of polynomials. + */ +static void dilithium_vec_decode_t1(const byte* t1, byte d, sword32* t) +{ + unsigned int i; + + /* Step 3. For each polynomial of vector. */ + for (i = 0; i < d; i++) { + dilithium_decode_t1(t1, t); + /* Next polynomial. */ + t1 += DILITHIUM_U * DILITHIUM_N / 8; + t += DILITHIUM_N; + } +} +#endif + +#ifndef WOLFSSL_DILITHIUM_NO_SIGN + +/* Encode z with range of -(GAMMA1-1)...GAMMA1 + * + * FIPS 204. 8.2: Algorithm 20 sigEncode(c_tilde, z, h) + * ... + * 2: for i form 0 to l - 1 do + * 3: sigma <- sigma || BitPack(z[i], GAMMA1 - 1, GAMMA1) + * 4: end for + * ... + * + * @param [in] z Vector of polynomials to encode. + * @param [in] l Dimension of vector. + * @param [in] bits Number of bits used in encoding - GAMMA1 bits. + * @param [out] s Buffer to encode into. + */ +static void dilithium_vec_encode_gamma1(const sword32* z, byte l, int bits, + byte* s) +{ + unsigned int i; + unsigned int j; + + (void)l; + +#ifndef WOLFSSL_NO_ML_DSA_44 + if (bits == DILITHIUM_GAMMA1_BITS_17) { + /* Step 2. For each polynomial of vector. */ + for (i = 0; i < PARAMS_ML_DSA_44_L; i++) { + /* Step 3. Get 18 bits as a number. */ + for (j = 0; j < DILITHIUM_N; j += 4) { + word32 z0 = DILITHIUM_GAMMA1_17 - z[j + 0]; + word32 z1 = DILITHIUM_GAMMA1_17 - z[j + 1]; + word32 z2 = DILITHIUM_GAMMA1_17 - z[j + 2]; + word32 z3 = DILITHIUM_GAMMA1_17 - z[j + 3]; + + /* 18 bits per number. + * 8 numbers become 9 bytes. (8 * 9 bits = 9 * 8 bits) */ + #if defined(LITTLE_ENDIAN_ORDER) && (WOLFSSL_DILITHIUM_ALIGNMENT == 0) + #ifdef WC_64BIT_CPU + word64* s64p = (word64*)s; + s64p[0] = z0 | ((word64)z1 << 18) | + ((word64)z2 << 36) | ((word64)z3 << 54); + #else + word32* s32p = (word32*)s; + s32p[0] = z0 | (z1 << 18) ; + s32p[1] = (z1 >> 14) | (z2 << 4) | (z3 << 22); + #endif + #else + s[0] = z0 ; + s[1] = z0 >> 8 ; + s[2] = (z0 >> 16) | (z1 << 2); + s[3] = z1 >> 6 ; + s[4] = (z1 >> 14) | (z2 << 4); + s[5] = z2 >> 4 ; + s[6] = (z2 >> 12) | (z3 << 6); + s[7] = z3 >> 2 ; + #endif + s[8] = z3 >> 10 ; + /* Move to next place to encode to. */ + s += DILITHIUM_GAMMA1_17_ENC_BITS / 2; + } + /* Next polynomial. */ + z += DILITHIUM_N; + } + } + else +#endif +#if !defined(WOLFSSL_NO_ML_DSA_65) || !defined(WOLFSSL_NO_ML_DSA_87) + if (bits == DILITHIUM_GAMMA1_BITS_19) { + /* Step 2. For each polynomial of vector. */ + for (i = 0; i < l; i++) { + /* Step 3. Get 20 bits as a number. */ + for (j = 0; j < DILITHIUM_N; j += 4) { + sword32 z0 = DILITHIUM_GAMMA1_19 - z[j + 0]; + sword32 z1 = DILITHIUM_GAMMA1_19 - z[j + 1]; + sword32 z2 = DILITHIUM_GAMMA1_19 - z[j + 2]; + sword32 z3 = DILITHIUM_GAMMA1_19 - z[j + 3]; + + /* 20 bits per number. + * 4 numbers become 10 bytes. (4 * 20 bits = 10 * 8 bits) */ + #if defined(LITTLE_ENDIAN_ORDER) && (WOLFSSL_DILITHIUM_ALIGNMENT <= 2) + word16* s16p = (word16*)s; + #ifdef WC_64BIT_CPU + word64* s64p = (word64*)s; + s64p[0] = z0 | ((word64)z1 << 20) | + ((word64)z2 << 40) | ((word64)z3 << 60); + #else + word32* s32p = (word32*)s; + s32p[0] = z0 | (z1 << 20) ; + s32p[1] = (z1 >> 12) | (z2 << 8) | (z3 << 28); + #endif + s16p[4] = (z3 >> 4) ; + #else + s[0] = z0 ; + s[1] = (z0 >> 8) ; + s[2] = (z0 >> 16) | (z1 << 4); + s[3] = (z1 >> 4) ; + s[4] = (z1 >> 12) ; + s[5] = z2 ; + s[6] = (z2 >> 8) ; + s[7] = (z2 >> 16) | (z3 << 4); + s[8] = (z3 >> 4) ; + s[9] = (z3 >> 12) ; + #endif + /* Move to next place to encode to. */ + s += DILITHIUM_GAMMA1_19_ENC_BITS / 2; + } + /* Next polynomial. */ + z += DILITHIUM_N; + } + } + else +#endif + { + } +} + +#endif /* !WOLFSSL_DILITHIUM_NO_SIGN */ + +#if !defined(WOLFSSL_DILITHIUM_NO_SIGN) || !defined(WOLFSSL_DILITHIUM_NO_VERIFY) +/* Decode polynomial with range -(GAMMA1-1)..GAMMA1. + * + * FIPS 204. 8.2: Algorithm 21 sigDecode(sigma) + * ... + * 4: z[i] <- BitUnpack(xi, GAMMA1 - 1, GAMMA1) + * ... + * + * @param [in] s Encoded values of z. + * @param [in] bits Number of bits used in encoding - GAMMA1 bits. + * @param [out] z Polynomial to fill. + */ +static void dilithium_decode_gamma1(const byte* s, int bits, sword32* z) +{ + unsigned int i; + +#ifndef WOLFSSL_NO_ML_DSA_44 + if (bits == DILITHIUM_GAMMA1_BITS_17) { +#if defined(WOLFSSL_DILITHIUM_NO_LARGE_CODE) || defined(WOLFSSL_DILITHIUM_SMALL) + /* Step 4: Get 18 bits as a number. */ + for (i = 0; i < DILITHIUM_N; i += 4) { + /* 18 bits per number. + * 4 numbers from 9 bytes. (4 * 18 bits = 9 * 8 bits) */ + #if defined(LITTLE_ENDIAN_ORDER) && (WOLFSSL_DILITHIUM_ALIGNMENT == 0) + #ifdef WC_64BIT_CPU + word64 s64_0 = *(const word64*)(s+0); + z[i+0] = (word32)DILITHIUM_GAMMA1_17 - + ( s64_0 & 0x3ffff ); + z[i+1] = (word32)DILITHIUM_GAMMA1_17 - + ((s64_0 >> 18) & 0x3ffff ); + z[i+2] = (word32)DILITHIUM_GAMMA1_17 - + ((s64_0 >> 36) & 0x3ffff ); + z[i+3] = (word32)DILITHIUM_GAMMA1_17 - + ((s64_0 >> 54) | (((word32)s[8]) << 10)); + #else + word32 s32_0 = ((const word32*)(s+0))[0]; + word32 s32_1 = ((const word32*)(s+0))[1]; + z[i+0] = (word32)DILITHIUM_GAMMA1_17 - + ( s32_0 & 0x3ffff ); + z[i+1] = (word32)DILITHIUM_GAMMA1_17 - + ((s32_0 >> 18) | (((s32_1 & 0x0000f) << 14))); + z[i+2] = (word32)DILITHIUM_GAMMA1_17 - + ((s32_1 >> 4) & 0x3ffff); + z[i+3] = (word32)DILITHIUM_GAMMA1_17 - + ((s32_1 >> 22) | (((word32)s[8]) << 10 )); + #endif + #else + z[i+0] = DILITHIUM_GAMMA1_17 - + ( s[ 0] | ((sword32)(s[ 1] << 8) | + (sword32)(s[ 2] & 0x03) << 16)); + z[i+1] = DILITHIUM_GAMMA1_17 - + ((s[ 2] >> 2) | ((sword32)(s[ 3] << 6) | + (sword32)(s[ 4] & 0x0f) << 14)); + z[i+2] = DILITHIUM_GAMMA1_17 - + ((s[ 4] >> 4) | ((sword32)(s[ 5] << 4) | + (sword32)(s[ 6] & 0x3f) << 12)); + z[i+3] = DILITHIUM_GAMMA1_17 - + ((s[ 6] >> 6) | ((sword32)(s[ 7] << 2) | + (sword32)(s[ 8] ) << 10)); + #endif + /* Move to next place to decode from. */ + s += DILITHIUM_GAMMA1_17_ENC_BITS / 2; + } +#else + /* Step 4: Get 18 bits as a number. */ + for (i = 0; i < DILITHIUM_N; i += 8) { + /* 18 bits per number. + * 8 numbers from 9 bytes. (8 * 18 bits = 18 * 8 bits) */ + #if defined(LITTLE_ENDIAN_ORDER) && (WOLFSSL_DILITHIUM_ALIGNMENT == 0) + #ifdef WC_64BIT_CPU + word64 s64_0 = *(const word64*)(s+0); + word64 s64_1 = *(const word64*)(s+9); + z[i+0] = (word32)DILITHIUM_GAMMA1_17 - + ( s64_0 & 0x3ffff ); + z[i+1] = (word32)DILITHIUM_GAMMA1_17 - + ((s64_0 >> 18) & 0x3ffff ); + z[i+2] = (word32)DILITHIUM_GAMMA1_17 - + ((s64_0 >> 36) & 0x3ffff ); + z[i+3] = (word32)DILITHIUM_GAMMA1_17 - + ((s64_0 >> 54) | (((word32)s[8]) << 10)); + z[i+4] = (word32)DILITHIUM_GAMMA1_17 - + ( s64_1 & 0x3ffff ); + z[i+5] = (word32)DILITHIUM_GAMMA1_17 - + ((s64_1 >> 18) & 0x3ffff ); + z[i+6] = (word32)DILITHIUM_GAMMA1_17 - + ((s64_1 >> 36) & 0x3ffff ); + z[i+7] = (word32)DILITHIUM_GAMMA1_17 - + ((s64_1 >> 54) | (((word32)s[17]) << 10)); + #else + word32 s32_0 = ((const word32*)(s+0))[0]; + word32 s32_1 = ((const word32*)(s+0))[1]; + word32 s32_2 = ((const word32*)(s+9))[0]; + word32 s32_3 = ((const word32*)(s+9))[1]; + z[i+0] = (word32)DILITHIUM_GAMMA1_17 - + ( s32_0 & 0x3ffff ); + z[i+1] = (word32)DILITHIUM_GAMMA1_17 - + ((s32_0 >> 18) | (((s32_1 & 0x0000f) << 14))); + z[i+2] = (word32)DILITHIUM_GAMMA1_17 - + ((s32_1 >> 4) & 0x3ffff); + z[i+3] = (word32)DILITHIUM_GAMMA1_17 - + ((s32_1 >> 22) | (((word32)s[8]) << 10 )); + z[i+4] = (word32)DILITHIUM_GAMMA1_17 - + ( s32_2 & 0x3ffff ); + z[i+5] = (word32)DILITHIUM_GAMMA1_17 - + ((s32_2 >> 18) | (((s32_3 & 0x0000f) << 14))); + z[i+6] = (word32)DILITHIUM_GAMMA1_17 - + ((s32_3 >> 4) & 0x3ffff); + z[i+7] = (word32)DILITHIUM_GAMMA1_17 - + ((s32_3 >> 22) | (((word32)s[17]) << 10 )); + #endif + #else + z[i+0] = DILITHIUM_GAMMA1_17 - + ( s[ 0] | ((sword32)(s[ 1] << 8) | + (sword32)(s[ 2] & 0x03) << 16)); + z[i+1] = DILITHIUM_GAMMA1_17 - + ((s[ 2] >> 2) | ((sword32)(s[ 3] << 6) | + (sword32)(s[ 4] & 0x0f) << 14)); + z[i+2] = DILITHIUM_GAMMA1_17 - + ((s[ 4] >> 4) | ((sword32)(s[ 5] << 4) | + (sword32)(s[ 6] & 0x3f) << 12)); + z[i+3] = DILITHIUM_GAMMA1_17 - + ((s[ 6] >> 6) | ((sword32)(s[ 7] << 2) | + (sword32)(s[ 8] ) << 10)); + z[i+4] = DILITHIUM_GAMMA1_17 - + ( s[ 9] | ((sword32)(s[10] << 8) | + (sword32)(s[11] & 0x03) << 16)); + z[i+5] = DILITHIUM_GAMMA1_17 - + ((s[11] >> 2) | ((sword32)(s[12] << 6) | + (sword32)(s[13] & 0x0f) << 14)); + z[i+6] = DILITHIUM_GAMMA1_17 - + ((s[13] >> 4) | ((sword32)(s[14] << 4) | + (sword32)(s[15] & 0x3f) << 12)); + z[i+7] = DILITHIUM_GAMMA1_17 - + ((s[15] >> 6) | ((sword32)(s[16] << 2) | + (sword32)(s[17] ) << 10)); + #endif + /* Move to next place to decode from. */ + s += DILITHIUM_GAMMA1_17_ENC_BITS; + } +#endif + } + else +#endif +#if !defined(WOLFSSL_NO_ML_DSA_65) || !defined(WOLFSSL_NO_ML_DSA_87) + if (bits == DILITHIUM_GAMMA1_BITS_19) { +#if defined(WOLFSSL_DILITHIUM_NO_LARGE_CODE) || defined(WOLFSSL_DILITHIUM_SMALL) + /* Step 4: Get 20 bits as a number. */ + for (i = 0; i < DILITHIUM_N; i += 4) { + /* 20 bits per number. + * 4 numbers from 10 bytes. (4 * 20 bits = 10 * 8 bits) */ + #if defined(LITTLE_ENDIAN_ORDER) && (WOLFSSL_DILITHIUM_ALIGNMENT <= 2) + word16 s16_0 = ((const word16*)s)[4]; + #ifdef WC_64BIT_CPU + word64 s64_0 = *(const word64*)s; + z[i+0] = DILITHIUM_GAMMA1_19 - ( s64_0 & 0xfffff) ; + z[i+1] = DILITHIUM_GAMMA1_19 - ( (s64_0 >> 20) & 0xfffff) ; + z[i+2] = DILITHIUM_GAMMA1_19 - ( (s64_0 >> 40) & 0xfffff) ; + z[i+3] = DILITHIUM_GAMMA1_19 - (((s64_0 >> 60) & 0xfffff) | + ((sword32)s16_0 << 4)); + #else + word32 s32_0 = ((const word32*)s)[0]; + word32 s32_1 = ((const word32*)s)[1]; + z[i+0] = DILITHIUM_GAMMA1_19 - ( s32_0 & 0xfffff); + z[i+1] = DILITHIUM_GAMMA1_19 - (( s32_0 >> 20) | + ((s32_1 & 0x000ff) << 12)); + z[i+2] = DILITHIUM_GAMMA1_19 - ( (s32_1 >> 8) & 0xfffff); + z[i+3] = DILITHIUM_GAMMA1_19 - (( s32_1 >> 28) | + ((sword32)s16_0 << 4)); + #endif + #else + z[i+0] = DILITHIUM_GAMMA1_19 - ( s[0] | ((sword32)s[1] << 8) | + ((sword32)(s[2] & 0x0f) << 16)); + z[i+1] = DILITHIUM_GAMMA1_19 - ((s[2] >> 4) | ((sword32)s[3] << 4) | + ((sword32)(s[4] ) << 12)); + z[i+2] = DILITHIUM_GAMMA1_19 - ( s[5] | ((sword32)s[6] << 8) | + ((sword32)(s[7] & 0x0f) << 16)); + z[i+3] = DILITHIUM_GAMMA1_19 - ((s[7] >> 4) | ((sword32)s[8] << 4) | + ((sword32)(s[9] ) << 12)); + #endif + /* Move to next place to decode from. */ + s += DILITHIUM_GAMMA1_19_ENC_BITS / 2; + } +#else + /* Step 4: Get 20 bits as a number. */ + for (i = 0; i < DILITHIUM_N; i += 8) { + /* 20 bits per number. + * 8 numbers from 10 bytes. (8 * 20 bits = 20 * 8 bits) */ + #if defined(LITTLE_ENDIAN_ORDER) && (WOLFSSL_DILITHIUM_ALIGNMENT <= 2) + word16 s16_0 = ((const word16*)s)[4]; + word16 s16_1 = ((const word16*)s)[9]; + #ifdef WC_64BIT_CPU + word64 s64_0 = *(const word64*)(s+0); + word64 s64_1 = *(const word64*)(s+10); + z[i+0] = DILITHIUM_GAMMA1_19 - ( s64_0 & 0xfffff) ; + z[i+1] = DILITHIUM_GAMMA1_19 - ( (s64_0 >> 20) & 0xfffff) ; + z[i+2] = DILITHIUM_GAMMA1_19 - ( (s64_0 >> 40) & 0xfffff) ; + z[i+3] = DILITHIUM_GAMMA1_19 - (((s64_0 >> 60) & 0xfffff) | + ((sword32)s16_0 << 4)); + z[i+4] = DILITHIUM_GAMMA1_19 - ( s64_1 & 0xfffff) ; + z[i+5] = DILITHIUM_GAMMA1_19 - ( (s64_1 >> 20) & 0xfffff) ; + z[i+6] = DILITHIUM_GAMMA1_19 - ( (s64_1 >> 40) & 0xfffff) ; + z[i+7] = DILITHIUM_GAMMA1_19 - (((s64_1 >> 60) & 0xfffff) | + ((sword32)s16_1 << 4)); + #else + word32 s32_0 = ((const word32*)(s+ 0))[0]; + word32 s32_1 = ((const word32*)(s+ 0))[1]; + word32 s32_2 = ((const word32*)(s+10))[0]; + word32 s32_3 = ((const word32*)(s+10))[1]; + z[i+0] = DILITHIUM_GAMMA1_19 - ( s32_0 & 0xfffff); + z[i+1] = DILITHIUM_GAMMA1_19 - (( s32_0 >> 20) | + ((s32_1 & 0x000ff) << 12)); + z[i+2] = DILITHIUM_GAMMA1_19 - ( (s32_1 >> 8) & 0xfffff); + z[i+3] = DILITHIUM_GAMMA1_19 - (( s32_1 >> 28) | + ((sword32)s16_0 << 4)); + z[i+4] = DILITHIUM_GAMMA1_19 - ( s32_2 & 0xfffff); + z[i+5] = DILITHIUM_GAMMA1_19 - (( s32_2 >> 20) | + ((s32_3 & 0x000ff) << 12)); + z[i+6] = DILITHIUM_GAMMA1_19 - ( (s32_3 >> 8) & 0xfffff); + z[i+7] = DILITHIUM_GAMMA1_19 - (( s32_3 >> 28) | + ((sword32)s16_1 << 4)); + #endif + #else + z[i+0] = DILITHIUM_GAMMA1_19 - ( s[ 0] | + ((sword32)s[ 1] << 8) | + ((sword32)(s[ 2] & 0x0f) << 16)); + z[i+1] = DILITHIUM_GAMMA1_19 - ((s[ 2] >> 4) | + ((sword32) s[ 3] << 4) | + ((sword32)(s[ 4] ) << 12)); + z[i+2] = DILITHIUM_GAMMA1_19 - ( s[ 5] | + ((sword32) s[ 6] << 8) | + ((sword32)(s[ 7] & 0x0f) << 16)); + z[i+3] = DILITHIUM_GAMMA1_19 - ((s[ 7] >> 4) | + ((sword32) s[ 8] << 4) | + ((sword32)(s[ 9] ) << 12)); + z[i+4] = DILITHIUM_GAMMA1_19 - ( s[10] | + ((sword32) s[11] << 8) | + ((sword32)(s[12] & 0x0f) << 16)); + z[i+5] = DILITHIUM_GAMMA1_19 - ((s[12] >> 4) | + ((sword32) s[13] << 4) | + ((sword32)(s[14] ) << 12)); + z[i+6] = DILITHIUM_GAMMA1_19 - ( s[15] | + ((sword32) s[16] << 8) | + ((sword32)(s[17] & 0x0f) << 16)); + z[i+7] = DILITHIUM_GAMMA1_19 - ((s[17] >> 4) | + ((sword32) s[18] << 4) | + ((sword32)(s[19] ) << 12)); + #endif + /* Move to next place to decode from. */ + s += DILITHIUM_GAMMA1_19_ENC_BITS; + } +#endif + } + else +#endif + { + } +} +#endif + +#ifndef WOLFSSL_DILITHIUM_NO_VERIFY +/* Decode polynomial with range -(GAMMA1-1)..GAMMA1. + * + * FIPS 204. 8.2: Algorithm 21 sigDecode(sigma) + * ... + * 3: for i from 0 to l - 1 do + * 4: z[i] <- BitUnpack(xi, GAMMA1 - 1, GAMMA1) + * 5: end for + * ... + * + * @param [in] x Encoded values of t0. + * @param [in] l Dimensions of vector z. + * @param [in] bits Number of bits used in encoding - GAMMA1 bits. + * @param [out] z Vector of polynomials. + */ +static void dilithium_vec_decode_gamma1(const byte* x, byte l, int bits, + sword32* z) +{ + unsigned int i; + + /* Step 3: For each polynomial of vector. */ + for (i = 0; i < l; i++) { + /* Step 4: Unpack a polynomial. */ + dilithium_decode_gamma1(x, bits, z); + /* Move pointers on to next polynomial. */ + x += DILITHIUM_N / 8 * (bits + 1); + z += DILITHIUM_N; + } +} +#endif + +#if !defined(WOLFSSL_DILITHIUM_NO_SIGN) || !defined(WOLFSSL_DILITHIUM_NO_VERIFY) +#ifndef WOLFSSL_NO_ML_DSA_44 +/* Encode w1 with range of 0..((q-1)/(2*GAMMA2)-1). + * + * FIPS 204. 8.2: Algorithm 22 w1Encode(w1) + * ... + * 3: w1_tilde <- w1_tilde || + * ByteToBits(SimpleBitPack(w1[i], (q-1)/(2*GAMMA2)-1)) + * ... + * + * @param [in] w1 Vector of polynomials to encode. + * @param [in] gamma2 Maximum value in range. + * @param [out] w1e Buffer to encode into. + */ +static void dilithium_encode_w1_88(const sword32* w1, byte* w1e) +{ + unsigned int j; + + /* Step 3: Encode a polynomial values 6 bits at a time. */ + for (j = 0; j < DILITHIUM_N; j += 16) { + /* 6 bits per number. + * 16 numbers in 12 bytes. (16 * 6 bits = 12 * 8 bits) */ +#if defined(LITTLE_ENDIAN_ORDER) && (WOLFSSL_DILITHIUM_ALIGNMENT <= 4) + word32* w1e32 = (word32*)w1e; + w1e32[0] = w1[j+ 0] | (w1[j+ 1] << 6) | + (w1[j+ 2] << 12) | (w1[j+ 3] << 18) | + (w1[j+ 4] << 24) | (w1[j+ 5] << 30); + w1e32[1] = (w1[j+ 5] >> 2) | (w1[j+ 6] << 4) | + (w1[j+ 7] << 10) | (w1[j+ 8] << 16) | + (w1[j+ 9] << 22) | (w1[j+10] << 28); + w1e32[2] = (w1[j+10] >> 4) | (w1[j+11] << 2) | + (w1[j+12] << 8) | (w1[j+13] << 14) | + (w1[j+14] << 20) | (w1[j+15] << 26); +#else + w1e[ 0] = w1[j+ 0] | (w1[j+ 1] << 6); + w1e[ 1] = (w1[j+ 1] >> 2) | (w1[j+ 2] << 4); + w1e[ 2] = (w1[j+ 2] >> 4) | (w1[j+ 3] << 2); + w1e[ 3] = w1[j+ 4] | (w1[j+ 5] << 6); + w1e[ 4] = (w1[j+ 5] >> 2) | (w1[j+ 6] << 4); + w1e[ 5] = (w1[j+ 6] >> 4) | (w1[j+ 7] << 2); + w1e[ 6] = w1[j+ 8] | (w1[j+ 9] << 6); + w1e[ 7] = (w1[j+ 9] >> 2) | (w1[j+10] << 4); + w1e[ 8] = (w1[j+10] >> 4) | (w1[j+11] << 2); + w1e[ 9] = w1[j+12] | (w1[j+13] << 6); + w1e[10] = (w1[j+13] >> 2) | (w1[j+14] << 4); + w1e[11] = (w1[j+14] >> 4) | (w1[j+15] << 2); +#endif + /* Move to next place to encode to. */ + w1e += DILITHIUM_Q_HI_88_ENC_BITS * 2; + } +} +#endif /* !WOLFSSL_NO_ML_DSA_44 */ + +#if !defined(WOLFSSL_NO_ML_DSA_65) || !defined(WOLFSSL_NO_ML_DSA_87) +/* Encode w1 with range of 0..((q-1)/(2*GAMMA2)-1). + * + * FIPS 204. 8.2: Algorithm 22 w1Encode(w1) + * ... + * 3: w1_tilde <- w1_tilde || + * ByteToBits(SimpleBitPack(w1[i], (q-1)/(2*GAMMA2)-1)) + * ... + * + * @param [in] w1 Vector of polynomials to encode. + * @param [in] gamma2 Maximum value in range. + * @param [out] w1e Buffer to encode into. + */ +static void dilithium_encode_w1_32(const sword32* w1, byte* w1e) +{ + unsigned int j; + + /* Step 3: Encode a polynomial values 4 bits at a time. */ + for (j = 0; j < DILITHIUM_N; j += 16) { + /* 4 bits per number. + * 16 numbers in 8 bytes. (16 * 4 bits = 8 * 8 bits) */ +#if defined(LITTLE_ENDIAN_ORDER) && (WOLFSSL_DILITHIUM_ALIGNMENT <= 8) + word32* w1e32 = (word32*)w1e; + w1e32[0] = (w1[j + 0] << 0) | (w1[j + 1] << 4) | + (w1[j + 2] << 8) | (w1[j + 3] << 12) | + (w1[j + 4] << 16) | (w1[j + 5] << 20) | + (w1[j + 6] << 24) | (w1[j + 7] << 28); + w1e32[1] = (w1[j + 8] << 0) | (w1[j + 9] << 4) | + (w1[j + 10] << 8) | (w1[j + 11] << 12) | + (w1[j + 12] << 16) | (w1[j + 13] << 20) | + (w1[j + 14] << 24) | (w1[j + 15] << 28); +#else + w1e[0] = w1[j + 0] | (w1[j + 1] << 4); + w1e[1] = w1[j + 2] | (w1[j + 3] << 4); + w1e[2] = w1[j + 4] | (w1[j + 5] << 4); + w1e[3] = w1[j + 6] | (w1[j + 7] << 4); + w1e[4] = w1[j + 8] | (w1[j + 9] << 4); + w1e[5] = w1[j + 10] | (w1[j + 11] << 4); + w1e[6] = w1[j + 12] | (w1[j + 13] << 4); + w1e[7] = w1[j + 14] | (w1[j + 15] << 4); +#endif + /* Move to next place to encode to. */ + w1e += DILITHIUM_Q_HI_32_ENC_BITS * 2; + } +} +#endif +#endif + +#if !defined(WOLFSSL_DILITHIUM_NO_SIGN) || \ + (!defined(WOLFSSL_DILITHIUM_NO_VERIFY) && \ + !defined(WOLFSSL_DILITHIUM_VERIFY_SMALL_MEM)) +/* Encode w1 with range of 0..((q-1)/(2*GAMMA2)-1). + * + * FIPS 204. 8.2: Algorithm 22 w1Encode(w1) + * 1: w1_tilde = () + * 2: for i form 0 to k - 1 do + * 3: w1_tilde <- w1_tilde || + * ByteToBits(SimpleBitPack(w1[i], (q-1)/(2*GAMMA2)-1)) + * 4: end for + * 5: return w1_tilde + * + * @param [in] w1 Vector of polynomials to encode. + * @param [in] k Dimension of vector. + * @param [in] gamma2 Maximum value in range. + * @param [out] w1e Buffer to encode into. + */ +static void dilithium_vec_encode_w1(const sword32* w1, byte k, sword32 gamma2, + byte* w1e) +{ + unsigned int i; + + (void)k; + +#ifndef WOLFSSL_NO_ML_DSA_44 + if (gamma2 == DILITHIUM_Q_LOW_88) { + /* Step 2. For each polynomial of vector. */ + for (i = 0; i < PARAMS_ML_DSA_44_K; i++) { + dilithium_encode_w1_88(w1, w1e); + /* Next polynomial. */ + w1 += DILITHIUM_N; + w1e += DILITHIUM_Q_HI_88_ENC_BITS * 2 * DILITHIUM_N / 16; + } + } + else +#endif +#if !defined(WOLFSSL_NO_ML_DSA_65) || !defined(WOLFSSL_NO_ML_DSA_87) + if (gamma2 == DILITHIUM_Q_LOW_32) { + /* Step 2. For each polynomial of vector. */ + for (i = 0; i < k; i++) { + dilithium_encode_w1_32(w1, w1e); + /* Next polynomial. */ + w1 += DILITHIUM_N; + w1e += DILITHIUM_Q_HI_32_ENC_BITS * 2 * DILITHIUM_N / 16; + } + } + else +#endif + { + } +} +#endif + +/****************************************************************************** + * Expand operations + ******************************************************************************/ + +/* Generate a random polynomial by rejection. + * + * FIPS 204. 8.3: Algorithm 24 RejNTTPoly(rho) + * 1: j <- 0 + * 2: c <- 0 + * 3: while j < 256 do + * 4: a_hat[j] <- CoeffFromThreeBytes(H128(rho)[[c]], H128(rho)[[c+1]], + * H128(rho)[[c+2]]) + * 5: c <- c + 3 + * 6: if a_hat[j] != falsam then + * 7: j <- j + 1 + * 8: end if + * 9: end while + * 10: return a_hat + * + * FIPS 204. 8.1: Algorithm 8 CoeffFromThreeBytes(b0,b1,b2) + * 1: if b2 > 127 then + * 2: b2 <- b2 - 128 + * 3. end if + * 4. z <- 2^16.b2 + s^8.b1 + b0 + * 5. if z < q then return z + * 6. else return falsam + * 7. end if + * + * @param [in, out] shake128 SHAKE-128 object. + * @param [in] seed Seed to hash to generate values. + * @param [out] a Polynomial. + * @return 0 on success. + * @return MEMORY_E when dynamic memory allocation fails. + * @return Negative on hash error. + */ +static int dilithium_rej_ntt_poly(wc_Shake* shake128, byte* seed, sword32* a, + byte* key_h) +{ +#ifdef WOLFSSL_DILITHIUM_SMALL + int ret = 0; + int j = 0; +#if defined(WOLFSSL_SMALL_STACK) || defined(WOLFSSL_DILITHIUM_VERIFY_NO_MALLOC) + byte* h = NULL; +#else + byte h[DILITHIUM_REJ_NTT_POLY_H_SIZE]; +#endif + + (void)key_h; + +#ifdef WOLFSSL_DILITHIUM_VERIFY_NO_MALLOC + h = key_h; +#elif defined(WOLFSSL_SMALL_STACK) + h = (byte*)XMALLOC(DILITHIUM_REJ_NTT_POLY_H_SIZE, NULL, + DYNAMIC_TYPE_DILITHIUM); + if (h == NULL) { + ret = MEMORY_E; + } +#endif /* WOLFSSL_DILITHIUM_VERIFY_NO_MALLOC */ + + if (ret == 0) { + #if defined(LITTLE_ENDIAN_ORDER) && (WOLFSSL_DILITHIUM_ALIGNMENT == 0) + /* Reading 4 bytes for 3 so need to set 1 past for last read. */ + h[DILITHIUM_GEN_A_BLOCK_BYTES] = 0; + #endif + + /* Initialize SHAKE-128 object for new hash. */ + ret = wc_InitShake128(shake128, NULL, INVALID_DEVID); + } + if (ret == 0) { + /* Absorb the seed. */ + ret = wc_Shake128_Absorb(shake128, seed, DILITHIUM_GEN_A_SEED_SZ); + } + /* Keep generating more blocks and using triplets until we have enough. + */ + while ((ret == 0) && (j < DILITHIUM_N)) { + /* Squeeze out a block - 168 bytes = 56 values. */ + ret = wc_Shake128_SqueezeBlocks(shake128, h, 1); + if (ret == 0) { + int c; + /* Use triplets until run out or have enough for polynomial. */ + for (c = 0; c < DILITHIUM_GEN_A_BLOCK_BYTES; c += 3) { + #if defined(LITTLE_ENDIAN_ORDER) && \ + (WOLFSSL_DILITHIUM_ALIGNMENT == 0) + /* Load 32-bit value and mask out 23 bits. */ + sword32 t = *((sword32*)(h + c)) & 0x7fffff; + #else + /* Load 24-bit value and mask out 23 bits. */ + sword32 t = (h[c] + ((sword32)h[c+1] << 8) + + ((sword32)h[c+2] << 16)) & 0x7fffff; + #endif + /* Check if value is in valid range. */ + if (t < DILITHIUM_Q) { + /* Store value in polynomial and increment count of values. + */ + a[j++] = t; + /* Check we whether we have enough yet. */ + if (j == DILITHIUM_N) { + break; + } + } + } + } + } + +#if !defined(WOLFSSL_DILITHIUM_VERIFY_NO_MALLOC) && defined(WOLFSSL_SMALL_STACK) + XFREE(h, NULL, DYNAMIC_TYPE_DILITHIUM); +#endif + return ret; +#else + int ret = 0; + unsigned int j = 0; + unsigned int c; +#if defined(WOLFSSL_SMALL_STACK) || defined(WOLFSSL_DILITHIUM_VERIFY_NO_MALLOC) + byte* h = NULL; +#else + byte h[DILITHIUM_REJ_NTT_POLY_H_SIZE]; +#endif + + (void)key_h; + +#ifdef WOLFSSL_DILITHIUM_VERIFY_NO_MALLOC + h = key_h; +#elif defined(WOLFSSL_SMALL_STACK) + h = (byte*)XMALLOC(DILITHIUM_REJ_NTT_POLY_H_SIZE, NULL, + DYNAMIC_TYPE_DILITHIUM); + if (h == NULL) { + ret = MEMORY_E; + } +#endif /* WOLFSSL_DILITHIUM_VERIFY_NO_MALLOC */ + + if (ret == 0) { + /* Generate enough SHAKE-128 output blocks to give high probability of + * being able to get 256 valid 3-byte, 23-bit values from it. */ + ret = dilithium_squeeze128(shake128, seed, DILITHIUM_GEN_A_SEED_SZ, h, + DILITHIUM_GEN_A_NBLOCKS); + } + if (ret == 0) { + #if defined(LITTLE_ENDIAN_ORDER) && (WOLFSSL_DILITHIUM_ALIGNMENT == 0) + /* Reading 4 bytes for 3 so need to set 1 past for last read. */ + h[DILITHIUM_GEN_A_BYTES] = 0; + #endif + + /* Use the first 256 triplets and know we won't exceed required. */ +#ifdef WOLFSSL_DILITHIUM_NO_LARGE_CODE + for (c = 0; c < (DILITHIUM_N - 1) * 3; c += 3) { + #if defined(LITTLE_ENDIAN_ORDER) && (WOLFSSL_DILITHIUM_ALIGNMENT == 0) + /* Load 32-bit value and mask out 23 bits. */ + sword32 t = *((sword32*)(h + c)) & 0x7fffff; + #else + /* Load 24-bit value and mask out 23 bits. */ + sword32 t = (h[c] + ((sword32)h[c+1] << 8) + + ((sword32)h[c+2] << 16)) & 0x7fffff; + #endif + /* Check if value is in valid range. */ + if (t < DILITHIUM_Q) { + /* Store value in polynomial and increment count of values. */ + a[j++] = t; + } + } + /* Use the remaining triplets, checking we have enough. */ + for (; c < DILITHIUM_GEN_A_BYTES; c += 3) { + #if defined(LITTLE_ENDIAN_ORDER) && (WOLFSSL_DILITHIUM_ALIGNMENT == 0) + /* Load 32-bit value and mask out 23 bits. */ + sword32 t = *((sword32*)(h + c)) & 0x7fffff; + #else + /* Load 24-bit value and mask out 23 bits. */ + sword32 t = (h[c] + ((sword32)h[c+1] << 8) + + ((sword32)h[c+2] << 16)) & 0x7fffff; + #endif + /* Check if value is in valid range. */ + if (t < DILITHIUM_Q) { + /* Store value in polynomial and increment count of values. */ + a[j++] = t; + /* Check we whether we have enough yet. */ + if (j == DILITHIUM_N) { + break; + } + } + } +#else + /* Do 15 bytes at a time: 255 * 3 / 15 = 51 */ + for (c = 0; c < DILITHIUM_N * 3; c += 24) { + #if defined(LITTLE_ENDIAN_ORDER) && (WOLFSSL_DILITHIUM_ALIGNMENT == 0) + /* Load 32-bit value and mask out 23 bits. */ + sword32 t0 = *((sword32*)(h + c + 0)) & 0x7fffff; + sword32 t1 = *((sword32*)(h + c + 3)) & 0x7fffff; + sword32 t2 = *((sword32*)(h + c + 6)) & 0x7fffff; + sword32 t3 = *((sword32*)(h + c + 9)) & 0x7fffff; + sword32 t4 = *((sword32*)(h + c + 12)) & 0x7fffff; + sword32 t5 = *((sword32*)(h + c + 15)) & 0x7fffff; + sword32 t6 = *((sword32*)(h + c + 18)) & 0x7fffff; + sword32 t7 = *((sword32*)(h + c + 21)) & 0x7fffff; + #else + /* Load 24-bit value and mask out 23 bits. */ + sword32 t0 = (h[c + 0] + ((sword32)h[c + 1] << 8) + + ((sword32)h[c + 2] << 16)) & 0x7fffff; + sword32 t1 = (h[c + 3] + ((sword32)h[c + 4] << 8) + + ((sword32)h[c + 5] << 16)) & 0x7fffff; + sword32 t2 = (h[c + 6] + ((sword32)h[c + 7] << 8) + + ((sword32)h[c + 8] << 16)) & 0x7fffff; + sword32 t3 = (h[c + 9] + ((sword32)h[c + 10] << 8) + + ((sword32)h[c + 11] << 16)) & 0x7fffff; + sword32 t4 = (h[c + 12] + ((sword32)h[c + 13] << 8) + + ((sword32)h[c + 14] << 16)) & 0x7fffff; + sword32 t5 = (h[c + 15] + ((sword32)h[c + 16] << 8) + + ((sword32)h[c + 17] << 16)) & 0x7fffff; + sword32 t6 = (h[c + 18] + ((sword32)h[c + 19] << 8) + + ((sword32)h[c + 20] << 16)) & 0x7fffff; + sword32 t7 = (h[c + 21] + ((sword32)h[c + 22] << 8) + + ((sword32)h[c + 23] << 16)) & 0x7fffff; + #endif + /* Check if value is in valid range. */ + if (t0 < DILITHIUM_Q) { + /* Store value in polynomial and increment count of values. */ + a[j++] = t0; + } + /* Check if value is in valid range. */ + if (t1 < DILITHIUM_Q) { + /* Store value in polynomial and increment count of values. */ + a[j++] = t1; + } + /* Check if value is in valid range. */ + if (t2 < DILITHIUM_Q) { + /* Store value in polynomial and increment count of values. */ + a[j++] = t2; + } + /* Check if value is in valid range. */ + if (t3 < DILITHIUM_Q) { + /* Store value in polynomial and increment count of values. */ + a[j++] = t3; + } + /* Check if value is in valid range. */ + if (t4 < DILITHIUM_Q) { + /* Store value in polynomial and increment count of values. */ + a[j++] = t4; + } + /* Check if value is in valid range. */ + if (t5 < DILITHIUM_Q) { + /* Store value in polynomial and increment count of values. */ + a[j++] = t5; + } + /* Check if value is in valid range. */ + if (t6 < DILITHIUM_Q) { + /* Store value in polynomial and increment count of values. */ + a[j++] = t6; + } + /* Check if value is in valid range. */ + if (t7 < DILITHIUM_Q) { + /* Store value in polynomial and increment count of values. */ + a[j++] = t7; + } + } + if (j < DILITHIUM_N) { + /* Use the remaining triplets, checking we have enough. */ + for (; c < DILITHIUM_GEN_A_BYTES; c += 3) { + #if defined(LITTLE_ENDIAN_ORDER) && \ + (WOLFSSL_DILITHIUM_ALIGNMENT == 0) + /* Load 32-bit value and mask out 23 bits. */ + sword32 t = *((sword32*)(h + c)) & 0x7fffff; + #else + /* Load 24-bit value and mask out 23 bits. */ + sword32 t = (h[c] + ((sword32)h[c+1] << 8) + + ((sword32)h[c+2] << 16)) & 0x7fffff; + #endif + /* Check if value is in valid range. */ + if (t < DILITHIUM_Q) { + /* Store value in polynomial and increment count of values. + */ + a[j++] = t; + /* Check we whether we have enough yet. */ + if (j == DILITHIUM_N) { + break; + } + } + } + } +#endif + /* Keep generating more blocks and using triplets until we have enough. + */ + while (j < DILITHIUM_N) { + /* Squeeze out a block - 168 bytes = 56 values. */ + ret = wc_Shake128_SqueezeBlocks(shake128, h, 1); + if (ret != 0) { + break; + } + /* Use triplets until run out or have enough for polynomial. */ + for (c = 0; c < DILITHIUM_GEN_A_BLOCK_BYTES; c += 3) { + #if defined(LITTLE_ENDIAN_ORDER) && \ + (WOLFSSL_DILITHIUM_ALIGNMENT == 0) + /* Load 32-bit value and mask out 23 bits. */ + sword32 t = *((sword32*)(h + c)) & 0x7fffff; + #else + /* Load 24-bit value and mask out 23 bits. */ + sword32 t = (h[c] + ((sword32)h[c+1] << 8) + + ((sword32)h[c+2] << 16)) & 0x7fffff; + #endif + /* Check if value is in valid range. */ + if (t < DILITHIUM_Q) { + /* Store value in polynomial and increment count of values. + */ + a[j++] = t; + /* Check we whether we have enough yet. */ + if (j == DILITHIUM_N) { + break; + } + } + } + } + } + +#if !defined(WOLFSSL_DILITHIUM_VERIFY_NO_MALLOC) && defined(WOLFSSL_SMALL_STACK) + XFREE(h, NULL, DYNAMIC_TYPE_DILITHIUM); +#endif + return ret; +#endif +} + +#if !defined(WOLFSSL_DILITHIUM_VERIFY_ONLY) || \ + !defined(WOLFSSL_DILITHIUM_VERIFY_SMALL_MEM) +/* Expand the seed to create matrix a. + * + * FIPS 204. 8.3: Algorithm 26 ExpandA(rho) + * 1: for r from 0 to k - 1 do + * 2: for s from 0 to l - 1 do + * 3: A_hat[r,s] <- RejNTTPoly(rho||IntegerToBits(s,8)|| + * IntegerToBits(r,8)) + * 4: end for + * 5: end for + * 6: return A_hat + * + * @param [in, out] shake128 SHAKE-128 object. + * @param [in] pub_seed Seed to generate stream of data. + * @param [in] k First dimension of matrix a. + * @param [in] l Second dimension of matrix a. + * @param [out] a Matrix of polynomials. + * @return 0 on success. + * @return Negative on hash error. + */ +static int dilithium_expand_a(wc_Shake* shake128, const byte* pub_seed, byte k, + byte l, sword32* a) +{ + int ret = 0; + byte r; + byte s; + byte seed[DILITHIUM_GEN_A_SEED_SZ]; + + /* Copy the seed into a buffer that has space for s and r. */ + XMEMCPY(seed, pub_seed, DILITHIUM_PUB_SEED_SZ); + /* Step 1: Loop over first dimension of matrix. */ + for (r = 0; (ret == 0) && (r < k); r++) { + /* Put r into buffer to be hashed. */ + seed[DILITHIUM_PUB_SEED_SZ + 1] = r; + /* Step 2: Loop over second dimension of matrix. */ + for (s = 0; (ret == 0) && (s < l); s++) { + /* Put s into buffer to be hashed. */ + seed[DILITHIUM_PUB_SEED_SZ + 0] = s; + /* Step 3: Create polynomial from hashing seed. */ + ret = dilithium_rej_ntt_poly(shake128, seed, a, NULL); + /* Next polynomial. */ + a += DILITHIUM_N; + } + } + + return ret; +} +#endif + +#ifndef WOLFSSL_DILITHIUM_NO_MAKE_KEY + +#if !defined(WOLFSSL_NO_ML_DSA_44) || !defined(WOLFSSL_NO_ML_DSA_87) +/* Check random value is in valid range. + * + * FIPS 204. 8.1: Algorithm 9 CoeffFromHalfByte(b) + * 1: if b < 15 + * + * @param [in] b Random half-byte (nibble) value. + * @param [in] eta Range specifier of result. Will always be 2 - unused. + * @return 1 when value less than 9. + * @return 0 when value greater than or equal to 9. + */ +#define DILITHIUM_COEFF_S_VALID_ETA2(b) \ + ((b) < DILITHIUM_ETA_2_MOD) + +static const byte dilithium_coeff_eta2[] = { + -2, -1, 0, 1, 2, + -2, -1, 0, 1, 2, + -2, -1, 0, 1, 2 +}; +/* Convert random value 0..15 to a value in range of -2..2. + * + * FIPS 204. 8.1: Algorithm 9 CoeffFromHalfByte(b) + * 1: return 2 - (b mod 5) + * + * @param [in] b Random half-byte (nibble) value. + * @return Value in range of -2..2 on success. + */ +#define DILITHIUM_COEFF_S_ETA2(b) \ + (dilithium_coeff_eta2[b]) +#endif + +#ifndef WOLFSSL_NO_ML_DSA_65 +/* Check random value is in valid range. + * + * FIPS 204. 8.1: Algorithm 9 CoeffFromHalfByte(b) + * 3: if b < 9 + * + * @param [in] b Random half-byte (nibble) value. + * @param [in] eta Range specifier of result. Will always be 4 - unused. + * @return 1 when value less than 9. + * @return 0 when value greater than or equal to 9. + */ +#define DILITHIUM_COEFF_S_VALID_ETA4(b) \ + ((b) < DILITHIUM_ETA_4_MOD) + +/* Convert random value 0..15 to a value in range of -4..4. + * + * FIPS 204. 8.1: Algorithm 9 CoeffFromHalfByte(b) + * 3: return 4 - b + * + * @param [in] b Random half-byte (nibble) value. + * @param [in] eta Range specifier of result. Will always be 4 - unused. + * @return Value in range of -4..4 on success. + */ +#define DILITHIUM_COEFF_S_ETA4(b) \ + (4 - (b)) +#endif + +#if !defined(WOLFSSL_NO_ML_DSA_44) || !defined(WOLFSSL_NO_ML_DSA_87) +#ifndef WOLFSSL_NO_ML_DSA_65 + +/* Check random value is in valid range. + * + * FIPS 204. 8.1: Algorithm 9 CoeffFromHalfByte(b) + * 1: if eta = 2 and b < 15 + * 2: else + * 3: if eta = 4 and b < 9 + * + * @param [in] b Random half-byte (nibble) value. + * @param [in] eta Range specifier of result. + * @return Value in range of -ETA..ETA on success. + */ +#define DILITHIUM_COEFF_S_VALID(b, eta) \ + (((eta) == DILITHIUM_ETA_2) ? DILITHIUM_COEFF_S_VALID_ETA2(b) : \ + DILITHIUM_COEFF_S_VALID_ETA4(b)) + +/* Convert random value 0..15 to a value in range of -ETA..ETA. + * + * FIPS 204. 8.1: Algorithm 9 CoeffFromHalfByte(b) + * 1: if eta = 2 then return 2 - (b mod 5) + * 2: else + * 3: if eta = 4 then return 4 - b + * ... + * 6: end if + * + * @param [in] b Random half-byte (nibble) value. + * @param [in] eta Range specifier of result. + * @return Value in range of -ETA..ETA on success. + */ +#define DILITHIUM_COEFF_S(b, eta) \ + (((eta) == DILITHIUM_ETA_2) ? DILITHIUM_COEFF_S_ETA2(b) \ + : DILITHIUM_COEFF_S_ETA4(b)) + +#else + +/* Check random value is in valid range. + * + * FIPS 204. 8.1: Algorithm 9 CoeffFromHalfByte(b) + * 1: if b < 15 + * + * @param [in] b Random half-byte (nibble) value. + * @param [in] eta Range specifier of result. Will always be 2 - unused. + * @return 1 when value less than 9. + * @return 0 when value greater than or equal to 9. + */ +#define DILITHIUM_COEFF_S_VALID(b, eta) \ + DILITHIUM_COEFF_S_VALID_ETA2(b) + +/* Convert random value 0..15 to a value in range of -2..2. + * + * FIPS 204. 8.1: Algorithm 9 CoeffFromHalfByte(b) + * 1: return 2 - (b mod 5) + * + * @param [in] b Random half-byte (nibble) value. + * @param [in] eta Range specifier of result. Will always be 2 - unused. + * @return Value in range of -2..2 on success. + */ +#define DILITHIUM_COEFF_S(b, eta) \ + DILITHIUM_COEFF_S_ETA2(b) + +#endif /* WOLFSSL_NO_ML_DSA_65 */ + +#else + +/* Check random value is in valid range. + * + * FIPS 204. 8.1: Algorithm 9 CoeffFromHalfByte(b) + * 3: if b < 9 + * + * @param [in] b Random half-byte (nibble) value. + * @param [in] eta Range specifier of result. Will always be 4 - unused. + * @return 1 when value less than 9. + * @return 0 when value greater than or equal to 9. + */ +#define DILITHIUM_COEFF_S_VALID(b, eta) \ + DILITHIUM_COEFF_S_VALID_ETA4(b) + +/* Convert random value 0..15 to a value in range of -4..4. + * + * FIPS 204. 8.1: Algorithm 9 CoeffFromHalfByte(b) + * 3: return 4 - b + * + * @param [in] b Random half-byte (nibble) value. + * @param [in] eta Range specifier of result. Will always be 4 - unused. + * @return Value in range of -4..4 on success. + */ +#define DILITHIUM_COEFF_S(b, eta) \ + DILITHIUM_COEFF_S_ETA4(b) + +#endif /* !WOLFSSL_NO_ML_DSA_44 || !WOLFSSL_NO_ML_DSA_87 */ + +/* Extract a coefficient from a nibble of z. + * + * Breaks out of loop when we have enough coefficients. + * + * @param [in] z A random value. + * @param [in] rs Amount to shift right. + * @param [in] t Temporary result. + * @param [in] eta ETA value from parameters. + * @return Value in range -eta..eta on success. + * @return Falsam (0x10) when random value out of range. + */ +#define EXTRACT_COEFF_NIBBLE_CHECK_J(z, rs, t, eta) \ + (t) = (sword8)(((z) >> (rs)) & 0xf); \ + /* Step 7: Check we have a valid coefficient. */ \ + if (DILITHIUM_COEFF_S_VALID(t, eta)) { \ + (t) = DILITHIUM_COEFF_S(t, eta); \ + /* Step 8: Store coefficient as next polynomial value. \ + * Step 9: Increment count of polynomial values set. */ \ + s[j++] = (sword32)(t); \ + if (j == DILITHIUM_N) { \ + break; \ + } \ + } + +/* Extract a coefficient from a nibble of z. + * + * @param [in] z A random value. + * @param [in] rs Amount to shift right. + * @param [in] t Temporary result. + * @param [in] eta ETA value from parameters. + * @return Value in range -eta..eta on success. + * @return Falsam (0x10) when random value out of range. + */ +#define EXTRACT_COEFF_NIBBLE(z, rs, t, eta) \ + (t) = (sword8)(((z) >> (rs)) & 0xf); \ + /* Step 7: Check we have a valid coefficient. */ \ + if (DILITHIUM_COEFF_S_VALID(t, eta)) { \ + (t) = DILITHIUM_COEFF_S(t, eta); \ + /* Step 8: Store coefficient as next polynomial value. \ + * Step 9: Increment count of polynomial values set. */ \ + s[j++] = (sword32)(t); \ + } + + +/* Extract coefficients from hash - z. + * + * FIPS 204. 8.3: Algorithm 25 RejBoundedPoly(rho) + * 2: c <- 0 + * 5: z0 <- CoeffFromHalfByte(z mod 16, eta) + * 6: z1 <- CoeffFromHalfByte(lower(z / 16), eta) + * 7: if z0 != falsam then + * 8: aj <- z0 + * 9: j <- j + 1 + * 10: end if + * 11: if z1 != falsam then + * 12: aj <- z1 + * 13: j <- j + 1 + * 14: end if + * 15: c <- c + 1 + * + * @param [in] z Hash data to extract coefficients from. + * @param [in] zLen Length of z in bytes. + * @param [in] eta Range specifier of each value. + * @param [out] s Polynomial to fill with coefficients. + * @param [in, out] cnt Current count of coefficients in polynomial. + */ +static void dilithium_extract_coeffs(byte* z, unsigned int zLen, byte eta, + sword32* s, unsigned int* cnt) +{ +#ifdef WOLFSSL_DILITHIUM_NO_LARGE_CODE + unsigned int j = *cnt; + unsigned int c; + + (void)eta; + + /* Extract values from the squeezed data. */ + for (c = 0; c < zLen; c++) { + sword8 t; + + /* Step 5: Get coefficient from bottom nibble. */ + EXTRACT_COEFF_NIBBLE_CHECK_J(z[c], 0, t, eta); + /* Step 6: Get coefficient from top nibble. */ + EXTRACT_COEFF_NIBBLE_CHECK_J(z[c], 4, t, eta); + } + + *cnt = j; +#else + unsigned int j = *cnt; + unsigned int c; + unsigned int min = (DILITHIUM_N - j) / 2; + + (void)eta; + +#if defined(LITTLE_ENDIAN_ORDER) +#ifdef WC_64BIT_CPU + min &= ~(unsigned int)7; + /* Extract values from the squeezed data. */ + for (c = 0; c < min; c += 8) { + word64 z64 = *(word64*)z; + sword8 t; + + /* Do each nibble from lowest to highest 16 at a time. */ + EXTRACT_COEFF_NIBBLE(z64, 0, t, eta); + EXTRACT_COEFF_NIBBLE(z64, 4, t, eta); + EXTRACT_COEFF_NIBBLE(z64, 8, t, eta); + EXTRACT_COEFF_NIBBLE(z64, 12, t, eta); + EXTRACT_COEFF_NIBBLE(z64, 16, t, eta); + EXTRACT_COEFF_NIBBLE(z64, 20, t, eta); + EXTRACT_COEFF_NIBBLE(z64, 24, t, eta); + EXTRACT_COEFF_NIBBLE(z64, 28, t, eta); + EXTRACT_COEFF_NIBBLE(z64, 32, t, eta); + EXTRACT_COEFF_NIBBLE(z64, 36, t, eta); + EXTRACT_COEFF_NIBBLE(z64, 40, t, eta); + EXTRACT_COEFF_NIBBLE(z64, 44, t, eta); + EXTRACT_COEFF_NIBBLE(z64, 48, t, eta); + EXTRACT_COEFF_NIBBLE(z64, 52, t, eta); + EXTRACT_COEFF_NIBBLE(z64, 56, t, eta); + EXTRACT_COEFF_NIBBLE(z64, 60, t, eta); + } +#else + min &= ~(unsigned int)3; + /* Extract values from the squeezed data. */ + for (c = 0; c < min; c += 4) { + word32 z32 = *(word32*)z; + sword8 t; + + /* Do each nibble from lowest to highest 8 at a time. */ + EXTRACT_COEFF_NIBBLE(z32, 0, t, eta); + EXTRACT_COEFF_NIBBLE(z32, 4, t, eta); + EXTRACT_COEFF_NIBBLE(z32, 8, t, eta); + EXTRACT_COEFF_NIBBLE(z32, 12, t, eta); + EXTRACT_COEFF_NIBBLE(z32, 16, t, eta); + EXTRACT_COEFF_NIBBLE(z32, 20, t, eta); + EXTRACT_COEFF_NIBBLE(z32, 24, t, eta); + EXTRACT_COEFF_NIBBLE(z32, 28, t, eta); + } +#endif +#else + /* Extract values from the squeezed data. */ + for (c = 0; c < min; c++) { + sword8 t; + + /* Step 5: Get coefficient from bottom nibble. */ + EXTRACT_COEFF_NIBBLE(z[c], 0, t, eta); + EXTRACT_COEFF_NIBBLE(z[c], 4, t, eta); + } +#endif + if (j != DILITHIUM_N) { + /* Extract values from the squeezed data. */ + for (; c < zLen; c++) { + sword8 t; + + EXTRACT_COEFF_NIBBLE_CHECK_J(z[c], 0, t, eta); + EXTRACT_COEFF_NIBBLE_CHECK_J(z[c], 4, t, eta); + } + } + + *cnt = j; +#endif +} + +/* Create polynomial from hashing the seed with bounded values. + * + * FIPS 204. 8.3: Algorithm 25 RejBoundedPoly(rho) + * 1: j <- 0 + * ... + * 3: while j < 256 do + * 4: z <- H(rho)[[c]] + * ... [Extract coefficients into polynomial from z] + * 16: end while + * 17: return a + * + * @param [in, out] shake256 SHAKE-256 object. + * @param [in] seed Seed, rho, to hash to generate values. + * @param [in] eta Range specifier of each value. + * @return 0 on success. + * @return Negative on hash error. + */ +static int dilithium_rej_bound_poly(wc_Shake* shake256, byte* seed, sword32* s, + byte eta) +{ +#ifdef WOLFSSL_DILITHIUM_SMALL + int ret; + unsigned int j = 0; + byte z[DILITHIUM_GEN_S_BLOCK_BYTES]; + + /* Initialize SHAKE-256 object for new hash. */ + ret = wc_InitShake256(shake256, NULL, INVALID_DEVID); + if (ret == 0) { + /* Absorb the seed. */ + ret = wc_Shake256_Absorb(shake256, seed, DILITHIUM_GEN_A_SEED_SZ); + } + if (ret == 0) { + do { + /* Squeeze out another block. */ + ret = wc_Shake256_SqueezeBlocks(shake256, z, 1); + if (ret != 0) { + break; + } + /* Extract up to the 256 valid coefficients for polynomial. */ + dilithium_extract_coeffs(z, DILITHIUM_GEN_S_BLOCK_BYTES, eta, s, + &j); + } + /* Check we got enough values to fill polynomial. */ + while (j < DILITHIUM_N); + } + + return ret; +#else + int ret; + unsigned int j = 0; + byte z[DILITHIUM_GEN_S_BYTES]; + + /* Absorb seed and squeeze out some blocks. */ + ret = dilithium_squeeze256(shake256, seed, DILITHIUM_GEN_S_SEED_SZ, z, + DILITHIUM_GEN_S_NBLOCKS); + if (ret == 0) { + /* Extract up to 256 valid coefficients for polynomial. */ + dilithium_extract_coeffs(z, DILITHIUM_GEN_S_BYTES, eta, s, &j); + /* Check we got enough values to fill polynomial. */ + while (j < DILITHIUM_N) { + /* Squeeze out another block. */ + ret = wc_Shake256_SqueezeBlocks(shake256, z, 1); + if (ret != 0) { + break; + } + /* Extract up to the 256 valid coefficients for polynomial. */ + dilithium_extract_coeffs(z, DILITHIUM_GEN_S_BLOCK_BYTES, eta, s, + &j); + } + } + + return ret; +#endif +} + +/* Expand private seed into vectors s1 and s2. + * + * FIPS 204. 8.3: Algorithm 27 ExpandS(rho) + * 1: for r from 0 to l - 1 do + * 2: s1[r] <- RejBoundedPoly(rho||IntegerToBits(r,16)) + * 3: end for + * 4: for r from 0 to k - 1 do + * 5: s2[r] <- RejBoundedPoly(rho||IntegerToBits(r + l,16)) + * 6: end for + * 7: return (s1,s2) + * + * @param [in, out] shake256 SHAKE-256 object. + * @param [in] priv_seed Private seed, rho, to expand. + * @param [in] eta Range specifier of each value. + * @param [out] s1 First vector of polynomials. + * @param [in] s1Len Dimension of first vector. + * @param [out] s2 Second vector of polynomials. + * @param [in] s2Len Dimension of second vector. + * @return 0 on success. + * @return Negative on hash error. + */ +static int dilithium_expand_s(wc_Shake* shake256, byte* priv_seed, byte eta, + sword32* s1, byte s1Len, sword32* s2, byte s2Len) +{ + int ret = 0; + byte r; + byte seed[DILITHIUM_GEN_S_SEED_SZ]; + + /* Copy the seed into a buffer that has space for r. */ + XMEMCPY(seed, priv_seed, DILITHIUM_PRIV_SEED_SZ); + /* Set top 8-bits of r in buffer to 0. */ + seed[DILITHIUM_PRIV_SEED_SZ + 1] = 0; + /* Step 1: Each polynomial in s1. */ + for (r = 0; (ret == 0) && (r < s1Len); r++) { + /* Set bottom 8-bits of r into buffer. */ + seed[DILITHIUM_PRIV_SEED_SZ] = r; + + /* Step 2: Generate polynomial for s1. */ + ret = dilithium_rej_bound_poly(shake256, seed, s1, eta); + /* Next polynomial in s1. */ + s1 += DILITHIUM_N; + } + /* Step 4: Each polynomial in s2. */ + for (r = 0; (ret == 0) && (r < s2Len); r++) { + /* Set bottom 8-bits of r + l into buffer. */ + seed[DILITHIUM_PRIV_SEED_SZ] = r + s1Len; + /* Step 5: Generate polynomial for s1. */ + ret = dilithium_rej_bound_poly(shake256, seed, s2, eta); + /* Next polynomial in s2. */ + s2 += DILITHIUM_N; + } + + return ret; +} + +#endif /* !WOLFSSL_DILITHIUM_NO_MAKE_KEY */ + +#ifndef WOLFSSL_DILITHIUM_NO_SIGN +/* Expand the private random seed into vector y. + * + * FIPS 204. 8.3: Algorithm 28 ExpandMask(rho, mu) + * 1: c <- 1 + bitlen(GAMMA1 - 1) + * 2: for r from 0 to l - 1 do + * 3: n <- IntegerToBits(mu + r, 16) + * 4: v <- (H(rho||n)[[32rc]], H(rho||n)[[32rc + 1]], ..., + * H(rho||n)[[32rc + 32c - 1]]) + * 5: s[r] <- BitUnpack(v, GAMMA-1, GAMMA1) + * 6: end for + * 7: return s + * + * @param [in, out] shake256 SHAKE-256 object. + * @param [in, out] seed Buffer containing seed to expand. + * Has space for two bytes to be appended. + * @param [in] kappa Base value to append to seed. + * @param [in] gamma1_bits Number of bits per value. + * @param [out] y Vector of polynomials. + * @param [in] l Dimension of vector. + * @return 0 on success. + * @return Negative on hash error. + */ +static int dilithium_expand_mask(wc_Shake* shake256, byte* seed, word16 kappa, + byte gamma1_bits, sword32* y, byte l) +{ + int ret = 0; + byte r; + byte v[DILITHIUM_MAX_V]; + + /* Step 2: For each polynomial of vector. */ + for (r = 0; (ret == 0) && (r < l); r++) { + /* Step 3: Calculate value to append to seed. */ + word16 n = kappa + r; + + /* Step 4: Append to seed and squeeze out data. */ + seed[DILITHIUM_PRIV_RAND_SEED_SZ + 0] = n; + seed[DILITHIUM_PRIV_RAND_SEED_SZ + 1] = n >> 8; + ret = dilithium_squeeze256(shake256, seed, DILITHIUM_Y_SEED_SZ, v, + DILITHIUM_MAX_V_BLOCKS); + if (ret == 0) { + /* Decode v into polynomial. */ + dilithium_decode_gamma1(v, gamma1_bits, y); + /* Next polynomial. */ + y += DILITHIUM_N; + } + } + + return ret; +} +#endif + +#if !defined(WOLFSSL_DILITHIUM_NO_SIGN) || !defined(WOLFSSL_DILITHIUM_NO_VERIFY) +/* Expand commit to a polynomial. + * + * FIPS 204. 8.3: Algorithm 23 SampleInBall(rho) + * 1: c <- 0 + * 2: k <- 8 + * 3: for i from 256 - TAU to 255 do + * 4: while H(rho)[[k]] > i do + * 5: k <- k + 1 + * 6: end while + * 7: j <- H(rho)[[k]] + * 8: c[i] <- c[j] + * 9: c[j] <- (-1)^H(rho)[i+TAU-256] + * 10: k <- k + 1 + * 11: end for + * 12: return c + * + * @param [in] shake256 SHAKE-256 object. + * @param [in] seed Buffer containing seed to expand. + * @param [in] tau Number of +/- 1s in polynomial. + * @param [out] c Commit polynomial. + * @param [in] key_block Memory to use for block from key. + * @return 0 on success. + * @return MEMORY_E when dynamic memory allocation fails. + * @return Negative on hash error. + */ +static int dilithium_sample_in_ball(wc_Shake* shake256, const byte* seed, + byte tau, sword32* c, byte* key_block) +{ + int ret = 0; + unsigned int k; + unsigned int i; + unsigned int s; +#if defined(WOLFSSL_SMALL_STACK) || defined(WOLFSSL_DILITHIUM_VERIFY_NO_MALLOC) + byte* block = NULL; +#else + byte block[DILITHIUM_GEN_C_BLOCK_BYTES]; +#endif + byte signs[DILITHIUM_SIGN_BYTES]; + + (void)key_block; + +#ifdef WOLFSSL_DILITHIUM_VERIFY_NO_MALLOC + block = key_block; +#elif defined(WOLFSSL_SMALL_STACK) + block = (byte*)XMALLOC(DILITHIUM_GEN_C_BLOCK_BYTES, NULL, + DYNAMIC_TYPE_DILITHIUM); + if (block == NULL) { + ret = MEMORY_E; + } +#endif + + if (ret == 0) { + /* Set polynomial to all zeros. */ + XMEMSET(c, 0, DILITHIUM_POLY_SIZE); + + /* Generate a block of data from seed. */ + ret = dilithium_shake256(shake256, seed, DILITHIUM_SEED_SZ, block, + DILITHIUM_GEN_C_BLOCK_BYTES); + } + if (ret == 0) { + /* Copy first 8 bytes of first hash block as random sign bits. */ + XMEMCPY(signs, block, DILITHIUM_SIGN_BYTES); + /* Step 1: Initialize sign bit index. */ + s = 0; + /* Step 2: First 8 bytes are used for sign. */ + k = DILITHIUM_SIGN_BYTES; + } + + /* Step 3: Put in TAU +/- 1s. */ + for (i = DILITHIUM_N - tau; (ret == 0) && (i < DILITHIUM_N); i++) { + unsigned int j; + do { + /* Check whether block is exhausted. */ + if (k == DILITHIUM_GEN_C_BLOCK_BYTES) { + /* Generate a new block. */ + ret = wc_Shake256_SqueezeBlocks(shake256, block, 1); + /* Restart hash block index. */ + k = 0; + } + /* Step 7: Get random byte from block as index. + * Step 5 and 10: Increment hash block index. + */ + j = block[k++]; + } + /* Step 4: Get another random if random index is a future swap index. */ + while ((ret == 0) && (j > i)); + + /* Step 8: Move value from random index to current index. */ + c[i] = c[j]; + /* Step 9: Set value at random index to +/- 1. */ + c[j] = 1 - ((((signs[s >> 3]) >> (s & 0x7)) & 0x1) << 1); + /* Next sign bit index. */ + s++; + } + +#if !defined(WOLFSSL_DILITHIUM_VERIFY_NO_MALLOC) && defined(WOLFSSL_SMALL_STACK) + XFREE(block, NULL, DYNAMIC_TYPE_DILITHIUM); +#endif + return ret; +} +#endif + +/****************************************************************************** + * Decompose operations + ******************************************************************************/ + +#if !defined(WOLFSSL_DILITHIUM_NO_SIGN) || !defined(WOLFSSL_DILITHIUM_NO_VERIFY) +#ifndef WOLFSSL_NO_ML_DSA_44 +/* Decompose value into high and low based on GAMMA2 being ((q-1) / 88). + * + * FIPS 204. 8.4: Algorithm 30 Decompose(r) + * 1: r+ <- r mod q + * 2: r0 <- r+ mod+/- (2 * GAMMA2) + * 3: if r+ - r0 = q - 1 then + * 4: r1 <- 0 + * 5: r0 <- r0 - 1 + * 6: else r1 <- (r+ - r0) / (2 * GAMMA2) + * 7: end if + * 8: return (r1, r0) + * + * DILITHIUM_Q_LOW_88_2 = 0x2e800 = 0b101110100000000000 + * t1 * DILITHIUM_Q_LOW_88_2 = (t1 << 18) - (t1 << 16) - (t1 << 12) - (t1 << 11) + * = ((93 * t1) << 11) + * Nothing faster than straight multiply. + * + * Implementation using Barrett Reduction. + * + * @param [in] r Value to decompose. + * @param [out] r0 Low bits. + * @param [out] r1 High bits. + */ +static void dilithium_decompose_q88(sword32 r, sword32* r0, sword32* r1) +{ + sword32 t0; + sword32 t1; +#ifdef DILITHIUM_MUL_SLOW + sword32 t2; +#endif + + /* Roundup r and calculate approx high value. */ +#if !defined(DILITHIUM_MUL_44_SLOW) + t1 = ((r * 44) + ((DILITHIUM_Q_LOW_88 - 1) * 44)) >> 23; +#elif !defined(DILITHIUM_MUL_11_SLOW) + t1 = ((r * 11) + ((DILITHIUM_Q_LOW_88 - 1) * 11)) >> 21; +#else + t0 = r + DILITHIUM_Q_LOW_88 - 1; + t1 = ((t0 << 3) + (t0 << 1) + t0) >> 21; +#endif + /* Calculate approx low value. */ + t0 = r - (t1 * DILITHIUM_Q_LOW_88_2); +#ifndef DILITHIUM_MUL_SLOW + /* Calculate real high value, When t0 > modulus, +1 to approx high value. */ + t1 += ((word32)(DILITHIUM_Q_LOW_88 - t0)) >> 31; + /* Calculate real low value. */ + t0 = r - (t1 * DILITHIUM_Q_LOW_88_2); +#else + /* Calculate real high value, When t0 > modulus, +1 to approx high value. */ + t2 = ((word32)(DILITHIUM_Q_LOW_88 - t0)) >> 31; + t1 += t2; + /* Calculate real low value. */ + t0 -= (0 - t2) & DILITHIUM_Q_LOW_88_2; +#endif + /* -1 from low value if high value is 44. Was 43 but low is negative. */ + t0 -= ((word32)(43 - t1)) >> 31; + /* When high value is 44, too large, set to 0. */ + t1 &= 0 - (((word32)(t1 - 44)) >> 31); + + *r0 = t0; + *r1 = t1; +} +#endif + +#if !defined(WOLFSSL_NO_ML_DSA_65) || !defined(WOLFSSL_NO_ML_DSA_87) +/* Decompose value into high and low based on GAMMA2 being ((q-1) / 32). + * + * FIPS 204. 8.4: Algorithm 30 Decompose(r) + * 1: r+ <- r mod q + * 2: r0 <- r+ mod+/- (2 * GAMMA2) + * 3: if r+ - r0 = q - 1 then + * 4: r1 <- 0 + * 5: r0 <- r0 - 1 + * 6: else r1 <- (r+ - r0) / (2 * GAMMA2) + * 7: end if + * 8: return (r1, r0) + * + * DILITHIUM_Q_LOW_32_2 = 0x7fe00 = 0b1111111111000000000 + * t1 * DILITHIUM_Q_LOW_32_2 = (t1 << 19) - (t1 << 9) + * + * Implementation using Barrett Reduction. + * + * @param [in] r Value to decompose. + * @param [out] r0 Low bits. + * @param [out] r1 High bits. + */ +static void dilithium_decompose_q32(sword32 r, sword32* r0, sword32* r1) +{ + sword32 t0; + sword32 t1; + + /* Roundup r and calculate approx high value. */ + t1 = (r + DILITHIUM_Q_LOW_32 - 1) >> 19; + /* Calculate approx low value. */ + t0 = r - (t1 << 19) + (t1 << 9); + /* Calculate real high value, When t0 > modulus, +1 to approx high value. */ + t1 += ((word32)(DILITHIUM_Q_LOW_32 - t0)) >> 31; + /* Calculate real low value. */ + t0 = r - (t1 << 19) + (t1 << 9); + /* -1 from low value if high value is 16. Was 15 but low is negative. */ + t0 -= t1 >> 4; + /* When high value is 16, too large, set to 0. */ + t1 &= 0xf; + + *r0 = t0; + *r1 = t1; +} +#endif +#endif + +#ifndef WOLFSSL_DILITHIUM_NO_SIGN + +/* Decompose vector of polynomials into high and low based on GAMMA2. + * + * @param [in] r Vector of polynomials to decompose. + * @param [in] k Dimension of vector. + * @param [in] gamma2 Low-order rounding range, GAMMA2. + * @param [out] r0 Low parts in vector of polynomials. + * @param [out] r1 High parts in vector of polynomials. + */ +static void dilithium_vec_decompose(const sword32* r, byte k, sword32 gamma2, + sword32* r0, sword32* r1) +{ + unsigned int i; + unsigned int j; + + (void)k; + +#ifndef WOLFSSL_NO_ML_DSA_44 + if (gamma2 == DILITHIUM_Q_LOW_88) { + /* For each polynomial of vector. */ + for (i = 0; i < PARAMS_ML_DSA_44_K; i++) { + /* For each value of polynomial. */ + for (j = 0; j < DILITHIUM_N; j++) { + /* Decompose value into two vectors. */ + dilithium_decompose_q88(r[j], &r0[j], &r1[j]); + } + /* Next polynomial of vectors. */ + r += DILITHIUM_N; + r0 += DILITHIUM_N; + r1 += DILITHIUM_N; + } + } + else +#endif +#if !defined(WOLFSSL_NO_ML_DSA_65) || !defined(WOLFSSL_NO_ML_DSA_87) + if (gamma2 == DILITHIUM_Q_LOW_32) { + /* For each polynomial of vector. */ + for (i = 0; i < k; i++) { + /* For each value of polynomial. */ + for (j = 0; j < DILITHIUM_N; j++) { + /* Decompose value into two vectors. */ + dilithium_decompose_q32(r[j], &r0[j], &r1[j]); + } + /* Next polynomial of vectors. */ + r += DILITHIUM_N; + r0 += DILITHIUM_N; + r1 += DILITHIUM_N; + } + } + else +#endif + { + } +} + +#endif /* !WOLFSSL_DILITHIUM_NO_SIGN */ + +/****************************************************************************** + * Range check operation + ******************************************************************************/ + +#if !defined(WOLFSSL_DILITHIUM_NO_SIGN) || !defined(WOLFSSL_DILITHIUM_NO_VERIFY) +/* Check that the values of the vector are in range. + * + * Many places in FIPS 204. One example from Algorithm 2: + * 23: if ||z||inf >= GAMMA1 - BETA or ..., then (z, h) = falsam + * + * @param [in] a Vector of polynomials. + * @param [in] l Dimension of vector. + * @param [in] hi Largest value in range. + */ +static int dilithium_check_low(const sword32* a, byte l, sword32 hi) +{ + int ret = 1; + unsigned int i; + /* Calculate lowest range value. */ + sword32 nhi = -hi; + + /* For each polynomial of vector. */ + for (i = 0; (ret == 1) && (i < l); i++) { + unsigned int j; + /* For each value of polynomial. */ + for (j = 0; j < DILITHIUM_N; j++) { + /* Check range is -(hi-1)..(hi-1). */ + if ((a[j] <= nhi) || (a[j] >= hi)) { + /* Check failed. */ + ret = 0; + break; + } + } + /* Next polynomial. */ + a += DILITHIUM_N; + } + + return ret; +} +#endif + +/****************************************************************************** + * Hint operations + ******************************************************************************/ + +#ifndef WOLFSSL_DILITHIUM_NO_SIGN + +/* Compute hints indicating whether adding ct0 to w alters high bits of w. + * + * FIPS 204. 6: Algorithm 2 ML-DSA.Sign(sk, M) + * ... + * 26: h <- MakeHint(-<>, w - <> + <>) + * 27: if ... or the number of 1's in h is greater than OMEGA, then + * (z, h) <- falsam + * ... + * 32: sigma <- sigEncode(c_tilda, z mod+/- q, h) + * ... + * + * FIPS 204. 8.4: Algorithm 33 MakeHint(z, r) + * 1: r1 <- HighBits(r) + * 2: v1 <- HightBits(r+z) + * 3: return [[r1 != v1]] + * + * FIPS 204. 8.2: Algorithm 20 sigEncode(c_tilde, z, h) + * ... + * 5: sigma <- sigma || HintBitPack(h) + * ... + * + * FIPS 204. 8.1: Algorithm 14 HintBitPack(h) + * ... + * 2: Index <- 0 + * 3. for i from 0 to k - 1 do + * 4: for j from 0 to 255 do + * 5: if h[i]j != 0 then + * 6: y[Index] <- j + * 7: Index <- Index + 1 + * 8: end if + * 9: end for + * 10: y[OMEGA + i] <- Index + * 11: end for + * 12: return y + * + * @param [in] s Vector of polynomials that is sum of ct0 and w0. + * @param [in] w1 Vector of polynomials that is high part of w. + * @param [in] k Dimension of vectors. + * @param [in] gamma2 Low-order rounding range, GAMMA2. + * @param [in] omega Maximum number of hints allowed. + * @param [out] h Encoded hints. + * return Number of hints on success. + * return Falsam of -1 when too many hints. + */ +static int dilithium_make_hint(const sword32* s, const sword32* w1, byte k, + word32 gamma2, byte omega, byte* h) +{ + unsigned int i; + unsigned int j; + byte idx = 0; + + (void)k; + (void)omega; + +#ifndef WOLFSSL_NO_ML_DSA_44 + if (gamma2 == DILITHIUM_Q_LOW_88) { + /* Alg 14, Step 2: For each polynomial of vector. */ + for (i = 0; i < PARAMS_ML_DSA_44_K; i++) { + /* Alg 14, Step 3: For each value of polynomial. */ + for (j = 0; j < DILITHIUM_N; j++) { + /* Alg 14, Step 4: Check whether hint is required. + * Did sum end up greater than low modulus or + * sum end up less than the negative of low modulus or + * sum is the negative of the low modulus and w1 is not zero, + * then w1 will be modified. + */ + if ((s[j] > (sword32)DILITHIUM_Q_LOW_88) || + (s[j] < -(sword32)DILITHIUM_Q_LOW_88) || + ((s[j] == -(sword32)DILITHIUM_Q_LOW_88) && + (w1[j] != 0))) { + /* Alg 14, Step 6, 7: Put index as hint modifier. */ + h[idx++] = (byte)j; + /* Alg 2, Step 27: If there are too many hints, return + * falsam of -1. */ + if (idx > PARAMS_ML_DSA_44_OMEGA) { + return -1; + } + } + } + /* Alg 14, Step 10: Store count of hints for polynomial at end of + * list. */ + h[omega + i] = idx; + + /* Next polynomial. */ + s += DILITHIUM_N; + w1 += DILITHIUM_N; + } + } + else +#endif +#if !defined(WOLFSSL_NO_ML_DSA_65) || !defined(WOLFSSL_NO_ML_DSA_87) + if (gamma2 == DILITHIUM_Q_LOW_32) { + /* Alg 14, Step 2: For each polynomial of vector. */ + for (i = 0; i < k; i++) { + /* Alg 14, Step 3: For each value of polynomial. */ + for (j = 0; j < DILITHIUM_N; j++) { + /* Alg 14, Step 4: Check whether hint is required. + * Did sum end up greater than low modulus or + * sum end up less than the negative of low modulus or + * sum is the negative of the low modulus and w1 is not zero, + * then w1 will be modified. + */ + if ((s[j] > (sword32)DILITHIUM_Q_LOW_32) || + (s[j] < -(sword32)DILITHIUM_Q_LOW_32) || + ((s[j] == -(sword32)DILITHIUM_Q_LOW_32) && + (w1[j] != 0))) { + /* Alg 14, Step 6, 7: Put index as hint modifier. */ + h[idx++] = (byte)j; + /* Alg 2, Step 27: If there are too many hints, return + * falsam of -1. */ + if (idx > omega) { + return -1; + } + } + } + /* Alg 14, Step 10: Store count of hints for polynomial at end of + * list. */ + h[omega + i] = idx; + + /* Next polynomial. */ + s += DILITHIUM_N; + w1 += DILITHIUM_N; + } + } + else +#endif + { + } + + /* Set remaining hints to zero. */ + XMEMSET(h + idx, 0, omega - idx); + return idx; +} + +#endif /* !WOLFSSL_DILITHIUM_NO_SIGN */ + +#ifndef WOLFSSL_DILITHIUM_NO_VERIFY +/* Check that the hints are valid. + * + * @param [in] h Hints to check + * @param [in] k Dimension of vector. + * @param [in] omega Maximum number of hints. Hint counts after this index. + * @return 0 when hints valid. + * @return SIG_VERIFY_E when hints invalid. + */ +static int dilithium_check_hint(const byte* h, byte k, byte omega) +{ + int ret = 0; + unsigned int o = 0; + unsigned int i; + + /* Skip polynomial index while count is 0. */ + while ((h[omega + o] == 0) && (o < k)) { + o++; + } + /* Check all possible hints. */ + for (i = 1; i < omega; i++) { + /* Done with polynomial if index equals count of hints. */ + if (i == h[omega + o]) { + /* Next polynomial index while count is index. */ + do { + o++; + } + while ((o < k) && (i == h[omega + o])); + /* Stop if hints for all polynomials checked. */ + if (o == k) { + break; + } + } + /* Ensure the last hint is less than the current hint. */ + else if (h[i - 1] > h[i]) { + ret = SIG_VERIFY_E; + break; + } + } + if (ret == 0) { + /* Use up any sizes that are the last element. */ + while ((o < k) && (i == h[omega + o])) { + o++; + } + /* Ensure all sizes were used. */ + if (o != k) { + ret = SIG_VERIFY_E; + } + } + /* Check remaining hints are 0. */ + for (; (ret == 0) && (i < omega); i++) { + if (h[i] != 0) { + ret = SIG_VERIFY_E; + } + } + + return ret; +} + +#ifndef WOLFSSL_NO_ML_DSA_44 +/* Use hints to modify w1. + * + * FIPS 204. 8.4: Algorithm 34 UseHint(h, r) + * 1: m <- (q - 1) / (2 * GAMMA2) + * 2: (r1, r0) <- Decompose(r) + * 3: if h == 1 and r0 > 0 return (r1 + 1) mod m + * 4: if h == 1 and r0 <= 0 return (r1 - 1) mod m + * 5: return r1 + * + * @param [in, out] w1 Vector of polynomials needing hints applied to. + * @param [in] h Hints to apply. In signature encoding. + * @param [in] i Dimension index. + * @param [in, out] op Pointer to current offset into hints. + */ +static void dilithium_use_hint_88(sword32* w1, const byte* h, unsigned int i, + byte* op) +{ + byte o = *op; + unsigned int j; + + /* For each value of polynomial. */ + for (j = 0; j < DILITHIUM_N; j++) { + sword32 r; + sword32 r0; + sword32 r1; +#ifdef DILITHIUM_USE_HINT_CT + /* Hint is 1 when index is next in hint list. */ + sword32 hint = ((o < h[PARAMS_ML_DSA_44_OMEGA + i]) & + (h[o] == (byte)j)); + + /* Increment hint offset if this index has hint. */ + o += hint; + /* Convert value to positive only range. */ + r = w1[j] + ((0 - (((word32)w1[j]) >> 31)) & DILITHIUM_Q); + /* Decompose value into low and high parts. */ + dilithium_decompose_q88(r, &r0, &r1); + /* Make hint positive or negative based on sign of r0. */ + hint = (1 - (2 * (((word32)r0) >> 31))) & (0 - hint); + /* Make w1 only the top part plus the hint. */ + w1[j] = r1 + hint; + + /* Fix up w1 to not be 44 but 0. */ + w1[j] &= 0 - (((word32)(w1[j] - 44)) >> 31); + /* Hint may have reduced 0 to -1 which is actually 43. */ + w1[j] += (0 - (((word32)w1[j]) >> 31)) & 44; +#else + /* Convert value to positive only range. */ + r = w1[j] + ((0 - (((word32)w1[j]) >> 31)) & DILITHIUM_Q); + /* Decompose value into low and high parts. */ + dilithium_decompose_q88(r, &r0, &r1); + /* Check for hint. */ + if ((o < h[PARAMS_ML_DSA_44_OMEGA + i]) && (h[o] == (byte)j)) { + /* Add or subtrac hint based on sign of r0. */ + r1 += 1 - (2 * (((word32)r0) >> 31)); + /* Go to next hint offset. */ + o++; + } + /* Fix up w1 to not be 44 but 0. */ + r1 &= 0 - (((word32)(r1 - 44)) >> 31); + /* Hint may have reduced 0 to -1 which is actually 43. */ + r1 += (0 - (((word32)r1) >> 31)) & 44; + /* Make w1 only the top part plus any hint. */ + w1[j] = r1; +#endif + } + *op = o; +} +#endif /* !WOLFSSL_NO_ML_DSA_44 */ + +#if !defined(WOLFSSL_NO_ML_DSA_65) || !defined(WOLFSSL_NO_ML_DSA_87) +/* Use hints to modify w1. + * + * FIPS 204. 8.4: Algorithm 34 UseHint(h, r) + * 1: m <- (q - 1) / (2 * GAMMA2) + * 2: (r1, r0) <- Decompose(r) + * 3: if h == 1 and r0 > 0 return (r1 + 1) mod m + * 4: if h == 1 and r0 <= 0 return (r1 - 1) mod m + * 5: return r1 + * + * @param [in, out] w1 Vector of polynomials needing hints applied to. + * @param [in] h Hints to apply. In signature encoding. + * @param [in] omega Max number of hints. Hint counts after this index. + * @param [in] i Dimension index. + * @param [in, out] op Pointer to current offset into hints. + */ +static void dilithium_use_hint_32(sword32* w1, const byte* h, byte omega, + unsigned int i, byte* op) +{ + byte o = *op; + unsigned int j; + + /* For each value of polynomial. */ + for (j = 0; j < DILITHIUM_N; j++) { + sword32 r; + sword32 r0; + sword32 r1; +#ifdef DILITHIUM_USE_HINT_CT + /* Hint is 1 when index is next in hint list. */ + sword32 hint = ((o < h[omega + i]) & (h[o] == (byte)j)); + + /* Increment hint offset if this index has hint. */ + o += hint; + /* Convert value to positive only range. */ + r = w1[j] + ((0 - (((word32)w1[j]) >> 31)) & DILITHIUM_Q); + /* Decompose value into low and high parts. */ + dilithium_decompose_q32(r, &r0, &r1); + /* Make hint positive or negative based on sign of r0. */ + hint = (1 - (2 * (((word32)r0) >> 31))) & (0 - hint); + /* Make w1 only the top part plus the hint. */ + w1[j] = r1 + hint; + + /* Fix up w1 not be 16 (-> 0) or -1 (-> 15). */ + w1[j] &= 0xf; +#else + /* Convert value to positive only range. */ + r = w1[j] + ((0 - (((word32)w1[j]) >> 31)) & DILITHIUM_Q); + /* Decompose value into low and high parts. */ + dilithium_decompose_q32(r, &r0, &r1); + /* Check for hint. */ + if ((o < h[omega + i]) && (h[o] == (byte)j)) { + /* Add or subtrac hint based on sign of r0. */ + r1 += 1 - (2 * (((word32)r0) >> 31)); + /* Go to next hint offset. */ + o++; + } + /* Fix up w1 not be 16 (-> 0) or -1 (-> 15). */ + w1[j] = r1 & 0xf; +#endif + } + *op = o; +} +#endif + +#ifndef WOLFSSL_DILITHIUM_VERIFY_SMALL_MEM +/* Use hints to modify w1. + * + * FIPS 204. 8.4: Algorithm 34 UseHint(h, r) + * 1: m <- (q - 1) / (2 * GAMMA2) + * 2: (r1, r0) <- Decompose(r) + * 3: if h == 1 and r0 > 0 return (r1 + 1) mod m + * 4: if h == 1 and r0 <= 0 return (r1 - 1) mod m + * 5: return r1 + * + * @param [in, out] w1 Vector of polynomials needing hints applied to. + * @param [in] k Dimension of vector. + * @param [in] gamma2 Low-order rounding range, GAMMA2. + * @param [in] omega Max number of hints. Hint counts after this index. + * @param [in] h Hints to apply. In signature encoding. + */ +static void dilithium_vec_use_hint(sword32* w1, byte k, word32 gamma2, + byte omega, const byte* h) +{ + unsigned int i; + byte o = 0; + + (void)k; + (void)omega; + +#ifndef WOLFSSL_NO_ML_DSA_44 + if (gamma2 == DILITHIUM_Q_LOW_88) { + /* For each polynomial of vector. */ + for (i = 0; i < PARAMS_ML_DSA_44_K; i++) { + dilithium_use_hint_88(w1, h, i, &o); + w1 += DILITHIUM_N; + } + } + else +#endif +#if !defined(WOLFSSL_NO_ML_DSA_65) || !defined(WOLFSSL_NO_ML_DSA_87) + if (gamma2 == DILITHIUM_Q_LOW_32) { + /* For each polynomial of vector. */ + for (i = 0; i < k; i++) { + dilithium_use_hint_32(w1, h, omega, i, &o); + w1 += DILITHIUM_N; + } + } + else +#endif + { + } +} +#endif +#endif /* !WOLFSSL_DILITHIUM_NO_VERIFY */ + +/****************************************************************************** + * Maths operations + ******************************************************************************/ + +/* q^-1 mod 2^32 (inverse of 8380417 mod 2^32) */ +#define DILITHIUM_QINV 58728449 + +/* Montgomery reduce a. + * + * @param [in] a 64-bit value to be reduced. + * @return Montgomery reduction result. + */ +static sword32 dilithium_mont_red(sword64 a) +{ +#ifndef DILITHIUM_MUL_QINV_SLOW + sword64 t = (sword32)a * (sword32)DILITHIUM_QINV; +#else + sword64 t = (sword32)((sword32)a + (sword32)((sword32)a << 13) - + (sword32)((sword32)a << 23) + (sword32)((sword32)a << 26)); +#endif + /* (a - (t * DILITHIUM_Q)) >> 32 */ + return (sword32)((a - (t << 23) + (t << 13) - t) >> 32); +} + +#if !defined(WOLFSSL_DILITHIUM_SMALL) || !defined(WOLFSSL_DILITHIUM_NO_SIGN) + +/* Reduce 32-bit a modulo q. r = a mod q. + * + * @param [in] a 32-bit value to be reduced to range of q. + * @return Modulo result. + */ +static sword32 dilithium_red(sword64 a) +{ + sword32 t = (sword32)((a + (1 << 22)) >> 23); +#ifndef DILITHIUM_MUL_Q_SLOW + return (sword32)(a - (t * DILITHIUM_Q)); +#else + return (sword32)(a - (t << 23) + (t << 13) - t); +#endif +} + +#endif /* !WOLFSSL_DILITHIUM_SMALL || !WOLFSSL_DILITHIUM_NO_SIGN */ + +/* Zetas for NTT. */ +static const sword32 zetas[DILITHIUM_N] = { + -41978, 25847, -2608894, -518909, 237124, -777960, -876248, 466468, + 1826347, 2353451, -359251, -2091905, 3119733, -2884855, 3111497, 2680103, + 2725464, 1024112, -1079900, 3585928, -549488, -1119584, 2619752, -2108549, + -2118186, -3859737, -1399561, -3277672, 1757237, -19422, 4010497, 280005, + 2706023, 95776, 3077325, 3530437, -1661693, -3592148, -2537516, 3915439, + -3861115, -3043716, 3574422, -2867647, 3539968, -300467, 2348700, -539299, + -1699267, -1643818, 3505694, -3821735, 3507263, -2140649, -1600420, 3699596, + 811944, 531354, 954230, 3881043, 3900724, -2556880, 2071892, -2797779, + -3930395, -1528703, -3677745, -3041255, -1452451, 3475950, 2176455, -1585221, + -1257611, 1939314, -4083598, -1000202, -3190144, -3157330, -3632928, 126922, + 3412210, -983419, 2147896, 2715295, -2967645, -3693493, -411027, -2477047, + -671102, -1228525, -22981, -1308169, -381987, 1349076, 1852771, -1430430, + -3343383, 264944, 508951, 3097992, 44288, -1100098, 904516, 3958618, + -3724342, -8578, 1653064, -3249728, 2389356, -210977, 759969, -1316856, + 189548, -3553272, 3159746, -1851402, -2409325, -177440, 1315589, 1341330, + 1285669, -1584928, -812732, -1439742, -3019102, -3881060, -3628969, 3839961, + 2091667, 3407706, 2316500, 3817976, -3342478, 2244091, -2446433, -3562462, + 266997, 2434439, -1235728, 3513181, -3520352, -3759364, -1197226, -3193378, + 900702, 1859098, 909542, 819034, 495491, -1613174, -43260, -522500, + -655327, -3122442, 2031748, 3207046, -3556995, -525098, -768622, -3595838, + 342297, 286988, -2437823, 4108315, 3437287, -3342277, 1735879, 203044, + 2842341, 2691481, -2590150, 1265009, 4055324, 1247620, 2486353, 1595974, + -3767016, 1250494, 2635921, -3548272, -2994039, 1869119, 1903435, -1050970, + -1333058, 1237275, -3318210, -1430225, -451100, 1312455, 3306115, -1962642, + -1279661, 1917081, -2546312, -1374803, 1500165, 777191, 2235880, 3406031, + -542412, -2831860, -1671176, -1846953, -2584293, -3724270, 594136, -3776993, + -2013608, 2432395, 2454455, -164721, 1957272, 3369112, 185531, -1207385, + -3183426, 162844, 1616392, 3014001, 810149, 1652634, -3694233, -1799107, + -3038916, 3523897, 3866901, 269760, 2213111, -975884, 1717735, 472078, + -426683, 1723600, -1803090, 1910376, -1667432, -1104333, -260646, -3833893, + -2939036, -2235985, -420899, -2286327, 183443, -976891, 1612842, -3545687, + -554416, 3919660, -48306, -1362209, 3937738, 1400424, -846154, 1976782 +}; + +#ifndef WOLFSSL_DILITHIUM_SMALL +/* Zetas for inverse NTT. */ +static const sword32 zetas_inv[DILITHIUM_N] = { + -1976782, 846154, -1400424, -3937738, 1362209, 48306, -3919660, 554416, + 3545687, -1612842, 976891, -183443, 2286327, 420899, 2235985, 2939036, + 3833893, 260646, 1104333, 1667432, -1910376, 1803090, -1723600, 426683, + -472078, -1717735, 975884, -2213111, -269760, -3866901, -3523897, 3038916, + 1799107, 3694233, -1652634, -810149, -3014001, -1616392, -162844, 3183426, + 1207385, -185531, -3369112, -1957272, 164721, -2454455, -2432395, 2013608, + 3776993, -594136, 3724270, 2584293, 1846953, 1671176, 2831860, 542412, + -3406031, -2235880, -777191, -1500165, 1374803, 2546312, -1917081, 1279661, + 1962642, -3306115, -1312455, 451100, 1430225, 3318210, -1237275, 1333058, + 1050970, -1903435, -1869119, 2994039, 3548272, -2635921, -1250494, 3767016, + -1595974, -2486353, -1247620, -4055324, -1265009, 2590150, -2691481, -2842341, + -203044, -1735879, 3342277, -3437287, -4108315, 2437823, -286988, -342297, + 3595838, 768622, 525098, 3556995, -3207046, -2031748, 3122442, 655327, + 522500, 43260, 1613174, -495491, -819034, -909542, -1859098, -900702, + 3193378, 1197226, 3759364, 3520352, -3513181, 1235728, -2434439, -266997, + 3562462, 2446433, -2244091, 3342478, -3817976, -2316500, -3407706, -2091667, + -3839961, 3628969, 3881060, 3019102, 1439742, 812732, 1584928, -1285669, + -1341330, -1315589, 177440, 2409325, 1851402, -3159746, 3553272, -189548, + 1316856, -759969, 210977, -2389356, 3249728, -1653064, 8578, 3724342, + -3958618, -904516, 1100098, -44288, -3097992, -508951, -264944, 3343383, + 1430430, -1852771, -1349076, 381987, 1308169, 22981, 1228525, 671102, + 2477047, 411027, 3693493, 2967645, -2715295, -2147896, 983419, -3412210, + -126922, 3632928, 3157330, 3190144, 1000202, 4083598, -1939314, 1257611, + 1585221, -2176455, -3475950, 1452451, 3041255, 3677745, 1528703, 3930395, + 2797779, -2071892, 2556880, -3900724, -3881043, -954230, -531354, -811944, + -3699596, 1600420, 2140649, -3507263, 3821735, -3505694, 1643818, 1699267, + 539299, -2348700, 300467, -3539968, 2867647, -3574422, 3043716, 3861115, + -3915439, 2537516, 3592148, 1661693, -3530437, -3077325, -95776, -2706023, + -280005, -4010497, 19422, -1757237, 3277672, 1399561, 3859737, 2118186, + 2108549, -2619752, 1119584, 549488, -3585928, 1079900, -1024112, -2725464, + -2680103, -3111497, 2884855, -3119733, 2091905, 359251, -2353451, -1826347, + -466468, 876248, 777960, -237124, 518909, 2608894, -25847, 41978 +}; +#endif + +#if !defined(WOLFSSL_DILITHIUM_NO_SIGN) || \ + !defined(WOLFSSL_DILITHIUM_NO_VERIFY) || \ + (!defined(WOLFSSL_DILITHIUM_NO_MAKE) && defined(WOLFSSL_DILITHIUM_SMALL)) + +/* One iteration of Number-Theoretic Transform. + * + * @param [in] len Length of sequence. + */ +#define NTT(len) \ +do { \ + for (start = 0; start < DILITHIUM_N; start += 2 * (len)) { \ + zeta = zetas[++k]; \ + for (j = 0; j < (len); ++j) { \ + sword32 t = \ + dilithium_mont_red((sword64)zeta * r[start + j + (len)]); \ + sword32 rj = r[start + j]; \ + r[start + j + (len)] = rj - t; \ + r[start + j] = rj + t; \ + } \ + } \ +} \ +while (0) + +/* Number-Theoretic Transform. + * + * @param [in, out] r Polynomial to transform. + */ +static void dilithium_ntt(sword32* r) +{ +#ifdef WOLFSSL_DILITHIUM_SMALL + unsigned int len; + unsigned int k; + unsigned int j; + + k = 0; + for (len = DILITHIUM_N / 2; len >= 1; len >>= 1) { + unsigned int start; + for (start = 0; start < DILITHIUM_N; start = j + len) { + sword32 zeta = zetas[++k]; + for (j = start; j < start + len; ++j) { + sword32 t = dilithium_mont_red((sword64)zeta * r[j + len]); + sword32 rj = r[j]; + r[j + len] = rj - t; + r[j] = rj + t; + } + } + } +#elif defined(WOLFSSL_DILITHIUM_NO_LARGE_CODE) + unsigned int j; + unsigned int k; + unsigned int start; + sword32 zeta; + + zeta = zetas[1]; + for (j = 0; j < DILITHIUM_N / 2; j++) { + sword32 t = + dilithium_mont_red((sword64)zeta * r[j + DILITHIUM_N / 2]); + sword32 rj = r[j]; + r[j + DILITHIUM_N / 2] = rj - t; + r[j] = rj + t; + } + + k = 1; + NTT(64); + NTT(32); + NTT(16); + NTT(8); + NTT(4); + NTT(2); + + for (j = 0; j < DILITHIUM_N; j += 2) { + sword32 t = dilithium_mont_red((sword64)zetas[++k] * r[j + 1]); + sword32 rj = r[j]; + r[j + 1] = rj - t; + r[j] = rj + t; + } +#else + unsigned int j; + unsigned int k; + sword32 t0; + sword32 t1; + sword32 t2; + sword32 t3; + + sword32 zeta128 = zetas[1]; + sword32 zeta640 = zetas[2]; + sword32 zeta641 = zetas[3]; + for (j = 0; j < DILITHIUM_N / 8; j++) { + sword32 r0 = r[j + 0]; + sword32 r1 = r[j + 32]; + sword32 r2 = r[j + 64]; + sword32 r3 = r[j + 96]; + sword32 r4 = r[j + 128]; + sword32 r5 = r[j + 160]; + sword32 r6 = r[j + 192]; + sword32 r7 = r[j + 224]; + + t0 = dilithium_mont_red((sword64)zeta128 * r4); + t1 = dilithium_mont_red((sword64)zeta128 * r5); + t2 = dilithium_mont_red((sword64)zeta128 * r6); + t3 = dilithium_mont_red((sword64)zeta128 * r7); + r4 = r0 - t0; + r5 = r1 - t1; + r6 = r2 - t2; + r7 = r3 - t3; + r0 += t0; + r1 += t1; + r2 += t2; + r3 += t3; + + t0 = dilithium_mont_red((sword64)zeta640 * r2); + t1 = dilithium_mont_red((sword64)zeta640 * r3); + t2 = dilithium_mont_red((sword64)zeta641 * r6); + t3 = dilithium_mont_red((sword64)zeta641 * r7); + r2 = r0 - t0; + r3 = r1 - t1; + r6 = r4 - t2; + r7 = r5 - t3; + r0 += t0; + r1 += t1; + r4 += t2; + r5 += t3; + + r[j + 0] = r0; + r[j + 32] = r1; + r[j + 64] = r2; + r[j + 96] = r3; + r[j + 128] = r4; + r[j + 160] = r5; + r[j + 192] = r6; + r[j + 224] = r7; + } + + for (j = 0; j < DILITHIUM_N; j += 64) { + int i; + sword32 zeta32 = zetas[ 4 + j / 64 + 0]; + sword32 zeta160 = zetas[ 8 + j / 32 + 0]; + sword32 zeta161 = zetas[ 8 + j / 32 + 1]; + sword32 zeta80 = zetas[16 + j / 16 + 0]; + sword32 zeta81 = zetas[16 + j / 16 + 1]; + sword32 zeta82 = zetas[16 + j / 16 + 2]; + sword32 zeta83 = zetas[16 + j / 16 + 3]; + for (i = 0; i < 8; i++) { + sword32 r0 = r[j + i + 0]; + sword32 r1 = r[j + i + 8]; + sword32 r2 = r[j + i + 16]; + sword32 r3 = r[j + i + 24]; + sword32 r4 = r[j + i + 32]; + sword32 r5 = r[j + i + 40]; + sword32 r6 = r[j + i + 48]; + sword32 r7 = r[j + i + 56]; + + t0 = dilithium_mont_red((sword64)zeta32 * r4); + t1 = dilithium_mont_red((sword64)zeta32 * r5); + t2 = dilithium_mont_red((sword64)zeta32 * r6); + t3 = dilithium_mont_red((sword64)zeta32 * r7); + r4 = r0 - t0; + r5 = r1 - t1; + r6 = r2 - t2; + r7 = r3 - t3; + r0 += t0; + r1 += t1; + r2 += t2; + r3 += t3; + + t0 = dilithium_mont_red((sword64)zeta160 * r2); + t1 = dilithium_mont_red((sword64)zeta160 * r3); + t2 = dilithium_mont_red((sword64)zeta161 * r6); + t3 = dilithium_mont_red((sword64)zeta161 * r7); + r2 = r0 - t0; + r3 = r1 - t1; + r6 = r4 - t2; + r7 = r5 - t3; + r0 += t0; + r1 += t1; + r4 += t2; + r5 += t3; + + t0 = dilithium_mont_red((sword64)zeta80 * r1); + t1 = dilithium_mont_red((sword64)zeta81 * r3); + t2 = dilithium_mont_red((sword64)zeta82 * r5); + t3 = dilithium_mont_red((sword64)zeta83 * r7); + r1 = r0 - t0; + r3 = r2 - t1; + r5 = r4 - t2; + r7 = r6 - t3; + r0 += t0; + r2 += t1; + r4 += t2; + r6 += t3; + + r[j + i + 0] = r0; + r[j + i + 8] = r1; + r[j + i + 16] = r2; + r[j + i + 24] = r3; + r[j + i + 32] = r4; + r[j + i + 40] = r5; + r[j + i + 48] = r6; + r[j + i + 56] = r7; + } + } + + k = 128; + for (j = 0; j < DILITHIUM_N; j += 8) { + sword32 zeta4 = zetas[32 + j / 8 + 0]; + sword32 zeta20 = zetas[64 + j / 4 + 0]; + sword32 zeta21 = zetas[64 + j / 4 + 1]; + sword32 r0 = r[j + 0]; + sword32 r1 = r[j + 1]; + sword32 r2 = r[j + 2]; + sword32 r3 = r[j + 3]; + sword32 r4 = r[j + 4]; + sword32 r5 = r[j + 5]; + sword32 r6 = r[j + 6]; + sword32 r7 = r[j + 7]; + + t0 = dilithium_mont_red((sword64)zeta4 * r4); + t1 = dilithium_mont_red((sword64)zeta4 * r5); + t2 = dilithium_mont_red((sword64)zeta4 * r6); + t3 = dilithium_mont_red((sword64)zeta4 * r7); + r4 = r0 - t0; + r5 = r1 - t1; + r6 = r2 - t2; + r7 = r3 - t3; + r0 += t0; + r1 += t1; + r2 += t2; + r3 += t3; + + t0 = dilithium_mont_red((sword64)zeta20 * r2); + t1 = dilithium_mont_red((sword64)zeta20 * r3); + t2 = dilithium_mont_red((sword64)zeta21 * r6); + t3 = dilithium_mont_red((sword64)zeta21 * r7); + r2 = r0 - t0; + r3 = r1 - t1; + r6 = r4 - t2; + r7 = r5 - t3; + r0 += t0; + r1 += t1; + r4 += t2; + r5 += t3; + + t0 = dilithium_mont_red((sword64)zetas[k++] * r1); + t1 = dilithium_mont_red((sword64)zetas[k++] * r3); + t2 = dilithium_mont_red((sword64)zetas[k++] * r5); + t3 = dilithium_mont_red((sword64)zetas[k++] * r7); + r1 = r0 - t0; + r3 = r2 - t1; + r5 = r4 - t2; + r7 = r6 - t3; + r0 += t0; + r2 += t1; + r4 += t2; + r6 += t3; + + r[j + 0] = r0; + r[j + 1] = r1; + r[j + 2] = r2; + r[j + 3] = r3; + r[j + 4] = r4; + r[j + 5] = r5; + r[j + 6] = r6; + r[j + 7] = r7; + } +#endif +} + +/* Number-Theoretic Transform. + * + * @param [in, out] r Vector of polynomials to transform. + * @param [in] l Dimension of polynomial. + */ +static void dilithium_vec_ntt(sword32* r, byte l) +{ + unsigned int i; + + for (i = 0; i < l; i++) { + dilithium_ntt(r); + r += DILITHIUM_N; + } +} +#endif + +#ifndef WOLFSSL_DILITHIUM_SMALL + +/* Number-Theoretic Transform with small initial values. + * + * @param [in, out] r Polynomial to transform. + */ +static void dilithium_ntt_small(sword32* r) +{ + unsigned int k; + unsigned int j; +#ifdef WOLFSSL_DILITHIUM_NO_LARGE_CODE + unsigned int start; + sword32 zeta; + + for (j = 0; j < DILITHIUM_N / 2; ++j) { + sword32 t = dilithium_red((sword32)-3572223 * r[j + DILITHIUM_N / 2]); + sword32 rj = r[j]; + r[j + DILITHIUM_N / 2] = rj - t; + r[j] = rj + t; + } + + k = 1; + NTT(64); + NTT(32); + NTT(16); + NTT(8); + NTT(4); + NTT(2); + + for (j = 0; j < DILITHIUM_N; j += 2) { + sword32 t = dilithium_mont_red((sword64)zetas[++k] * r[j + 1]); + sword32 rj = r[j]; + r[j + 1] = rj - t; + r[j] = rj + t; + } +#else + sword32 t0; + sword32 t1; + sword32 t2; + sword32 t3; + sword32 zeta640 = zetas[2]; + sword32 zeta641 = zetas[3]; + for (j = 0; j < DILITHIUM_N / 8; j++) { + sword32 r0 = r[j + 0]; + sword32 r1 = r[j + 32]; + sword32 r2 = r[j + 64]; + sword32 r3 = r[j + 96]; + sword32 r4 = r[j + 128]; + sword32 r5 = r[j + 160]; + sword32 r6 = r[j + 192]; + sword32 r7 = r[j + 224]; + + t0 = dilithium_red((sword32)-3572223 * r4); + t1 = dilithium_red((sword32)-3572223 * r5); + t2 = dilithium_red((sword32)-3572223 * r6); + t3 = dilithium_red((sword32)-3572223 * r7); + r4 = r0 - t0; + r5 = r1 - t1; + r6 = r2 - t2; + r7 = r3 - t3; + r0 += t0; + r1 += t1; + r2 += t2; + r3 += t3; + + t0 = dilithium_mont_red((sword64)zeta640 * r2); + t1 = dilithium_mont_red((sword64)zeta640 * r3); + t2 = dilithium_mont_red((sword64)zeta641 * r6); + t3 = dilithium_mont_red((sword64)zeta641 * r7); + r2 = r0 - t0; + r3 = r1 - t1; + r6 = r4 - t2; + r7 = r5 - t3; + r0 += t0; + r1 += t1; + r4 += t2; + r5 += t3; + + r[j + 0] = r0; + r[j + 32] = r1; + r[j + 64] = r2; + r[j + 96] = r3; + r[j + 128] = r4; + r[j + 160] = r5; + r[j + 192] = r6; + r[j + 224] = r7; + } + + for (j = 0; j < DILITHIUM_N; j += 64) { + int i; + sword32 zeta32 = zetas[ 4 + j / 64 + 0]; + sword32 zeta160 = zetas[ 8 + j / 32 + 0]; + sword32 zeta161 = zetas[ 8 + j / 32 + 1]; + sword32 zeta80 = zetas[16 + j / 16 + 0]; + sword32 zeta81 = zetas[16 + j / 16 + 1]; + sword32 zeta82 = zetas[16 + j / 16 + 2]; + sword32 zeta83 = zetas[16 + j / 16 + 3]; + for (i = 0; i < 8; i++) { + sword32 r0 = r[j + i + 0]; + sword32 r1 = r[j + i + 8]; + sword32 r2 = r[j + i + 16]; + sword32 r3 = r[j + i + 24]; + sword32 r4 = r[j + i + 32]; + sword32 r5 = r[j + i + 40]; + sword32 r6 = r[j + i + 48]; + sword32 r7 = r[j + i + 56]; + + t0 = dilithium_mont_red((sword64)zeta32 * r4); + t1 = dilithium_mont_red((sword64)zeta32 * r5); + t2 = dilithium_mont_red((sword64)zeta32 * r6); + t3 = dilithium_mont_red((sword64)zeta32 * r7); + r4 = r0 - t0; + r5 = r1 - t1; + r6 = r2 - t2; + r7 = r3 - t3; + r0 += t0; + r1 += t1; + r2 += t2; + r3 += t3; + + t0 = dilithium_mont_red((sword64)zeta160 * r2); + t1 = dilithium_mont_red((sword64)zeta160 * r3); + t2 = dilithium_mont_red((sword64)zeta161 * r6); + t3 = dilithium_mont_red((sword64)zeta161 * r7); + r2 = r0 - t0; + r3 = r1 - t1; + r6 = r4 - t2; + r7 = r5 - t3; + r0 += t0; + r1 += t1; + r4 += t2; + r5 += t3; + + t0 = dilithium_mont_red((sword64)zeta80 * r1); + t1 = dilithium_mont_red((sword64)zeta81 * r3); + t2 = dilithium_mont_red((sword64)zeta82 * r5); + t3 = dilithium_mont_red((sword64)zeta83 * r7); + r1 = r0 - t0; + r3 = r2 - t1; + r5 = r4 - t2; + r7 = r6 - t3; + r0 += t0; + r2 += t1; + r4 += t2; + r6 += t3; + + r[j + i + 0] = r0; + r[j + i + 8] = r1; + r[j + i + 16] = r2; + r[j + i + 24] = r3; + r[j + i + 32] = r4; + r[j + i + 40] = r5; + r[j + i + 48] = r6; + r[j + i + 56] = r7; + } + } + + k = 128; + for (j = 0; j < DILITHIUM_N; j += 8) { + sword32 zeta4 = zetas[32 + j / 8 + 0]; + sword32 zeta20 = zetas[64 + j / 4 + 0]; + sword32 zeta21 = zetas[64 + j / 4 + 1]; + sword32 r0 = r[j + 0]; + sword32 r1 = r[j + 1]; + sword32 r2 = r[j + 2]; + sword32 r3 = r[j + 3]; + sword32 r4 = r[j + 4]; + sword32 r5 = r[j + 5]; + sword32 r6 = r[j + 6]; + sword32 r7 = r[j + 7]; + + t0 = dilithium_mont_red((sword64)zeta4 * r4); + t1 = dilithium_mont_red((sword64)zeta4 * r5); + t2 = dilithium_mont_red((sword64)zeta4 * r6); + t3 = dilithium_mont_red((sword64)zeta4 * r7); + r4 = r0 - t0; + r5 = r1 - t1; + r6 = r2 - t2; + r7 = r3 - t3; + r0 += t0; + r1 += t1; + r2 += t2; + r3 += t3; + + t0 = dilithium_mont_red((sword64)zeta20 * r2); + t1 = dilithium_mont_red((sword64)zeta20 * r3); + t2 = dilithium_mont_red((sword64)zeta21 * r6); + t3 = dilithium_mont_red((sword64)zeta21 * r7); + r2 = r0 - t0; + r3 = r1 - t1; + r6 = r4 - t2; + r7 = r5 - t3; + r0 += t0; + r1 += t1; + r4 += t2; + r5 += t3; + + t0 = dilithium_mont_red((sword64)zetas[k++] * r1); + t1 = dilithium_mont_red((sword64)zetas[k++] * r3); + t2 = dilithium_mont_red((sword64)zetas[k++] * r5); + t3 = dilithium_mont_red((sword64)zetas[k++] * r7); + r1 = r0 - t0; + r3 = r2 - t1; + r5 = r4 - t2; + r7 = r6 - t3; + r0 += t0; + r2 += t1; + r4 += t2; + r6 += t3; + + r[j + 0] = r0; + r[j + 1] = r1; + r[j + 2] = r2; + r[j + 3] = r3; + r[j + 4] = r4; + r[j + 5] = r5; + r[j + 6] = r6; + r[j + 7] = r7; + } +#endif +} + +#ifndef WOLFSSL_DILITHIUM_VERIFY_ONLY +/* Number-Theoretic Transform with small initial values. + * + * @param [in, out] r Vector of polynomials to transform. + * @param [in] l Dimension of polynomial. + */ +static void dilithium_vec_ntt_small(sword32* r, byte l) +{ + unsigned int i; + + for (i = 0; i < l; i++) { + dilithium_ntt_small(r); + r += DILITHIUM_N; + } +} +#endif /* !WOLFSSL_DILITHIUM_VERIFY_ONLY */ + +#else + +/* Number-Theoretic Transform with small initial values. + * + * @param [in, out] r Polynomial to transform. + */ +#define dilithium_ntt_small dilithium_ntt +/* Number-Theoretic Transform with small initial values. + * + * @param [in, out] r Vector of polynomials to transform. + * @param [in] l Dimension of polynomial. + */ +#define dilithium_vec_ntt_small dilithium_vec_ntt + +#endif /* WOLFSSL_DILITHIUM_SMALL */ + + +/* One iteration of Inverse Number-Theoretic Transform. + * + * @param [in] len Length of sequence. + */ +#define INVNTT(len) \ +do { \ + for (start = 0; start < DILITHIUM_N; start += 2 * (len)) { \ + zeta = zetas_inv[k++]; \ + for (j = 0; j < (len); ++j) { \ + sword32 rj = r[start + j]; \ + sword32 rjl = r[start + j + (len)]; \ + sword32 t = rj + rjl; \ + r[start + j] = t; \ + rjl = rj - rjl; \ + r[start + j + (len)] = dilithium_mont_red((sword64)zeta * rjl); \ + } \ + } \ +} \ +while (0) + +/* Inverse Number-Theoretic Transform. + * + * @param [in, out] r Polynomial to transform. + */ +static void dilithium_invntt(sword32* r) +{ +#ifdef WOLFSSL_DILITHIUM_SMALL + unsigned int len; + unsigned int k; + unsigned int j; + sword32 zeta; + + k = 256; + for (len = 1; len <= DILITHIUM_N / 2; len <<= 1) { + unsigned int start; + for (start = 0; start < DILITHIUM_N; start = j + len) { + zeta = -zetas[--k]; + for (j = start; j < start + len; ++j) { + sword32 rj = r[j]; + sword32 rjl = r[j + len]; + sword32 t = rj + rjl; + r[j] = t; + rjl = rj - rjl; + r[j + len] = dilithium_mont_red((sword64)zeta * rjl); + } + } + } + + zeta = -zetas[0]; + for (j = 0; j < DILITHIUM_N; ++j) { + r[j] = dilithium_mont_red((sword64)zeta * r[j]); + } +#elif defined(WOLFSSL_DILITHIUM_NO_LARGE_CODE) + unsigned int j; + unsigned int k = 0; + unsigned int start; + sword32 zeta; + + for (j = 0; j < DILITHIUM_N; j += 2) { + sword32 rj = r[j]; + sword32 rjl = r[j + 1]; + sword32 t = rj + rjl; + r[j] = t; + rjl = rj - rjl; + r[j + 1] = dilithium_mont_red((sword64)zetas_inv[k++] * rjl); + } + + INVNTT(2); + INVNTT(4); + INVNTT(8); + INVNTT(16); + INVNTT(32); + INVNTT(64); + INVNTT(128); + + zeta = zetas_inv[255]; + for (j = 0; j < DILITHIUM_N; ++j) { + r[j] = dilithium_mont_red((sword64)zeta * r[j]); + } +#else + unsigned int j; + unsigned int k = 0; + sword32 t0; + sword32 t1; + sword32 t2; + sword32 t3; + + sword32 zeta640; + sword32 zeta641; + sword32 zeta128; + sword32 zeta256; + for (j = 0; j < DILITHIUM_N; j += 8) { + sword32 zeta20 = zetas_inv[128 + j / 4 + 0]; + sword32 zeta21 = zetas_inv[128 + j / 4 + 1]; + sword32 zeta4 = zetas_inv[192 + j / 8 + 0]; + sword32 r0 = r[j + 0]; + sword32 r1 = r[j + 1]; + sword32 r2 = r[j + 2]; + sword32 r3 = r[j + 3]; + sword32 r4 = r[j + 4]; + sword32 r5 = r[j + 5]; + sword32 r6 = r[j + 6]; + sword32 r7 = r[j + 7]; + + t0 = dilithium_mont_red((sword64)zetas_inv[k++] * (r0 - r1)); + t1 = dilithium_mont_red((sword64)zetas_inv[k++] * (r2 - r3)); + t2 = dilithium_mont_red((sword64)zetas_inv[k++] * (r4 - r5)); + t3 = dilithium_mont_red((sword64)zetas_inv[k++] * (r6 - r7)); + r0 += r1; + r2 += r3; + r4 += r5; + r6 += r7; + r1 = t0; + r3 = t1; + r5 = t2; + r7 = t3; + + t0 = dilithium_mont_red((sword64)zeta20 * (r0 - r2)); + t1 = dilithium_mont_red((sword64)zeta20 * (r1 - r3)); + t2 = dilithium_mont_red((sword64)zeta21 * (r4 - r6)); + t3 = dilithium_mont_red((sword64)zeta21 * (r5 - r7)); + r0 += r2; + r1 += r3; + r4 += r6; + r5 += r7; + r2 = t0; + r3 = t1; + r6 = t2; + r7 = t3; + + t0 = dilithium_mont_red((sword64)zeta4 * (r0 - r4)); + t1 = dilithium_mont_red((sword64)zeta4 * (r1 - r5)); + t2 = dilithium_mont_red((sword64)zeta4 * (r2 - r6)); + t3 = dilithium_mont_red((sword64)zeta4 * (r3 - r7)); + r0 += r4; + r1 += r5; + r2 += r6; + r3 += r7; + r4 = t0; + r5 = t1; + r6 = t2; + r7 = t3; + + r[j + 0] = r0; + r[j + 1] = r1; + r[j + 2] = r2; + r[j + 3] = r3; + r[j + 4] = r4; + r[j + 5] = r5; + r[j + 6] = r6; + r[j + 7] = r7; + } + + for (j = 0; j < DILITHIUM_N; j += 64) { + int i; + sword32 zeta80 = zetas_inv[224 + j / 16 + 0]; + sword32 zeta81 = zetas_inv[224 + j / 16 + 1]; + sword32 zeta82 = zetas_inv[224 + j / 16 + 2]; + sword32 zeta83 = zetas_inv[224 + j / 16 + 3]; + sword32 zeta160 = zetas_inv[240 + j / 32 + 0]; + sword32 zeta161 = zetas_inv[240 + j / 32 + 1]; + sword32 zeta32 = zetas_inv[248 + j / 64 + 0]; + for (i = 0; i < 8; i++) { + sword32 r0 = r[j + i + 0]; + sword32 r1 = r[j + i + 8]; + sword32 r2 = r[j + i + 16]; + sword32 r3 = r[j + i + 24]; + sword32 r4 = r[j + i + 32]; + sword32 r5 = r[j + i + 40]; + sword32 r6 = r[j + i + 48]; + sword32 r7 = r[j + i + 56]; + + t0 = dilithium_mont_red((sword64)zeta80 * (r0 - r1)); + t1 = dilithium_mont_red((sword64)zeta81 * (r2 - r3)); + t2 = dilithium_mont_red((sword64)zeta82 * (r4 - r5)); + t3 = dilithium_mont_red((sword64)zeta83 * (r6 - r7)); + r0 += r1; + r2 += r3; + r4 += r5; + r6 += r7; + r1 = t0; + r3 = t1; + r5 = t2; + r7 = t3; + + t0 = dilithium_mont_red((sword64)zeta160 * (r0 - r2)); + t1 = dilithium_mont_red((sword64)zeta160 * (r1 - r3)); + t2 = dilithium_mont_red((sword64)zeta161 * (r4 - r6)); + t3 = dilithium_mont_red((sword64)zeta161 * (r5 - r7)); + r0 += r2; + r1 += r3; + r4 += r6; + r5 += r7; + r2 = t0; + r3 = t1; + r6 = t2; + r7 = t3; + + t0 = dilithium_mont_red((sword64)zeta32 * (r0 - r4)); + t1 = dilithium_mont_red((sword64)zeta32 * (r1 - r5)); + t2 = dilithium_mont_red((sword64)zeta32 * (r2 - r6)); + t3 = dilithium_mont_red((sword64)zeta32 * (r3 - r7)); + r0 += r4; + r1 += r5; + r2 += r6; + r3 += r7; + r4 = t0; + r5 = t1; + r6 = t2; + r7 = t3; + + r[j + i + 0] = r0; + r[j + i + 8] = r1; + r[j + i + 16] = r2; + r[j + i + 24] = r3; + r[j + i + 32] = r4; + r[j + i + 40] = r5; + r[j + i + 48] = r6; + r[j + i + 56] = r7; + } + } + + zeta640 = zetas_inv[252]; + zeta641 = zetas_inv[253]; + zeta128 = zetas_inv[254]; + zeta256 = zetas_inv[255]; + for (j = 0; j < DILITHIUM_N / 8; j++) { + sword32 r0 = r[j + 0]; + sword32 r1 = r[j + 32]; + sword32 r2 = r[j + 64]; + sword32 r3 = r[j + 96]; + sword32 r4 = r[j + 128]; + sword32 r5 = r[j + 160]; + sword32 r6 = r[j + 192]; + sword32 r7 = r[j + 224]; + + t0 = dilithium_mont_red((sword64)zeta640 * (r0 - r2)); + t1 = dilithium_mont_red((sword64)zeta640 * (r1 - r3)); + t2 = dilithium_mont_red((sword64)zeta641 * (r4 - r6)); + t3 = dilithium_mont_red((sword64)zeta641 * (r5 - r7)); + r0 += r2; + r1 += r3; + r4 += r6; + r5 += r7; + r2 = t0; + r3 = t1; + r6 = t2; + r7 = t3; + + t0 = dilithium_mont_red((sword64)zeta128 * (r0 - r4)); + t1 = dilithium_mont_red((sword64)zeta128 * (r1 - r5)); + t2 = dilithium_mont_red((sword64)zeta128 * (r2 - r6)); + t3 = dilithium_mont_red((sword64)zeta128 * (r3 - r7)); + r0 += r4; + r1 += r5; + r2 += r6; + r3 += r7; + r4 = t0; + r5 = t1; + r6 = t2; + r7 = t3; + + r0 = dilithium_mont_red((sword64)zeta256 * r0); + r1 = dilithium_mont_red((sword64)zeta256 * r1); + r2 = dilithium_mont_red((sword64)zeta256 * r2); + r3 = dilithium_mont_red((sword64)zeta256 * r3); + r4 = dilithium_mont_red((sword64)zeta256 * r4); + r5 = dilithium_mont_red((sword64)zeta256 * r5); + r6 = dilithium_mont_red((sword64)zeta256 * r6); + r7 = dilithium_mont_red((sword64)zeta256 * r7); + + r[j + 0] = r0; + r[j + 32] = r1; + r[j + 64] = r2; + r[j + 96] = r3; + r[j + 128] = r4; + r[j + 160] = r5; + r[j + 192] = r6; + r[j + 224] = r7; + } +#endif +} + + +#if !defined(WOLFSSL_DILITHIUM_VERIFY_ONLY) || \ + !defined(WOLFSSL_DILITHIUM_VERIFY_SMALL_MEM) +/* Inverse Number-Theoretic Transform. + * + * @param [in, out] r Vector of polynomials to transform. + * @param [in] l Dimension of polynomial. + */ +static void dilithium_vec_invntt(sword32* r, byte l) +{ + unsigned int i; + + for (i = 0; i < l; i++) { + dilithium_invntt(r); + r += DILITHIUM_N; + } +} +#endif + +#if !defined(WOLFSSL_DILITHIUM_VERIFY_ONLY) || \ + !defined(WOLFSSL_DILITHIUM_VERIFY_SMALL_MEM) +/* Matrix multiplication. + * + * @param [out] r Vector of polynomials that is result. + * @param [in] m Matrix of polynomials. + * @param [in] v Vector of polynomials. + * @param [in] k First dimension of matrix and dimension of result. + * @param [in] l Second dimension of matrix and dimension of v. + */ +static void dilithium_matrix_mul(sword32* r, const sword32* m, const sword32* v, + byte k, byte l) +{ + byte i; + + for (i = 0; i < k; i++) { + byte j; + unsigned int e; + const sword32* vt = v; + +#ifdef WOLFSSL_DILITHIUM_SMALL + for (e = 0; e < DILITHIUM_N; e++) { + r[e] = dilithium_mont_red((sword64)m[e] * vt[e]); + } + m += DILITHIUM_N; + vt += DILITHIUM_N; + for (j = 1; j < l; j++) { + for (e = 0; e < DILITHIUM_N; e++) { + r[e] += dilithium_mont_red((sword64)m[e] * vt[e]); + } + m += DILITHIUM_N; + vt += DILITHIUM_N; + } +#elif defined(WOLFSSL_DILITHIUM_NO_LARGE_CODE) + (void)j; + if (l == 4) { + for (e = 0; e < DILITHIUM_N; e++) { + sword64 t = ((sword64)m[e + 0 * 256] * vt[e + 0 * 256]) + + ((sword64)m[e + 1 * 256] * vt[e + 1 * 256]) + + ((sword64)m[e + 2 * 256] * vt[e + 2 * 256]) + + ((sword64)m[e + 3 * 256] * vt[e + 3 * 256]); + r[e] = dilithium_mont_red(t); + } + m += DILITHIUM_N * 4; + } + else if (l == 5) { + for (e = 0; e < DILITHIUM_N; e++) { + sword64 t = ((sword64)m[e + 0 * 256] * vt[e + 0 * 256]) + + ((sword64)m[e + 1 * 256] * vt[e + 1 * 256]) + + ((sword64)m[e + 2 * 256] * vt[e + 2 * 256]) + + ((sword64)m[e + 3 * 256] * vt[e + 3 * 256]) + + ((sword64)m[e + 4 * 256] * vt[e + 4 * 256]); + r[e] = dilithium_mont_red(t); + } + m += DILITHIUM_N * 5; + } + else if (l == 7) { + for (e = 0; e < DILITHIUM_N; e++) { + sword64 t = ((sword64)m[e + 0 * 256] * vt[e + 0 * 256]) + + ((sword64)m[e + 1 * 256] * vt[e + 1 * 256]) + + ((sword64)m[e + 2 * 256] * vt[e + 2 * 256]) + + ((sword64)m[e + 3 * 256] * vt[e + 3 * 256]) + + ((sword64)m[e + 4 * 256] * vt[e + 4 * 256]) + + ((sword64)m[e + 5 * 256] * vt[e + 5 * 256]) + + ((sword64)m[e + 6 * 256] * vt[e + 6 * 256]); + r[e] = dilithium_mont_red(t); + } + m += DILITHIUM_N * 7; + } +#else + sword64 t0; + sword64 t1; + sword64 t2; + sword64 t3; + (void)j; + if (l == 4) { + for (e = 0; e < DILITHIUM_N; e += 4) { + t0 = ((sword64)m[e + 0 + 0 * 256] * vt[e + 0 + 0 * 256]) + + ((sword64)m[e + 0 + 1 * 256] * vt[e + 0 + 1 * 256]) + + ((sword64)m[e + 0 + 2 * 256] * vt[e + 0 + 2 * 256]) + + ((sword64)m[e + 0 + 3 * 256] * vt[e + 0 + 3 * 256]); + t1 = ((sword64)m[e + 1 + 0 * 256] * vt[e + 1 + 0 * 256]) + + ((sword64)m[e + 1 + 1 * 256] * vt[e + 1 + 1 * 256]) + + ((sword64)m[e + 1 + 2 * 256] * vt[e + 1 + 2 * 256]) + + ((sword64)m[e + 1 + 3 * 256] * vt[e + 1 + 3 * 256]); + t2 = ((sword64)m[e + 2 + 0 * 256] * vt[e + 2 + 0 * 256]) + + ((sword64)m[e + 2 + 1 * 256] * vt[e + 2 + 1 * 256]) + + ((sword64)m[e + 2 + 2 * 256] * vt[e + 2 + 2 * 256]) + + ((sword64)m[e + 2 + 3 * 256] * vt[e + 2 + 3 * 256]); + t3 = ((sword64)m[e + 3 + 0 * 256] * vt[e + 3 + 0 * 256]) + + ((sword64)m[e + 3 + 1 * 256] * vt[e + 3 + 1 * 256]) + + ((sword64)m[e + 3 + 2 * 256] * vt[e + 3 + 2 * 256]) + + ((sword64)m[e + 3 + 3 * 256] * vt[e + 3 + 3 * 256]); + r[e + 0] = dilithium_mont_red(t0); + r[e + 1] = dilithium_mont_red(t1); + r[e + 2] = dilithium_mont_red(t2); + r[e + 3] = dilithium_mont_red(t3); + } + m += DILITHIUM_N * 4; + } + else if (l == 5) { + for (e = 0; e < DILITHIUM_N; e += 4) { + t0 = ((sword64)m[e + 0 + 0 * 256] * vt[e + 0 + 0 * 256]) + + ((sword64)m[e + 0 + 1 * 256] * vt[e + 0 + 1 * 256]) + + ((sword64)m[e + 0 + 2 * 256] * vt[e + 0 + 2 * 256]) + + ((sword64)m[e + 0 + 3 * 256] * vt[e + 0 + 3 * 256]) + + ((sword64)m[e + 0 + 4 * 256] * vt[e + 0 + 4 * 256]); + t1 = ((sword64)m[e + 1 + 0 * 256] * vt[e + 1 + 0 * 256]) + + ((sword64)m[e + 1 + 1 * 256] * vt[e + 1 + 1 * 256]) + + ((sword64)m[e + 1 + 2 * 256] * vt[e + 1 + 2 * 256]) + + ((sword64)m[e + 1 + 3 * 256] * vt[e + 1 + 3 * 256]) + + ((sword64)m[e + 1 + 4 * 256] * vt[e + 1 + 4 * 256]); + t2 = ((sword64)m[e + 2 + 0 * 256] * vt[e + 2 + 0 * 256]) + + ((sword64)m[e + 2 + 1 * 256] * vt[e + 2 + 1 * 256]) + + ((sword64)m[e + 2 + 2 * 256] * vt[e + 2 + 2 * 256]) + + ((sword64)m[e + 2 + 3 * 256] * vt[e + 2 + 3 * 256]) + + ((sword64)m[e + 2 + 4 * 256] * vt[e + 2 + 4 * 256]); + t3 = ((sword64)m[e + 3 + 0 * 256] * vt[e + 3 + 0 * 256]) + + ((sword64)m[e + 3 + 1 * 256] * vt[e + 3 + 1 * 256]) + + ((sword64)m[e + 3 + 2 * 256] * vt[e + 3 + 2 * 256]) + + ((sword64)m[e + 3 + 3 * 256] * vt[e + 3 + 3 * 256]) + + ((sword64)m[e + 3 + 4 * 256] * vt[e + 3 + 4 * 256]); + r[e + 0] = dilithium_mont_red(t0); + r[e + 1] = dilithium_mont_red(t1); + r[e + 2] = dilithium_mont_red(t2); + r[e + 3] = dilithium_mont_red(t3); + } + m += DILITHIUM_N * 5; + } + else if (l == 7) { + for (e = 0; e < DILITHIUM_N; e += 2) { + t0 = ((sword64)m[e + 0 + 0 * 256] * vt[e + 0 + 0 * 256]) + + ((sword64)m[e + 0 + 1 * 256] * vt[e + 0 + 1 * 256]) + + ((sword64)m[e + 0 + 2 * 256] * vt[e + 0 + 2 * 256]) + + ((sword64)m[e + 0 + 3 * 256] * vt[e + 0 + 3 * 256]) + + ((sword64)m[e + 0 + 4 * 256] * vt[e + 0 + 4 * 256]) + + ((sword64)m[e + 0 + 5 * 256] * vt[e + 0 + 5 * 256]) + + ((sword64)m[e + 0 + 6 * 256] * vt[e + 0 + 6 * 256]); + t1 = ((sword64)m[e + 1 + 0 * 256] * vt[e + 1 + 0 * 256]) + + ((sword64)m[e + 1 + 1 * 256] * vt[e + 1 + 1 * 256]) + + ((sword64)m[e + 1 + 2 * 256] * vt[e + 1 + 2 * 256]) + + ((sword64)m[e + 1 + 3 * 256] * vt[e + 1 + 3 * 256]) + + ((sword64)m[e + 1 + 4 * 256] * vt[e + 1 + 4 * 256]) + + ((sword64)m[e + 1 + 5 * 256] * vt[e + 1 + 5 * 256]) + + ((sword64)m[e + 1 + 6 * 256] * vt[e + 1 + 6 * 256]); + r[e + 0] = dilithium_mont_red(t0); + r[e + 1] = dilithium_mont_red(t1); + } + m += DILITHIUM_N * 7; + } +#endif + r += DILITHIUM_N; + } +} +#endif + +#if !defined(WOLFSSL_DILITHIUM_NO_SIGN) || \ + (!defined(WOLFSSL_DILITHIUM_NO_VERIFY) && \ + !defined(WOLFSSL_DILITHIUM_VERIFY_SMALL_MEM)) +/* Vector multiplication. + * + * @param [out] r Vector of polynomials that is result. + * @param [in] a Polynomials + * @param [in] b Vector of polynomials. + * @param [in] l Dimension of vectors. + */ +static void dilithium_vec_mul(sword32* r, sword32* a, sword32* b, byte l) +{ + byte i; + + for (i = 0; i < l; i++) { + unsigned int e; +#ifdef WOLFSSL_DILITHIUM_SMALL + for (e = 0; e < DILITHIUM_N; e++) { + r[e] = dilithium_mont_red((sword64)a[e] * b[e]); + } +#elif defined(WOLFSSL_DILITHIUM_NO_LARGE_CODE) + for (e = 0; e < DILITHIUM_N; e += 8) { + r[e+0] = dilithium_mont_red((sword64)a[e+0] * b[e+0]); + r[e+1] = dilithium_mont_red((sword64)a[e+1] * b[e+1]); + r[e+2] = dilithium_mont_red((sword64)a[e+2] * b[e+2]); + r[e+3] = dilithium_mont_red((sword64)a[e+3] * b[e+3]); + r[e+4] = dilithium_mont_red((sword64)a[e+4] * b[e+4]); + r[e+5] = dilithium_mont_red((sword64)a[e+5] * b[e+5]); + r[e+6] = dilithium_mont_red((sword64)a[e+6] * b[e+6]); + r[e+7] = dilithium_mont_red((sword64)a[e+7] * b[e+7]); + } +#else + for (e = 0; e < DILITHIUM_N; e += 16) { + r[e+ 0] = dilithium_mont_red((sword64)a[e+ 0] * b[e+ 0]); + r[e+ 1] = dilithium_mont_red((sword64)a[e+ 1] * b[e+ 1]); + r[e+ 2] = dilithium_mont_red((sword64)a[e+ 2] * b[e+ 2]); + r[e+ 3] = dilithium_mont_red((sword64)a[e+ 3] * b[e+ 3]); + r[e+ 4] = dilithium_mont_red((sword64)a[e+ 4] * b[e+ 4]); + r[e+ 5] = dilithium_mont_red((sword64)a[e+ 5] * b[e+ 5]); + r[e+ 6] = dilithium_mont_red((sword64)a[e+ 6] * b[e+ 6]); + r[e+ 7] = dilithium_mont_red((sword64)a[e+ 7] * b[e+ 7]); + r[e+ 8] = dilithium_mont_red((sword64)a[e+ 8] * b[e+ 8]); + r[e+ 9] = dilithium_mont_red((sword64)a[e+ 9] * b[e+ 9]); + r[e+10] = dilithium_mont_red((sword64)a[e+10] * b[e+10]); + r[e+11] = dilithium_mont_red((sword64)a[e+11] * b[e+11]); + r[e+12] = dilithium_mont_red((sword64)a[e+12] * b[e+12]); + r[e+13] = dilithium_mont_red((sword64)a[e+13] * b[e+13]); + r[e+14] = dilithium_mont_red((sword64)a[e+14] * b[e+14]); + r[e+15] = dilithium_mont_red((sword64)a[e+15] * b[e+15]); + } +#endif + r += DILITHIUM_N; + b += DILITHIUM_N; + } +} +#endif + +#ifndef WOLFSSL_DILITHIUM_NO_SIGN +/* Modulo reduce values in polynomials of vector. Range (-2^31)..(2^31-1). + * + * @param [in, out] a Vector of polynomials. + * @param [in] l Dimension of vector. + */ +static void dilithium_vec_red(sword32* a, byte l) +{ + byte i; + + for (i = 0; i < l; i++) { + word16 j; +#ifdef WOLFSSL_DILITHIUM_SMALL + for (j = 0; j < DILITHIUM_N; j++) { + a[j] = dilithium_red(a[j]); + } +#else + for (j = 0; j < DILITHIUM_N; j += 8) { + a[j+0] = dilithium_red(a[j+0]); + a[j+1] = dilithium_red(a[j+1]); + a[j+2] = dilithium_red(a[j+2]); + a[j+3] = dilithium_red(a[j+3]); + a[j+4] = dilithium_red(a[j+4]); + a[j+5] = dilithium_red(a[j+5]); + a[j+6] = dilithium_red(a[j+6]); + a[j+7] = dilithium_red(a[j+7]); + } +#endif + a += DILITHIUM_N; + } +} +#endif /* !WOLFSSL_DILITHIUM_NO_SIGN */ + +#if (!defined(WOLFSSL_DILITHIUM_NO_SIGN) || \ + (!defined(WOLFSSL_DILITHIUM_NO_VERIFY) && \ + !defined(WOLFSSL_DILITHIUM_VERIFY_SMALL_MEM))) || \ + defined(WOLFSSL_DILITHIUM_CHECK_KEY) +/* Subtract vector a from r. r -= a. + * + * @param [out] r Vector of polynomials that is result. + * @param [in] a Vector of polynomials to subtract. + * @param [in] l Dimension of vectors. + */ +static void dilithium_vec_sub(sword32* r, const sword32* a, byte l) +{ + byte i; + + for (i = 0; i < l; i++) { + word16 j; +#ifdef WOLFSSL_DILITHIUM_SMALL + for (j = 0; j < DILITHIUM_N; j++) { + r[j] -= a[j]; + } +#else + for (j = 0; j < DILITHIUM_N; j += 8) { + r[j+0] -= a[j+0]; + r[j+1] -= a[j+1]; + r[j+2] -= a[j+2]; + r[j+3] -= a[j+3]; + r[j+4] -= a[j+4]; + r[j+5] -= a[j+5]; + r[j+6] -= a[j+6]; + r[j+7] -= a[j+7]; + } +#endif + r += DILITHIUM_N; + a += DILITHIUM_N; + } +} +#endif + +#ifndef WOLFSSL_DILITHIUM_VERIFY_ONLY + +/* Add vector a to r. r += a. + * + * @param [out] r Vector of polynomials that is result. + * @param [in] a Vector of polynomials to add. + * @param [in] l Dimension of vectors. + */ +static void dilithium_vec_add(sword32* r, const sword32* a, byte l) +{ + byte i; + + for (i = 0; i < l; i++) { + word16 j; +#ifdef WOLFSSL_DILITHIUM_SMALL + for (j = 0; j < DILITHIUM_N; j++) { + r[j] += a[j]; + } +#else + for (j = 0; j < DILITHIUM_N; j += 8) { + r[j+0] += a[j+0]; + r[j+1] += a[j+1]; + r[j+2] += a[j+2]; + r[j+3] += a[j+3]; + r[j+4] += a[j+4]; + r[j+5] += a[j+5]; + r[j+6] += a[j+6]; + r[j+7] += a[j+7]; + } +#endif + r += DILITHIUM_N; + a += DILITHIUM_N; + } +} + +/* Make valus in polynomials of vector be in positive range. + * + * @param [in, out] a Vector of polynomials. + * @param [in] l Dimension of vector. + */ +static void dilithium_vec_make_pos(sword32* a, byte l) +{ + byte i; + + for (i = 0; i < l; i++) { + word16 j; +#ifdef WOLFSSL_DILITHIUM_SMALL + for (j = 0; j < DILITHIUM_N; j++) { + a[j] += (0 - (((word32)a[j]) >> 31)) & DILITHIUM_Q; + } +#else + for (j = 0; j < DILITHIUM_N; j += 8) { + a[j+0] += (0 - (((word32)a[j+0]) >> 31)) & DILITHIUM_Q; + a[j+1] += (0 - (((word32)a[j+1]) >> 31)) & DILITHIUM_Q; + a[j+2] += (0 - (((word32)a[j+2]) >> 31)) & DILITHIUM_Q; + a[j+3] += (0 - (((word32)a[j+3]) >> 31)) & DILITHIUM_Q; + a[j+4] += (0 - (((word32)a[j+4]) >> 31)) & DILITHIUM_Q; + a[j+5] += (0 - (((word32)a[j+5]) >> 31)) & DILITHIUM_Q; + a[j+6] += (0 - (((word32)a[j+6]) >> 31)) & DILITHIUM_Q; + a[j+7] += (0 - (((word32)a[j+7]) >> 31)) & DILITHIUM_Q; + } +#endif + a += DILITHIUM_N; + } +} + +#endif /* !WOLFSSL_DILITHIUM_VERIFY_ONLY */ + +/******************************************************************************/ + +#ifndef WOLFSSL_DILITHIUM_NO_MAKE_KEY + +/* Make a key from a random seed. + * + * xi is seed passed in. + * FIPS 204. 5: Algorithm 1 ML-DSA.KeyGen() + * ... + * 2: (rho, rho', K) E {0,1}256 x {0,1}512 x {0,1}256 <- H(xi, 1024) + * 3: A_circum <- ExpandA(rho) + * 4: (s1,s2) <- ExpandS(rho') + * 5: t <- NTT-1(A_circum o NTT(s1)) + s2 + * 6: (t1, t0) <- Power2Round(t, d) + * 7: pk <- pkEncode(rho, t1) + * 8: tr <- H(BytesToBits(pk), 512) + * 9: sk <- skEncode(rho, K, tr, s1, s2, t0) + * 10: return (pk, sk) + * + * FIPS 204. 8.2: Algorithm 16 pkEncode(rho, t1) + * 1: pk <- BitsToBytes(rho) + * 2: for i from 0 to l - 1 do + * 3: pk <- pk || SimpleBitPack(t1[i], 2^(bitlen(q-1)-d) - 1) + * 4: end for + * 5: return pk + * + * FIPS 204. 8.2: Algorithm 18 skEncode(rho, K, tr, s, s2, t0) + * 1: sk <- BitsToBytes(rho) || BitsToBytes(K) || BitsToBytes(tr) + * 2: for i from 0 to l - 1 do + * 3: sk <- sk || BitPack(s1[i], eta, eta) + * 4: end for + * 5: for i from 0 to k - 1 do + * 6: sk <- sk || BitPack(s2[i], eta, eta) + * 7: end for + * 8: for i from 0 to k - 1 do + * 9: sk <- sk || BitPack(t0[i], 2^(d-1)-1, 2^(d-1)) + * 10: end for + * 11: return sk + * + * Public and private key store in key. + * + * @param [in, out] key Dilithium key. + * @param [in] seed Seed to hash to generate values. + * @return 0 on success. + * @return MEMORY_E when memory allocation fails. + * @return Other negative when an error occurs. + */ +static int dilithium_make_key_from_seed(dilithium_key* key, byte* seed) +{ + int ret = 0; + const wc_dilithium_params* params = key->params; + sword32* a = NULL; + sword32* s1 = NULL; + sword32* s2 = NULL; + sword32* t = NULL; + byte* pub_seed = key->k; + + /* Allocate memory for large intermediates. */ +#ifdef WC_DILITHIUM_CACHE_MATRIX_A + if (key->a == NULL) { + key->a = (sword32*)XMALLOC(params->aSz, NULL, DYNAMIC_TYPE_DILITHIUM); + if (key->a == NULL) { + ret = MEMORY_E; + } + } + if (ret == 0) { + a = key->a; + } +#endif +#ifdef WC_DILITHIUM_CACHE_PRIV_VECTORS + if ((ret == 0) && (key->s1 == NULL)) { + key->s1 = (sword32*)XMALLOC(params->aSz, NULL, DYNAMIC_TYPE_DILITHIUM); + if (key->s1 == NULL) { + ret = MEMORY_E; + } + else { + key->s2 = key->s1 + params->s1Sz / sizeof(*s1); + key->t0 = key->s2 + params->s2Sz / sizeof(*s2); + } + } + if (ret == 0) { + s1 = key->s1; + s2 = key->s2; + t = key->t0; + } +#else + if (ret == 0) { + unsigned int allocSz; + + allocSz = params->s1Sz + params->s2Sz + params->s2Sz; +#ifndef WC_DILITHIUM_CACHE_MATRIX_A + allocSz += params->aSz; +#endif + + /* s1, s2, t, a */ + s1 = (sword32*)XMALLOC(allocSz, NULL, DYNAMIC_TYPE_DILITHIUM); + if (s1 == NULL) { + ret = MEMORY_E; + } + else { + s2 = s1 + params->s1Sz / sizeof(*s1); + t = s2 + params->s2Sz / sizeof(*s2); +#ifndef WC_DILITHIUM_CACHE_MATRIX_A + a = t + params->s2Sz / sizeof(*s2); +#endif + } + } +#endif + + if (ret == 0) { + /* Step 2: Create public seed, private seed and K from seed. + * Step 9; Alg 18, Step 1: Public seed is placed into private key. */ + ret = dilithium_shake256(&key->shake, seed, DILITHIUM_SEED_SZ, pub_seed, + DILITHIUM_SEEDS_SZ); + } + if (ret == 0) { + /* Step 7; Alg 16 Step 1: Copy public seed into public key. */ + XMEMCPY(key->p, pub_seed, DILITHIUM_PUB_SEED_SZ); + + /* Step 3: Expand public seed into a matrix of polynomials. */ + ret = dilithium_expand_a(&key->shake, pub_seed, params->k, params->l, + a); + } + if (ret == 0) { + byte* priv_seed = key->k + DILITHIUM_PUB_SEED_SZ; + + /* Step 4: Expand private seed into to vectors of polynomials. */ + ret = dilithium_expand_s(&key->shake, priv_seed, params->eta, s1, + params->l, s2, params->k); + } + if (ret == 0) { + byte* k = pub_seed + DILITHIUM_PUB_SEED_SZ; + byte* tr = k + DILITHIUM_K_SZ; + byte* s1p = tr + DILITHIUM_TR_SZ; + byte* s2p = s1p + params->s1EncSz; + byte* t0 = s2p + params->s2EncSz; + byte* t1 = key->p + DILITHIUM_PUB_SEED_SZ; + + /* Step 9: Move k down to after public seed. */ + XMEMCPY(k, k + DILITHIUM_PRIV_SEED_SZ, DILITHIUM_K_SZ); + /* Step 9. Alg 18 Steps 2-4: Encode s1 into private key. */ + dilthium_vec_encode_eta_bits(s1, params->l, params->eta, s1p); + /* Step 9. Alg 18 Steps 5-7: Encode s2 into private key. */ + dilthium_vec_encode_eta_bits(s2, params->k, params->eta, s2p); + + /* Step 5: t <- NTT-1(A_circum o NTT(s1)) + s2 */ + dilithium_vec_ntt_small(s1, params->l); + dilithium_matrix_mul(t, a, s1, params->k, params->l); + dilithium_vec_invntt(t, params->k); + dilithium_vec_add(t, s2, params->k); + + /* Make positive for decomposing. */ + dilithium_vec_make_pos(t, params->k); + /* Step 6, Step 7, Step 9. Alg 16 Steps 2-4, Alg 18 Steps 8-10. + * Decompose t in t0 and t1 and encode into public and private key. + */ + dilithium_vec_encode_t0_t1(t, params->k, t0, t1); + /* Step 8. Alg 18, Step 1: Hash public key into private key. */ + ret = dilithium_shake256(&key->shake, key->p, params->pkSz, tr, + DILITHIUM_TR_SZ); + } + if (ret == 0) { + /* Public key and private key are available. */ + key->prvKeySet = 1; + key->pubKeySet = 1; +#ifdef WC_DILITHIUM_CACHE_MATRIX_A + /* Matrix A is available. */ + key->aSet = 1; +#endif +#ifdef WC_DILITHIUM_CACHE_PRIV_VECTORS + /* Private vectors are not available as they were overwritten. */ + key->privVecsSet = 0; +#endif +#ifdef WC_DILITHIUM_CACHE_PUB_VECTORS + /* Public vector, t1, is not available as it was not created. */ + key->pubVecSet = 0; +#endif + } + +#ifndef WC_DILITHIUM_CACHE_PRIV_VECTORS + XFREE(s1, NULL, DYNAMIC_TYPE_DILITHIUM); +#endif + return ret; +} + +/* Make a key from a random seed. + * + * FIPS 204. 5: Algorithm 1 ML-DSA.KeyGen() + * 1: xi <- {0,1}256 [Choose random seed] + * ... + * + * @param [in, out] key Dilithium key. + * @param [in] rng Random number generator. + * @return 0 on success. + * @return MEMORY_E when memory allocation fails. + * @return Other negative when an error occurs. + */ +static int dilithium_make_key(dilithium_key* key, WC_RNG* rng) +{ + int ret; + byte seed[DILITHIUM_SEED_SZ]; + + /* Generate a 256-bit random seed. */ + ret = wc_RNG_GenerateBlock(rng, seed, DILITHIUM_SEED_SZ); + if (ret == 0) { + /* Make key with random seed. */ + ret = dilithium_make_key_from_seed(key, seed); + } + + return ret; +} +#endif /* !WOLFSSL_DILITHIUM_NO_MAKE_KEY */ + +#ifndef WOLFSSL_DILITHIUM_NO_SIGN + +/* Decode, from private key, and NTT private key vectors s1, s2, and t0. + * + * FIPS 204. 6: Algorithm 2 MD-DSA.Sign(sk, M) + * 1: (rho, K, tr, s1, s2, t0) <- skDecode(sk) + * 2: s1_circum <- NTT(s1) + * 3: s2_circum <- NTT(s2) + * 4: t0_circum <- NTT(t0) + * + * @param [in, out] key Dilithium key. + * @param [out] s1 Vector of polynomials s1. + * @param [out] s2 Vector of polynomials s2. + * @param [out] t0 Vector of polynomials t0. + */ +static void dilithium_make_priv_vecs(dilithium_key* key, sword32* s1, + sword32* s2, sword32* t0) +{ + const wc_dilithium_params* params = key->params; + const byte* pubSeed = key->k; + const byte* k = pubSeed + DILITHIUM_PUB_SEED_SZ; + const byte* tr = k + DILITHIUM_K_SZ; + const byte* s1p = tr + DILITHIUM_TR_SZ; + const byte* s2p = s1p + params->s1EncSz; + const byte* t0p = s2p + params->s2EncSz; + + /* Step 1: Decode s1, s2, t0. */ + dilithium_vec_decode_eta_bits(s1p, params->eta, s1, params->l); + dilithium_vec_decode_eta_bits(s2p, params->eta, s2, params->k); + dilithium_vec_decode_t0(t0p, params->k, t0); + + /* Step 2: NTT s1. */ + dilithium_vec_ntt_small(s1, params->l); + /* Step 3: NTT s2. */ + dilithium_vec_ntt_small(s2, params->k); + /* Step 4: NTT t0. */ + dilithium_vec_ntt(t0, params->k); + +#ifdef WC_DILITHIUM_CACHE_PRIV_VECTORS + /* Private key vectors have been created. */ + key->privVecsSet = 1; +#endif +} + +/* Sign a message with the key and a seed. + * + * FIPS 204. 6: Algorithm 2 MD-DSA.Sign(sk, M) + * 1: (rho, K, tr, s1, s2, t0) <- skDecode(sk) + * 2: s1_circum <- NTT(s1) + * 3: s2_circum <- NTT(s2) + * 4: t0_circum <- NTT(t0) + * 5: A_circum <- ExpandA(rho) + * 6: mu <- H(tr||M, 512) + * 7: rnd <- {0,1}256 + * 8: rho' <- H(K||rnd||mu, 512) + * 9: kappa <- 0 + * 10: (z, h) <- falsam + * 11: while (z, h) = falsam do + * 12: y <- ExpandMask(rho', kappa) + * 13: w <- NTT-1(A_circum o NTT(y)) + * 14: w1 <- HighBits(w) + * 15: c_tilde E {0,1}2*lambda <- H(mu|w1Encode(w1), 2 * lambda) + * 16: (c1_tilde, c2_tilde) E {0,1}256 x {0,1}2*lambda-256 <- c_tilde + * 17: c < SampleInBall(c1_tilde) + * 18: c_circum <- NTT(c) + * 19: <> <- NTT-1(c_circum o s1_circum) + * 20: <> <- NTT-1(c_circum o s2_circum) + * 21: z <- y + <> + * 22: r0 <- LowBits(w - <> + * 23: if ||z||inf >= GAMMA1 - BETA or ||r0||inf GAMMA2 - BETA then + * (z, h) <- falsam + * 24: else + * 25: <> <- NTT-1(c_circum o t0_circum) + * 26: h < MakeHint(-<>, w - <> + <>) + * 27: if (||<>||inf >= GAMMMA1 or + * the number of 1's in h is greater than OMEGA, then + * (z, h) <- falsam + * 28: end if + * 29: end if + * 30: kappa <- kappa + l + * 31: end while + * 32: sigma <- sigEncode(c_tilde, z mod +/- q, h) + * 33: return sigma + * + * @param [in, out] key Dilithium key. + * @param [in, out] rng Random number generator. + * @param [in] msg Message data to sign. + * @param [in] msgLen Length of message data in bytes. + * @param [out] sig Buffer to hold signature. + * @param [in, out] sigLen On in, length of buffer in bytes. + * On out, the length of the signature in bytes. + * @return 0 on success. + * @return BUFFER_E when the signature buffer is too small. + * @return MEMORY_E when memory allocation fails. + * @return Other negative when an error occurs. + */ +static int dilithium_sign_msg_with_seed(dilithium_key* key, const byte* rnd, + const byte* msg, word32 msgLen, byte* sig, word32 *sigLen) +{ + int ret = 0; + const wc_dilithium_params* params = key->params; + byte* pub_seed = key->k; + byte* k = pub_seed + DILITHIUM_PUB_SEED_SZ; + byte* tr = k + DILITHIUM_K_SZ; + sword32* a = NULL; + sword32* s1 = NULL; + sword32* s2 = NULL; + sword32* t0 = NULL; + sword32* y = NULL; + sword32* w0 = NULL; + sword32* w1 = NULL; + sword32* c = NULL; + sword32* z = NULL; + sword32* ct0 = NULL; + byte data[DILITHIUM_RND_SZ + DILITHIUM_MU_SZ]; + byte* mu = data + DILITHIUM_RND_SZ; + byte priv_rand_seed[DILITHIUM_Y_SEED_SZ]; + byte* h = sig + params->lambda * 2 + params->zEncSz; + + /* Check the signature buffer isn't too small. */ + if ((ret == 0) && (*sigLen < params->sigSz)) { + ret = BUFFER_E; + } + if (ret == 0) { + /* Return the size of the signature. */ + *sigLen = params->sigSz; + } + + /* Allocate memory for large intermediates. */ +#ifdef WC_DILITHIUM_CACHE_MATRIX_A + if ((ret == 0) && (key->a == NULL)) { + a = (sword32*)XMALLOC(params->aSz, NULL, DYNAMIC_TYPE_DILITHIUM); + if (a == NULL) { + ret = MEMORY_E; + } + } + if (ret == 0) { + a = key->a; + } +#endif +#ifdef WC_DILITHIUM_CACHE_PRIV_VECTORS + if ((ret == 0) && (key->s1 == NULL)) { + key->s1 = (sword32*)XMALLOC(params->aSz, NULL, DYNAMIC_TYPE_DILITHIUM); + if (key->s1 == NULL) { + ret = MEMORY_E; + } + else { + key->s2 = key->s1 + params->s1Sz / sizeof(*s1); + key->t0 = key->s2 + params->s2Sz / sizeof(*s2); + } + } + if (ret == 0) { + s1 = key->s1; + s2 = key->s2; + t0 = key->t0; + } +#endif + if (ret == 0) { + unsigned int allocSz; + + /* y-l, w0-k, w1-k, c-1, z-l, ct0-k */ + allocSz = params->s1Sz + params->s2Sz + params->s2Sz + + DILITHIUM_POLY_SIZE + params->s1Sz + params->s2Sz; +#ifndef WC_DILITHIUM_CACHE_PRIV_VECTORS + /* s1-l, s2-k, t0-k */ + allocSz += params->s1Sz + params->s2Sz + params->s2Sz; +#endif +#ifndef WC_DILITHIUM_CACHE_MATRIX_A + /* A */ + allocSz += params->aSz; +#endif + y = (sword32*)XMALLOC(allocSz, NULL, DYNAMIC_TYPE_DILITHIUM); + if (y == NULL) { + ret = MEMORY_E; + } + else { + w0 = y + params->s1Sz / sizeof(*y); + w1 = w0 + params->s2Sz / sizeof(*w0); + c = w1 + params->s2Sz / sizeof(*w1); + z = c + DILITHIUM_N; + ct0 = z + params->s1Sz / sizeof(*z); +#ifndef WC_DILITHIUM_CACHE_PRIV_VECTORS + s1 = ct0 + params->s2Sz / sizeof(*ct0); + s2 = s1 + params->s1Sz / sizeof(*s1); + t0 = s2 + params->s2Sz / sizeof(*s2); +#endif +#ifndef WC_DILITHIUM_CACHE_MATRIX_A + a = t0 + params->s2Sz / sizeof(*s2); +#endif + } + } + + if (ret == 0) { +#ifdef WC_DILITHIUM_CACHE_PRIV_VECTORS + /* Check that we haven't already cached the private vectors. */ + if (!key->privVecsSet) +#endif + { + /* Steps 1-4: Decode and NTT vectors s1, s2, and t0. */ + dilithium_make_priv_vecs(key, s1, s2, t0); + } + +#ifdef WC_DILITHIUM_CACHE_MATRIX_A + /* Check that we haven't already cached the matrix A. */ + if (!key->aSet) +#endif + { + /* Step 5: Create the matrix A from the public seed. */ + ret = dilithium_expand_a(&key->shake, pub_seed, params->k, + params->l, a); +#ifdef WC_DILITHIUM_CACHE_MATRIX_A + key->aSet = (ret == 0); +#endif + } + } + if (ret == 0) { + /* Step 6: Compute the hash of tr, public key hash, and message. */ + ret = dilithium_hash256(&key->shake, tr, DILITHIUM_TR_SZ, msg, msgLen, + mu, DILITHIUM_MU_SZ); + } + if (ret == 0) { + /* Step 7: Copy random into buffer for hashing. */ + XMEMCPY(data, rnd, DILITHIUM_RND_SZ); + } + if (ret == 0) { + /* Step 9: Compute private random using hash. */ + ret = dilithium_hash256(&key->shake, k, DILITHIUM_K_SZ, data, + DILITHIUM_RND_SZ + DILITHIUM_MU_SZ, priv_rand_seed, + DILITHIUM_PRIV_RAND_SEED_SZ); + } + if (ret == 0) { + word16 kappa = 0; + int valid = 0; + + /* Step 11: Start rejection sampling loop */ + do { + byte w1e[DILITHIUM_MAX_W1_ENC_SZ]; + sword32* w = w1; + sword32* y_ntt = z; + sword32* cs2 = ct0; + byte* commit = sig; + + /* Step 12: Compute vector y from private random seed and kappa. */ + dilithium_expand_mask(&key->shake, priv_rand_seed, kappa, + params->gamma1_bits, y, params->l); + + /* Step 13: NTT-1(A o NTT(y)) */ + XMEMCPY(y_ntt, y, params->s1Sz); + dilithium_vec_ntt(y_ntt, params->l); + dilithium_matrix_mul(w, a, y_ntt, params->k, params->l); + dilithium_vec_invntt(w, params->k); + /* Step 14, Step 22: Make values positive and decompose. */ + dilithium_vec_make_pos(w, params->k); + dilithium_vec_decompose(w, params->k, params->gamma2, w0, w1); + + /* Step 15: Encode w1. */ + dilithium_vec_encode_w1(w1, params->k, params->gamma2, w1e); + /* Step 15: Hash mu and encoded w1. + * Step 32: Hash is stored in signature. */ + ret = dilithium_hash256(&key->shake, mu, DILITHIUM_MU_SZ, + w1e, params->w1EncSz, commit, 2 * params->lambda); + if (ret == 0) { + /* Step 17: Compute c from first 256 bits of commit. */ + ret = dilithium_sample_in_ball(&key->shake, commit, params->tau, + c, NULL); + } + if (ret == 0) { + sword32 hi; + + /* Step 18: NTT(c). */ + dilithium_ntt_small(c); + /* Step 20: c o s2 */ + dilithium_vec_mul(cs2, c, s2, params->k); + /* Step 20: cs2 = NTT-1(c o s2) */ + dilithium_vec_invntt(cs2, params->k); + /* Step 22: w0 = w0 - cs2 */ + dilithium_vec_sub(w0, cs2, params->k); + dilithium_vec_red(w0, params->k); + /* Step 23: Check w0 - cs2 has low enough values. */ + hi = params->gamma2 - params->beta; + valid = dilithium_check_low(w0, params->k, hi); + if (valid) { + /* Step 19: cs1 = NTT-1(c o s1) */ + dilithium_vec_mul(z, c, s1, params->l); + dilithium_vec_invntt(z, params->l); + /* Step 21: z = y + cs1 */ + dilithium_vec_add(z, y, params->l); + dilithium_vec_red(z, params->l); + /* Step 23: Check z has low enough values. */ + hi = (1 << params->gamma1_bits) - params->beta; + valid = dilithium_check_low(z, params->l, hi); + } + if (valid) { + /* Step 25: ct0 = NTT-1(c o t0) */ + dilithium_vec_mul(ct0, c, t0, params->k); + dilithium_vec_invntt(ct0, params->k); + /* Step 27: Check ct0 has low enough values. */ + hi = params->gamma2; + valid = dilithium_check_low(ct0, params->k, hi); + } + if (valid) { + /* Step 26: ct0 = ct0 + w0 */ + dilithium_vec_add(ct0, w0, params->k); + dilithium_vec_red(ct0, params->l); + /* Step 26, 27: Make hint from ct0 and w1 and check number + * of hints is valid. + * Step 32: h is encoded into signature. + */ + valid = (dilithium_make_hint(ct0, w1, params->k, + params->gamma2, params->omega, h) >= 0); + } + } + + if (!valid) { + /* Too many attempts - something wrong with implementation. */ + if ((kappa > (word16)(kappa + params->l))) { + ret = BAD_COND_E; + } + + /* Step 30: increment value to append to seed to unique value. + */ + kappa += params->l; + } + } + /* Step 11: Check we have a valid signature. */ + while ((ret == 0) && (!valid)); + } + if (ret == 0) { + byte* ze = sig + params->lambda * 2; + /* Step 32: Encode z into signature. + * Commit (c) and h already encoded into signature. */ + dilithium_vec_encode_gamma1(z, params->l, params->gamma1_bits, ze); + } + + XFREE(y, NULL, DYNAMIC_TYPE_DILITHIUM); + return ret; +} + +/* Sign a message with the key and a random number generator. + * + * FIPS 204. 6: Algorithm 2 MD-DSA.Sign(sk, M) + * ... + * 7: rnd <- {0,1}256 [Randomly generated.] + * ... + * + * @param [in, out] key Dilithium key. + * @param [in, out] rng Random number generator. + * @param [in] msg Message data to sign. + * @param [in] msgLen Length of message data in bytes. + * @param [out] sig Buffer to hold signature. + * @param [in, out] sigLen On in, length of buffer in bytes. + * On out, the length of the signature in bytes. + * @return 0 on success. + * @return BUFFER_E when the signature buffer is too small. + * @return MEMORY_E when memory allocation fails. + * @return Other negative when an error occurs. + */ +static int dilithium_sign_msg(dilithium_key* key, WC_RNG* rng, const byte* msg, + word32 msgLen, byte* sig, word32 *sigLen) +{ + int ret = 0; + byte rnd[DILITHIUM_RND_SZ]; + + /* Must have a random number generator. */ + if (rng == NULL) { + ret = BAD_FUNC_ARG; + } -#ifdef HAVE_CONFIG_H - #include -#endif + if (ret == 0) { + /* Step 7: Generate random seed. */ + ret = wc_RNG_GenerateBlock(rng, rnd, DILITHIUM_RND_SZ); + } + if (ret == 0) { + /* Sign with random seed. */ + ret = dilithium_sign_msg_with_seed(key, rnd, msg, msgLen, sig, sigLen); + } -/* in case user set HAVE_PQC there */ -#include + return ret; +} -#include +#endif /* !WOLFSSL_DILITHIUM_NO_SIGN */ -#if defined(HAVE_PQC) && defined(HAVE_DILITHIUM) +#ifndef WOLFSSL_DILITHIUM_NO_VERIFY -#ifdef HAVE_LIBOQS -#include -#endif +#ifndef WOLFSSL_DILITHIUM_VERIFY_SMALL_MEM +static void dilithium_make_pub_vec(dilithium_key* key, sword32* t1) +{ + const wc_dilithium_params* params = key->params; + const byte* t1p = key->p + DILITHIUM_PUB_SEED_SZ; -#include -#include -#ifdef NO_INLINE - #include -#else - #define WOLFSSL_MISC_INCLUDED - #include + dilithium_vec_decode_t1(t1p, params->k, t1); + dilithium_vec_ntt(t1, params->k); + +#ifdef WC_DILITHIUM_CACHE_PUB_VECTORS + key->pubVecSet = 1; +#endif +} #endif -/* Sign the message using the dilithium private key. +/* Verify signature of message using public key. * - * in [in] Message to sign. - * inLen [in] Length of the message in bytes. - * out [in] Buffer to write signature into. - * outLen [in/out] On in, size of buffer. - * On out, the length of the signature in bytes. - * key [in] Dilithium key to use when signing - * returns BAD_FUNC_ARG when a parameter is NULL or public key not set, - * BUFFER_E when outLen is less than DILITHIUM_LEVEL2_SIG_SIZE, - * 0 otherwise. + * FIPS 204. 6: Algorithm 3 ML-DSA.Verify(pk, M, sigma) + * 1: (rho, t1) <- pkDecode(pk) + * 2: (c_tilde, z, h) <- sigDecode(sigma) + * 3: if h = falsam then return false + * 4: end if + * 5: A_circum <- ExpandS(rho) + * 6: tr <- H(BytesToBits(pk), 512) + * 7: mu <- H(tr||M, 512) + * 8: (c1_tilde, c2_tilde) E {0,1}256 x {0,1)2*lambda-256 <- c_tilde + * 9: c <- SampleInBall(c1_tilde) + * 10: w'approx <- NTT-1(A_circum o NTT(z) - NTT(c) o NTT(t1.s^d)) + * 11: w1' <- UseHint(h, w'approx) + * 12: c'_tilde < H(mu||w1Encode(w1'), 2*lambda) + * 13: return [[ ||z||inf < GAMMA1 - BETA]] and [[c_tilde = c'_tilde]] and + * [[number of 1's in h is <= OMEGA + * + * @param [in, out] key Dilithium key. + * @param [in] msg Message to verify. + * @param [in] msgLen Length of message in bytes. + * @param [in] sig Signature to verify message. + * @param [in] sigLen Length of message in bytes. + * @param [out] res Result of verification. + * @return 0 on success. + * @return SIG_VERIFY_E when hint is malformed. + * @return BUFFER_E when the length of the signature does not match + * parameters. + * @return MEMORY_E when memory allocation fails. + * @return Other negative when an error occurs. */ -int wc_dilithium_sign_msg(const byte* in, word32 inLen, - byte* out, word32 *outLen, - dilithium_key* key, WC_RNG* rng) +#ifndef WOLFSSL_DILITHIUM_VERIFY_SMALL_MEM +static int dilithium_verify_msg(dilithium_key* key, const byte* msg, + word32 msgLen, const byte* sig, word32 sigLen, int* res) { int ret = 0; + const wc_dilithium_params* params = key->params; + const byte* pub_seed = key->p; + const byte* commit = sig; + const byte* ze = sig + params->lambda * 2; + const byte* h = ze + params->zEncSz; + sword32* a = NULL; + sword32* t1 = NULL; + sword32* c = NULL; + sword32* z = NULL; + sword32* w = NULL; + sword32* t1c = NULL; + byte tr[DILITHIUM_TR_SZ]; + byte* mu = tr; + byte* w1e = NULL; + byte* commit_calc = tr; + int valid = 0; + sword32 hi; + + /* Ensure the signature is the right size for the parameters. */ + if (sigLen != params->sigSz) { + ret = BUFFER_E; + } + if (ret == 0) { + /* Step 13: Verify the hint is well-formed. */ + ret = dilithium_check_hint(h, params->k, params->omega); + } + + /* Allocate memory for large intermediates. */ +#ifdef WC_DILITHIUM_CACHE_MATRIX_A + if ((ret == 0) && (key->a == NULL)) { + key->a = (sword32*)XMALLOC(params->aSz, NULL, DYNAMIC_TYPE_DILITHIUM); + if (key->a == NULL) { + ret = MEMORY_E; + } + } + if (ret == 0) { + a = key->a; + } +#endif +#ifdef WC_DILITHIUM_CACHE_PUB_VECTORS + if ((ret == 0) && (key->t1 == NULL)) { + key->t1 = (sword32*)XMALLOC(params->s2Sz, NULL, DYNAMIC_TYPE_DILITHIUM); + if (key->t1 == NULL) { + ret = MEMORY_E; + } + } + if (ret == 0) { + t1 = key->t1; + } +#endif + if (ret == 0) { + unsigned int allocSz; + + /* z, c, w, t1/t1c */ + allocSz = DILITHIUM_POLY_SIZE + params->s1Sz + params->s2Sz + + params->s2Sz; +#ifndef WC_DILITHIUM_CACHE_MATRIX_A + /* a */ + allocSz += params->aSz; +#endif - /* sanity check on arguments */ - if ((in == NULL) || (out == NULL) || (outLen == NULL) || (key == NULL)) { - return BAD_FUNC_ARG; + z = (sword32*)XMALLOC(allocSz, NULL, DYNAMIC_TYPE_DILITHIUM); + if (z == NULL) { + ret = MEMORY_E; + } + else { + c = z + params->s1Sz / sizeof(*z); + w = c + DILITHIUM_N; +#ifndef WC_DILITHIUM_CACHE_PUB_VECTORS + t1 = w + params->s2Sz / sizeof(*w); + t1c = t1; +#else + t1c = w + params->s2Sz / sizeof(*w); +#endif +#ifndef WC_DILITHIUM_CACHE_MATRIX_A + a = t1 + params->s2Sz / sizeof(*t1); +#endif + w1e = (byte*)c; + } } -#ifdef WOLF_CRYPTO_CB - #ifndef WOLF_CRYPTO_CB_FIND - if (key->devId != INVALID_DEVID) - #endif - { - ret = wc_CryptoCb_PqcSign(in, inLen, out, outLen, rng, - WC_PQC_SIG_TYPE_DILITHIUM, key); - if (ret != WC_NO_ERR_TRACE(CRYPTOCB_UNAVAILABLE)) - return ret; - /* fall-through when unavailable */ - ret = 0; + if (ret == 0) { + /* Step 2: Decode z from signature. */ + dilithium_vec_decode_gamma1(ze, params->l, params->gamma1_bits, z); + /* Step 13: Check z is valid - values are low enough. */ + hi = (1 << params->gamma1_bits) - params->beta; + valid = dilithium_check_low(z, params->l, hi); } + if ((ret == 0) && valid) { +#ifdef WC_DILITHIUM_CACHE_PUB_VECTORS + /* Check that we haven't already cached the public vector. */ + if (!key->pubVecSet) #endif + { + /* Step 1: Decode and NTT vector t1. */ + dilithium_make_pub_vec(key, t1); + } -#ifdef HAVE_LIBOQS +#ifdef WC_DILITHIUM_CACHE_MATRIX_A + /* Check that we haven't already cached the matrix A. */ + if (!key->aSet) +#endif + { + /* Step 5: Expand pub seed to compute matrix A. */ + ret = dilithium_expand_a(&key->shake, pub_seed, params->k, + params->l, a); +#ifdef WC_DILITHIUM_CACHE_MATRIX_A + /* Whether we have cached A is dependent on success of operation. */ + key->aSet = (ret == 0); +#endif + } + } + if ((ret == 0) && valid) { + /* Step 6: Hash public key. */ + ret = dilithium_shake256(&key->shake, key->p, params->pkSz, tr, + DILITHIUM_TR_SZ); + } + if ((ret == 0) && valid) { + /* Step 7: Hash hash of public key and message. */ + ret = dilithium_hash256(&key->shake, tr, DILITHIUM_TR_SZ, msg, msgLen, + mu, DILITHIUM_MU_SZ); + } + if ((ret == 0) && valid) { + /* Step 9: Compute c from first 256 bits of commit. */ + ret = dilithium_sample_in_ball(&key->shake, commit, params->tau, c, + NULL); + } + if ((ret == 0) && valid) { + /* Step 10: w = NTT-1(A o NTT(z) - NTT(c) o NTT(t1)) */ + dilithium_vec_ntt(z, params->l); + dilithium_matrix_mul(w, a, z, params->k, params->l); + dilithium_ntt_small(c); + dilithium_vec_mul(t1c, c, t1, params->k); + dilithium_vec_sub(w, t1c, params->k); + dilithium_vec_invntt(w, params->k); + /* Step 11: Use hint to give full w1. */ + dilithium_vec_use_hint(w, params->k, params->gamma2, params->omega, h); + /* Step 12: Encode w1. */ + dilithium_vec_encode_w1(w, params->k, params->gamma2, w1e); + /* Step 12: Hash mu and encoded w1. */ + ret = dilithium_hash256(&key->shake, mu, DILITHIUM_MU_SZ, w1e, + params->w1EncSz, commit_calc, 2 * params->lambda); + } + if ((ret == 0) && valid) { + /* Step 13: Compare commit. */ + valid = (XMEMCMP(commit, commit_calc, 2 * params->lambda) == 0); + } + + *res = valid; + XFREE(z, NULL, DYNAMIC_TYPE_DILITHIUM); + return ret; +} +#else +static int dilithium_verify_msg(dilithium_key* key, const byte* msg, + word32 msgLen, const byte* sig, word32 sigLen, int* res) +{ + int ret = 0; + const wc_dilithium_params* params = key->params; + const byte* pub_seed = key->p; + const byte* t1p = pub_seed + DILITHIUM_PUB_SEED_SZ; + const byte* commit = sig; + const byte* ze = sig + params->lambda * 2; + const byte* h = ze + params->zEncSz; + sword32* t1 = NULL; + sword32* a = NULL; + sword32* c = NULL; + sword32* z = NULL; + sword32* w = NULL; + byte tr[DILITHIUM_TR_SZ]; + byte* mu = tr; + byte* w1e = NULL; + byte* commit_calc = tr; + int valid = 0; + sword32 hi; + byte i; + unsigned int j; + byte o; + byte* encW1; + byte* seed = tr; + + /* Ensure the signature is the right size for the parameters. */ + if (sigLen != params->sigSz) { + ret = BUFFER_E; + } + if (ret == 0) { + /* Step 13: Verify the hint is well-formed. */ + ret = dilithium_check_hint(h, params->k, params->omega); + } + +#ifndef WOLFSSL_DILITHIUM_VERIFY_NO_MALLOC + /* Allocate memory for large intermediates. */ + if (ret == 0) { + /* z, c, w, t1, w1e. */ + z = (sword32*)XMALLOC(params->s1Sz + 3 * DILITHIUM_POLY_SIZE + + DILITHIUM_MAX_W1_ENC_SZ, NULL, DYNAMIC_TYPE_DILITHIUM); + if (z == NULL) { + ret = MEMORY_E; + } + else { + c = z + params->s1Sz / sizeof(*t1); + w = c + DILITHIUM_N; + t1 = w + DILITHIUM_N; + w1e = (byte*)(t1 + DILITHIUM_N); + a = t1; + } + } +#else + if (ret == 0) { + z = key->z; + c = key->c; + w = key->w; + t1 = key->t1; + w1e = key->w1e; + a = t1; + } +#endif + + if (ret == 0) { + /* Step 2: Decode z from signature. */ + dilithium_vec_decode_gamma1(ze, params->l, params->gamma1_bits, z); + /* Step 13: Check z is valid - values are low enough. */ + hi = (1 << params->gamma1_bits) - params->beta; + valid = dilithium_check_low(z, params->l, hi); + } + if ((ret == 0) && valid) { + /* Step 10: NTT(z) */ + dilithium_vec_ntt(z, params->l); + + /* Step 9: Compute c from first 256 bits of commit. */ +#ifdef WOLFSSL_DILITHIUM_VERIFY_NO_MALLOC + ret = dilithium_sample_in_ball(&key->shake, commit, params->tau, c, + key->block); +#else + ret = dilithium_sample_in_ball(&key->shake, commit, params->tau, c, + NULL); +#endif + } + if ((ret == 0) && valid) { + dilithium_ntt_small(c); + + o = 0; + encW1 = w1e; + + /* Copy the seed into a buffer that has space for s and r. */ + XMEMCPY(seed, pub_seed, DILITHIUM_PUB_SEED_SZ); + /* Step 1: Loop over first dimension of matrix. */ + for (i = 0; (ret == 0) && (i < params->k); i++) { + byte s; + const sword32* zt = z; + + /* Step 1: Decode and NTT vector t1. */ + dilithium_decode_t1(t1p, w); + /* Next polynomial. */ + t1p += DILITHIUM_U * DILITHIUM_N / 8; + + /* Step 10: w = NTT(c) o NTT(t1)) */ + dilithium_ntt(w); +#ifdef WOLFSSL_DILITHIUM_SMALL + for (j = 0; j < DILITHIUM_N; j++) { + w[j] = -dilithium_mont_red((sword64)c[j] * w[j]); + } +#else + for (j = 0; j < DILITHIUM_N; j += 8) { + w[j+0] = -dilithium_mont_red((sword64)c[j+0] * w[j+0]); + w[j+1] = -dilithium_mont_red((sword64)c[j+1] * w[j+1]); + w[j+2] = -dilithium_mont_red((sword64)c[j+2] * w[j+2]); + w[j+3] = -dilithium_mont_red((sword64)c[j+3] * w[j+3]); + w[j+4] = -dilithium_mont_red((sword64)c[j+4] * w[j+4]); + w[j+5] = -dilithium_mont_red((sword64)c[j+5] * w[j+5]); + w[j+6] = -dilithium_mont_red((sword64)c[j+6] * w[j+6]); + w[j+7] = -dilithium_mont_red((sword64)c[j+7] * w[j+7]); + } +#endif + + /* Step 5: Expand pub seed to compute matrix A. */ + /* Put r into buffer to be hashed. */ + seed[DILITHIUM_PUB_SEED_SZ + 1] = i; + for (s = 0; (ret == 0) && (s < params->l); s++) { + /* Put s into buffer to be hashed. */ + seed[DILITHIUM_PUB_SEED_SZ + 0] = s; + /* Step 3: Create polynomial from hashing seed. */ + #ifdef WOLFSSL_DILITHIUM_VERIFY_NO_MALLOC + ret = dilithium_rej_ntt_poly(&key->shake, seed, a, key->h); + #else + ret = dilithium_rej_ntt_poly(&key->shake, seed, a, NULL); + #endif + + /* Step 10: w = A o NTT(z) - NTT(c) o NTT(t1) */ +#ifdef WOLFSSL_DILITHIUM_SMALL + for (j = 0; j < DILITHIUM_N; j++) { + w[j] += dilithium_mont_red((sword64)a[j] * zt[j]); + } +#else + for (j = 0; j < DILITHIUM_N; j += 8) { + w[j+0] += dilithium_mont_red((sword64)a[j+0] * zt[j+0]); + w[j+1] += dilithium_mont_red((sword64)a[j+1] * zt[j+1]); + w[j+2] += dilithium_mont_red((sword64)a[j+2] * zt[j+2]); + w[j+3] += dilithium_mont_red((sword64)a[j+3] * zt[j+3]); + w[j+4] += dilithium_mont_red((sword64)a[j+4] * zt[j+4]); + w[j+5] += dilithium_mont_red((sword64)a[j+5] * zt[j+5]); + w[j+6] += dilithium_mont_red((sword64)a[j+6] * zt[j+6]); + w[j+7] += dilithium_mont_red((sword64)a[j+7] * zt[j+7]); + } +#endif + /* Next polynomial. */ + zt += DILITHIUM_N; + } + + /* Step 10: w = NTT-1(A o NTT(z) - NTT(c) o NTT(t1)) */ + dilithium_invntt(w); + +#ifndef WOLFSSL_NO_ML_DSA_44 + if (params->gamma2 == DILITHIUM_Q_LOW_88) { + /* Step 11: Use hint to give full w1. */ + dilithium_use_hint_88(w, h, i, &o); + /* Step 12: Encode w1. */ + dilithium_encode_w1_88(w, encW1); + encW1 += DILITHIUM_Q_HI_88_ENC_BITS * 2 * DILITHIUM_N / 16; + } + else +#endif +#if !defined(WOLFSSL_NO_ML_DSA_65) || !defined(WOLFSSL_NO_ML_DSA_87) + if (params->gamma2 == DILITHIUM_Q_LOW_32) { + /* Step 11: Use hint to give full w1. */ + dilithium_use_hint_32(w, h, params->omega, i, &o); + /* Step 12: Encode w1. */ + dilithium_encode_w1_32(w, encW1); + encW1 += DILITHIUM_Q_HI_32_ENC_BITS * 2 * DILITHIUM_N / 16; + } + else +#endif + { + } + } + } + if ((ret == 0) && valid) { + /* Step 6: Hash public key. */ + ret = dilithium_shake256(&key->shake, key->p, params->pkSz, tr, + DILITHIUM_TR_SZ); + } + if ((ret == 0) && valid) { + /* Step 7: Hash hash of public key and message. */ + ret = dilithium_hash256(&key->shake, tr, DILITHIUM_TR_SZ, msg, msgLen, + mu, DILITHIUM_MU_SZ); + } + if ((ret == 0) && valid) { + /* Step 12: Hash mu and encoded w1. */ + ret = dilithium_hash256(&key->shake, mu, DILITHIUM_MU_SZ, w1e, + params->w1EncSz, commit_calc, 2 * params->lambda); + } + if ((ret == 0) && valid) { + /* Step 13: Compare commit. */ + valid = (XMEMCMP(commit, commit_calc, 2 * params->lambda) == 0); + } + + *res = valid; +#ifndef WOLFSSL_DILITHIUM_VERIFY_NO_MALLOC + XFREE(z, NULL, DYNAMIC_TYPE_DILITHIUM); +#endif + return ret; +} +#endif /* !WOLFSSL_DILITHIUM_VERIFY_SMALL_MEM */ + +#endif /* WOLFSSL_DILITHIUM_NO_VERIFY */ + +#elif defined(HAVE_LIBOQS) + +#ifndef WOLFSSL_DILITHIUM_NO_MAKE_KEY +static int oqs_dilithium_make_key(dilithium_key* key, WC_RNG* rng) +{ + int ret = 0; + OQS_SIG *oqssig = NULL; + + if (key->level == 2) { + oqssig = OQS_SIG_new(OQS_SIG_alg_ml_dsa_44_ipd); + } + else if (key->level == 3) { + oqssig = OQS_SIG_new(OQS_SIG_alg_ml_dsa_65_ipd); + } + else if (key->level == 5) { + oqssig = OQS_SIG_new(OQS_SIG_alg_ml_dsa_87_ipd); + } + else { + ret = SIG_TYPE_E; + } + + if (ret == 0) { + ret = wolfSSL_liboqsRngMutexLock(rng); + if (ret == 0) { + if (OQS_SIG_keypair(oqssig, key->p, key->k) != OQS_SUCCESS) { + ret = BUFFER_E; + } + } + wolfSSL_liboqsRngMutexUnlock(); + } + if (ret == 0) { + key->prvKeySet = 1; + key->pubKeySet = 1; + } + + return ret; +} +#endif /* WOLFSSL_DILITHIUM_NO_MAKE_KEY */ + +#ifndef WOLFSSL_DILITHIUM_NO_SIGN +static int oqs_dilithium_sign_msg(const byte* msg, word32 msgLen, byte* sig, + word32 *sigLen, dilithium_key* key, WC_RNG* rng) +{ + int ret = 0; OQS_SIG *oqssig = NULL; size_t localOutLen = 0; - if ((ret == 0) && (!key->prvKeySet)) { + if (!key->prvKeySet) { ret = BAD_FUNC_ARG; } if (ret == 0) { if (key->level == 2) { - oqssig = OQS_SIG_new(OQS_SIG_alg_dilithium_2); + oqssig = OQS_SIG_new(OQS_SIG_alg_ml_dsa_44_ipd); } else if (key->level == 3) { - oqssig = OQS_SIG_new(OQS_SIG_alg_dilithium_3); + oqssig = OQS_SIG_new(OQS_SIG_alg_ml_dsa_65_ipd); } else if (key->level == 5) { - oqssig = OQS_SIG_new(OQS_SIG_alg_dilithium_5); + oqssig = OQS_SIG_new(OQS_SIG_alg_ml_dsa_87_ipd); } else { ret = SIG_TYPE_E; @@ -111,19 +5464,19 @@ int wc_dilithium_sign_msg(const byte* in, word32 inLen, /* check and set up out length */ if (ret == 0) { - if ((key->level == 2) && (*outLen < DILITHIUM_LEVEL2_SIG_SIZE)) { - *outLen = DILITHIUM_LEVEL2_SIG_SIZE; + if ((key->level == 2) && (*sigLen < DILITHIUM_LEVEL2_SIG_SIZE)) { + *sigLen = DILITHIUM_LEVEL2_SIG_SIZE; ret = BUFFER_E; } - else if ((key->level == 3) && (*outLen < DILITHIUM_LEVEL3_SIG_SIZE)) { - *outLen = DILITHIUM_LEVEL3_SIG_SIZE; + else if ((key->level == 3) && (*sigLen < DILITHIUM_LEVEL3_SIG_SIZE)) { + *sigLen = DILITHIUM_LEVEL3_SIG_SIZE; ret = BUFFER_E; } - else if ((key->level == 5) && (*outLen < DILITHIUM_LEVEL5_SIG_SIZE)) { - *outLen = DILITHIUM_LEVEL5_SIG_SIZE; + else if ((key->level == 5) && (*sigLen < DILITHIUM_LEVEL5_SIG_SIZE)) { + *sigLen = DILITHIUM_LEVEL5_SIG_SIZE; ret = BUFFER_E; } - localOutLen = *outLen; + localOutLen = *sigLen; } if (ret == 0) { @@ -131,13 +5484,13 @@ int wc_dilithium_sign_msg(const byte* in, word32 inLen, } if ((ret == 0) && - (OQS_SIG_sign(oqssig, out, &localOutLen, in, inLen, key->k) + (OQS_SIG_sign(oqssig, sig, &localOutLen, msg, msgLen, key->k) == OQS_ERROR)) { ret = BAD_FUNC_ARG; } if (ret == 0) { - *outLen = (word32)localOutLen; + *sigLen = (word32)localOutLen; } wolfSSL_liboqsRngMutexUnlock(); @@ -145,63 +5498,30 @@ int wc_dilithium_sign_msg(const byte* in, word32 inLen, if (oqssig != NULL) { OQS_SIG_free(oqssig); } -#else - ret = NOT_COMPILED_IN; -#endif return ret; } +#endif -/* Verify the message using the dilithium public key. - * - * sig [in] Signature to verify. - * sigLen [in] Size of signature in bytes. - * msg [in] Message to verify. - * msgLen [in] Length of the message in bytes. - * res [out] *res is set to 1 on successful verification. - * key [in] Dilithium key to use to verify. - * returns BAD_FUNC_ARG when a parameter is NULL or contextLen is zero when and - * BUFFER_E when sigLen is less than DILITHIUM_LEVEL2_SIG_SIZE, - * 0 otherwise. - */ -int wc_dilithium_verify_msg(const byte* sig, word32 sigLen, const byte* msg, - word32 msgLen, int* res, dilithium_key* key) +#ifndef WOLFSSL_DILITHIUM_NO_VERIFY +static int oqs_dilithium_verify_msg(const byte* sig, word32 sigLen, + const byte* msg, word32 msgLen, int* res, dilithium_key* key) { int ret = 0; - - if (key == NULL || sig == NULL || msg == NULL || res == NULL) { - return BAD_FUNC_ARG; - } - -#ifdef WOLF_CRYPTO_CB - #ifndef WOLF_CRYPTO_CB_FIND - if (key->devId != INVALID_DEVID) - #endif - { - ret = wc_CryptoCb_PqcVerify(sig, sigLen, msg, msgLen, res, - WC_PQC_SIG_TYPE_DILITHIUM, key); - if (ret != WC_NO_ERR_TRACE(CRYPTOCB_UNAVAILABLE)) - return ret; - /* fall-through when unavailable */ - ret = 0; - } -#endif - -#ifdef HAVE_LIBOQS OQS_SIG *oqssig = NULL; - if ((ret == 0) && (!key->pubKeySet)) { + if (!key->pubKeySet) { ret = BAD_FUNC_ARG; } if (ret == 0) { if (key->level == 2) { - oqssig = OQS_SIG_new(OQS_SIG_alg_dilithium_2); + oqssig = OQS_SIG_new(OQS_SIG_alg_ml_dsa_44_ipd); } else if (key->level == 3) { - oqssig = OQS_SIG_new(OQS_SIG_alg_dilithium_3); + oqssig = OQS_SIG_new(OQS_SIG_alg_ml_dsa_65_ipd); } else if (key->level == 5) { - oqssig = OQS_SIG_new(OQS_SIG_alg_dilithium_5); + oqssig = OQS_SIG_new(OQS_SIG_alg_ml_dsa_87_ipd); } else { ret = SIG_TYPE_E; @@ -212,25 +5532,176 @@ int wc_dilithium_verify_msg(const byte* sig, word32 sigLen, const byte* msg, ret = BUFFER_E; } - if ((ret == 0) && - (OQS_SIG_verify(oqssig, msg, msgLen, sig, sigLen, key->p) - == OQS_ERROR)) { - ret = SIG_VERIFY_E; + if ((ret == 0) && + (OQS_SIG_verify(oqssig, msg, msgLen, sig, sigLen, key->p) + == OQS_ERROR)) { + ret = SIG_VERIFY_E; + } + + if (ret == 0) { + *res = 1; + } + + if (oqssig != NULL) { + OQS_SIG_free(oqssig); + } + return ret; +} +#endif /* WOLFSSL_DILITHIUM_NO_VERIFY */ + +#else + #error "No dilithium implementation chosen." +#endif + +#ifndef WOLFSSL_DILITHIUM_NO_MAKE_KEY +int wc_dilithium_make_key(dilithium_key* key, WC_RNG* rng) +{ + int ret = 0; + + /* Validate parameters. */ + if ((key == NULL) || (rng == NULL)) { + ret = BAD_FUNC_ARG; + } + +#ifdef WOLF_CRYPTO_CB + if (ret == 0) { + #ifndef WOLF_CRYPTO_CB_FIND + if (key->devId != INVALID_DEVID) + #endif + { + ret = wc_CryptoCb_MakePqcSignatureKey(rng, + WC_PQC_SIG_TYPE_DILITHIUM, key->level, key); + if (ret != WC_NO_ERR_TRACE(CRYPTOCB_UNAVAILABLE)) + return ret; + /* fall-through when unavailable */ + ret = 0; + } + } +#endif + + if (ret == 0) { +#ifdef WOLFSSL_WC_DILITHIUM + /* Check the level or parameters have been set. */ + if (key->params == NULL) { + ret = BAD_STATE_E; + } + else { + /* Make the key. */ + ret = dilithium_make_key(key, rng); + } +#elif defined(HAVE_LIBOQS) + /* Make the key. */ + ret = oqs_dilithium_make_key(key, rng); +#endif + } + + return ret; +} +#endif + +#ifndef WOLFSSL_DILITHIUM_NO_SIGN +/* Sign the message using the dilithium private key. + * + * msg [in] Message to sign. + * msgLen [in] Length of the message in bytes. + * sig [out] Buffer to write signature into. + * sigLen [in/out] On in, size of buffer. + * On out, the length of the signature in bytes. + * key [in] Dilithium key to use when signing + * returns BAD_FUNC_ARG when a parameter is NULL or public key not set, + * BUFFER_E when outLen is less than DILITHIUM_LEVEL2_SIG_SIZE, + * 0 otherwise. + */ +int wc_dilithium_sign_msg(const byte* msg, word32 msgLen, byte* sig, + word32 *sigLen, dilithium_key* key, WC_RNG* rng) +{ + int ret = 0; + + /* Validate parameters. */ + if ((msg == NULL) || (sig == NULL) || (sigLen == NULL) || (key == NULL)) { + ret = BAD_FUNC_ARG; + } + +#ifdef WOLF_CRYPTO_CB + if (ret == 0) { + #ifndef WOLF_CRYPTO_CB_FIND + if (key->devId != INVALID_DEVID) + #endif + { + ret = wc_CryptoCb_PqcSign(msg, msgLen, sig, sigLen, rng, + WC_PQC_SIG_TYPE_DILITHIUM, key); + if (ret != WC_NO_ERR_TRACE(CRYPTOCB_UNAVAILABLE)) + return ret; + /* fall-through when unavailable */ + ret = 0; + } + } +#endif + + if (ret == 0) { + /* Sign message. */ + #ifdef WOLFSSL_WC_DILITHIUM + ret = dilithium_sign_msg(key, rng, msg, msgLen, sig, sigLen); + #elif defined(HAVE_LIBOQS) + ret = oqs_dilithium_sign_msg(msg, msgLen, sig, sigLen, key, rng); + #endif + } + + return ret; +} +#endif /* !WOLFSSL_DILITHIUM_NO_SIGN */ + +#ifndef WOLFSSL_DILITHIUM_NO_VERIFY +/* Verify the message using the dilithium public key. + * + * sig [in] Signature to verify. + * sigLen [in] Size of signature in bytes. + * msg [in] Message to verify. + * msgLen [in] Length of the message in bytes. + * res [out] *res is set to 1 on successful verification. + * key [in] Dilithium key to use to verify. + * returns BAD_FUNC_ARG when a parameter is NULL or contextLen is zero when and + * BUFFER_E when sigLen is less than DILITHIUM_LEVEL2_SIG_SIZE, + * 0 otherwise. + */ +int wc_dilithium_verify_msg(const byte* sig, word32 sigLen, const byte* msg, + word32 msgLen, int* res, dilithium_key* key) +{ + int ret = 0; + + /* Validate parameters. */ + if ((key == NULL) || (sig == NULL) || (msg == NULL) || (res == NULL)) { + ret = BAD_FUNC_ARG; } + #ifdef WOLF_CRYPTO_CB if (ret == 0) { - *res = 1; + #ifndef WOLF_CRYPTO_CB_FIND + if (key->devId != INVALID_DEVID) + #endif + { + ret = wc_CryptoCb_PqcVerify(sig, sigLen, msg, msgLen, res, + WC_PQC_SIG_TYPE_DILITHIUM, key); + if (ret != WC_NO_ERR_TRACE(CRYPTOCB_UNAVAILABLE)) + return ret; + /* fall-through when unavailable */ + ret = 0; + } } + #endif - if (oqssig != NULL) { - OQS_SIG_free(oqssig); + if (ret == 0) { + /* Verify message with signature. */ + #ifdef WOLFSSL_WC_DILITHIUM + ret = dilithium_verify_msg(key, msg, msgLen, sig, sigLen, res); + #elif defined(HAVE_LIBOQS) + ret = oqs_dilithium_verify_msg(sig, sigLen, msg, msgLen, res, key); + #endif } -#else - ret = NOT_COMPILED_IN; -#endif return ret; } +#endif /* WOLFSSL_DILITHIUM_NO_VERIFY */ /* Initialize the dilithium private/public key. * @@ -251,41 +5722,50 @@ int wc_dilithium_init(dilithium_key* key) */ int wc_dilithium_init_ex(dilithium_key* key, void* heap, int devId) { + int ret = 0; + + (void)heap; + (void)devId; + + /* Validate parameters. */ if (key == NULL) { - return BAD_FUNC_ARG; + ret = BAD_FUNC_ARG; } - ForceZero(key, sizeof(*key)); - -#ifdef WOLF_CRYPTO_CB - key->devCtx = NULL; - key->devId = devId; -#endif -#ifdef WOLF_PRIVATE_KEY_ID - key->idLen = 0; - key->labelLen = 0; -#endif + if (ret == 0) { + /* Ensure all fields reset. */ + XMEMSET(key, 0, sizeof(*key)); - (void) heap; - (void) devId; + #ifdef WOLF_CRYPTO_CB + key->devCtx = NULL; + key->devId = devId; + #endif + #ifdef WOLF_PRIVATE_KEY_ID + key->idLen = 0; + key->labelLen = 0; + #endif + } - return 0; + return ret; } #ifdef WOLF_PRIVATE_KEY_ID int wc_dilithium_init_id(dilithium_key* key, const unsigned char* id, int len, - void* heap, int devId) + void* heap, int devId) { int ret = 0; - if (key == NULL) + if (key == NULL) { ret = BAD_FUNC_ARG; - if (ret == 0 && (len < 0 || len > DILITHIUM_MAX_ID_LEN)) + } + if ((ret == 0) && ((len < 0) || (len > DILITHIUM_MAX_ID_LEN))) { ret = BUFFER_E; + } - if (ret == 0) + if (ret == 0) { ret = wc_dilithium_init_ex(key, heap, devId); - if (ret == 0 && id != NULL && len != 0) { + } + if ((ret == 0) && (id != NULL) && (len != 0)) { XMEMCPY(key->id, id, (size_t)len); key->idLen = len; } @@ -297,21 +5777,24 @@ int wc_dilithium_init_id(dilithium_key* key, const unsigned char* id, int len, } int wc_dilithium_init_label(dilithium_key* key, const char* label, void* heap, - int devId) + int devId) { int ret = 0; int labelLen = 0; - if (key == NULL || label == NULL) + if ((key == NULL) || (label == NULL)) { ret = BAD_FUNC_ARG; + } if (ret == 0) { labelLen = (int)XSTRLEN(label); - if (labelLen == 0 || labelLen > DILITHIUM_MAX_LABEL_LEN) + if ((labelLen == 0) || (labelLen > DILITHIUM_MAX_LABEL_LEN)) { ret = BUFFER_E; + } } - if (ret == 0) + if (ret == 0) { ret = wc_dilithium_init_ex(key, heap, devId); + } if (ret == 0) { XMEMCPY(key->label, label, (size_t)labelLen); key->labelLen = labelLen; @@ -332,18 +5815,49 @@ int wc_dilithium_init_label(dilithium_key* key, const char* label, void* heap, */ int wc_dilithium_set_level(dilithium_key* key, byte level) { + int ret = 0; + + /* Validate parameters. */ if (key == NULL) { - return BAD_FUNC_ARG; + ret = BAD_FUNC_ARG; + } + if ((ret == 0) && (level != 2) && (level != 3) && (level != 5)) { + ret = BAD_FUNC_ARG; + } + + if (ret == 0) { +#ifdef WOLFSSL_WC_DILITHIUM + /* Get the parameters for level into key. */ + ret = dilithium_get_params(level, &key->params); } + if (ret == 0) { + /* Clear any cached items. */ + #ifdef WC_DILITHIUM_CACHE_MATRIX_A + XFREE(key->a, NULL, WOLFSSL_WC_DILITHIUM); + key->a = NULL; + key->aSet = 0; + #endif + #ifdef WC_DILITHIUM_CACHE_PRIV_VECTORS + XFREE(key->s1, NULL, WOLFSSL_WC_DILITHIUM); + key->s1 = NULL; + key->s2 = NULL; + key->t0 = NULL; + key->privVecsSet = 0; + #endif + #ifdef WC_DILITHIUM_CACHE_PUB_VECTORS + XFREE(key->t1, NULL, WOLFSSL_WC_DILITHIUM); + key->t1 = NULL; + key->pubVecSet = 0; + #endif +#endif /* WOLFSSL_WC_DILITHIUM */ - if (level != 2 && level != 3 && level != 5) { - return BAD_FUNC_ARG; + /* Store level and indicate public and private key are not set. */ + key->level = level; + key->pubKeySet = 0; + key->prvKeySet = 0; } - key->level = level; - key->pubKeySet = 0; - key->prvKeySet = 0; - return 0; + return ret; } /* Get the level of the dilithium private/public key. @@ -354,16 +5868,23 @@ int wc_dilithium_set_level(dilithium_key* key, byte level) */ int wc_dilithium_get_level(dilithium_key* key, byte* level) { - if (key == NULL || level == NULL) { - return BAD_FUNC_ARG; + int ret = 0; + + /* Validate parameters. */ + if ((key == NULL) || (level == NULL)) { + ret = BAD_FUNC_ARG; + } + if ((ret == 0) && (key->level != 2) && (key->level != 3) && + (key->level != 5)) { + ret = BAD_FUNC_ARG; } - if (key->level != 2 && key->level != 3 && key->level != 5) { - return BAD_FUNC_ARG; + if (ret == 0) { + /* Return level. */ + *level = key->level; } - *level = key->level; - return 0; + return ret; } /* Clears the dilithium key data @@ -373,688 +5894,1019 @@ int wc_dilithium_get_level(dilithium_key* key, byte* level) void wc_dilithium_free(dilithium_key* key) { if (key != NULL) { +#ifdef WOLFSSL_WC_DILITHIUM + /* Dispose of cached items. */ + #ifdef WC_DILITHIUM_CACHE_PUB_VECTORS + XFREE(key->t1, NULL, WOLFSSL_WC_DILITHIUM); + #endif + #ifdef WC_DILITHIUM_CACHE_PRIV_VECTORS + XFREE(key->s1, NULL, WOLFSSL_WC_DILITHIUM); + #endif + #ifdef WC_DILITHIUM_CACHE_MATRIX_A + XFREE(key->a, NULL, WOLFSSL_WC_DILITHIUM); + #endif + /* Free the SHAKE-128/256 object. */ + wc_Shake256_Free(&key->shake); +#endif + /* Ensure all private data is zeroized. */ ForceZero(key, sizeof(*key)); } } -/* Export the dilithium public key. +#ifdef WOLFSSL_DILITHIUM_PRIVATE_KEY +/* Returns the size of a dilithium private key. * - * key [in] Dilithium public key. - * out [in] Array to hold public key. - * outLen [in/out] On in, the number of bytes in array. - * On out, the number bytes put into array. - * returns BAD_FUNC_ARG when a parameter is NULL, - * BUFFER_E when outLen is less than DILITHIUM_LEVEL2_PUB_KEY_SIZE, - * 0 otherwise. + * @param [in] key Dilithium private/public key. + * @return Private key size on success for set level. + * @return BAD_FUNC_ARG when key is NULL or level not set, */ -int wc_dilithium_export_public(dilithium_key* key, - byte* out, word32* outLen) +int wc_dilithium_size(dilithium_key* key) { - /* sanity check on arguments */ - if ((key == NULL) || (out == NULL) || (outLen == NULL)) { - return BAD_FUNC_ARG; - } + int ret = BAD_FUNC_ARG; - if ((key->level != 2) && (key->level != 3) && (key->level != 5)) { - return BAD_FUNC_ARG; + if (key != NULL) { + if (key->level == 2) { + ret = DILITHIUM_LEVEL2_KEY_SIZE; + } + else if (key->level == 3) { + ret = DILITHIUM_LEVEL3_KEY_SIZE; + } + else if (key->level == 5) { + ret = DILITHIUM_LEVEL5_KEY_SIZE; + } } - if (!key->pubKeySet) { - return BAD_FUNC_ARG; - } + return ret; +} - /* check and set up out length */ - if ((key->level == 2) && (*outLen < DILITHIUM_LEVEL2_PUB_KEY_SIZE)) { - *outLen = DILITHIUM_LEVEL2_PUB_KEY_SIZE; - return BUFFER_E; - } - else if ((key->level == 3) && (*outLen < DILITHIUM_LEVEL3_PUB_KEY_SIZE)) { - *outLen = DILITHIUM_LEVEL3_PUB_KEY_SIZE; - return BUFFER_E; - } - else if ((key->level == 5) && (*outLen < DILITHIUM_LEVEL5_PUB_KEY_SIZE)) { - *outLen = DILITHIUM_LEVEL5_PUB_KEY_SIZE; - return BUFFER_E; - } +#ifdef WOLFSSL_DILITHIUM_PUBLIC_KEY +/* Returns the size of a dilithium private plus public key. + * + * @param [in] key Dilithium private/public key. + * @return Private key size on success for set level. + * @return BAD_FUNC_ARG when key is NULL or level not set, + */ +int wc_dilithium_priv_size(dilithium_key* key) +{ + int ret = BAD_FUNC_ARG; - if (key->level == 2) { - *outLen = DILITHIUM_LEVEL2_PUB_KEY_SIZE; - XMEMCPY(out, key->p, DILITHIUM_LEVEL2_PUB_KEY_SIZE); - } - else if (key->level == 3) { - *outLen = DILITHIUM_LEVEL3_PUB_KEY_SIZE; - XMEMCPY(out, key->p, DILITHIUM_LEVEL3_PUB_KEY_SIZE); - } - else if (key->level == 5) { - *outLen = DILITHIUM_LEVEL5_PUB_KEY_SIZE; - XMEMCPY(out, key->p, DILITHIUM_LEVEL5_PUB_KEY_SIZE); + if (key != NULL) { + if (key->level == 2) { + ret = DILITHIUM_LEVEL2_PRV_KEY_SIZE; + } + else if (key->level == 3) { + ret = DILITHIUM_LEVEL3_PRV_KEY_SIZE; + } + else if (key->level == 5) { + ret = DILITHIUM_LEVEL5_PRV_KEY_SIZE; + } } - return 0; + return ret; } -/* Import a dilithium public key from a byte array. - * Public key encoded in big-endian. +/* Returns the size of a dilithium private plus public key. * - * in [in] Array holding public key. - * inLen [in] Number of bytes of data in array. - * key [in] Dilithium public key. - * returns BAD_FUNC_ARG when a parameter is NULL or key format is not supported, - * 0 otherwise. + * @param [in] key Dilithium private/public key. + * @param [out] len Private key size for set level. + * @return 0 on success. + * @return BAD_FUNC_ARG when key is NULL or level not set, */ -int wc_dilithium_import_public(const byte* in, word32 inLen, - dilithium_key* key) +int wc_MlDsaKey_GetPrivLen(MlDsaKey* key, int* len) { - /* sanity check on arguments */ - if ((in == NULL) || (key == NULL)) { - return BAD_FUNC_ARG; - } - - if ((key->level != 2) && (key->level != 3) && (key->level != 5)) { - return BAD_FUNC_ARG; - } + int ret = 0; - if ((key->level == 2) && (inLen != DILITHIUM_LEVEL2_PUB_KEY_SIZE)) { - return BAD_FUNC_ARG; - } - else if ((key->level == 3) && (inLen != DILITHIUM_LEVEL3_PUB_KEY_SIZE)) { - return BAD_FUNC_ARG; - } - else if ((key->level == 5) && (inLen != DILITHIUM_LEVEL5_PUB_KEY_SIZE)) { - return BAD_FUNC_ARG; + *len = wc_dilithium_priv_size(key); + if (*len < 0) { + ret = *len; } - XMEMCPY(key->p, in, inLen); - key->pubKeySet = 1; - - return 0; + return ret; } +#endif /* WOLFSSL_DILITHIUM_PUBLIC_KEY */ +#endif /* WOLFSSL_DILITHIUM_PRIVATE_KEY */ -static int parse_private_key(const byte* priv, word32 privSz, - byte** out, word32 *outSz, - dilithium_key* key) { - word32 idx = 0; - int ret = 0; - int length = 0; +#ifdef WOLFSSL_DILITHIUM_PUBLIC_KEY +/* Returns the size of a dilithium public key. + * + * @param [in] key Dilithium private/public key. + * @return Public key size on success for set level. + * @return BAD_FUNC_ARG when key is NULL or level not set, + */ +int wc_dilithium_pub_size(dilithium_key* key) +{ + int ret = BAD_FUNC_ARG; - /* sanity check on arguments */ - if ((priv == NULL) || (key == NULL)) { - return BAD_FUNC_ARG; + if (key != NULL) { + if (key->level == 2) { + ret = DILITHIUM_LEVEL2_PUB_KEY_SIZE; + } + else if (key->level == 3) { + ret = DILITHIUM_LEVEL3_PUB_KEY_SIZE; + } + else if (key->level == 5) { + ret = DILITHIUM_LEVEL5_PUB_KEY_SIZE; + } } - if ((key->level != 2) && (key->level != 3) && (key->level != 5)) { - return BAD_FUNC_ARG; - } + return ret; +} - /* At this point, it is still a PKCS8 private key. */ - if ((ret = ToTraditionalInline(priv, &idx, privSz)) < 0) { - /* ignore error, did not have PKCS8 header */ - (void)ret; - } +/* Returns the size of a dilithium public key. + * + * @param [in] key Dilithium private/public key. + * @param [out] len Public key size for set level. + * @return 0 on success. + * @return BAD_FUNC_ARG when key is NULL or level not set, + */ +int wc_MlDsaKey_GetPubLen(MlDsaKey* key, int* len) +{ + int ret = 0; - /* Now it is a octet_string(concat(priv,pub)) */ - if ((ret = GetOctetString(priv, &idx, &length, privSz)) < 0) { - return ret; + *len = wc_dilithium_pub_size(key); + if (*len < 0) { + ret = *len; } - *out = (byte *)priv + idx; - *outSz = privSz - idx; + return ret; +} +#endif + +#if !defined(WOLFSSL_DILITHIUM_NO_SIGN) || !defined(WOLFSSL_DILITHIUM_NO_VERIFY) +/* Returns the size of a dilithium signature. + * + * @param [in] key Dilithium private/public key. + * @return Signature size on success for set level. + * @return BAD_FUNC_ARG when key is NULL or level not set, + */ +int wc_dilithium_sig_size(dilithium_key* key) +{ + int ret = BAD_FUNC_ARG; - /* And finally it is concat(priv,pub). Key size check. */ - if ((key->level == 2) && (*outSz != DILITHIUM_LEVEL2_KEY_SIZE + - DILITHIUM_LEVEL2_PUB_KEY_SIZE)) { - return BAD_FUNC_ARG; - } - else if ((key->level == 3) && (*outSz != DILITHIUM_LEVEL3_KEY_SIZE + - DILITHIUM_LEVEL3_PUB_KEY_SIZE)) { - return BAD_FUNC_ARG; - } - else if ((key->level == 5) && (*outSz != DILITHIUM_LEVEL5_KEY_SIZE + - DILITHIUM_LEVEL5_PUB_KEY_SIZE)) { - return BAD_FUNC_ARG; + if (key != NULL) { + if (key->level == 2) { + ret = DILITHIUM_LEVEL2_SIG_SIZE; + } + else if (key->level == 3) { + ret = DILITHIUM_LEVEL3_SIG_SIZE; + } + else if (key->level == 5) { + ret = DILITHIUM_LEVEL5_SIG_SIZE; + } } - return 0; + return ret; } -/* Import a dilithium private key from a byte array. +/* Returns the size of a dilithium signature. * - * priv [in] Array holding private key. - * privSz [in] Number of bytes of data in array. - * key [in] Dilithium private key. - * returns BAD_FUNC_ARG when a parameter is NULL or privSz is less than - * DILITHIUM_LEVEL2_KEY_SIZE, - * 0 otherwise. + * @param [in] key Dilithium private/public key. + * @param [out] len Signature size for set level. + * @return 0 on success. + * @return BAD_FUNC_ARG when key is NULL or level not set, */ -int wc_dilithium_import_private_only(const byte* priv, word32 privSz, - dilithium_key* key) +int wc_MlDsaKey_GetSigLen(MlDsaKey* key, int* len) { int ret = 0; - byte *newPriv = NULL; - word32 newPrivSz = 0; - if ((ret = parse_private_key(priv, privSz, &newPriv, &newPrivSz, key)) - != 0) { - return ret; + *len = wc_dilithium_sig_size(key); + if (*len < 0) { + ret = *len; } - XMEMCPY(key->k, newPriv, newPrivSz); - key->prvKeySet = 1; - - return 0; + return ret; } +#endif -/* Import a dilithium private and public keys from byte array(s). +#ifdef WOLFSSL_DILITHIUM_CHECK_KEY +/* Check the public key of the dilithium key matches the private key. * - * priv [in] Array holding private key or private+public keys - * privSz [in] Number of bytes of data in private key array. - * pub [in] Array holding public key (or NULL). - * pubSz [in] Number of bytes of data in public key array (or 0). - * key [in] Dilithium private/public key. - * returns BAD_FUNC_ARG when a required parameter is NULL or an invalid - * combination of keys/lengths is supplied, 0 otherwise. + * @param [in] key Dilithium private/public key. + * @return 0 on success. + * @return BAD_FUNC_ARG when key is NULL or no private key available, + * @return PUBLIC_KEY_E when the public key is not set or doesn't match, + * @return MEMORY_E when dynamic memory allocation fails. */ -int wc_dilithium_import_private_key(const byte* priv, word32 privSz, - const byte* pub, word32 pubSz, - dilithium_key* key) +int wc_dilithium_check_key(dilithium_key* key) { int ret = 0; - byte *newPriv = NULL; - word32 newPrivSz = 0; +#ifdef WOLFSSL_WC_DILITHIUM + const wc_dilithium_params* params; + sword32* a = NULL; + sword32* s1 = NULL; + sword32* s2 = NULL; + sword32* t = NULL; + sword32* t0 = NULL; + sword32* t1 = NULL; + + /* Validate parameter. */ + if (key == NULL) { + ret = BAD_FUNC_ARG; + } + if ((ret == 0) && (!key->prvKeySet)) { + ret = BAD_FUNC_ARG; + } + if ((ret == 0) && (!key->pubKeySet)) { + ret = PUBLIC_KEY_E; + } + + /* Any value in public key are valid. + * Public seed is hashed to generate matrix A. + * t1 is the top 10 bits of a number in range of 0..(Q-1). + * Q >> 13 = 0x3ff so all encoded values are valid. + */ + + if (ret == 0) { + params = key->params; + unsigned int allocSz; + + /* s1-L, s2-K, t0-K, t-K, t1-K */ + allocSz = params->s1Sz + 4 * params->s2Sz; +#if !defined(WC_DILITHIUM_CACHE_MATRIX_A) + /* A-KxL */ + allocSz += params->aSz; +#endif + + /* Allocate memory for large intermediates. */ + s1 = (sword32*)XMALLOC(allocSz, NULL, DYNAMIC_TYPE_DILITHIUM); + if (s1 == NULL) { + ret = MEMORY_E; + } + else { + s2 = s1 + params->s1Sz / sizeof(*s1); + t0 = s2 + params->s2Sz / sizeof(*s2); + t = t0 + params->s2Sz / sizeof(*t0); + t1 = t + params->s2Sz / sizeof(*t); +#if !defined(WC_DILITHIUM_CACHE_MATRIX_A) + a = t1 + params->s2Sz / sizeof(*t1); +#else + a = key->a; +#endif + } + } + + if (ret == 0) { +#ifdef WC_DILITHIUM_CACHE_MATRIX_A + /* Check that we haven't already cached the matrix A. */ + if (!key->aSet) +#endif + { + const byte* pub_seed = key->p; + + ret = dilithium_expand_a(&key->shake, pub_seed, params->k, + params->l, a); +#ifdef WC_DILITHIUM_CACHE_MATRIX_A + key->aSet = (ret == 0); +#endif + } + } + if (ret == 0) { + const byte* s1p = key->k + DILITHIUM_PUB_SEED_SZ + DILITHIUM_K_SZ + + DILITHIUM_TR_SZ; + const byte* s2p = s1p + params->s1EncSz; + const byte* t0p = s2p + params->s2EncSz; + const byte* t1p = key->p + DILITHIUM_PUB_SEED_SZ; + sword32* tt = t; + unsigned int i; + unsigned int j; + sword32 x = 0; + + /* Get s1, s2 and t0 from private key. */ + dilithium_vec_decode_eta_bits(s1p, params->eta, s1, params->l); + dilithium_vec_decode_eta_bits(s2p, params->eta, s2, params->k); + dilithium_vec_decode_t0(t0p, params->k, t0); + + /* Get t1 from public key. */ + dilithium_vec_decode_t1(t1p, params->k, t1); + + /* Calcaluate t = NTT-1(A o NTT(s1)) + s2 */ + dilithium_vec_ntt_small(s1, params->l); + dilithium_matrix_mul(t, a, s1, params->k, params->l); + dilithium_vec_invntt(t, params->k); + dilithium_vec_add(t, s2, params->k); + /* Subtract t0 from t. */ + dilithium_vec_sub(t, t0, params->k); + /* Make t positive to match t1. */ + dilithium_vec_make_pos(t, params->k); + + /* Check t - t0 and t1 are the same. */ + for (i = 0; i < params->k; i++) { + for (j = 0; j < DILITHIUM_N; j++) { + x |= tt[j] ^ t1[j]; + } + tt += DILITHIUM_N; + t1 += DILITHIUM_N; + } + /* Check the public seed is the same in private and public key. */ + for (i = 0; i < DILITHIUM_PUB_SEED_SZ; i++) { + x |= key->p[i] ^ key->k[i]; + } + + if ((ret == 0) && (x != 0)) { + ret = PUBLIC_KEY_E; + } + } - if ((ret = parse_private_key(priv, privSz, &newPriv, &newPrivSz, key)) - != 0) { - return ret; + /* Dispose of allocated memory. */ + XFREE(s1, NULL, DYNAMIC_TYPE_DILITHIUM); +#else + /* Validate parameter. */ + if (key == NULL) { + ret = BAD_FUNC_ARG; + } + if ((ret == 0) && (!key->prvKeySet)) { + ret = BAD_FUNC_ARG; + } + if ((ret == 0) && (!key->pubKeySet)) { + ret = PUBLIC_KEY_E; } - if (pub == NULL) { - if (pubSz != 0) { - return BAD_FUNC_ARG; + if (ret == 0) { + int i; + sword32 x = 0; + + /* Check the public seed is the same in private and public key. */ + for (i = 0; i < 32; i++) { + x |= key->p[i] ^ key->k[i]; } - if ((newPrivSz != DILITHIUM_LEVEL2_PRV_KEY_SIZE) && - (newPrivSz != DILITHIUM_LEVEL3_PRV_KEY_SIZE) && - (newPrivSz != DILITHIUM_LEVEL5_PRV_KEY_SIZE)) { - return BAD_FUNC_ARG; + if (x != 0) { + ret = PUBLIC_KEY_E; } + } +#endif /* WOLFSSL_WC_DILITHIUM */ + return ret; +} +#endif /* WOLFSSL_DILITHIUM_CHECK_KEY */ + +#ifdef WOLFSSL_DILITHIUM_PUBLIC_KEY +/* Export the dilithium public key. + * + * @param [in] key Dilithium public key. + * @param [out] out Array to hold public key. + * @param [in, out] outLen On in, the number of bytes in array. + * On out, the number bytes put into array. + * @return 0 on success. + * @return BAD_FUNC_ARG when a parameter is NULL. + * @return BUFFER_E when outLen is less than DILITHIUM_LEVEL2_PUB_KEY_SIZE. + */ +int wc_dilithium_export_public(dilithium_key* key, byte* out, word32* outLen) +{ + int ret = 0; + word32 inLen; + + /* Validate parameters */ + if ((key == NULL) || (out == NULL) || (outLen == NULL)) { + ret = BAD_FUNC_ARG; + } + if (ret == 0) { + /* Get length passed in for checking. */ + inLen = *outLen; if (key->level == 2) { - pub = newPriv + DILITHIUM_LEVEL2_KEY_SIZE; - pubSz = DILITHIUM_LEVEL2_PUB_KEY_SIZE; + /* Set out length. */ + *outLen = DILITHIUM_LEVEL2_PUB_KEY_SIZE; + /* Validate length passed in. */ + if (inLen < DILITHIUM_LEVEL2_PUB_KEY_SIZE) { + ret = BUFFER_E; + } } else if (key->level == 3) { - pub = newPriv + DILITHIUM_LEVEL3_KEY_SIZE; - pubSz = DILITHIUM_LEVEL3_PUB_KEY_SIZE; + /* Set out length. */ + *outLen = DILITHIUM_LEVEL3_PUB_KEY_SIZE; + /* Validate length passed in. */ + if (inLen < DILITHIUM_LEVEL3_PUB_KEY_SIZE) { + ret = BUFFER_E; + } } else if (key->level == 5) { - pub = newPriv + DILITHIUM_LEVEL5_KEY_SIZE; - pubSz = DILITHIUM_LEVEL5_PUB_KEY_SIZE; + /* Set out length. */ + *outLen = DILITHIUM_LEVEL5_PUB_KEY_SIZE; + /* Validate length passed in. */ + if (inLen < DILITHIUM_LEVEL5_PUB_KEY_SIZE) { + ret = BUFFER_E; + } + } + else { + /* Level not set. */ + ret = BAD_FUNC_ARG; } - } - else if ((pubSz != DILITHIUM_LEVEL2_PUB_KEY_SIZE) && - (pubSz != DILITHIUM_LEVEL3_PUB_KEY_SIZE) && - (pubSz != DILITHIUM_LEVEL5_PUB_KEY_SIZE)) { - return BAD_FUNC_ARG; } - /* import public key */ - ret = wc_dilithium_import_public(pub, pubSz, key); + /* Check public key available. */ + if ((ret == 0) && (!key->pubKeySet)) { + ret = BAD_FUNC_ARG; + } if (ret == 0) { - /* make the private key (priv + pub) */ - XMEMCPY(key->k, newPriv, newPrivSz); - key->prvKeySet = 1; + /* Copy public key out. */ + XMEMCPY(out, key->p, *outLen); } return ret; } -/* Export the dilithium private key. +/* Import a dilithium public key from a byte array. + * + * Public key encoded in big-endian. * - * key [in] Dilithium private key. - * out [in] Array to hold private key. - * outLen [in/out] On in, the number of bytes in array. - * On out, the number bytes put into array. - * returns BAD_FUNC_ARG when a parameter is NULL, - * BUFFER_E when outLen is less than DILITHIUM_LEVEL2_KEY_SIZE, - * 0 otherwise. + * @param [in] in Array holding public key. + * @param [in] inLen Number of bytes of data in array. + * @param [in, out] key Dilithium public key. + * @return 0 on success. + * @return BAD_FUNC_ARG when in or key is NULL or key format is not supported. */ -int wc_dilithium_export_private_only(dilithium_key* key, byte* out, - word32* outLen) +int wc_dilithium_import_public(const byte* in, word32 inLen, dilithium_key* key) { - /* sanity checks on arguments */ - if ((key == NULL) || (out == NULL) || (outLen == NULL)) { - return BAD_FUNC_ARG; + int ret = 0; + + /* Validate parameters. */ + if ((in == NULL) || (key == NULL)) { + ret = BAD_FUNC_ARG; + } + if (ret == 0) { + if (key->level == 2) { + /* Check length. */ + if (inLen != DILITHIUM_LEVEL2_PUB_KEY_SIZE) { + ret = BAD_FUNC_ARG; + } + } + else if (key->level == 3) { + /* Check length. */ + if (inLen != DILITHIUM_LEVEL3_PUB_KEY_SIZE) { + ret = BAD_FUNC_ARG; + } + } + else if (key->level == 5) { + /* Check length. */ + if (inLen != DILITHIUM_LEVEL5_PUB_KEY_SIZE) { + ret = BAD_FUNC_ARG; + } + } + else { + /* Level not set. */ + ret = BAD_FUNC_ARG; + } } - if ((key->level != 2) && (key->level != 3) && (key->level != 5)) { - return BAD_FUNC_ARG; + if (ret == 0) { + /* Copy the private key data in or copy pointer. */ + #ifndef WOLFSSL_DILITHIUM_ASSIGN_KEY + XMEMCPY(key->p, in, inLen); + #else + key->p = in; + #endif + + #ifdef WC_DILITHIUM_CACHE_PUB_VECTORS + /* Allocate t1 if required. */ + if (key->t1 == NULL) { + key->t1 = (sword32*)XMALLOC(key->params->s2Sz, NULL, + DYNAMIC_TYPE_DILITHIUM); + if (key->t1 == NULL) { + ret = MEMORY_E; + } + } } - - /* check and set up out length */ - if ((key->level == 2) && (*outLen < DILITHIUM_LEVEL2_KEY_SIZE)) { - *outLen = DILITHIUM_LEVEL2_KEY_SIZE; - return BUFFER_E; + if (ret == 0) { + /* Compute t1 from public key data. */ + dilithium_make_pub_vec(key, key->t1); + #endif + #ifdef WC_DILITHIUM_CACHE_MATRIX_A + /* Allocate matrix a if required. */ + if (key->a == NULL) { + key->a = (sword32*)XMALLOC(key->params->aSz, NULL, + DYNAMIC_TYPE_DILITHIUM); + if (key->a == NULL) { + ret = MEMORY_E; + } + } } - else if ((key->level == 3) && (*outLen < DILITHIUM_LEVEL3_KEY_SIZE)) { - *outLen = DILITHIUM_LEVEL3_KEY_SIZE; - return BUFFER_E; + if (ret == 0) { + /* Compute matrix a from public key data. */ + ret = dilithium_expand_a(&key->shake, key->p, key->params->k, + key->params->l, key->a); + if (ret == 0) { + key->aSet = 1; + } } - else if ((key->level == 5) && (*outLen < DILITHIUM_LEVEL5_KEY_SIZE)) { - *outLen = DILITHIUM_LEVEL5_KEY_SIZE; - return BUFFER_E; + if (ret == 0) { + #endif + /* Public key is set. */ + key->pubKeySet = 1; } - if (key->level == 2) { - *outLen = DILITHIUM_LEVEL2_KEY_SIZE; - } - else if (key->level == 3) { - *outLen = DILITHIUM_LEVEL3_KEY_SIZE; - } - else if (key->level == 5) { - *outLen = DILITHIUM_LEVEL5_KEY_SIZE; - } + return ret; +} - XMEMCPY(out, key->k, *outLen); +#endif /* WOLFSSL_DILITHIUM_PUBLIC_KEY */ - return 0; -} +#ifdef WOLFSSL_DILITHIUM_PRIVATE_KEY -/* Export the dilithium private and public key. +/* Set the private key data into key. * - * key [in] Dilithium private/public key. - * out [in] Array to hold private and public key. - * outLen [in/out] On in, the number of bytes in array. - * On out, the number bytes put into array. - * returns BAD_FUNC_ARG when a parameter is NULL, - * BUFFER_E when outLen is less than DILITHIUM_LEVEL2_PRV_KEY_SIZE, - * 0 otherwise. + * @param [in] priv Private key data. + * @param [in] privSz Size of private key data in bytes. + * @param in, out] key Dilithium key to set into. + * @return 0 on success. + * @return BAD_FUNC_ARG when private key size is invalid. + * @return MEMORY_E when dynamic memory allocation fails. + * @return Other negative on hash error. */ -int wc_dilithium_export_private(dilithium_key* key, byte* out, word32* outLen) +static int dilithium_set_priv_key(const byte* priv, word32 privSz, + dilithium_key* key) { - /* sanity checks on arguments */ - if ((key == NULL) || (out == NULL) || (outLen == NULL)) { - return BAD_FUNC_ARG; + int ret = 0; +#ifdef WC_DILITHIUM_CACHE_MATRIX_A + const wc_dilithium_params* params = key->params; +#endif + + /* Validate parameters. */ + if ((privSz != DILITHIUM_LEVEL2_KEY_SIZE) && + (privSz != DILITHIUM_LEVEL3_KEY_SIZE) && + (privSz != DILITHIUM_LEVEL5_KEY_SIZE)) { + ret = BAD_FUNC_ARG; } - if ((key->level != 2) && (key->level != 3) && (key->level != 5)) { - return BAD_FUNC_ARG; + if (ret == 0) { + /* Copy the private key data in or copy pointer. */ + #ifndef WOLFSSL_DILITHIUM_ASSIGN_KEY + XMEMCPY(key->k, priv, privSz); + #else + key->k = priv; + #endif } - if ((key->level == 2) && (*outLen < DILITHIUM_LEVEL2_PRV_KEY_SIZE)) { - *outLen = DILITHIUM_LEVEL2_PRV_KEY_SIZE; - return BUFFER_E; + /* Allocate and create cached values. */ +#ifdef WC_DILITHIUM_CACHE_MATRIX_A + if (ret == 0) { + /* Allocate matrix a if required. */ + if (key->a == NULL) { + key->a = (sword32*)XMALLOC(params->aSz, NULL, + DYNAMIC_TYPE_DILITHIUM); + if (key->a == NULL) { + ret = MEMORY_E; + } + } } - else if ((key->level == 3) && (*outLen < DILITHIUM_LEVEL3_PRV_KEY_SIZE)) { - *outLen = DILITHIUM_LEVEL3_PRV_KEY_SIZE; - return BUFFER_E; + if (ret == 0) { + /* Compute matrix a from private key data. */ + ret = dilithium_expand_a(&key->shake, key->k, params->k, params->l, + key->a); + if (ret == 0) { + key->aSet = 1; + } } - else if ((key->level == 5) && (*outLen < DILITHIUM_LEVEL5_PRV_KEY_SIZE)) { - *outLen = DILITHIUM_LEVEL5_PRV_KEY_SIZE; - return BUFFER_E; +#endif +#ifdef WC_DILITHIUM_CACHE_PRIV_VECTORS + if ((ret == 0) && (key->s1 == NULL)) { + /* Allocate L vector s1, K vector s2 and K vector t0 if required. */ + key->s1 = (sword32*)XMALLOC(params->s1Sz + params->s2Sz + params->s2Sz, + NULL, DYNAMIC_TYPE_DILITHIUM); + if (key->s1 == NULL) { + ret = MEMORY_E; + } } + if (ret == 0) { + /* Set pointers into allocated memory. */ + key->s2 = key->s1 + params->s1Sz / sizeof(*key->s1); + key->t0 = key->s2 + params->s2Sz / sizeof(*key->s2); - - if (key->level == 2) { - *outLen = DILITHIUM_LEVEL2_PRV_KEY_SIZE; - XMEMCPY(out, key->k, DILITHIUM_LEVEL2_KEY_SIZE); - XMEMCPY(out + DILITHIUM_LEVEL2_KEY_SIZE, key->p, - DILITHIUM_LEVEL2_PUB_KEY_SIZE); + /* Compute vectors from private key. */ + dilithium_make_priv_vecs(key, key->s1, key->s2, key->t0); } - else if (key->level == 3) { - *outLen = DILITHIUM_LEVEL3_PRV_KEY_SIZE; - XMEMCPY(out, key->k, DILITHIUM_LEVEL3_KEY_SIZE); - XMEMCPY(out + DILITHIUM_LEVEL3_KEY_SIZE, key->p, - DILITHIUM_LEVEL3_PUB_KEY_SIZE); - } - else if (key->level == 5) { - *outLen = DILITHIUM_LEVEL5_PRV_KEY_SIZE; - XMEMCPY(out, key->k, DILITHIUM_LEVEL5_KEY_SIZE); - XMEMCPY(out + DILITHIUM_LEVEL5_KEY_SIZE, key->p, - DILITHIUM_LEVEL5_PUB_KEY_SIZE); +#endif + if (ret == 0) { + /* Private key is set. */ + key->prvKeySet = 1; } - return 0; + return ret; } -/* Export the dilithium private and public key. +/* Import a dilithium private key from a byte array. * - * key [in] Dilithium private/public key. - * priv [in] Array to hold private key. - * privSz [in/out] On in, the number of bytes in private key array. - * pub [in] Array to hold public key. - * pubSz [in/out] On in, the number of bytes in public key array. - * On out, the number bytes put into array. - * returns BAD_FUNC_ARG when a parameter is NULL, - * BUFFER_E when privSz is less than DILITHIUM_LEVEL2_PRV_KEY_SIZE or pubSz is less - * than DILITHIUM_LEVEL2_PUB_KEY_SIZE, - * 0 otherwise. + * @param [in] priv Array holding private key. + * @param [in] privSz Number of bytes of data in array. + * @param [in, out] key Dilithium private key. + * @return 0 otherwise. + * @return BAD_FUNC_ARG when a parameter is NULL or privSz is less than size + * required for level, */ -int wc_dilithium_export_key(dilithium_key* key, byte* priv, word32 *privSz, - byte* pub, word32 *pubSz) +int wc_dilithium_import_private(const byte* priv, word32 privSz, + dilithium_key* key) { int ret = 0; - /* export private part */ - ret = wc_dilithium_export_private(key, priv, privSz); + /* Validate parameters. */ + if ((priv == NULL) || (key == NULL)) { + ret = BAD_FUNC_ARG; + } + if ((ret == 0) && (key->level != 2) && (key->level != 3) && + (key->level != 5)) { + ret = BAD_FUNC_ARG; + } + if (ret == 0) { - /* export public part */ - ret = wc_dilithium_export_public(key, pub, pubSz); + /* Set the private key data. */ + ret = dilithium_set_priv_key(priv, privSz, key); } return ret; } -/* Check the public key of the dilithium key matches the private key. +#if defined(WOLFSSL_DILITHIUM_PUBLIC_KEY) +/* Import a dilithium private and public keys from byte array(s). * - * key [in] Dilithium private/public key. - * returns BAD_FUNC_ARG when key is NULL, - * PUBLIC_KEY_E when the public key is not set or doesn't match, - * other -ve value on hash failure, - * 0 otherwise. + * @param [in] priv Array holding private key or private+public keys + * @param [in] privSz Number of bytes of data in private key array. + * @param [in] pub Array holding public key (or NULL). + * @param [in] pubSz Number of bytes of data in public key array (or 0). + * @param [in] key Dilithium private/public key. + * @return 0 on success. + * @return BAD_FUNC_ARG when a required parameter is NULL an invalid + * combination of keys/lengths is supplied. */ -int wc_dilithium_check_key(dilithium_key* key) +int wc_dilithium_import_key(const byte* priv, word32 privSz, + const byte* pub, word32 pubSz, dilithium_key* key) { - if (key == NULL) { - return BAD_FUNC_ARG; - } - int ret = 0; - /* The public key is also decoded and stored within the private key buffer - * behind the private key. Hence, we can compare both stored public keys. */ - if (key->level == 2) { - ret = XMEMCMP(key->p, key->k + DILITHIUM_LEVEL2_KEY_SIZE, - DILITHIUM_LEVEL2_PUB_KEY_SIZE); + /* Validate parameters. */ + if ((priv == NULL) || (key == NULL)) { + ret = BAD_FUNC_ARG; } - else if (key->level == 3) { - ret = XMEMCMP(key->p, key->k + DILITHIUM_LEVEL3_KEY_SIZE, - DILITHIUM_LEVEL3_PUB_KEY_SIZE); + if ((pub == NULL) && (pubSz != 0)) { + ret = BAD_FUNC_ARG; } - else if (key->level == 5) { - ret = XMEMCMP(key->p, key->k + DILITHIUM_LEVEL5_KEY_SIZE, - DILITHIUM_LEVEL5_PUB_KEY_SIZE); + if ((ret == 0) && (key->level != 2) && (key->level != 3) && + (key->level != 5)) { + ret = BAD_FUNC_ARG; } - if (ret != 0) { - ret = PUBLIC_KEY_E; + if ((ret == 0) && (pub != NULL)) { + /* Import public key. */ + ret = wc_dilithium_import_public(pub, pubSz, key); + } + if (ret == 0) { + ret = dilithium_set_priv_key(priv, privSz, key); } return ret; - } +#endif /* WOLFSSL_DILITHIUM_PUBLIC_KEY */ -/* Returns the size of a dilithium private key. +/* Export the dilithium private key. * - * key [in] Dilithium private/public key. - * returns BAD_FUNC_ARG when key is NULL, - * DILITHIUM_LEVEL2_KEY_SIZE otherwise. + * @param [in] key Dilithium private key. + * @param [out] out Array to hold private key. + * @param [in, out] outLen On in, the number of bytes in array. + * On out, the number bytes put into array. + * @return 0 on success. + * @return BAD_FUNC_ARG when a parameter is NULL. + * @return BUFFER_E when outLen is less than DILITHIUM_LEVEL2_KEY_SIZE. */ -int wc_dilithium_size(dilithium_key* key) +int wc_dilithium_export_private(dilithium_key* key, byte* out, + word32* outLen) { - if (key == NULL) { - return BAD_FUNC_ARG; - } + int ret = 0; + word32 inLen; - if (key->level == 2) { - return DILITHIUM_LEVEL2_KEY_SIZE; - } - else if (key->level == 3) { - return DILITHIUM_LEVEL3_KEY_SIZE; - } - else if (key->level == 5) { - return DILITHIUM_LEVEL5_KEY_SIZE; + /* Validate parameters. */ + if ((key == NULL) || (out == NULL) || (outLen == NULL)) { + ret = BAD_FUNC_ARG; } - return BAD_FUNC_ARG; -} - -/* Returns the size of a dilithium private plus public key. - * - * key [in] Dilithium private/public key. - * returns BAD_FUNC_ARG when key is NULL, - * DILITHIUM_LEVEL2_PRV_KEY_SIZE otherwise. - */ -int wc_dilithium_priv_size(dilithium_key* key) -{ - if (key == NULL) { - return BAD_FUNC_ARG; + /* Check private key available. */ + if ((ret == 0) && (!key->prvKeySet)) { + ret = BAD_FUNC_ARG; } - if (key->level == 2) { - return DILITHIUM_LEVEL2_PRV_KEY_SIZE; + if (ret == 0) { + inLen = *outLen; + /* check and set up out length */ + if (key->level == 2) { + *outLen = DILITHIUM_LEVEL2_KEY_SIZE; + } + else if (key->level == 3) { + *outLen = DILITHIUM_LEVEL3_KEY_SIZE; + } + else if (key->level == 5) { + *outLen = DILITHIUM_LEVEL5_KEY_SIZE; + } + else { + /* Level not set. */ + ret = BAD_FUNC_ARG; + } } - else if (key->level == 3) { - return DILITHIUM_LEVEL3_PRV_KEY_SIZE; + + /* Check array length. */ + if ((ret == 0) && (inLen < *outLen)) { + ret = BUFFER_E; } - else if (key->level == 5) { - return DILITHIUM_LEVEL5_PRV_KEY_SIZE; + + if (ret == 0) { + /* Copy private key out key. */ + XMEMCPY(out, key->k, *outLen); } - return BAD_FUNC_ARG; + return ret; } -/* Returns the size of a dilithium public key. +#ifdef WOLFSSL_DILITHIUM_PUBLIC_KEY +/* Export the dilithium private and public key. * - * key [in] Dilithium private/public key. - * returns BAD_FUNC_ARG when key is NULL, - * DILITHIUM_LEVEL2_PUB_KEY_SIZE otherwise. + * @param [in] key Dilithium private/public key. + * @param [out] priv Array to hold private key. + * @param [in, out] privSz On in, the number of bytes in private key array. + * On out, the number bytes put into private key. + * @param [out] pub Array to hold public key. + * @param [in, out] pubSz On in, the number of bytes in public key array. + * On out, the number bytes put into public key. + * @return 0 on success. + * @return BAD_FUNC_ARG when a key, priv, privSz, pub or pubSz is NULL. + * @return BUFFER_E when privSz or pubSz is less than required size. */ -int wc_dilithium_pub_size(dilithium_key* key) +int wc_dilithium_export_key(dilithium_key* key, byte* priv, word32 *privSz, + byte* pub, word32 *pubSz) { - if (key == NULL) { - return BAD_FUNC_ARG; - } + int ret; - if (key->level == 2) { - return DILITHIUM_LEVEL2_PUB_KEY_SIZE; - } - else if (key->level == 3) { - return DILITHIUM_LEVEL3_PUB_KEY_SIZE; - } - else if (key->level == 5) { - return DILITHIUM_LEVEL5_PUB_KEY_SIZE; + /* Export private key only. */ + ret = wc_dilithium_export_private(key, priv, privSz); + if (ret == 0) { + /* Export public key. */ + ret = wc_dilithium_export_public(key, pub, pubSz); } - return BAD_FUNC_ARG; + return ret; } +#endif /* WOLFSSL_DILITHIUM_PUBLIC_KEY */ -/* Returns the size of a dilithium signature. - * - * key [in] Dilithium private/public key. - * returns BAD_FUNC_ARG when key is NULL, - * DILITHIUM_LEVEL2_SIG_SIZE otherwise. - */ -int wc_dilithium_sig_size(dilithium_key* key) -{ - if (key == NULL) { - return BAD_FUNC_ARG; - } +#endif /* WOLFSSL_DILITHIUM_PRIVATE_KEY */ - if (key->level == 2) { - return DILITHIUM_LEVEL2_SIG_SIZE; - } - else if (key->level == 3) { - return DILITHIUM_LEVEL3_SIG_SIZE; - } - else if (key->level == 5) { - return DILITHIUM_LEVEL5_SIG_SIZE; - } +#ifndef WOLFSSL_DILITHIUM_NO_ASN1 - return BAD_FUNC_ARG; -} +#if defined(WOLFSSL_DILITHIUM_PRIVATE_KEY) && \ + defined(WOLFSSL_DILITHIUM_PUBLIC_KEY) +/* Decode the DER encoded Dilithium key. + * + * @param [in] input Array holding DER encoded data. + * @param [in, out] inOutIdx On in, index into array of start of DER encoding. + * On out, index into array after DER encoding. + * @param [in, out] key Dilithium key to store key. + * @param [in] inSz Total size of data in array. + * @return 0 on success. + * @return BAD_FUNC_ARG when input, inOutIdx or key is NULL or inSz is 0. + * @return BAD_FUNC_ARG when level not set. + * @return Other negative on parse error. + */ int wc_Dilithium_PrivateKeyDecode(const byte* input, word32* inOutIdx, - dilithium_key* key, word32 inSz) + dilithium_key* key, word32 inSz) { int ret = 0; - byte privKey[DILITHIUM_MAX_PRV_KEY_SIZE]; - byte pubKey[DILITHIUM_MAX_PUB_KEY_SIZE]; - word32 privKeyLen = (word32)sizeof(privKey); - word32 pubKeyLen = (word32)sizeof(pubKey); + const byte* privKey = NULL; + const byte* pubKey = NULL; + word32 privKeyLen = 0; + word32 pubKeyLen = 0; int keytype = 0; - if (input == NULL || inOutIdx == NULL || key == NULL || inSz == 0) { - return BAD_FUNC_ARG; + /* Validate parameters. */ + if ((input == NULL) || (inOutIdx == NULL) || (key == NULL) || (inSz == 0)) { + ret = BAD_FUNC_ARG; } - if (key->level == 2) { - keytype = DILITHIUM_LEVEL2k; - } - else if (key->level == 3) { - keytype = DILITHIUM_LEVEL3k; - } - else if (key->level == 5) { - keytype = DILITHIUM_LEVEL5k; - } - else { - return BAD_FUNC_ARG; + if (ret == 0) { + /* Get OID sum for level. */ + if (key->level == 2) { + keytype = DILITHIUM_LEVEL2k; + } + else if (key->level == 3) { + keytype = DILITHIUM_LEVEL3k; + } + else if (key->level == 5) { + keytype = DILITHIUM_LEVEL5k; + } + else { + /* Level not set. */ + ret = BAD_FUNC_ARG; + } } - ret = DecodeAsymKey(input, inOutIdx, inSz, privKey, &privKeyLen, - pubKey, &pubKeyLen, keytype); if (ret == 0) { + /* Decode the asymmetric key and get out private and public key data. */ + ret = DecodeAsymKey_Assign(input, inOutIdx, inSz, &privKey, &privKeyLen, + &pubKey, &pubKeyLen, keytype); + } + if (ret == 0) { + /* Check whether public key data was found. */ if (pubKeyLen == 0) { - ret = wc_dilithium_import_private_key(input, inSz, NULL, 0, key); + /* No public key data, only import private key data. */ + ret = wc_dilithium_import_private(privKey, privKeyLen, key); } else { - ret = wc_dilithium_import_private_key(input, inSz, pubKey, - pubKeyLen, key); + /* Import private and public key data. */ + ret = wc_dilithium_import_key(privKey, privKeyLen, pubKey, + pubKeyLen, key); } } + return ret; } +#endif /* WOLFSSL_DILITHIUM_PRIVATE_KEY */ + +#ifdef WOLFSSL_DILITHIUM_PUBLIC_KEY + +/* Decode the DER encoded Dilithium public key. + * + * @param [in] input Array holding DER encoded data. + * @param [in, out] inOutIdx On in, index into array of start of DER encoding. + * On out, index into array after DER encoding. + * @param [in, out] key Dilithium key to store key. + * @param [in] inSz Total size of data in array. + * @return 0 on success. + * @return BAD_FUNC_ARG when input, inOutIdx or key is NULL or inSz is 0. + * @return BAD_FUNC_ARG when level not set. + * @return Other negative on parse error. + */ int wc_Dilithium_PublicKeyDecode(const byte* input, word32* inOutIdx, - dilithium_key* key, word32 inSz) + dilithium_key* key, word32 inSz) { int ret = 0; - byte pubKey[DILITHIUM_MAX_PUB_KEY_SIZE]; - word32 pubKeyLen = (word32)sizeof(pubKey); + const byte* pubKey; + word32 pubKeyLen = 0; int keytype = 0; - if (input == NULL || inOutIdx == NULL || key == NULL || inSz == 0) { - return BAD_FUNC_ARG; + /* Validate parameters. */ + if ((input == NULL) || (inOutIdx == NULL) || (key == NULL) || (inSz == 0)) { + ret = BAD_FUNC_ARG; } - ret = wc_dilithium_import_public(input, inSz, key); if (ret == 0) { - return 0; - } - - if (key->level == 2) { - keytype = DILITHIUM_LEVEL2k; - } - else if (key->level == 3) { - keytype = DILITHIUM_LEVEL3k; - } - else if (key->level == 5) { - keytype = DILITHIUM_LEVEL5k; + /* Get OID sum for level. */ + if (key->level == 2) { + keytype = DILITHIUM_LEVEL2k; + } + else if (key->level == 3) { + keytype = DILITHIUM_LEVEL3k; + } + else if (key->level == 5) { + keytype = DILITHIUM_LEVEL5k; + } + else { + /* Level not set. */ + ret = BAD_FUNC_ARG; + } } - else { - return BAD_FUNC_ARG; + if (ret == 0) { + /* Decode the asymmetric key and get out public key data. */ + ret = DecodeAsymKeyPublic_Assign(input, inOutIdx, inSz, &pubKey, + &pubKeyLen, keytype); } - - ret = DecodeAsymKeyPublic(input, inOutIdx, inSz, pubKey, &pubKeyLen, - keytype); if (ret == 0) { + /* Import public key data. */ ret = wc_dilithium_import_public(pubKey, pubKeyLen, key); } return ret; } #ifdef WC_ENABLE_ASYM_KEY_EXPORT -/* Encode the public part of an Dilithium key in DER. +/* Encode the public part of a Dilithium key in DER. * * Pass NULL for output to get the size of the encoding. * - * @param [in] key Dilithium key object. - * @param [out] output Buffer to put encoded data in. - * @param [in] outLen Size of buffer in bytes. - * @param [in] withAlg Whether to use SubjectPublicKeyInfo format. + * @param [in] key Dilithium key object. + * @param [out] output Buffer to put encoded data in. + * @param [in] len Size of buffer in bytes. + * @param [in] withAlg Whether to use SubjectPublicKeyInfo format. * @return Size of encoded data in bytes on success. * @return BAD_FUNC_ARG when key is NULL. * @return MEMORY_E when dynamic memory allocation failed. */ -int wc_Dilithium_PublicKeyToDer(dilithium_key* key, byte* output, word32 inLen, - int withAlg) +int wc_Dilithium_PublicKeyToDer(dilithium_key* key, byte* output, word32 len, + int withAlg) { - int ret; - byte pubKey[DILITHIUM_MAX_PUB_KEY_SIZE]; - word32 pubKeyLen = (word32)sizeof(pubKey); - int keytype = 0; + int ret = 0; + int keytype = 0; + int pubKeyLen = 0; + /* Validate parameters. */ if (key == NULL) { - return BAD_FUNC_ARG; - } - - if (key->level == 2) { - keytype = DILITHIUM_LEVEL2k; - } - else if (key->level == 3) { - keytype = DILITHIUM_LEVEL3k; + ret = BAD_FUNC_ARG; } - else if (key->level == 5) { - keytype = DILITHIUM_LEVEL5k; + /* Check we have a public key to encode. */ + if ((ret == 0) && (!key->pubKeySet)) { + ret = BAD_FUNC_ARG; } - else { - return BAD_FUNC_ARG; + + if (ret == 0) { + /* Get OID and length for level. */ + if (key->level == 2) { + keytype = DILITHIUM_LEVEL2k; + pubKeyLen = DILITHIUM_LEVEL2_PUB_KEY_SIZE; + } + else if (key->level == 3) { + keytype = DILITHIUM_LEVEL3k; + pubKeyLen = DILITHIUM_LEVEL3_PUB_KEY_SIZE; + } + else if (key->level == 5) { + keytype = DILITHIUM_LEVEL5k; + pubKeyLen = DILITHIUM_LEVEL5_PUB_KEY_SIZE; + } + else { + /* Level not set. */ + ret = BAD_FUNC_ARG; + } } - ret = wc_dilithium_export_public(key, pubKey, &pubKeyLen); if (ret == 0) { - ret = SetAsymKeyDerPublic(pubKey, pubKeyLen, output, inLen, keytype, - withAlg); + ret = SetAsymKeyDerPublic(key->p, pubKeyLen, output, len, keytype, + withAlg); } return ret; } -#endif +#endif /* WC_ENABLE_ASYM_KEY_EXPORT */ + +#endif /* WOLFSSL_DILITHIUM_PUBLIC_KEY */ -int wc_Dilithium_KeyToDer(dilithium_key* key, byte* output, word32 inLen) +#ifdef WOLFSSL_DILITHIUM_PRIVATE_KEY + +#ifdef WOLFSSL_DILITHIUM_PUBLIC_KEY +/* Encode the private and public data of a Dilithium key in DER. + * + * Pass NULL for output to get the size of the encoding. + * + * @param [in] key Dilithium key object. + * @param [out] output Buffer to put encoded data in. + * @param [in] len Size of buffer in bytes. + * @return Size of encoded data in bytes on success. + * @return BAD_FUNC_ARG when key is NULL. + * @return MEMORY_E when dynamic memory allocation failed. + */ +int wc_Dilithium_KeyToDer(dilithium_key* key, byte* output, word32 len) { - if (key == NULL) { - return BAD_FUNC_ARG; - } + int ret = BAD_FUNC_ARG; - if (key->level == 2) { - return SetAsymKeyDer(key->k, DILITHIUM_LEVEL2_KEY_SIZE, key->p, - DILITHIUM_LEVEL2_KEY_SIZE, output, inLen, - DILITHIUM_LEVEL2k); - } - else if (key->level == 3) { - return SetAsymKeyDer(key->k, DILITHIUM_LEVEL3_KEY_SIZE, key->p, - DILITHIUM_LEVEL3_KEY_SIZE, output, inLen, - DILITHIUM_LEVEL3k); - } - else if (key->level == 5) { - return SetAsymKeyDer(key->k, DILITHIUM_LEVEL5_KEY_SIZE, key->p, - DILITHIUM_LEVEL5_KEY_SIZE, output, inLen, - DILITHIUM_LEVEL5k); + /* Validate parameters and check public and private key set. */ + if ((key != NULL) && key->prvKeySet && key->pubKeySet) { + /* Create DER for level. */ + if (key->level == 2) { + ret = SetAsymKeyDer(key->k, DILITHIUM_LEVEL2_KEY_SIZE, key->p, + DILITHIUM_LEVEL2_PUB_KEY_SIZE, output, len, DILITHIUM_LEVEL2k); + } + else if (key->level == 3) { + ret = SetAsymKeyDer(key->k, DILITHIUM_LEVEL3_KEY_SIZE, key->p, + DILITHIUM_LEVEL3_PUB_KEY_SIZE, output, len, DILITHIUM_LEVEL3k); + } + else if (key->level == 5) { + ret = SetAsymKeyDer(key->k, DILITHIUM_LEVEL5_KEY_SIZE, key->p, + DILITHIUM_LEVEL5_PUB_KEY_SIZE, output, len, DILITHIUM_LEVEL5k); + } } - return BAD_FUNC_ARG; + return ret; } +#endif /* WOLFSSL_DILITHIUM_PUBLIC_KEY */ -int wc_Dilithium_PrivateKeyToDer(dilithium_key* key, byte* output, word32 inLen) +/* Encode the private data of a Dilithium key in DER. + * + * Pass NULL for output to get the size of the encoding. + * + * @param [in] key Dilithium key object. + * @param [out] output Buffer to put encoded data in. + * @param [in] len Size of buffer in bytes. + * @return Size of encoded data in bytes on success. + * @return BAD_FUNC_ARG when key is NULL. + * @return MEMORY_E when dynamic memory allocation failed. + */ +int wc_Dilithium_PrivateKeyToDer(dilithium_key* key, byte* output, word32 len) { - if (key == NULL) { - return BAD_FUNC_ARG; - } + int ret = BAD_FUNC_ARG; - if (key->level == 2) { - return SetAsymKeyDer(key->k, DILITHIUM_LEVEL2_KEY_SIZE, NULL, 0, output, - inLen, DILITHIUM_LEVEL2k); - } - else if (key->level == 3) { - return SetAsymKeyDer(key->k, DILITHIUM_LEVEL3_KEY_SIZE, NULL, 0, output, - inLen, DILITHIUM_LEVEL3k); - } - else if (key->level == 5) { - return SetAsymKeyDer(key->k, DILITHIUM_LEVEL5_KEY_SIZE, NULL, 0, output, - inLen, DILITHIUM_LEVEL5k); + /* Validate parameters and check private key set. */ + if ((key != NULL) && key->prvKeySet) { + /* Create DER for level. */ + if (key->level == 2) { + ret = SetAsymKeyDer(key->k, DILITHIUM_LEVEL2_KEY_SIZE, NULL, 0, + output, len, DILITHIUM_LEVEL2k); + } + else if (key->level == 3) { + ret = SetAsymKeyDer(key->k, DILITHIUM_LEVEL3_KEY_SIZE, NULL, 0, + output, len, DILITHIUM_LEVEL3k); + } + else if (key->level == 5) { + ret = SetAsymKeyDer(key->k, DILITHIUM_LEVEL5_KEY_SIZE, NULL, 0, + output, len, DILITHIUM_LEVEL5k); + } } - return BAD_FUNC_ARG; + return ret; } -#endif /* HAVE_PQC && HAVE_DILITHIUM */ + +#endif /* WOLFSSL_DILITHIUM_PRIVATE_KEY */ + +#endif /* WOLFSSL_DILITHIUM_NO_ASN1 */ + +#endif /* HAVE_DILITHIUM */ diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index 0fd362b301..1364cfef1e 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -314,6 +314,9 @@ const byte const_byte_array[] = "A+Gd\0\0\0"; #include #endif #endif +#ifdef HAVE_DILITHIUM + #include +#endif #if defined(WOLFSSL_HAVE_XMSS) #include #ifdef HAVE_LIBXMSS @@ -633,6 +636,9 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t scrypt_test(void); #ifdef WOLFSSL_HAVE_KYBER WOLFSSL_TEST_SUBROUTINE wc_test_ret_t kyber_test(void); #endif +#ifdef HAVE_DILITHIUM + WOLFSSL_TEST_SUBROUTINE wc_test_ret_t dilithium_test(void); +#endif #if defined(WOLFSSL_HAVE_XMSS) #if !defined(WOLFSSL_SMALL_STACK) && WOLFSSL_XMSS_MIN_HEIGHT <= 10 WOLFSSL_TEST_SUBROUTINE wc_test_ret_t xmss_test_verify_only(void); @@ -2148,6 +2154,13 @@ options: [-s max_relative_stack_bytes] [-m max_relative_heap_memory_bytes]\n\ TEST_PASS("KYBER test passed!\n"); #endif +#ifdef HAVE_DILITHIUM + if ( (ret = dilithium_test()) != 0) + TEST_FAIL("DILITHIUM test failed!\n", ret); + else + TEST_PASS("DILITHIUM test passed!\n"); +#endif + #if defined(WOLFSSL_HAVE_XMSS) #if !defined(WOLFSSL_SMALL_STACK) && WOLFSSL_XMSS_MIN_HEIGHT <= 10 if ( (ret = xmss_test_verify_only()) != 0) @@ -39890,6 +39903,1849 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t kyber_test(void) } #endif /* WOLFSSL_HAVE_KYBER */ +#ifdef HAVE_DILITHIUM +#ifndef WOLFSSL_DILITHIUM_NO_VERIFY +static wc_test_ret_t dilithium_param_vfy_test(int param, const byte* pubKey, + word32 pubKeyLen, const byte* sig, word32 sigLen) +{ + byte msg[512]; + dilithium_key* key; + wc_test_ret_t ret; + int i; + int res = 0; + + key = (dilithium_key*)XMALLOC(sizeof(*key), HEAP_HINT, + DYNAMIC_TYPE_TMP_BUFFER); + if (key == NULL) { + ERROR_OUT(WC_TEST_RET_ENC_ERRNO, out); + } + + /* make dummy msg */ + for (i = 0; i < (int)sizeof(msg); i++) { + msg[i] = (byte)i; + } + + ret = wc_dilithium_init(key); + if (ret != 0) { + ret = WC_TEST_RET_ENC_EC(ret); + return ret; + } + + ret = wc_dilithium_set_level(key, param); + if (ret != 0) + ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out); + + ret = wc_dilithium_import_public(pubKey, pubKeyLen, key); + if (ret != 0) + ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out); + + ret = wc_dilithium_verify_msg(sig, sigLen, msg, (word32)sizeof(msg), &res, + key); + if (ret != 0) + ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out); + if (res != 1) + ERROR_OUT(WC_TEST_RET_ENC_EC(res), out); +out: + wc_dilithium_free(key); + XFREE(key, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER); + return ret; +} + +#ifndef WOLFSSL_NO_ML_DSA_44 +static wc_test_ret_t dilithium_param_44_vfy_test(void) +{ + WOLFSSL_SMALL_STACK_STATIC const byte ml_dsa_44_pub_key[] = { + 0xea, 0x05, 0x24, 0x0d, 0x80, 0x72, 0x25, 0x55, 0xf4, 0x5b, + 0xc2, 0x13, 0x8b, 0x87, 0x5d, 0x31, 0x99, 0x2f, 0x1d, 0xa9, + 0x41, 0x09, 0x05, 0x76, 0xa7, 0xb7, 0x5e, 0x8c, 0x44, 0xe2, + 0x64, 0x79, 0xa0, 0xec, 0x1f, 0x24, 0xb6, 0xc8, 0x05, 0x5b, + 0xc1, 0x18, 0xb0, 0xb7, 0xcf, 0x8c, 0x60, 0x67, 0x6b, 0x81, + 0x44, 0x27, 0xb6, 0x0e, 0xfd, 0x9b, 0xc3, 0xcb, 0x52, 0x31, + 0xfa, 0xc9, 0x34, 0x8d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02, 0xa9, + 0x18, 0xa0, 0x01, 0x18, 0x84, 0x95, 0x22, 0x2e, 0x93, 0x76, + 0x44, 0x4e, 0x11, 0x7b, 0x03, 0x51, 0x50, 0x19, 0x79, 0xe7, + 0xbb, 0x5c, 0x7b, 0xca, 0x74, 0xb4, 0x25, 0x26, 0xdb, 0x66, + 0xaa, 0x0b, 0x21, 0x07, 0xfb, 0x7a, 0x96, 0x10, 0x7d, 0x99, + 0xa9, 0x16, 0xcb, 0x0e, 0xba, 0x63, 0xab, 0x95, 0xfc, 0x5a, + 0xbe, 0xa6, 0x7f, 0xd8, 0xb4, 0xcd, 0x7c, 0xc5, 0xd0, 0xb1, + 0x1b, 0x48, 0x40, 0xfb, 0xe6, 0x2f, 0x2b, 0x94, 0xfe, 0x68, + 0xa2, 0xc4, 0x36, 0xd9, 0xcd, 0xc1, 0x93, 0x6d, 0xef, 0x39, + 0x5e, 0x43, 0x30, 0x5a, 0x2e, 0x66, 0xb6, 0xf2, 0xed, 0x9a, + 0x8d, 0x12, 0xdf, 0x5c, 0xae, 0xad, 0x16, 0x12, 0x7e, 0x81, + 0x82, 0x91, 0x7d, 0x2b, 0x12, 0xe9, 0x96, 0xb8, 0xb7, 0x42, + 0xcb, 0x1f, 0xf8, 0xd1, 0xfd, 0x83, 0x7a, 0xe4, 0x36, 0x1d, + 0x04, 0x27, 0x4c, 0xe5, 0xbd, 0x75, 0x24, 0xf7, 0xbd, 0xb6, + 0x6a, 0x68, 0x4e, 0x2c, 0x1b, 0x56, 0x3e, 0x60, 0xa4, 0x42, + 0xca, 0x7a, 0x54, 0xe5, 0x06, 0xe3, 0xda, 0x05, 0xf7, 0x77, + 0x36, 0x8b, 0x81, 0x26, 0x99, 0x92, 0x42, 0xda, 0x45, 0xb1, + 0xfe, 0x4b, + }; + WOLFSSL_SMALL_STACK_STATIC const byte ml_dsa_44_sig[] = { + 0x5e, 0xc1, 0xce, 0x0e, 0x31, 0xea, 0x10, 0x52, 0xa3, 0x7a, + 0xf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xf1, 0x68, 0x56, 0x8b, 0x74, 0x94, 0x58, 0x48, 0x28, + 0xee, 0xf7, 0x0a, 0x8f, 0xad, 0x43, 0x67, 0xe1, 0xa3, 0x8c, + 0x3b, 0x35, 0x48, 0xcc, 0x52, 0x14, 0x36, 0x99, 0x18, 0x71, + 0x1c, 0xb2, 0xfc, 0x82, 0xda, 0xac, 0xd5, 0x55, 0x0a, 0x77, + 0x44, 0x6a, 0x48, 0xed, 0xfc, 0x5a, 0x68, 0xa6, 0x4d, 0x65, + 0xe7, 0x30, 0xaa, 0x23, 0x66, 0x84, 0xdf, 0x83, 0xf1, 0x17, + 0x5c, 0x46, 0xfe, 0x63, 0xcb, 0xc3, 0x6e, 0x4e, 0x47, 0x8d, + 0x30, 0x48, 0x06, 0xda, 0x97, 0x6b, 0x04, 0x5d, 0x44, 0xf3, + 0xb7, 0x2a, 0x6d, 0x2b, 0xbb, 0xcd, 0x97, 0x4e, 0x26, 0x8e, + 0xc9, 0x03, 0x0b, 0x5d, 0x68, 0xed, 0x81, 0xf7, 0x19, 0x61, + 0x81, 0xe9, 0xac, 0x3a, 0x35, 0xcd, 0xe8, 0xfd, 0x99, 0xdb, + 0x89, 0x83, 0x7d, 0x23, 0x6a, 0xc1, 0xc1, 0x10, 0xe9, 0xd3, + 0xfa, 0x9e, 0x5a, 0xcd, 0x73, 0xa3, 0x0a, 0x37, 0xa3, 0x12, + 0xef, 0x72, 0xa2, 0x28, 0xd4, 0x3d, 0x67, 0x53, 0x24, 0x0d, + 0x61, 0x98, 0xbb, 0x07, 0xf3, 0xa7, 0x79, 0x22, 0x74, 0x57, + 0x99, 0xe8, 0x7a, 0xbf, 0x90, 0x84, 0xa2, 0x6b, 0x29, 0x34, + 0xac, 0xc9, 0xff, 0x67, 0x82, 0xd0, 0xd2, 0x7d, 0x69, 0xc0, + 0xf3, 0xd7, 0x4b, 0x5c, 0xf2, 0xa8, 0x53, 0x8b, 0x78, 0x57, + 0xfc, 0x74, 0xf5, 0x81, 0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 0xf6, 0xae, 0x9a, 0x19, + 0x6c, 0xd8, 0x2d, 0x9b, 0xb4, 0x40, 0x9e, 0x15, 0x77, 0x2e, + 0x7e, 0xe9, 0xb4, 0x3d, 0x0f, 0x1b, 0xb5, 0x1c, 0xc2, 0x58, + 0x4e, 0x4b, 0xf6, 0x53, 0x9e, 0x6f, 0x09, 0x55, 0xa0, 0xb8, + 0x73, 0x11, 0x64, 0x70, 0x54, 0xb4, 0xcb, 0xb7, 0x27, 0xe5, + 0xdf, 0x58, 0x67, 0x5b, 0xc0, 0xd6, 0xf5, 0x64, 0xa6, 0x66, + 0x6d, 0xdf, 0xd8, 0xf8, 0xd6, 0x85, 0xba, 0xba, 0x30, 0xa7, + 0xca, 0x34, 0xf4, 0x9a, 0xba, 0x0a, 0xfb, 0x0e, 0xa0, 0x65, + 0x98, 0x78, 0xee, 0xaa, 0x14, 0x6a, 0x99, 0x77, 0x67, 0xad, + 0x01, 0x95, 0x5e, 0x50, 0x22, 0xe9, 0x74, 0x95, 0xa7, 0x13, + 0x3f, 0xdd, 0xa6, 0x69, 0x64, 0xf6, 0x50, 0x06, 0x6d, 0xba, + 0x90, 0x5a, 0x8c, 0x81, 0xa0, 0xda, 0x55, 0xe9, 0x97, 0x0e, + 0xd7, 0x10, 0x8e, 0x1f, 0x23, 0x65, 0xd9, 0x14, 0xd4, 0xde, + 0xa5, 0xf9, 0xec, 0xb6, 0xad, 0x65, 0xce, 0x0b, 0x1b, 0x0a, + 0x4c, 0x7d, 0xb0, 0x97, 0xa6, 0xfe, 0x67, 0xfb, 0x4f, 0x8f, + 0x00, 0x92, 0xb6, 0x0d, 0x20, 0x78, 0x65, 0x1d, 0x9a, 0x56, + 0x57, 0xc6, 0x15, 0x88, 0xba, 0x55, 0x02, 0x7a, 0x9a, 0xac, + 0x50, 0x4c, 0xc7, 0x9e, 0x66, 0x8b, 0xfc, 0xf3, 0x67, 0x48, + 0x07, 0xbf, 0x84, 0x94, 0x9b, 0x22, 0x2a, 0xae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 0x61, + 0x26, 0xb3, 0x12, 0x43, 0x31, 0x55, 0xb5, 0xda, 0x4b, 0xb5, + 0x11, 0xb4, 0xb8, 0xfb, 0x0a, 0xd9, 0xa7, 0x0e, 0x9f, 0x2a, + 0x74, 0x01, 0xf6, 0x1a, 0x33, 0x10, 0x9e, 0x66, 0xff, 0x82, + 0xfa, 0xa9, 0xa4, 0xa0, 0x9b, 0x25, 0x2d, 0x16, 0xbf, 0x60, + 0x0d, 0x87, 0xea, 0x94, 0xad, 0xdd, 0xc4, 0xd0, 0xa8, 0xdd, + 0x2d, 0xc7, 0xc8, 0xac, 0x39, 0x9e, 0x87, 0x69, 0xc4, 0x3a, + 0xbc, 0x28, 0x7e, 0x36, 0x69, 0xfd, 0x20, 0x25, 0xac, 0xa3, + 0xa7, 0x37, 0x96, 0xe9, 0x8a, 0x65, 0xe4, 0xb0, 0x2a, 0x61, + 0x23, 0x28, 0x64, 0xff, 0x17, 0x6c, 0x36, 0x9e, 0x0a, 0xba, + 0xe4, 0x4b, 0xeb, 0x84, 0x24, 0x20, 0x57, 0x0f, 0x34, 0x05, + 0x95, 0x56, 0xc3, 0x2f, 0x2b, 0xf0, 0x36, 0xef, 0xca, 0x68, + 0xfe, 0x78, 0xf8, 0x98, 0x09, 0x4a, 0x25, 0xcc, 0x17, 0xbe, + 0x05, 0x00, 0xff, 0xf9, 0xa5, 0x5b, 0xe6, 0xaa, 0x5b, 0x56, + 0xb6, 0x89, 0x64, 0x9c, 0x16, 0x48, 0xe1, 0xcd, 0x67, 0x87, + 0xdd, 0xba, 0xbd, 0x02, 0x0d, 0xd8, 0xb4, 0xc9, 0x7c, 0x37, + 0x92, 0xd0, 0x39, 0x46, 0xd2, 0xc4, 0x78, 0x13, 0xf0, 0x76, + 0x45, 0x5f, 0xeb, 0x52, 0xd2, 0x3f, 0x61, 0x87, 0x34, 0x09, + 0xb7, 0x24, 0x4e, 0x93, 0xf3, 0xc5, 0x10, 0x19, 0x66, 0x66, + 0x3f, 0x15, 0xe3, 0x05, 0x55, 0x43, 0xb7, 0xf4, 0x62, 0x57, + 0xb4, 0xd9, 0xef, 0x46, 0x47, 0xb5, 0xfb, 0x79, 0xc9, 0x67, + 0xc5, 0xc3, 0x18, 0x91, 0x73, 0x75, 0xec, 0xd5, 0x68, 0x2b, + 0xf6, 0x42, 0xb4, 0xff, 0xfb, 0x27, 0x61, 0x77, 0x28, 0x10, + 0x6b, 0xce, 0x19, 0xad, 0x87, 0xc3, 0x85, 0xe3, 0x78, 0x00, + 0xdb, 0x21, 0xee, 0xd8, 0xfa, 0x9c, 0x81, 0x11, 0x97, 0xac, + 0xd0, 0x50, 0x89, 0x45, 0x23, 0xf6, 0x85, 0x7d, 0x60, 0xb2, + 0xad, 0x0c, 0x5d, 0xd8, 0x9e, 0xe4, 0xe1, 0x25, 0xb2, 0x13, + 0x1a, 0x54, 0x54, 0xfd, 0x7b, 0xab, 0x85, 0x20, 0xe8, 0xda, + 0x52, 0x0f, 0xac, 0x49, 0x70, 0xf1, 0x4c, 0x66, 0x74, 0x8c, + 0x87, 0x6e, 0xca, 0xc1, 0x0d, 0x92, 0xc0, 0xa8, 0x08, 0xfd, + 0x0f, 0x60, 0x55, 0xaf, 0x24, 0xcb, 0x04, 0xb7, 0xff, 0xa9, + 0xc5, 0x07, 0x26, 0xf6, 0xe2, 0x1e, 0x2f, 0xd1, 0x99, 0x6d, + 0xef, 0xc0, 0xdb, 0x5b, 0xf7, 0x06, 0x80, 0x92, 0x5f, 0x56, + 0x54, 0xdb, 0x2e, 0xba, 0x93, 0xb2, 0x94, 0xf2, 0xad, 0xbc, + 0x91, 0x6e, 0x4e, 0xce, 0x21, 0xc4, 0x8b, 0x18, 0xc4, 0xfc, + 0xab, 0xb4, 0x4f, 0xd7, 0xa2, 0xef, 0x55, 0x00, 0x6d, 0x34, + 0x17, 0x59, 0x8d, 0x79, 0x75, 0x02, 0xa3, 0x7a, 0x52, 0x57, + 0x5c, 0x26, 0xb9, 0xae, 0xd6, 0x19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x25, + 0x35, 0x45, 0x4a, 0x4b, 0x63, 0x74, 0x79, 0x7e, 0x82, 0xa2, + 0xaf, 0xc6, 0xc7, 0xcc, 0xd2, 0xfa, 0x2a, 0x2d, 0x2f, 0x32, + 0x35, 0x38, 0x3f, 0x4c, 0x7f, 0x80, 0x81, 0x8b, 0x9b, 0x9c, + 0x9d, 0xa7, 0xa9, 0xcb, 0xe9, 0xf0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x20, 0x32, 0x46, + }; + + return dilithium_param_vfy_test(WC_ML_DSA_44, ml_dsa_44_pub_key, + (word32)sizeof(ml_dsa_44_pub_key), ml_dsa_44_sig, + (word32)sizeof(ml_dsa_44_sig)); +} +#endif + +#ifndef WOLFSSL_NO_ML_DSA_65 +static wc_test_ret_t dilithium_param_65_vfy_test(void) +{ + WOLFSSL_SMALL_STACK_STATIC const byte ml_dsa_65_pub_key[] = { + 0x15, 0xc9, 0xe5, 0x53, 0x2f, 0xd8, 0x1f, 0xb4, 0xa3, 0x9f, + 0xae, 0xad, 0xb3, 0x10, 0xd0, 0x72, 0x69, 0xd3, 0x02, 0xf3, + 0xdf, 0x67, 0x5a, 0x31, 0x52, 0x19, 0xca, 0x39, 0x27, 0x77, + 0x61, 0x6d, 0x0f, 0xc1, 0x33, 0x26, 0x09, 0xf0, 0xf9, 0x4d, + 0x12, 0x7a, 0xef, 0xf7, 0x21, 0x26, 0x2c, 0xe0, 0xe2, 0x92, + 0x1f, 0x9d, 0xd1, 0xaa, 0xaf, 0x08, 0x14, 0xf2, 0xaa, 0x24, + 0x99, 0x0f, 0x20, 0x57, 0x35, 0x04, 0x32, 0x96, 0x8e, 0x6e, + 0x10, 0x64, 0xe3, 0xe3, 0x57, 0x26, 0x33, 0x32, 0x7b, 0xe4, + 0x18, 0x41, 0x77, 0xd3, 0x24, 0x63, 0x3d, 0x11, 0xea, 0xdc, + 0xbe, 0x59, 0xff, 0x8d, 0xc2, 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 0x95, 0x0d, + 0xab, 0x24, 0xdf, 0x2d, 0xbf, 0x76, 0x46, 0x01, 0x44, 0xe4, + 0x18, 0x8e, 0xd5, 0x9a, 0x76, 0xc9, 0xc6, 0xbc, 0xdb, 0x7f, + 0x80, 0x52, 0xc6, 0x40, 0x41, 0x12, 0x36, 0x7c, 0x80, 0x69, + 0xce, 0x7b, 0xe1, 0xa0, 0x53, 0xa2, 0xd6, 0x8f, 0x3f, 0xf7, + 0xd7, 0x61, 0x09, 0x70, 0xa2, 0xa0, 0xc6, 0xaf, 0xa0, 0xd0, + 0xfa, 0x13, 0xbf, 0xc0, 0x69, 0x15, 0xce, 0x15, 0xec, 0x24, + 0x4b, 0x6b, 0xdc, 0x93, 0x51, 0xc6, 0x82, 0x19, 0x92, 0x84, + 0x5d, 0x99, 0xb0, 0x90, 0x2c, 0xcc, 0x2a, 0x81, 0x6b, 0x22, + 0x64, 0x0a, 0xcb, 0x51, 0x25, 0x82, 0x50, 0x02, 0x2d, 0x3e, + 0xd4, 0x72, 0xb3, 0x0c, 0x15, 0x77, 0xd2, 0xca, 0x98, 0x2f, + 0x41, 0x93, 0x14, 0xb2, 0x7f, 0xa1, 0x97, 0xa3, 0xb8, 0x8a, + 0x56, 0x24, 0x38, 0xa7, 0x36, 0xc5, 0x01, 0xc0, 0x9f, 0x3f, + 0x3e, 0x9a, 0xf6, 0xe9, 0x16, 0x82, 0x01, 0x58, 0x70, 0x0e, + 0x0d, 0xbc, 0xfa, 0x03, 0x57, 0x65, 0xa8, 0x5a, 0x3d, 0x57, + 0x81, 0x23, 0xbe, 0x6e, 0xa9, 0xe8, 0x22, 0xdf, 0x2f, 0x70, + 0xeb, 0x0a, 0x03, 0x96, 0x6b, 0xef, 0x20, 0x9f, 0xf2, 0x62, + 0xe7, 0xb2, 0x6e, 0x3a, 0x1e, 0x40, 0x1f, 0xd2, 0x97, 0x48, + 0xd1, 0x18, 0xf0, 0xeb, 0x52, 0x58, 0x02, 0x26, 0xce, 0x75, +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0x0e, 0x04, 0x61, 0x16, 0x34, 0xf9, 0xc6, 0x63, 0x58, + 0xdf, 0xf4, 0x52, 0xce, 0xd0, 0x0f, 0x0c, 0xec, 0xb1, 0x82, + 0xf4, 0x72, 0x73, 0x72, 0x3f, 0x02, 0xbe, 0xe3, 0x9c, 0x63, + 0x73, 0xc8, 0x21, 0x65, 0xba, 0x57, 0x52, 0xa9, 0x19, 0xac, + 0x68, 0x50, 0xbd, 0x2d, 0x72, 0x5b, 0x93, 0x0f, 0x1c, 0x81, + 0x77, 0xd7, 0x2e, 0xc3, 0x93, 0x52, 0x6e, 0xdc, 0x79, 0x52, + 0x9f, 0xe3, 0xde, 0xe1, 0xba, 0x58, 0x55, 0xab, 0x8a, 0xf2, + 0x35, 0x6a, 0xcf, 0x94, 0x1f, 0x17, 0xa4, 0x23, 0x2e, 0x8e, + 0x18, 0x21, 0xbe, 0x14, 0xfa, 0xe7, 0x59, 0xc5, 0x44, 0x34, + 0xce, 0x03, 0xf4, 0xb7, 0x75, 0xd3, 0x51, 0x55, 0xdf, 0xff, + 0xcf, 0x4f, 0x44, 0xee, 0x13, 0x9b, 0xcb, 0x12, 0xae, 0xe5, + 0x5b, 0x44, 0x65, 0x28, 0xcb, 0x6a, 0x9c, 0x24, 0x1d, 0xea, + 0x2d, 0x5e, 0xa5, 0xc3, 0x78, 0xad, 0xed, 0x0c, 0x05, 0xa6, + 0xaf, 0x95, 0x04, 0xd2, 0xb5, 0x91, 0x0e, 0xa0, 0x06, 0x77, + 0xc5, 0x82, 0xf6, 0xdd, 0x72, 0x83, 0x04, 0xcc, 0xb0, 0xab, + 0x7a, 0xf0, 0xb4, 0x4d, 0x36, 0x71, 0x72, 0x1a, 0x9a, 0x0d, + 0xcd, 0xa3, 0x11, 0xa8, 0x0d, 0x7d, 0x49, 0xce, 0x9c, 0x09, + 0x1d, 0x08, 0xa4, 0x39, 0x2e, 0x03, 0xdf, 0x3a, 0xc8, 0xfe, + 0x6a, 0x2b, 0x0b, 0x07, 0x80, 0x55, 0x8a, 0xa8, 0xe6, 0x0e, + 0xc9, 0x7e, 0x83, 0xce, 0x3a, 0x98, 0x98, 0x4e, 0x3e, 0x08, + 0x20, 0x8f, 0x10, 0xfc, 0xc1, 0xc4, 0xcf, 0x37, 0x8d, 0x69, + 0xd8, 0x57, 0x9d, 0x48, 0x80, 0x6a, 0xef, 0x0c, 0xdd, 0x27, + 0x99, 0xf9, 0xe7, 0xd0, 0xd2, 0x36, 0xd8, 0xed, 0x41, 0x14, + 0x1b, 0x10, + }; + WOLFSSL_SMALL_STACK_STATIC const byte ml_dsa_65_sig[] = { + 0x3e, 0xff, 0xf4, 0x48, 0x80, 0x2d, 0x88, 0x87, 0xf4, 0xcc, + 0xa4, 0x61, 0xe1, 0x27, 0x20, 0x55, 0x66, 0xc8, 0xfe, 0x3e, + 0xdd, 0xf5, 0x5c, 0x70, 0x6c, 0x54, 0xba, 0x50, 0x8a, 0xa2, + 0x4b, 0x88, 0xbc, 0xb8, 0x87, 0xf9, 0x4e, 0x50, 0x3a, 0x04, + 0x18, 0xb3, 0xf4, 0x5f, 0x77, 0x4a, 0x7e, 0xa8, 0xf5, 0xca, + 0x49, 0x00, 0xdc, 0x24, 0xaa, 0x05, 0x35, 0x0f, 0x34, 0xf7, + 0xbf, 0x09, 0xa6, 0xcf, 0x75, 0x37, 0x07, 0xcd, 0x07, 0x99, + 0x92, 0x1d, 0xc7, 0xc9, 0x17, 0x1c, 0xdd, 0x27, 0x8c, 0x66, + 0xf2, 0x8b, 0x75, 0xb0, 0x86, 0x2d, 0xbd, 0x51, 0x16, 0xc2, + 0x50, 0xe0, 0x7e, 0x0a, 0x21, 0x58, 0x93, 0x22, 0x06, 0xcb, + 0x85, 0x8b, 0xfd, 0x97, 0x61, 0xc0, 0xdb, 0xab, 0xfa, 0x4a, + 0x69, 0xef, 0x9c, 0xc1, 0x4e, 0xae, 0xb2, 0xb3, 0xa2, 0x74, + 0xa4, 0x94, 0x0a, 0xed, 0x39, 0x9e, 0xe8, 0x58, 0xeb, 0xfd, + 0x43, 0x05, 0x73, 0x38, 0xd6, 0xbb, 0xeb, 0xb9, 0x9d, 0x3b, + 0xf8, 0x85, 0xb4, 0x4b, 0x16, 0x5c, 0x9e, 0xfe, 0xb8, 0x13, + 0xf8, 0x68, 0x44, 0x90, 0x05, 0x61, 0xb3, 0xed, 0x6f, 0x47, + 0xc9, 0x50, 0xcf, 0x6c, 0xc0, 0xac, 0xdf, 0x4c, 0x4c, 0x1b, + 0x42, 0xce, 0x0a, 0x32, 0x69, 0xb0, 0xfd, 0x87, 0xef, 0xf3, + 0x9c, 0xcc, 0xba, 0x2f, 0x03, 0xd7, 0xdb, 0x76, 0xee, 0xa0, + 0x71, 0x4a, 0x80, 0xcb, 0x90, 0x9e, 0xbb, 0x8f, 0x00, 0x46, + 0x81, 0xe0, 0xde, 0xa6, 0x43, 0xb5, 0x37, 0x79, 0xf2, 0x35, + 0xce, 0x9e, 0xd2, 0xb1, 0x5b, 0xff, 0x91, 0xfb, 0x98, 0xc1, + 0xe1, 0x66, 0x2c, 0x00, 0x1b, 0x89, 0xf2, 0x57, 0x81, 0x73, + 0x7e, 0x9f, 0x8d, 0x50, 0xd0, 0xe0, 0xe3, 0x93, 0xf2, 0x87, + 0x41, 0x64, 0x6c, 0xb7, 0x09, 0x60, 0x91, 0x4e, 0x0b, 0xbe, + 0xbe, 0xd4, 0x98, 0xfa, 0x14, 0x8c, 0x46, 0x09, 0xfa, 0xaa, + 0x82, 0xd6, 0xdd, 0x65, 0x93, 0x39, 0x45, 0x50, 0x90, 0x10, + 0xae, 0x1b, 0xff, 0xab, 0x7e, 0x86, 0xda, 0xb9, 0x4d, 0xf1, + 0xc2, 0x00, 0x54, 0x66, 0xee, 0x40, 0xc0, 0x56, 0x2f, 0xe8, + 0x43, 0x89, 0xbb, 0xb8, 0x59, 0x24, 0x63, 0x45, 0x9a, 0xde, + 0x08, 0xf3, 0x16, 0x94, 0xd2, 0x8d, 0xee, 0xf9, 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x7a, + 0x09, 0xf3, 0x84, 0xf9, 0x18, 0x04, 0x56, 0x2f, 0x7f, 0xbd, + 0x8e, 0x12, 0xdf, 0x4d, 0x58, 0x5c, 0x1d, 0x81, 0x0c, 0x7d, + 0x62, 0x02, 0xe0, 0xf9, 0x1b, 0x69, 0xe9, 0x38, 0x45, 0x84, + 0x2d, 0x9a, 0x4a, 0x3d, 0x7b, 0x48, 0xd5, 0x0d, 0x76, 0xba, + 0xff, 0x20, 0x00, 0xf8, 0x42, 0x7f, 0xd2, 0x25, 0x70, 0x90, + 0x88, 0xb3, 0x98, 0xac, 0xe9, 0xd9, 0xac, 0x58, 0xa6, 0x49, + 0xcc, 0x93, 0xa5, 0x04, 0x0c, 0x68, 0x53, 0x64, 0x72, 0x8c, + 0xfc, 0x8d, 0x61, 0xeb, 0x3f, 0x93, 0x8b, 0x85, 0x98, 0x05, + 0xce, 0x06, 0xd7, 0xbf, 0xbb, 0xa5, 0x22, 0xda, 0xe9, 0x8a, + 0x29, 0x30, 0x5e, 0x82, 0xe4, 0x46, 0x7c, 0x36, 0x5e, 0xf5, + 0xc7, 0xe3, 0x09, 0xdf, 0x20, 0x76, 0x73, 0x33, 0x31, 0x75, + 0xc2, 0x99, 0xe9, 0x74, 0x43, 0x82, 0xb1, 0xeb, 0x74, 0x6f, + 0xad, 0x59, 0x48, 0x12, 0xa0, 0x24, 0xe3, 0x38, 0x48, 0x61, + 0x0c, 0xf6, 0x38, 0x83, 0x3a, 0xcd, 0xd6, 0x45, 0x10, 0x0e, + 0x09, 0x79, 0x31, 0x30, 0x80, 0xfb, 0x34, 0x60, 0x1e, 0x72, + 0x98, 0xe9, 0x5c, 0xbf, 0xab, 0x21, 0x7f, 0xa3, 0x19, 0x7e, + 0x8c, 0xa9, 0xa7, 0xfc, 0x25, 0xe0, 0x8e, 0x6d, 0xa1, 0xb9, + 0x7b, 0x5b, 0x37, 0x33, 0x96, 0xd8, 0x6e, 0x7a, 0xce, 0xa6, + 0x1a, 0xbd,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4a, 0xc8, 0xc6, 0x20, 0x5b, 0xb8, + 0x80, 0xb4, 0x13, 0x35, 0x23, 0xff, 0x50, 0xde, 0x25, 0x92, + 0x67, 0x08, 0xb8, 0xa3, 0xb6, 0x39, 0xd4, 0x30, 0xdc, 0xa5, + 0x88, 0x8a, 0x44, 0x08, 0x8b, 0x6d, 0x2e, 0xb8, 0xf3, 0x0d, + 0x23, 0xda, 0x35, 0x08, 0x5a, 0x92, 0xe1, 0x40, 0xac, 0xc7, + 0x15, 0x05, 0x8a, 0xdf, 0xe5, 0x71, 0xd8, 0xe0, 0xd7, 0x9f, + 0x58, 0x03, 0xf4, 0xec, 0x99, 0x3c, 0xb0, 0xe0, 0x07, 0x42, + 0x9b, 0xa0, 0x10, 0x7c, 0x24, 0x60, 0x19, 0xe8, 0x84, 0xd4, + 0xb1, 0x86, 0x19, 0x0a, 0x52, 0x70, 0x6e, 0xc2, 0x3c, 0xe2, + 0x73, 0x8d, 0xfe, 0xf8, 0x7e, 0xdf, 0x78, 0xe7, 0x92, 0x36, + 0x10, 0xf7, 0x2d, 0x76, 0x93, 0x8a, 0x0f, 0x20, 0xc8, 0x30, + 0x59, 0x81, 0xff, 0x3b, 0x70, 0x22, 0xce, 0x6e, 0x23, 0x68, + 0x35, 0x59, 0x0e, 0xcf, 0xf8, 0xf6, 0xcd, 0x45, 0xb6, 0x41, + 0xba, 0xda, 0xe6, 0x35, 0x0b, 0xd1, 0xef, 0xa5, 0x7c, 0xe0, + 0xb9, 0x6f, 0x5b, 0xa9, 0xab, 0x87, 0xe3, 0x3b, 0x92, 0xce, + 0xbe, 0xfe, 0xf7, 0xab, 0x82, 0xa3, 0xe6, 0xbd, 0xfe, 0xce, + 0xa6, 0x17, 0xcb, 0x4c, 0xb4, 0x4c, 0xd6, 0xfe, 0xbb, 0x1c, + 0x10, 0xde, 0x29, 0x3e, 0x92, 0x66, 0x20, 0xf8, 0xee, 0x83, + 0x86, 0x66, 0xe0, 0x66, 0x97, 0x85, 0xaf, 0x3a, 0x8f, 0xa9, + 0x97, 0x09, 0xde, 0x77, 0xda, 0xb7, 0x81, 0x41, 0x10, 0xca, + 0x66, 0x00, 0xec, 0xf8, 0x46, 0x73, 0xa6, 0x24, 0x36, 0xec, + 0x25, 0xbe, 0x93, 0x5e, 0x74, 0x9f, 0xbe, 0xf4, 0x84, 0x15, + 0x9c, 0xc5, 0x43, 0xd9, 0xea, 0x5a, 0xcc, 0x2c, 0x4e, 0x2e, + 0x4e, 0x32, 0xa6, 0x88, 0xb1, 0x25, 0x34, 0xf7, 0xba, 0xab, + 0xd3, 0xa0, 0xc2, 0x06, 0x70, 0xed, 0x66, 0x4d, 0x71, 0x34, + 0xaf, 0x10, 0x99, 0x10, 0x11, 0x4f, 0xe4, 0x7d, 0x42, 0x03, + 0x04, 0x02, 0xc2, 0x41, 0x85, 0x1e, 0xc4, 0xca, 0xae, 0xf0, + 0x83, 0x78, 0x34, 0x98, 0x55, 0x8b, 0x4c, 0xa0, 0x14, 0xea, + 0x15, 0x2c, 0xa1, 0x30, 0xd8, 0xcf, 0xac, 0xd4, 0xca, 0xf7, + 0xf4, 0xc4, 0x20, 0xca, 0xa1, 0xef, 0xce, 0x5d, 0x6b, 0x32, + 0xb6, 0xf0, 0x22, 0x08, 0x49, 0x21, 0x0c, 0x57, 0x0f, 0xf8, + 0xc0, 0xd2, 0xe3, 0xc0, 0xa6, 0x31, 0xc7, 0x87, 0x96, 0xa9, + 0xfe, 0x69, 0xa0, 0x7f, 0xf7, 0x8e, 0x31, 0x92, 0x37, 0xce, + 0xde, 0x36, 0x3f, 0xf5, 0x7d, 0x07, 0xaa, 0xa9, 0x43, 0xee, + 0x3c, 0x8c, 0xd3, 0x7d, 0x2c, 0xa6, 0xc3, 0x98, 0xab, 0xbe, + 0x90, 0x4c, 0xa5, 0x5a, 0x27, 0xeb, 0x0e, 0xed, 0xa1, 0x1e, + 0x3e, 0x44, 0xa3, 0x4b, 0x49, 0xad, 0xe4, 0x19, 0x90, 0xc8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76, + 0x28, 0xa2, 0xea, 0x4b, 0x76, 0xaf, 0x9c, 0x3d, 0xf1, 0x1b, + 0x92, 0xff, 0xb0, 0xca, 0x16, 0xa2, 0x29, 0x94, 0x0e, 0x1e, + 0x51, 0xfb, 0xe1, 0x2b, 0x5a, 0x50, 0xfd, 0xaf, 0xab, 0xd7, + 0x32, 0xaa, 0x43, 0xa7, 0xcb, 0xd3, 0xd3, 0xe9, 0x1e, 0xb1, + 0x70, 0xd2, 0xbb, 0x15, 0x68, 0x49, 0xee, 0x6e, 0x1e, 0xc5, + 0x64, 0x4b, 0x26, 0x08, 0xe7, 0x32, 0x1c, 0x1d, 0x73, 0x8f, + 0x42, 0xfe, 0xeb, 0x67, 0x89, 0x42, 0x25, 0x40, 0xd6, 0x15, + 0x02, 0x55, 0x87, 0xe3, 0x87, 0xdd, 0x78, 0xc1, 0x01, 0x94, + 0xbc, 0x30, 0x5f, 0xbd, 0x89, 0xe1, 0xb0, 0x5c, 0xcd, 0xb7, + 0x68, 0xd5, 0xbb, 0xf4, 0xa0, 0x5d, 0x3d, 0xdd, 0x89, 0x12, + 0xc7, 0xb8, 0x5d, 0x51, 0x8a, 0xf4, 0xd5, 0x05, 0xc6, 0xdd, + 0x7b, 0x44, 0x38, 0xce, 0xb1, 0x24, 0x24, 0xe1, 0x9d, 0xc7, + 0x80, 0x86, 0x46, 0x2a, 0xd2, 0xa4, 0x0f, 0xec, 0xd3, 0x6b, + 0x31, 0xc0, 0x05, 0x31, 0xff, 0xf5, 0x1a, 0x33, 0x35, 0x68, + 0x2e, 0x68, 0x24, 0xbd, 0x62, 0xfc, 0x46, 0x79, 0x54, 0x5e, + 0x1e, 0x27, 0x93, 0x07, 0xed, 0x78, 0x94, 0x50, 0x42, 0x98, + 0x53, 0x88, 0xb7, 0x57, 0x04, 0x7d, 0xe2, 0xe1, 0xb5, 0x61, + 0x9e, 0x5a, 0x88, 0x31, 0x3e, 0x6c, 0x69, 0xbc, 0x8a, 0xe6, + 0xbc, 0x9d, 0x20, 0x7a, 0x86, 0xe5, 0x73, 0x93, 0x02, 0xc5, + 0xde, 0xdc, 0xcc, 0xbf, 0x89, 0x76, 0xdc, 0x4e, 0xa1, 0x89, + 0xe7, 0x95, 0x75, 0x01, 0xf7, 0x43, 0xaa, 0x3f, 0x1b, 0xb7, + 0x8c, 0x92, 0x66, 0x22, 0xbe, 0x34, 0xf1, 0x2f, 0xc3, 0xc7, + 0x21, 0xaf, 0x25, 0x57, 0x9a, 0x2c, 0x80, 0xf0, 0xb3, 0xdd, + 0xb3, 0xb2, 0x82, 0x97, 0x85, 0x73, 0xa9, 0x76, 0xe4, 0x37, + 0xa2, 0x65, 0xf9, 0xc1, 0x3d, 0x11, 0xbf, 0xcb, 0x3c, 0x8e, + 0xdd, 0xaf, 0x98, 0x57, 0x6a, 0xe1, 0x33, 0xe7, 0xf0, 0xff, + 0xed, 0x61, 0x53, 0xfe, 0x1e, 0x2d, 0x06, 0x2f, 0xb8, 0x9e, + 0xf9, 0xa5, 0x21, 0x06, 0xf3, 0x72, 0xf6, 0xa3, 0x77, 0xbb, + 0x63, 0x6e, 0x52, 0xb2, 0x42, 0x47, 0x9b, 0x92, 0x4c, 0xf8, + 0xd2, 0xe6, 0x02, 0xa5, 0x57, 0x2d, 0x6f, 0x30, 0x05, 0xe2, + 0xfd, 0x33, 0xe5, 0xb6, 0x23, 0x85, 0x89, 0x4a, 0x99, 0x20, + 0x33, 0xea, 0x2f, 0xcd, 0x28, 0x27, 0xff, 0xfd, 0x2e, 0x73, + 0x52, 0x29, 0x19, 0x7c, 0x65, 0xf5, 0x6a, 0xaa, 0x97, 0x6e, + 0xe9, 0x42, 0xa8, 0x55, 0x97, 0x56, 0x92, 0x9d, 0xd2, 0xd1, + 0xc4, 0x30, 0xaa, 0x95, 0x86, 0xba, 0x71, 0xdd, 0x2f, 0xf1, + 0xed, 0x66, 0x54, 0x78, 0x4b, 0x13, 0x31, 0xed, 0x9d, 0x2c, + 0xae, 0x0a, 0xc3, 0xca, 0xfb, 0x3f, 0x92, 0x92, 0x30, 0xa3, + 0x8e, 0xc8, 0x6d, 0x7b, 0x42, 0xd5, 0x5d, 0x99, 0x79, 0x42, + 0x28, 0x63, 0x9f, 0x97, 0x8e, 0x94, 0x6d, 0x1d, 0xb4, 0x21, + 0x39, 0xc7, 0x64, 0x48, 0x44, 0x5e, 0x15, 0x10, 0x45, 0x9f, + 0x8a, 0x01, 0x45, 0x20, 0x5c, 0xd1, 0x28, 0x0d, 0xe9, 0xfb, + 0xa9, 0x72, 0x68, 0x07, 0x31, 0x20, 0x75, 0x76, 0x82, 0x76, + 0x5d, 0x7c, 0xc1, 0x5d, 0x42, 0x40, 0xfd, 0x06, 0xa9, 0x66, + 0xb0, 0x36, 0x55, 0x86, 0x6c, 0x96, 0xbd, 0xb8, 0xf7, 0x36, + 0x87, 0xf2, 0xa1, 0x37, 0xd8, 0x2d, 0x83, 0xf5, 0xdc, 0xd8, + 0xde, 0x9e, 0x69, 0xd6, 0xe1, 0x0d, 0xd5, 0x93, 0xc5, 0xee, + 0xba, 0xd3, 0x40, 0x71, 0xbb, 0xc7, 0xbb, 0x50, 0x1a, 0x10, + 0x80, 0x99, 0x62, 0x1c, 0xe3, 0x1f, 0xa2, 0xcc, 0x98, 0xe1, + 0xaa, 0xff, 0xd9, 0x69, 0xe7, 0x87, 0x04, 0x87, 0x76, 0xec, + 0x55, 0x18, 0xaf, 0x82, 0x34, 0x4d, 0x4f, 0xf7, 0x57, 0x1f, + 0xa5, 0x43, 0xcc, 0xe9, 0x7a, 0x4a, 0xc8, 0xb4, 0x1f, 0x61, + 0x40, 0x5e, 0x1d, 0x11, 0xdd, 0xdc, 0xdc, 0xb4, 0x57, 0xf9, + 0x47, 0x96, 0xbc, 0x47, 0x29, 0xf8, 0xf2, 0x43, 0xc4, 0xa0, + 0x8c, 0x14, 0x5e, 0x73, 0x52, 0xac, 0xac, 0x39, 0x3b, 0x06, + 0x19, 0x1a, 0xca, 0x22, 0xc8, 0x96, 0x12, 0x2e, 0x4c, 0x7b, + 0xa0, 0x96, 0x53, 0x16, 0xce, 0x6d, 0x6e, 0xac, 0xb2, 0x07, + 0x17, 0x22, 0x07, 0x30, 0x20, 0x84, 0x9b, 0x0e, 0x92, 0x31, + 0x07, 0xe2, 0x77, 0xcd, 0x6a, 0x3e, 0x16, 0x4f, 0xd6, 0x12, + 0x88, 0x8a, 0x70, 0x5a, 0x87, 0xd8, 0xb9, 0xef, 0x76, 0xab, + 0x14, 0x65, 0x87, 0x3a, 0xef, 0xd8, 0x0e, 0x24, 0x40, 0x73, + 0x93, 0x2b, 0xbf, 0xac, 0xfe, 0x96, 0x8a, 0x9d, 0x12, 0xe6, + 0xc1, 0x5b, 0x00, 0x3b, 0x23, 0xee, 0xe2, 0x10, 0xb6, 0xbe, + 0x0e, 0x2f, 0xa2, 0x77, 0x16, 0x17, 0xfc, 0x4b, 0x2c, 0xd7, + 0x9c, 0xad, 0x66, 0xb4, 0xf2, 0xfd, 0xc1, 0xaf, 0x81, 0x12, + 0xd9, 0xed, 0x14, 0x32, 0xcf, 0x1b, 0xee, 0xc6, 0x63, 0xe8, + 0xe5, 0xe6, 0xb6, 0x91, 0x8d, 0x1b, 0x90, 0x75, 0x5d, 0x69, + 0x4c, 0x5d, 0xd6, 0xac, 0x79, 0xe8, 0xb6, 0xdf, 0xbf, 0x43, + 0x39, 0xd3, 0xb8, 0xf0, 0x39, 0xf4, 0x90, 0xaf, 0x73, 0x26, + 0xc7, 0x73, 0x6f, 0x93, 0xbb, 0xce, 0x6e, 0xdc, 0x1c, 0xd0, + 0x36, 0x23, 0x17, 0xb2, 0x39, 0x37, 0x15, 0xf5, 0x3a, 0x61, + 0xa9, 0x15, 0x52, 0x6e, 0xc5, 0x3a, 0x63, 0x79, 0x5d, 0x45, + 0xdc, 0x3a, 0xd5, 0x26, 0x01, 0x56, 0x97, 0x80, 0x7f, 0x83, + 0xf9, 0xec, 0xde, 0xa0, 0x2e, 0x7a, 0xb2, 0x4b,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, 0x56, 0xd8, 0xe2, 0x82, 0xfc, 0x58, 0x8f, 0xf6, 0x12, + 0x10, 0x65, 0x6a, 0x68, 0x53, 0x2d, 0x9f, 0x2c, 0x77, 0xd1, + 0xb8, 0x21, 0x8a, 0xcb, 0xe9, 0xd4, 0x25, 0x18, 0x22, 0x46, + 0x3e, 0x72, 0x29, 0x2a, 0x68, 0x70, 0x73, 0xe2, 0x61, 0xa2, + 0xa8, 0x1f, 0x24, 0x48, 0x92, 0xa0, 0xd4, 0xdd, 0xde, 0xe5, + 0x02, 0x1b, 0x59, 0x5c, 0x7e, 0x92, 0x9c, 0xd8, 0xf4, 0x2d, + 0x6b, 0x79, 0x7b, 0xc7, 0xcd, 0xef, 0x21, 0x2a, 0x50, 0x7e, + 0xba, 0xdd, 0x02, 0x45, 0x7e, 0xc1, 0xdd, 0xeb, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x03, 0x0c, 0x15, 0x1c, 0x22, 0x28, + }; + + return dilithium_param_vfy_test(WC_ML_DSA_65, ml_dsa_65_pub_key, + (word32)sizeof(ml_dsa_65_pub_key), ml_dsa_65_sig, + (word32)sizeof(ml_dsa_65_sig)); +} +#endif + +#ifndef WOLFSSL_NO_ML_DSA_87 +static wc_test_ret_t dilithium_param_87_vfy_test(void) +{ + WOLFSSL_SMALL_STACK_STATIC const byte ml_dsa_87_pub_key[] = { + 0xef, 0x49, 0x79, 0x47, 0x15, 0xc4, 0x8a, 0xa9, 0x74, 0x2a, + 0xf0, 0x36, 0x94, 0x5c, 0x91, 0x1c, 0x5d, 0xff, 0x2c, 0x83, + 0xf2, 0x8b, 0x04, 0xfc, 0x5d, 0x64, 0xbd, 0x49, 0x73, 0xcd, + 0xcc, 0x99, 0x50, 0x5f, 0x2b, 0x16, 0x3a, 0xbb, 0x98, 0xc0, + 0xa7, 0x69, 0x0e, 0x95, 0x99, 0x0b, 0xa2, 0x6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, 0x41, + 0x50, 0x20, 0x14, 0x18, 0x21, 0x5e, 0x2a, 0x6f, 0x70, 0x21, + 0xd6, 0x97, 0x13, 0xb9, 0xc1, 0x9e, 0x90, 0x67, 0xcc, 0x55, + 0x8a, 0xec, 0xec, 0x0a, 0x1e, 0x90, 0xdc, 0x3f, 0xb0, 0x4d, + 0xd1, 0x18, 0xea, 0x4f, 0xcb, 0x5d, 0x15, 0x4c, 0xb8, 0x35, + 0x9b, 0x34, 0x24, 0x30, 0x06, 0x53, 0x17, 0xf0, 0xbe, 0x27, + 0x36, 0xb3, 0x04, 0x6a, 0xbd, 0xbf, 0xa7, 0x39, 0xee, 0xa9, + 0x8f, 0x0e, 0x98, 0xc5, 0xf5, 0x9f, 0x46, 0x25, 0x93, 0xc9, + 0xf2, 0xf6, 0x2b, 0x8e, 0x92, 0x06, 0x01, 0x3d, 0x81, 0x18, + 0xf2, 0xec, 0xf1, 0x05, 0x4c, 0xad, 0x4b, 0xcb, 0x98, 0xa4, + 0xb5, 0x61, 0x20, 0xda, 0x81, 0xa1, 0xfb, 0x92, 0x4c, 0xaf, + 0x87, 0x6f, 0x6e, 0xd2, 0x57, 0xec, 0xcd, 0x94, 0xb3, 0x79, + 0xbf, 0x59, 0x88, 0x17, 0x81, 0xce, 0x8a, 0x57, 0xce, 0x57, + 0xae, 0x3e, 0x82, 0x81, 0x2f, 0x83, 0x61, 0xd8, 0xf9, 0x68, + 0x21, 0xe7, 0x72, 0x5b, 0xd6, 0x80, 0x55, 0x68, 0x5d, 0x67, + 0x15, 0x0c, 0x8b, 0xdc, 0x4f, 0xc3, 0x89, 0x36, 0x3c, 0xac, + 0xaf, 0x16, 0x5e, 0x1c, 0xfa, 0x68, 0x74, 0x6a, 0xab, 0x68, + 0xd8, 0x59, 0x96, 0x2d, 0x33, 0x62, 0xe4, 0xbd, 0xb3, 0xb7, + 0x4d, 0x88, 0x35, 0xb8, 0xed, 0xb2, 0x16, 0x85, 0x97, 0x08, + 0x71, 0x71, 0x39, 0x7e, 0x0c, 0x53, 0x16, 0xda, 0x38, 0xe5, + 0x28, 0x09, 0x9c, 0xd9, 0x46, 0xec, 0x68, 0xda, 0x8d, 0xd0, + 0xad, 0xb2, 0x79, 0x28, 0x3b, 0x1e, 0x12, 0xc9, 0xdf, 0xa9, + 0x6d, 0x3d, 0x29, 0x99, 0x2f, 0x53, 0xc2, 0xd0, 0xf9, 0x88, + 0x26, 0x94, 0x47, 0xaf, 0xf6, 0x96, 0xf3, 0xe1, 0x11, 0xa6, + 0x82, 0x3d, 0x43, 0x3f, 0x1f, 0xbc, 0xf6, 0x98, 0xbe, 0xff, + 0x06, 0x86, 0x61, 0x27, 0xdc, 0x91, 0x54, 0xd4, 0xfc, 0x68, + 0x83, 0xe8, 0x35, 0x3e, 0xee, 0x94, 0x59, 0x28, 0x2f, 0xde, + 0xdd, 0x03, 0x60, 0x66, 0xc1, 0x49, 0x57, 0xdd, 0xbc, 0xd5, + 0x0a, 0x67, 0x34, 0xf1, 0xa6, 0x0a, 0x57, 0x94, 0x65, 0x02, + 0x2c, 0x52, 0x43, 0x70, 0x3b, 0xc1, 0x9a, 0xff, 0xda, 0x6f, + 0xb9, 0x54, 0x47, 0x01, 0xda, 0x27, 0xe4, 0x48, 0x4a, 0x90, + 0x9f, 0xb5, 0xc3, 0xee, 0x0e, 0x09, 0x57, 0xfe, 0x48, 0x51, + 0x08, 0x34, 0x5e, 0x8f, 0x16, 0xc9, 0x0b, 0x74, 0xd9, 0x7d, + 0x22, 0x3f, 0xd6, 0xb7, 0x5d, 0xd6, 0x76, 0x00, 0x8d, 0x4e, + 0x78, 0x73, 0x86, 0xd6, 0xdb, 0x2a, 0x65, 0xab, 0xdf, 0xb0, + 0xea, 0x11, 0xad, 0xdf, 0xba, 0x43, 0xdb, 0xa8, 0x0a, 0xfb, + 0x04, 0x38, 0x81, 0x2b, 0xa3, 0x29, 0xfc, 0x95, 0x73, 0x9a, + 0x0c, 0x6c, 0x9e, 0xcd, 0xdc, 0x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0x63, 0xca, 0x2e, + 0x90, 0x03, 0x32, 0xec, 0x63, 0xdb, 0x52, 0x7b, 0x16, 0xfc, + 0x01, 0x2d, 0x30, 0x12, 0x1e, 0xf9, 0xa3, 0x72, 0x21, 0x3c, + 0x75, 0x0c, 0x61, 0x9c, 0x7e, 0x73, 0x04, 0x71, 0x41, 0x45, + 0x5d, 0x7f, 0x49, 0x1c, 0x09, 0x08, 0xa4, 0xec, 0x2f, 0xfd, + 0xc4, 0xfb, 0x59, 0x6a, 0x27, 0x7a, 0xd4, 0xfc, 0x5f, 0x20, + 0x04, 0x34, 0x7d, 0x08, 0xed, 0x82, 0x5a, 0x90, 0xe1, 0xab, + 0xfd, 0x35, 0x3a, 0x8d, 0xbb, 0x0a, 0x9d, 0x73, 0xff, 0x69, + 0xe5, 0xe9, 0x09, 0x55, 0x14, 0xd9, 0x7b, 0x6f, 0x0d, 0x99, + 0xd2, 0x7e, 0x71, 0xf8, 0x4f, 0x72, 0x2f, 0xbb, 0xc6, 0xc4, + 0x36, 0xc9, 0x01, 0xd3, 0x9b, 0x94, 0xab, 0x41, 0x0f, 0x4a, + 0x61, 0x5c, 0x68, 0xe5, 0xd7, 0x0d, 0x94, 0xaa, 0xee, 0xba, + 0x95, 0xcb, 0x8c, 0x0e, 0x85, 0x3a, 0x02, 0x6b, 0x95, 0x50, + 0xfd, 0x02, 0xfd, 0xa4, 0x58, 0x29, 0x78, 0x4f, 0xd0, 0xae, + 0x66, 0xd6, 0x5c, 0xe7, 0x45, 0xfe, 0x98, 0xb0, 0xa3, 0xe2, + 0x87, 0xc0, 0xd2, 0x81, 0x08, 0xf1, 0xf1, 0xe7, 0xda, 0x62, + 0x9e, 0xa0, 0x34, 0x86, 0xeb, 0xa1, 0x6e, 0x4a, 0x26, 0x8e, + 0x39, 0x0c, 0x51, 0x10, 0x33, 0x11, 0x87, 0xf8, 0x79, 0x3c, + 0x49, 0x7a, 0x8b, 0xce, 0xc1, 0x0a, 0x0e, 0xe1, 0xd5,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0xa9, 0xce, 0x3f, 0x3d, 0x41, 0x3b, 0x28, 0x45, 0xa3, 0xb3, + 0x21, 0xc2, 0xcd, 0x14, 0x49, 0x41, 0x6c, 0x38, 0xda, 0x1b, + 0x5f, 0x16, 0x49, 0xf9, 0x65, 0x00, 0x4e, 0xb4, 0x20, 0x55, + 0x70, 0xe8, 0x58, 0x1a, 0x18, 0xbf, 0x41, 0xef, 0x31, 0xb1, + 0xe7, 0x8d, 0x89, 0xc1, 0x48, 0xe8, 0xf5, 0x57, 0x35, 0xfa, + 0xc1, 0x79, 0xee, 0x2c, 0xe8, 0x7d, 0xb6, 0x03, 0xcc, 0x66, + 0x09, 0x6f, 0x52, 0x84, 0x0a, 0x34, 0x18, 0x2c, 0x01, 0x45, + 0x81, 0x00, 0xe5, 0x5e, 0x8d, 0xae, 0x1c, 0x96, 0x8b, 0x45, + 0x73, 0x00, 0x0a, 0xb5, 0xcf, 0x8d, 0x0e, 0x35, 0x5d, 0x1a, + 0x0e, 0xbf, 0x64, 0x9a, 0x52, 0x20, 0x48, 0xc6, 0xb9, 0x40, + 0xd3, 0x2c, 0x52, 0xca, 0x93, 0xcf, 0xbb, 0x94, 0x06, 0xf3, + 0x97, 0xee, 0xcc, 0x5d, 0xa3, 0xea, 0xf8, 0x5a, 0x39, 0x77, + 0x34, 0xd7, 0xf6, 0x4e, 0xbe, 0x8a, 0x07, 0x5f, 0x51, 0x53, + 0xc5, 0x1b, 0x8c, 0x47, 0x8f, 0x34, 0x0e, 0x60, 0x0a, 0x90, + 0xe2, 0xda, 0x7b, 0xef, 0xd6, 0xf5, 0x5d, 0xe5, 0x32, 0x37, + 0x75, 0x99, 0x81, 0x4a, 0x2a, 0x78, 0x71, 0xdc, 0xf4, 0xe5, + 0xca, 0xd8, 0x6b, 0x3b, 0x90, 0x68, 0x2e, 0x93, 0xc5, 0x10, + 0x42, 0x5d, 0x38, 0x90, 0x32, 0x46, 0xea, 0x87, 0xe0, 0xbc, + 0xb8, 0x9a, 0x18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, 0x6e, 0x19, 0x8d, 0x95, + 0x0a, 0x93, + }; + WOLFSSL_SMALL_STACK_STATIC const byte ml_dsa_87_sig[] = { + 0x78, 0xed, 0x1a, 0x3f, 0x41, 0xab, 0xf8, 0x93, 0x80, 0xf0, + 0xc6, 0xbf, 0x4a, 0xde, 0xaf, 0x29, 0x93, 0xe5, 0x9a, 0xbf, + 0x38, 0x08, 0x18, 0x33, 0xca, 0x7d, 0x5e, 0x65, 0xa4, 0xd2, + 0xd7, 0x45, 0xe3, 0xe7, 0x58, 0xfb, 0x05, 0xab, 0x65, 0x57, + 0xac, 0x6f, 0xf5, 0x43, 0x28, 0x5f, 0x9c, 0x9a, 0x3e, 0x35, + 0x84, 0xe4, 0xef, 0xa5, 0x57, 0x17, 0xad, 0x51, 0x44, 0x70, + 0x09, 0x00, 0x81, 0xbe, 0xfe, 0x14, 0x01, 0xfe, 0x0c, 0x94, + 0xbe, 0xa9, 0x89, 0xfd, 0x47, 0xfc, 0xb9, 0xd8, 0x17, 0x4d, + 0xd8, 0x73, 0xd5, 0x50, 0x9f, 0x13, 0x6c, 0x07, 0x71, 0x47, + 0xaa, 0x3c, 0xc0, 0x64, 0x00, 0x19, 0x2e, 0x74, 0x51, 0x0e, + 0x0f, 0x25, 0x30, 0x7f, 0x13, 0x96, 0xc6, 0xc5, 0xbf, 0xd4, + 0x82, 0xd3, 0x0d, 0xd3, 0x65, 0x4c, 0x72, 0x67, 0xe2, 0x37, + 0x6b, 0x3c, 0x8e, 0xa3, 0x36, 0x84, 0xe9, 0xaa, 0xac, 0x7d, + 0xf3, 0xac, 0xfc, 0x01, 0x50, 0x87, 0x88, 0xf6, 0xbf, 0x84, + 0xc3, 0xa0, 0x23, 0xe4, 0xe8, 0x01, 0x38, 0x39, 0x30, 0x8a, + 0xf3, 0xba, 0x92, 0x62, 0x37, 0xd7, 0x20, 0xd7, 0xf7, 0x41, + 0xff, 0xae, 0x81, 0x02, 0x29, 0x2a, 0x66, 0x8b, 0x20, 0xb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, + 0x80, 0xf7, 0xf6, 0xa2, 0xf5, 0x04, 0x82, 0xea, 0xb6, 0xb1, + 0xa3, 0xfe, 0xa2, 0x2d, 0x83, 0xc7, 0x01, 0x4b, 0x27, 0x19, + 0x6a, 0x31, 0x04, 0x70, 0xce, 0x75, 0x22, 0x4b, 0x7a, 0x21, + 0x29, 0xfd, 0xe9, 0xcb, 0xbb, 0xca, 0x95, 0x0a, 0xd8, 0xcd, + 0x20, 0x2a, 0xb7, 0xbe, 0xdf, 0x2f, 0x0f, 0xfa, 0xf1, 0xc0, + 0x39, 0xf3, 0x74, 0x22, 0x05, 0x33, 0xca, 0x2a, 0x9c, 0x9f, + 0x06, 0x71, 0x90, 0x1e, 0x74, 0x4b, 0xbe, 0x9a, 0xc7, 0x1e, + 0x37, 0x9b, 0x96, 0x19, 0xfd, 0xa0, 0x61, 0x87, 0x93, 0xab, + 0x75, 0x79, 0xac, 0x2f, 0x83, 0xe1, 0x8c, 0x70, 0x54, 0x70, + 0x01, 0x93, 0xce, 0x76, 0x7a, 0x08, 0xe7, 0x75, 0xfb, 0x5e, + 0xa4, 0xcc, 0xd6, 0xeb, 0x90, 0xe2, 0x57, 0x07, 0x53, 0x88, + 0x8f, 0x7f, 0x29, 0x39, 0x80, 0xc4, 0x7f, 0x70, 0x6f, 0xff, + 0x44, 0x25, 0x2b, 0x9e, 0xa1, 0xbb, 0xda, 0x43, 0x53, 0x14, + 0xf8, 0x97, 0x08, 0xa4, 0xaf, 0xa0, 0xa5, 0x0c, 0xfa, 0xcc, + 0xba, 0xcd, 0x4f, 0xd3, 0x90, 0x28, 0x02, 0x25, 0xbe, 0xc6, + 0x35, 0x66, 0x99, 0xb0, 0x69, 0x46, 0xe5, 0xbf, 0x7e, 0x4f, + 0x53, 0x11, 0x1f, 0xa5, 0x2c, 0x9b, 0xd1, 0x70, 0x90, 0x34, + 0x66, 0xaa, 0x9f, 0xa8, 0x02, 0x3a, 0x05, 0x2b, 0x0a, 0xd0, + 0x72, 0x5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, 0x17, 0x06, 0xea, 0xcc, 0x98, 0xa8, 0xdf, 0x81, + 0xe1, 0x80, 0xb7, 0xad, 0x69, 0xcb, 0x8f, 0x81, 0x1e, 0x76, + 0x75, 0x3c, 0x11, 0x9b, 0x38, 0x95, 0xa7, 0x87, 0x1f, 0xd9, + 0x76, 0x82, 0x21, 0x13, 0x25, 0x20, 0x42, 0xd3, 0x8c, 0xd9, + 0x1c, 0x64, 0xed, 0xe9, 0x55, 0xb5, 0x29, 0x98, 0x85, 0x7c, + 0x01, 0x94, 0xaa, 0xdd, 0x8c, 0x78, 0x08, 0x99, 0x99, 0x5a, + 0xf6, 0x61, 0x4c, 0xe0, 0x99, 0xf8, 0x15, 0x74, 0x2e, 0x0d, + 0x14, 0x89, 0x11, 0x84, 0xcd, 0x78, 0x0c, 0x6b, 0x48, 0xde, + 0xb4, 0xd6, 0x05, 0xbd, 0x99, 0x58, 0xb7, 0xe5, 0xc5, 0x7a, + 0x43, 0x18, 0x55, 0x33, 0x16, 0x2b, 0xfa, 0x27, 0xf5, 0xbb, + 0xaa, 0x52, 0xb5, 0x28, 0x5c, 0xfe, 0x61, 0x7f, 0x7a, 0x70, + 0xc2, 0x32, 0x4b, 0x05, 0x8d, 0x7b, 0x4d, 0x22, 0x57, 0x25, + 0x40, 0x46, 0x7c, 0xad, 0x2f, 0x8a, 0xc8, 0x16, 0xd6, 0xac, + 0x4e, 0xe3, 0xe3, 0x29, 0xe4, 0xe8, 0x00, 0x2b, 0xc9, 0xe3, + 0x3a, 0x6f, 0x66, 0xf1, 0x37, 0x37, 0x52, 0x88, 0x77, 0xf6, + 0xbd, 0x59, 0x5f, 0xf8, 0x11, 0x46, 0x7b, 0x12, 0x88, 0x2f, + 0x4b, 0x0d, 0x16, 0x89, 0x3e, 0x2a, 0x56, 0x58, 0xa8, 0x1c, + 0xee, 0x23, 0xd5, 0x66, 0x86, 0x5f, 0x59, 0x55, 0xac, 0x07, + 0xfd, 0xda, 0x6b, 0xf1, 0xc7, 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0x87, 0x3c, 0xc1, 0xf6, + 0x93, 0x37, 0xe2, 0x3b, 0x70, 0xc4, 0xd8, 0x10, 0x0e, 0x44, + 0x37, 0x00, 0xe3, 0x07, 0xbd, 0x67, 0xd3, 0x9d, 0xe6, 0xe7, + 0x48, 0x1b, 0xe0, 0x79, 0xb3, 0x30, 0x91, 0x89, 0x0f, 0x89, + 0x77, 0xfa, 0x13, 0x85, 0xd0, 0x32, 0xbd, 0xc1, 0x9e, 0x52, + 0x04, 0x80, 0x54, 0xb1, 0x08, 0x39, 0x20, 0xda, 0x3e, 0xf1, + 0xd9, 0x15, 0x74, 0x55, 0x06, 0xfc, 0x4d, 0x85, 0xd4, 0x98, + 0x02, 0x64, 0x10, 0x86, 0xd7, 0xcd, 0x01, 0x0d, 0x85, 0xa0, + 0x78, 0xb0, 0x58, 0x99, 0x7b, 0xdf, 0xe4, 0x8c, 0x3f, 0xab, + 0xc0, 0xbc, 0xa5, 0x30, 0x28, 0xe1, 0x4e, 0x02, 0x98, 0xab, + 0x03, 0xf3, 0x21, 0xe7, 0xa7, 0xe7, 0xc3, 0x5f, 0x98, 0xc0, + 0x83, 0x02, 0xe8, 0x8a, 0x30, 0x75, 0x95, 0xcf, 0x77, 0x83, + 0xfb, 0x32, 0x5a, 0xf9, 0x13, 0xed, 0xdb, 0xda, 0xc3, 0x84, + 0x4b, 0x8f, 0x1a, 0xf0, 0xad, 0x8e, 0xcf, 0xe3, 0xa7, 0x2b, + 0xb5, 0x44, 0x75, 0xd6, 0xda, 0x33, 0x81, 0x22, 0xa7, 0x6a, + 0xbd, 0x21, 0x64, 0x85, 0xfa, 0x65, 0x8e, 0xc4, 0x58, 0xec, + 0xc4, 0x18, 0x90, 0xa3, 0xcc, 0x2e, 0xaa, 0xa2, 0x2e, 0x46, + 0x7a, 0x4a, 0x35, 0xbf, 0x58, 0x78, 0x2b, 0x1e, 0x72, 0xe5, + 0x80, 0xc9, 0xe0, 0x9e, 0x43, 0x01, 0xcc, 0xe1, 0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 0x47, 0xd9, 0xd6, + 0xac, 0xdc, 0x3f, 0x16, 0xb1, 0x58, 0x11, 0x9f, 0x67, 0xd7, + 0x15, 0x45, 0xd8, 0xc3, 0x69, 0x24, 0x8d, 0xac, 0xff, 0xc3, + 0x43, 0xfd, 0x24, 0xaf, 0xf1, 0xc8, 0x3a, 0xc7, 0xd6, 0x1f, + 0x56, 0x26, 0x16, 0xe6, 0x30, 0xcd, 0x6e, 0x0a, 0x63, 0x2a, + 0x7b, 0x86, 0xd7, 0x65, 0x39, 0x45, 0x7c, 0xe6, 0xa0, 0xe6, + 0x38, 0xed, 0x54, 0x84, 0x00, 0x4d, 0x8e, 0xc2, 0xba, 0x56, + 0x9b, 0xf3, 0xe1, 0xe8, 0x7d, 0xfe, 0x47, 0xf0, 0x58, 0xe7, + 0x59, 0x60, 0x97, 0x2e, 0x57, 0x1a, 0x09, 0x1f, 0x8b, 0x2b, + 0x0b, 0x47, 0x75, 0xc0, 0xb3, 0x79, 0xce, 0x10, 0x47, 0x6d, + 0xfc, 0xcb, 0x22, 0x61, 0x5c, 0x39, 0xc4, 0x3f, 0xc5, 0xef, + 0xb8, 0xc8, 0x88, 0x52, 0xce, 0x90, 0x17, 0xf5, 0x3c, 0xa9, + 0x87, 0x6f, 0xcb, 0x2f, 0x11, 0x53, 0x65, 0x9b, 0x74, 0x21, + 0x3e, 0xdd, 0x7b, 0x1f, 0x19, 0x9f, 0x53, 0xe6, 0xab, 0xc0, + 0x56, 0xba, 0x80, 0x19, 0x5d, 0x3f, 0xc7, 0xe2, 0xfb, 0x8c, + 0xe2, 0x93, 0xe0, 0x31, 0xc9, 0x33, 0x31, 0x23, 0x31, 0xa1, + 0x36, 0x4c, 0x62, 0xd8, 0x0a, 0xfd, 0x85, 0x97, 0xae, 0xa9, + 0xe9, 0x58, 0x29, 0x17, 0x33, 0x09, 0x5a, 0x8e, 0xa3, 0x90, + 0x41, 0xd3, 0xfc, 0x24, 0x98, 0x61, 0x4d, 0x30, 0x1f, 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, 0xb2, 0xd7, 0x0f, 0x90, 0xf5, 0x2c, 0x5b, 0xf5, + 0xfd, 0x39, 0x17, 0xf7, 0xe4, 0x69, 0x81, 0x0f, 0x6b, 0xe7, + 0x32, 0xd2, 0xdc, 0x5d, 0x40, 0xbf, 0x41, 0x95, 0x89, 0x81, + 0x29, 0x80, 0x40, 0xa3, 0xac, 0xd2, 0xc7, 0xf7, 0xe8, 0xd0, + 0x45, 0xed, 0x48, 0x43, 0x3a, 0xed, 0x8d, 0xef, 0x37, 0xe1, + 0x24, 0x9a, 0x67, 0x9a, 0x6b, 0x71, 0x4f, 0x9a, 0xb9, 0x2c, + 0x1b, 0x10, 0x48, 0xe2, 0x31, 0x1e, 0xbb, 0xf2, 0x4a, 0xad, + 0x04, 0xc7, 0xd7, 0xf2, 0xe8, 0x83, 0x5f, 0xe8, 0xa2, 0x81, + 0x95, 0xf9, 0x60, 0x51, 0x9c, 0x99, 0x76, 0x69, 0x76, 0x4e, + 0xbd, 0x44, 0x52, 0x36, 0xca, 0xd8, 0x6e, 0xf7, 0x1a, 0xa1, + 0x54, 0xdf, 0x90, 0x52, 0x94, 0xb6, 0x3a, 0xcb, 0x43, 0x56, + 0x11, 0xde, 0xa0, 0xe1, 0x45, 0x8a, 0x80, 0x2d, 0xaf, 0x1f, + 0x24, 0x3f, 0x80, 0x17, 0x1f, 0x28, 0xbb, 0xcc, 0x1a, 0xd2, + 0x2d, 0xa6, 0x9e, 0xe0, 0xdc, 0xf0, 0x98, 0x16, 0x58, 0x88, + 0xc6, 0xf1, 0x81, 0x71, 0x91, 0x8f, 0xa2, 0xab, 0xa5, 0xe6, + 0x68, 0x1f, 0xa5, 0x86, 0xb5, 0xd9, 0x05, 0xba, 0x50, 0x67, + 0x0b, 0x1e, 0xfe, 0x42, 0x50, 0xf8, 0x01, 0xf8, 0x38, 0x92, + 0x57, 0x86, 0x08, 0x47, 0xee, 0x23, 0x11, 0x60, 0x61, 0x1a, + 0x77, 0x3c, 0x1a, 0x8e, 0x08, 0xe3, 0xaf, 0x84, 0x04, 0x75, + 0x15, 0x47, 0x7a, 0x83, 0x8e, 0x92, 0x3e, 0xe8, 0xf0, 0xc2, + 0x81, 0x89, 0x3b, 0x73, 0x81, 0xe5, 0xe8, 0x97, 0x97, 0x63, + 0x64, 0xf3, 0xa9, 0x1b, 0x61, 0x65, 0x7f, 0x0e, 0x47, 0x6b, + 0x14, 0x57, 0x29, 0x8f, 0x91, 0x35, 0x43, 0x10, 0x12, 0x86, + 0x99, 0xec, 0xc8, 0x9e, 0x67, 0x90, 0x20, 0x21, 0x3c, 0x83, + 0xdb, 0x73, 0x4e, 0x8e, 0x7d, 0x86, 0xde, 0xb8, 0xd8, 0xfa, + 0x23, 0x1f, 0x5a, 0xe4, 0xc7, 0x0c, 0x1d, 0x5e, 0xd1, 0x10, + 0x58, 0xd5, 0x86, 0xfa, 0x40, 0x30, 0x0a, 0x78, 0x0a, 0xa5, + 0x56, 0xd5, 0xe6, 0x86, 0xd4, 0x14, 0x77, 0x32, 0xcd, 0x07, + 0xf9, 0xbe, 0x7a, 0xd8, 0xbc, 0x91, 0xe0, 0xda, 0x76, 0x6b, + 0x97, 0x10, 0xda, 0xea, 0x27, 0xa2, 0x67, 0x6d, 0x94, 0x27, + 0x6e, 0xea, 0xca, 0x56, 0x45, 0x32, 0x1d, 0x38, 0x12, 0x21, + 0x33, 0x2c, 0x3c, 0x5c, 0x33, 0xb0, 0x9e, 0x80, 0x0b, 0x4e, + 0xbb, 0x09, 0x5e, 0x56, 0x54, 0xb0, 0x9b, 0x7e, 0xb6, 0x00, + 0xe8, 0x63, 0x19, 0x85, 0xf1, 0x4d, 0x65, 0x9d, 0x1f, 0x8d, + 0x18, 0xcc, 0x63, 0xc6, 0xd9, 0xa6, 0xbc, 0xe7, 0x42, 0x55, + 0x12, 0xdc, 0x8c, 0x26, 0x2d, 0x8d, 0xc2, 0xe9, 0x3b, 0xbc, + 0xed, 0x06, 0x08, 0x31, 0xb0, 0xe0, 0x99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0x59, 0x49, 0x31, + 0xda, 0xc1, 0x08, 0x46, 0x65, 0x68, 0xe9, 0x44, 0x18, 0x2b, + 0xf2, 0x2a, 0x13, 0x60, 0x07, 0xae, 0xe4, 0x96, 0xdb, 0x0a, + 0x6f, 0x52, 0x23, 0x9a, 0xcf, 0x9d, 0xa4, 0xc5, 0xc1, 0x74, + 0xa8, 0x0e, 0xe1, 0x5e, 0xfa, 0xa4, 0x06, 0x9c, 0x2e, 0x70, + 0x08, 0x22, 0x25, 0x4f, 0xc1, 0xf1, 0x13, 0x5a, 0x66, 0xa0, + 0x6c, 0x59, 0xa3, 0xfc, 0x03, 0x9c, 0x8a, 0x23, 0x01, 0x00, + 0xa9, 0x49, 0xf0, 0x22, 0xa3, 0x8f, 0x6c, 0xef, 0xcb, 0x69, + 0x06, 0x3a, 0x69, 0x99, 0x96, 0xd2, 0xa7, 0xa0, 0x0b, 0x7e, + 0x44, 0x7d, 0x04, 0xff, 0x7e, 0x9e, 0x1e, 0x77, 0xa0, 0x30, + 0xd1, 0xdf, 0x18, 0xe4, 0xd8, 0xa5, 0x64, 0xbe, 0x8c, 0x80, + 0x28, 0xe2, 0x98, 0x5e, 0xec, 0x9e, 0xb1, 0x0a, 0xb5, 0x25, + 0xaa, 0xb8, 0x0f, 0x78, 0x30, 0x48, 0x06, 0xe5, 0x76, 0xf9, + 0x24, 0x96, 0x87, 0x2a, 0x91, 0x89, 0xb6, 0xce, 0x04, 0xdf, + 0xfc, 0x13, 0x42, 0x19, 0xba, 0x14, 0x46, 0x20, 0x08, 0x47, + 0xe1, 0x82, 0x57, 0x51, 0x74, 0x3b, 0x5b, 0x23, 0x5c, 0xb2, + 0x85, 0x8c, 0xed, 0xe6, 0xda, 0x4d, 0x56, 0xe8, 0x61, 0x31, + 0xec, 0x97, 0x27, 0xeb, 0xf2, 0xa7, 0x7c, 0x13, 0x1b, 0xc5, + 0x44, 0xfe, 0x63, 0x4b, 0x2b, 0x33, 0x22, 0x23, 0x60, 0x86, + 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e, 0x4b, 0x2e, 0x18, 0x29, 0x0e, 0xe0, 0xf5, 0x72, + 0x1a, 0x21, 0x37, 0xef, 0x7d, 0x6a, 0x39, 0xe9, 0xa8, 0xd7, + 0x96, 0xd6, 0xb3, 0x7d, 0x83, 0x0c, 0x13, 0x30, 0x49, 0x03, + 0xe8, 0x6b, 0xe6, 0x77, 0xe8, 0x69, 0x48, 0x56, 0x5f, 0x39, + 0x63, 0xbc, 0x86, 0xa8, 0x26, 0xa1, 0xbd, 0x4b, 0x24, 0xbd, + 0xdd, 0xe8, 0x02, 0x64, 0xcb, 0xae, 0x24, 0x17, 0x62, 0xbd, + 0x27, 0xa7, 0x22, 0x60, 0x51, 0x0c, 0x53, 0xff, 0x9d, 0x63, + 0x1b, 0xf9, 0xff, 0x76, 0x3b, 0x74, 0x05, 0x98, 0x46, 0x0b, + 0xe8, 0xcb, 0xd4, 0x0a, 0xcd, 0x91, 0xdb, 0x5b, 0x21, 0x4d, + 0xa1, 0x87, 0xbd, 0xb7, 0x58, 0xec, 0x28, 0x00, 0x92, 0xc2, + 0x98, 0xe4, 0x8c, 0x1f, 0x9d, 0xa4, 0x80, 0x83, 0x40, 0xb9, + 0x63, 0xfe, 0xc9, 0x18, 0x3f, 0xd6, 0xab, 0x34, 0x00, 0x2c, + 0x53, 0x40, 0x38, 0x0e, 0xb1, 0x69, 0xa8, 0xb8, 0xa9, 0x2e, + 0x9b, 0x7b, 0x89, 0x8d, 0xff, 0x86, 0x01, 0x51, 0x42, 0xde, + 0x04, 0xd6, 0x1d, 0xd1, 0x29, 0x8d, 0x42, 0x46, 0x5f, 0xd6, + 0x02, 0xde, 0x73, 0xee, 0x2d, 0xe9, 0x6e, 0xb0, 0x3f, 0xf0, + 0x47, 0x72, 0xfe, 0x45, 0xff, 0x05, 0x82, 0x2d, 0xc6, 0x4f, + 0xc9, 0xd3, 0xec, 0xf9, 0x5a, 0x22, 0x50, 0x6c, 0x4f, 0x1e, + 0xc8, 0x5f, 0xfc, 0x2c, 0x04, 0x4f, 0xdf, 0xce, 0xe4, 0x18, + 0xd2, 0xd7, 0x8b, 0x67, 0x83, 0x39, 0x96, 0x47, 0x5e, 0x5b, + 0xad, 0x7f, 0x5d, 0x42, 0x56, 0x97, 0x71, 0x39, 0x28, 0x44, + 0x9d, 0x35, 0xde, 0xde, 0x03, 0x20, 0x34, 0x44, 0xdb, 0xdf, + 0xfc, 0xff, 0x1e, 0x3d, 0x58, 0x5f, 0x7a, 0x8e, 0x90, 0xa1, + 0xd3, 0xeb, 0x0c, 0x23, 0x3f, 0x4e, 0x61, 0x77, 0x79, 0xb2, + 0xdc, 0xfb, 0x21, 0x46, 0x5c, 0x82, 0xb6, 0xf6, 0x34, 0x3c, + 0x3f, 0x45, 0x4b, 0x80, 0x9e, 0xa4, 0xe6, 0x02, 0x13, 0x38, + 0x40, 0x7e, 0x87, 0x92, 0x96, 0x51, 0x63, 0x87, 0xae, 0xc8, + 0x02, 0x6a, 0x70, 0xc8, 0xcd, 0xd0, 0xe2, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, + 0x12, 0x1c, 0x22, 0x2b, 0x33, 0x38, 0x3f, + }; + + return dilithium_param_vfy_test(WC_ML_DSA_87, ml_dsa_87_pub_key, + (word32)sizeof(ml_dsa_87_pub_key), ml_dsa_87_sig, + (word32)sizeof(ml_dsa_87_sig)); +} +#endif +#endif + +#ifndef WOLFSSL_DILITHIUM_NO_MAKE_KEY +static wc_test_ret_t dilithium_param_test(int param, WC_RNG* rng) +{ + wc_test_ret_t ret; + dilithium_key* key; +#ifndef WOLFSSL_DILITHIUM_NO_SIGN + word32 sigLen; + byte* sig = NULL; + byte msg[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 }; +#ifndef WOLFSSL_DILITHIUM_NO_VERIFY + int res = 0; +#endif +#endif + + key = (dilithium_key*)XMALLOC(sizeof(*key), HEAP_HINT, + DYNAMIC_TYPE_TMP_BUFFER); + if (key == NULL) { + ERROR_OUT(WC_TEST_RET_ENC_ERRNO, out); + } + sig = (byte*)XMALLOC(DILITHIUM_MAX_SIG_SIZE, HEAP_HINT, + DYNAMIC_TYPE_TMP_BUFFER); + if (sig == NULL) { + ERROR_OUT(WC_TEST_RET_ENC_ERRNO, out); + } + + ret = wc_dilithium_init(key); + if (ret != 0) { + ret = WC_TEST_RET_ENC_EC(ret); + return ret; + } + + ret = wc_dilithium_set_level(key, param); + if (ret != 0) + ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out); + + ret = wc_dilithium_make_key(key, rng); + if (ret != 0) + ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out); + +#ifndef WOLFSSL_DILITHIUM_NO_SIGN + sigLen = wc_dilithium_sig_size(key); + if (sigLen <= 0) + ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out); + + ret = wc_dilithium_sign_msg(msg, (word32)sizeof(msg), sig, &sigLen, key, + rng); + if (ret != 0) + ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out); + +#ifndef WOLFSSL_DILITHIUM_NO_VERIFY + ret = wc_dilithium_verify_msg(sig, sigLen, msg, (word32)sizeof(msg), &res, + key); + if (ret != 0) + ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out); + if (res != 1) + ERROR_OUT(WC_TEST_RET_ENC_EC(res), out); +#endif +#endif + +out: + wc_dilithium_free(key); + XFREE(sig, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER); + XFREE(key, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER); + return ret; +} +#endif + +WOLFSSL_TEST_SUBROUTINE wc_test_ret_t dilithium_test(void) +{ + wc_test_ret_t ret; + WC_RNG rng; + +#ifndef HAVE_FIPS + ret = wc_InitRng_ex(&rng, HEAP_HINT, INVALID_DEVID); +#else + ret = wc_InitRng(&rng); +#endif + if (ret != 0) { + ret = WC_TEST_RET_ENC_EC(ret); + return ret; + } + +#ifndef WOLFSSL_NO_ML_DSA_44 +#ifndef WOLFSSL_DILITHIUM_NO_VERIFY + ret = dilithium_param_44_vfy_test(); + if (ret != 0) + ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out); +#endif +#ifndef WOLFSSL_DILITHIUM_NO_MAKE_KEY + ret = dilithium_param_test(WC_ML_DSA_44, &rng); + if (ret != 0) + ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out); +#endif +#endif +#ifndef WOLFSSL_NO_ML_DSA_65 +#ifndef WOLFSSL_DILITHIUM_NO_VERIFY + ret = dilithium_param_65_vfy_test(); + if (ret != 0) + ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out); +#endif +#ifndef WOLFSSL_DILITHIUM_NO_MAKE_KEY + ret = dilithium_param_test(WC_ML_DSA_65, &rng); + if (ret != 0) + ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out); +#endif +#endif +#ifndef WOLFSSL_NO_ML_DSA_87 +#ifndef WOLFSSL_DILITHIUM_NO_VERIFY + ret = dilithium_param_87_vfy_test(); + if (ret != 0) + ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out); +#endif +#ifndef WOLFSSL_DILITHIUM_NO_MAKE_KEY + ret = dilithium_param_test(WC_ML_DSA_87, &rng); + if (ret != 0) + ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out); +#endif +#endif + +#if !defined(WOLFSSL_DILITHIUM_NO_MAKE_KEY) || \ + !defined(WOLFSSL_DILITHIUM_NO_VERIFY) +out: +#endif + wc_FreeRng(&rng); + return ret; +} +#endif /* HAVE_DILITHIUM */ + #if defined(WOLFSSL_HAVE_XMSS) && !defined(WOLFSSL_XMSS_VERIFY_ONLY) static enum wc_XmssRc xmss_write_key_mem(const byte * priv, word32 privSz, void *context) diff --git a/wolfssl/certs_test.h b/wolfssl/certs_test.h index 09ed4b1230..013b37494e 100644 --- a/wolfssl/certs_test.h +++ b/wolfssl/certs_test.h @@ -3451,7 +3451,7 @@ static const int sizeof_dh_key_der_4096 = sizeof(dh_key_der_4096); #endif /* USE_CERT_BUFFERS_4096 */ -#if defined(HAVE_PQC) && defined(HAVE_FALCON) +#if defined(HAVE_FALCON) /* certs/falcon/bench_falcon_level1_key.der */ static const unsigned char bench_falcon_level1_key[] = @@ -4099,1767 +4099,1802 @@ static const unsigned char bench_falcon_level5_key[] = }; static const int sizeof_bench_falcon_level5_key = sizeof(bench_falcon_level5_key); -#endif /* HAVE_PQC && HAVE_FALCON */ +#endif /* HAVE_FALCON */ -#if defined (HAVE_PQC) && defined(HAVE_DILITHIUM) +#if defined(HAVE_DILITHIUM) -/* certs/dilithium/bench_dilithium_level2_key.der */ -static const unsigned char bench_dilithium_level2_key[] = -{ - 0x30, 0x82, 0x0F, 0x1A, 0x02, 0x01, 0x00, 0x30, 0x0D, 0x06, - 0x0B, 0x2B, 0x06, 0x01, 0x04, 0x01, 0x02, 0x82, 0x0B, 0x07, - 0x04, 0x04, 0x04, 0x82, 0x0F, 0x04, 0x04, 0x82, 0x0F, 0x00, - 0xA2, 0xBD, 0x74, 0xB9, 0x8E, 0x34, 0xF0, 0xEC, 0xF7, 0x40, - 0x22, 0x33, 0xE8, 0x50, 0x43, 0x66, 0xF0, 0x25, 0x41, 0x20, - 0xD9, 0x3F, 0x8A, 0xC6, 0xAD, 0x69, 0xC6, 0x9C, 0xD9, 0xE0, - 0x0D, 0xFF, 0x77, 0x85, 0xCD, 0x88, 0x58, 0x17, 0x6B, 0x85, - 0xD2, 0x5D, 0xF0, 0x41, 0xCE, 0x6D, 0x94, 0x7F, 0xF4, 0xDB, - 0xD3, 0x60, 0x52, 0x1A, 0x83, 0x42, 0xD8, 0x7C, 0x2D, 0xD9, - 0x55, 0x7B, 0xFB, 0xB8, 0x87, 0xAA, 0xDA, 0x75, 0x42, 0x86, - 0x3E, 0x5A, 0xE4, 0xD4, 0x7D, 0xC3, 0x38, 0xA2, 0xEE, 0x0D, - 0xF5, 0xAD, 0xDA, 0x12, 0x5B, 0xD6, 0x3A, 0x89, 0x87, 0xED, - 0x57, 0xD1, 0xA9, 0xC2, 0xB3, 0xC0, 0xDC, 0x90, 0x88, 0x0C, - 0x86, 0x48, 0xD2, 0xA6, 0x60, 0x1B, 0x22, 0x8C, 0x03, 0x34, - 0x69, 0x19, 0x96, 0x24, 0x04, 0xB3, 0x65, 0x10, 0x34, 0x31, - 0x09, 0x38, 0x31, 0x5C, 0x10, 0x8C, 0x02, 0x15, 0x66, 0xD0, - 0x48, 0x50, 0x53, 0x22, 0x41, 0xC4, 0x98, 0x41, 0xE2, 0x42, - 0x62, 0x42, 0x38, 0x45, 0xC2, 0xB8, 0x08, 0x20, 0x31, 0x21, - 0x13, 0x10, 0x88, 0x00, 0xB9, 0x24, 0x93, 0x06, 0x6D, 0x44, - 0x20, 0x64, 0x98, 0x84, 0x29, 0x91, 0x12, 0x6A, 0xC9, 0x14, - 0x10, 0x11, 0x40, 0x2A, 0x24, 0xC9, 0x85, 0xCC, 0x42, 0x2A, - 0x1C, 0x44, 0x28, 0xE0, 0xB4, 0x00, 0x20, 0x99, 0x11, 0x0B, - 0x09, 0x61, 0x24, 0x14, 0x10, 0x41, 0x94, 0x20, 0xC9, 0x46, - 0x64, 0x43, 0x02, 0x6E, 0x08, 0x39, 0x71, 0x81, 0x06, 0x2D, - 0x63, 0x14, 0x71, 0x62, 0xC0, 0x11, 0x20, 0xB2, 0x61, 0xD1, - 0x30, 0x24, 0x44, 0x06, 0x89, 0x04, 0x16, 0x88, 0x10, 0x33, - 0x48, 0x51, 0xB8, 0x00, 0x4A, 0x12, 0x68, 0x14, 0x04, 0x10, - 0xD8, 0x92, 0x8D, 0x22, 0x32, 0x61, 0x0C, 0x23, 0x91, 0x10, - 0x39, 0x24, 0x51, 0x80, 0x08, 0x0B, 0x30, 0x61, 0x00, 0x89, - 0x01, 0x98, 0x34, 0x05, 0x9A, 0xA2, 0x70, 0xC4, 0x46, 0x40, - 0x52, 0x38, 0x42, 0xC0, 0x92, 0x6D, 0xCC, 0x08, 0x22, 0xD4, - 0x42, 0x4A, 0x02, 0x23, 0x40, 0x40, 0x92, 0x25, 0x12, 0x36, - 0x65, 0x42, 0x06, 0x10, 0x02, 0x10, 0x10, 0x20, 0xA3, 0x41, - 0x0A, 0x15, 0x10, 0x20, 0x23, 0x80, 0x99, 0xB6, 0x0C, 0x11, - 0x26, 0x11, 0x9B, 0xC8, 0x44, 0x1C, 0xC9, 0x05, 0xA4, 0x38, - 0x11, 0x1B, 0xB0, 0x05, 0xDC, 0x22, 0x00, 0xC8, 0x22, 0x72, - 0xA3, 0x30, 0x2E, 0xC1, 0xA8, 0x41, 0x1C, 0xA6, 0x20, 0xE2, - 0xB0, 0x21, 0x9B, 0x10, 0x01, 0x61, 0x32, 0x46, 0xC1, 0x92, - 0x61, 0x1C, 0xA4, 0x85, 0x0A, 0xB7, 0x70, 0xE4, 0x26, 0x6C, - 0x58, 0xA4, 0x00, 0x19, 0x86, 0x4C, 0xDC, 0xA6, 0x40, 0xA1, - 0x32, 0x12, 0x04, 0x81, 0x90, 0x8C, 0x04, 0x05, 0x10, 0x30, - 0x26, 0x09, 0x31, 0x2C, 0x50, 0x88, 0x89, 0x82, 0x44, 0x62, - 0x10, 0x23, 0x8A, 0x04, 0x44, 0x22, 0x0A, 0x30, 0x4E, 0xA4, - 0x34, 0x32, 0x4C, 0x18, 0x8C, 0x21, 0x21, 0x41, 0x23, 0x13, - 0x72, 0x08, 0x84, 0x24, 0x1A, 0x04, 0x24, 0x14, 0x06, 0x02, - 0xC4, 0x40, 0x70, 0xCA, 0x00, 0x6E, 0xC1, 0xC6, 0x09, 0x83, - 0x42, 0x62, 0xA0, 0x30, 0x12, 0x1B, 0x14, 0x0C, 0x08, 0x03, - 0x22, 0xCA, 0x46, 0x65, 0x64, 0x46, 0x26, 0x10, 0x39, 0x20, - 0xCA, 0x80, 0x28, 0x62, 0x14, 0x6D, 0x10, 0x26, 0x11, 0x49, - 0xA2, 0x45, 0x53, 0x98, 0x0D, 0x64, 0x40, 0x05, 0x0C, 0x31, - 0x09, 0x13, 0x11, 0x60, 0xD8, 0x02, 0x50, 0x11, 0x41, 0x41, - 0x23, 0xC1, 0x4C, 0x22, 0xC6, 0x30, 0x99, 0x06, 0x08, 0xCA, - 0x40, 0x81, 0xCC, 0x32, 0x0E, 0x11, 0xC4, 0x20, 0xD9, 0x92, - 0x41, 0xC4, 0x20, 0x08, 0xE4, 0xA0, 0x00, 0xCB, 0x88, 0x21, - 0x03, 0x03, 0x90, 0x54, 0x00, 0x49, 0x14, 0x98, 0x04, 0xC8, - 0xC0, 0x31, 0x11, 0x31, 0x69, 0x04, 0x93, 0x90, 0x00, 0xB9, - 0x21, 0x22, 0x38, 0x48, 0x00, 0x34, 0x0C, 0x61, 0x98, 0x00, - 0x01, 0xB4, 0x69, 0x60, 0x26, 0x81, 0x1C, 0xA4, 0x10, 0x22, - 0xB6, 0x10, 0x21, 0xC6, 0x20, 0x4A, 0x22, 0x26, 0xD0, 0x92, - 0x41, 0xDA, 0x84, 0x69, 0x03, 0x42, 0x2A, 0x04, 0x09, 0x02, - 0xE1, 0x24, 0x42, 0xA2, 0x46, 0x28, 0x10, 0xB1, 0x08, 0x82, - 0x86, 0x84, 0xE0, 0x24, 0x51, 0x0A, 0xC9, 0x28, 0x59, 0x86, - 0x20, 0xDB, 0xB6, 0x40, 0x13, 0xC3, 0x40, 0x1C, 0xA9, 0x09, - 0x80, 0x34, 0x50, 0xDC, 0x84, 0x2C, 0x53, 0x24, 0x08, 0xC0, - 0xB4, 0x6D, 0x88, 0x26, 0x30, 0x82, 0xC8, 0x0D, 0x62, 0x22, - 0x28, 0x64, 0xA2, 0x09, 0x10, 0x25, 0x26, 0xDB, 0x34, 0x02, - 0x4A, 0x04, 0x11, 0x53, 0xB8, 0x28, 0x82, 0x34, 0x11, 0xC2, - 0x12, 0x25, 0x20, 0xB5, 0x40, 0x19, 0xA8, 0x31, 0x80, 0x22, - 0x66, 0x21, 0xB2, 0x10, 0x0B, 0x42, 0x2A, 0x61, 0x20, 0x50, - 0x40, 0x24, 0x4C, 0x99, 0x12, 0x48, 0x21, 0xB4, 0x11, 0xD1, - 0x44, 0x48, 0x00, 0x40, 0x0C, 0x58, 0x46, 0x68, 0x04, 0x12, - 0x12, 0x93, 0x22, 0x20, 0xC2, 0x32, 0x4C, 0x01, 0xB0, 0x88, - 0xE3, 0x20, 0x8E, 0x03, 0x00, 0x6C, 0x52, 0x14, 0x30, 0xD2, - 0x44, 0x88, 0x10, 0x44, 0x4A, 0x61, 0x86, 0x29, 0x14, 0x42, - 0x24, 0x24, 0x35, 0x2E, 0x11, 0xC4, 0x0D, 0x23, 0x24, 0x66, - 0x0A, 0x90, 0x71, 0xE0, 0xC2, 0x69, 0x48, 0x38, 0x91, 0x82, - 0xC8, 0x08, 0x1C, 0x93, 0x31, 0xD9, 0x06, 0x51, 0x8A, 0xA4, - 0x6C, 0x50, 0x34, 0x68, 0x5A, 0x18, 0x89, 0x4A, 0x96, 0x85, - 0x8A, 0x18, 0x44, 0x4A, 0x34, 0x40, 0x5B, 0x36, 0x80, 0xCC, - 0x20, 0x6E, 0x09, 0x19, 0x89, 0x02, 0x38, 0x6A, 0x24, 0xA3, - 0x69, 0x58, 0x32, 0x6D, 0x21, 0x01, 0x84, 0x88, 0x86, 0x28, - 0xA3, 0x22, 0x89, 0x93, 0xA6, 0x80, 0x00, 0x88, 0x81, 0xE1, - 0x48, 0x70, 0xA2, 0x34, 0x60, 0x18, 0x02, 0x04, 0x18, 0x29, - 0x01, 0x1B, 0x31, 0x51, 0xD4, 0xA4, 0x49, 0xCC, 0x08, 0x8C, - 0xDA, 0x36, 0x11, 0x01, 0x39, 0x26, 0x42, 0x92, 0x88, 0xC8, - 0x46, 0x52, 0x8C, 0xA4, 0x08, 0x14, 0x11, 0x52, 0xCA, 0x40, - 0x66, 0x8B, 0x32, 0x8E, 0x89, 0x44, 0x02, 0x9B, 0x42, 0x02, - 0x93, 0xA4, 0x01, 0x1A, 0x00, 0x50, 0x94, 0x44, 0x42, 0x08, - 0x09, 0x8C, 0xE2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, 0xC5, 0x40, 0x35, 0xD0, 0x07, 0x74, 0x02, 0xA3, 0xCF, - 0x23, 0x60, 0x15, 0xAC, 0x54, 0x98, 0x59, 0xEF, 0x94, 0x17, - 0x0A, 0xEF, 0xBB, 0xC2, 0x7B, 0x3B, 0xEF, 0xF5, 0xD1, 0x9C, - 0xB7, 0xB1, 0xDF, 0x45, 0xF5, 0x57, 0xD1, 0x18, 0x05, 0x97, - 0x8F, 0x8C, 0x30, 0x8C, 0x11, 0xF4, 0x81, 0x4D, 0x75, 0x18, - 0x97, 0x9F, 0x30, 0x64, 0xE2, 0x5B, 0x18, 0x95, 0xAC, 0x4E, - 0xDC, 0x47, 0xB5, 0x45, 0xAA, 0xD4, 0x7E, 0xF4, 0x70, 0x46, - 0x34, 0xF3, 0xB3, 0x85, 0xC2, 0x46, 0x98, 0xB5, 0xB5, 0x33, - 0x52, 0xF4, 0x36, 0x39, 0xCA, 0x23, 0xF9, 0x66, 0xB9, 0xA4, - 0x63, 0xC6, 0x3D, 0x02, 0xE7, 0x8F, 0x95, 0xF3, 0x25, 0xFD, - 0x21, 0xD0, 0x62, 0xC2, 0xEE, 0xE2, 0x2F, 0x69, 0x55, 0x31, - 0x42, 0x78, 0x2D, 0x53, 0xDC, 0x7F, 0x0E, 0x93, 0xD5, 0x4D, - 0x21, 0x64, 0x8B, 0x9E, 0x2C, 0xBE, 0xBA, 0xD3, 0x39, 0x41, - 0xE3, 0x10, 0xE5, 0x07, 0xE4, 0x0E, 0x20, 0x38, 0x63, 0xF7, - 0x02, 0xF2, 0x17, 0x99, 0xEB, 0xC6, 0xE7, 0x5F, 0xBE, 0xAE, - 0x53, 0xD1, 0x12, 0xB2, 0x9A, 0x90, 0x25, 0x6A, 0xAA, 0xFD, - 0x5D, 0x69, 0x2F, 0x32, 0x33, 0x53, 0x57, 0x1B, 0xC4, 0x24, - 0xC0, 0xC5, 0x90, 0x04, 0x04, 0x67, 0xCA, 0x85, 0x1E, 0x94, - 0x31, 0x95, 0x78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71, 0x42, 0xAD, 0xBA, - 0x34, 0x68, 0x9F, 0x67, 0xB1, 0xEE, 0x1C, 0x70, 0x7A, 0xFC, - 0x1E, 0x86, 0xF8, 0x96, 0x6C, 0x13, 0xD6, 0x36, 0x57, 0x5F, - 0x11, 0x2E, 0x1B, 0x97, 0xAB, 0x8B, 0x65, 0x3E, 0x8E, 0x91, - 0x69, 0x1C, 0x76, 0xAD, 0xB5, 0x8C, 0xE6, 0x02, 0x93, 0x16, - 0xA4, 0xF5, 0x14, 0x86, 0xB5, 0x16, 0x07, 0xF5, 0x0C, 0x01, - 0xE9, 0xDC, 0xEA, 0x86, 0x58, 0x98, 0xBA, 0x2C, 0x04, 0x0A, - 0x16, 0x8A, 0xF3, 0x10, 0x25, 0x48, 0x51, 0x21, 0x77, 0x69, - 0xF1, 0x22, 0xC3, 0xF4, 0x1D, 0xD5, 0x6D, 0x59, 0x1B, 0x44, - 0x88, 0xFC, 0xE5, 0x4B, 0xE1, 0xD6, 0xF4, 0x46, 0x4C, 0x9D, - 0x45, 0x93, 0xE1, 0xB5, 0x26, 0xDF, 0x48, 0x90, 0x13, 0xA6, - 0x65, 0x7E, 0x18, 0x6A, 0x79, 0x19, 0x81, 0x10, 0x08, 0x80, - 0xA4, 0x99, 0xD3, 0x98, 0x3C, 0x9E, 0x91, 0x31, 0xE9, 0x71, - 0xA0, 0x6A, 0xF9, 0x2F, 0x61, 0xA5, 0x72, 0x13, 0x6C, 0x4C, - 0xD2, 0xAF, 0x40, 0x8B, 0x0D, 0x3D, 0xE4, 0x24, 0x7B, 0x30, - 0x9C, 0xD0, 0x62, 0x42, 0x67, 0x54, 0xC6, 0x34, 0xF2, 0x55, - 0x70, 0x95, 0xAE, 0x16, 0x9F, 0xCC, 0x6F, 0xEA, 0x0B, 0x40, - 0x38, 0xAE, 0x74, 0x89, 0xCB, 0x64, 0x79, 0xF7, 0x08, 0x68, - 0x2C, 0x1E, 0xEE, 0x28, 0xEA, 0x77, 0xA2, 0xA3, 0x8E, 0xF4, - 0xEE, 0xFE, 0x62, 0x25, 0x98, 0xB1, 0xDE, 0x4B, 0x3A, 0x62, - 0xD9, 0x12, 0xD6, 0x09, 0x32, 0x6C, 0x80, 0x27, 0x21, 0x0A, - 0xFE, 0x4D, 0xBF, 0x29, 0x90, 0xCD, 0x6C, 0xE0, 0xAF, 0x06, - 0xB3, 0xC2, 0xDF, 0xB8, 0x50, 0x59, 0xD8, 0x0A, 0xB5, 0x98, - 0xC1, 0xA8, 0x80, 0xD7, 0x61, 0xFC, 0x59, 0xDB, 0xB1, 0x2A, - 0xA5, 0xD7, 0xFA, 0x9E, 0x93, 0x60, 0xD4, 0xB0, 0x6B, 0x44, - 0xB3, 0xC3, 0x3F, 0x9B, 0xEA, 0xD4, 0x8C, 0x08, 0x4B, 0x09, - 0x97, 0xC6, 0x2B, 0xC0, 0x8A, 0x92, 0x35, 0xCA, 0x6F, 0x93, - 0xD6, 0x71, 0x1E, 0xAB, 0x0F, 0x65, 0x42, 0xC2, 0x97, 0x77, - 0x10, 0x6E, 0xD4, 0xEE, 0x2A, 0xDF, 0x54, 0x2A, 0x5F, 0xB4, - 0xD4, 0x72, 0x18, 0x90, 0x42, 0x09, 0xAA, 0xC3, 0x31, 0x89 +#ifndef WOLFSSL_DILITHIUM_NO_SIGN +static const unsigned char bench_dilithium_level2_key[] = { + 0xea, 0x05, 0x24, 0x0d, 0x80, 0x72, 0x25, 0x55, 0xf4, 0x5b, + 0xc2, 0x13, 0x8b, 0x87, 0x5d, 0x31, 0x99, 0x2f, 0x1d, 0xa9, + 0x41, 0x09, 0x05, 0x76, 0xa7, 0xb7, 0x5e, 0x8c, 0x44, 0xe2, + 0x64, 0x79, 0xd8, 0x79, 0x4c, 0xee, 0x92, 0x2b, 0x37, 0xab, + 0xb1, 0x16, 0x65, 0x72, 0xc3, 0x49, 0xc2, 0xec, 0xfd, 0x9a, + 0xe6, 0x2d, 0x1e, 0x5b, 0xe3, 0x04, 0x96, 0x16, 0xad, 0x97, + 0x5d, 0xac, 0xf2, 0xcc, 0x62, 0x2e, 0x34, 0x5d, 0x67, 0x19, + 0x47, 0xee, 0x0f, 0x8b, 0x97, 0x60, 0xb4, 0x0b, 0xeb, 0x6a, + 0x7a, 0x75, 0x14, 0x27, 0x00, 0x39, 0xd6, 0x60, 0xce, 0x39, + 0x6e, 0x69, 0x46, 0xe1, 0x0d, 0xf9, 0xa6, 0xfa, 0x8c, 0xcf, + 0x65, 0x50, 0x59, 0x1d, 0xb0, 0x26, 0xc2, 0xe2, 0xf1, 0xb9, + 0xcd, 0x09, 0x60, 0xcc, 0xbb, 0x57, 0xd6, 0xac, 0xcc, 0xf9, + 0x58, 0x73, 0xa8, 0x81, 0x61, 0x2f, 0xd2, 0xa4, 0x5b, 0x98, + 0x0d, 0x12, 0x88, 0x51, 0x63, 0x38, 0x6e, 0xa2, 0x46, 0x64, + 0x52, 0xc0, 0x71, 0xc1, 0x42, 0x68, 0xd8, 0x42, 0x32, 0x5c, + 0xb4, 0x44, 0x08, 0x95, 0x48, 0xa2, 0x46, 0x6c, 0x0b, 0x10, + 0x09, 0xc8, 0x24, 0x4d, 0x18, 0x37, 0x4c, 0x4c, 0x82, 0x05, + 0x02, 0x22, 0x10, 0x4a, 0x86, 0x30, 0x03, 0x03, 0x11, 0x44, + 0x22, 0x62, 0x01, 0xa9, 0x51, 0x13, 0x02, 0x2c, 0x19, 0x85, + 0x65, 0x51, 0x14, 0x01, 0x9c, 0xb2, 0x81, 0x0a, 0x49, 0x52, + 0xa2, 0xb2, 0x4c, 0x98, 0x34, 0x01, 0x0a, 0x07, 0x06, 0x58, + 0xb2, 0x69, 0x51, 0x24, 0x2d, 0x59, 0x12, 0x52, 0xe0, 0xb4, + 0x04, 0x14, 0x40, 0x29, 0xa2, 0xb0, 0x31, 0x54, 0xc0, 0x40, + 0x63, 0x00, 0x69, 0x18, 0x47, 0x85, 0xc8, 0x30, 0x81, 0x0b, + 0x15, 0x0a, 0xd8, 0xa0, 0x0c, 0x5c, 0x20, 0x4a, 0x11, 0x38, + 0x64, 0x04, 0x94, 0x84, 0xd3, 0x24, 0x72, 0x58, 0x38, 0x28, + 0x18, 0x37, 0x6d, 0x94, 0xc0, 0x4d, 0xa0, 0xa6, 0x0c, 0x9a, + 0x82, 0x31, 0xc2, 0x40, 0x48, 0xda, 0x46, 0x85, 0x03, 0x00, + 0x05, 0xd8, 0x02, 0x4d, 0x0b, 0x85, 0x40, 0xe2, 0x32, 0x86, + 0x4c, 0xa0, 0x65, 0x8a, 0x36, 0x65, 0x42, 0x18, 0x6e, 0x60, + 0x36, 0x0d, 0x40, 0xc0, 0x01, 0x5a, 0x44, 0x42, 0xc4, 0xa4, + 0x0d, 0xd4, 0x88, 0x8d, 0x88, 0x22, 0x52, 0x00, 0xc0, 0x0c, + 0x5b, 0x36, 0x90, 0x09, 0x20, 0x22, 0x08, 0x03, 0x12, 0x90, + 0x12, 0x42, 0x04, 0x20, 0x29, 0x8c, 0x48, 0x6d, 0x20, 0x32, + 0x08, 0x94, 0x88, 0x6c, 0x10, 0x87, 0x21, 0xc1, 0x44, 0x02, + 0x52, 0x40, 0x12, 0xdb, 0xc8, 0x24, 0x14, 0x09, 0x2c, 0x93, + 0x40, 0x09, 0x64, 0xc8, 0x4c, 0x08, 0x48, 0x70, 0xa1, 0x10, + 0x81, 0x4a, 0x80, 0x8c, 0x20, 0x03, 0x31, 0x18, 0xb3, 0x80, + 0xd3, 0x82, 0x25, 0x4c, 0x94, 0x8c, 0x1c, 0x93, 0x89, 0x1a, + 0x91, 0x51, 0xd1, 0xb6, 0x68, 0x43, 0x14, 0x25, 0x84, 0x48, + 0x61, 0x82, 0x40, 0x24, 0xdb, 0x22, 0x4d, 0x63, 0x16, 0x66, + 0x62, 0x90, 0x50, 0xa1, 0x18, 0x86, 0x49, 0x28, 0x25, 0xa0, + 0x10, 0x68, 0x8c, 0x04, 0x00, 0x08, 0x32, 0x4e, 0x22, 0x43, + 0x31, 0x42, 0x96, 0x28, 0x11, 0x23, 0x89, 0xd2, 0xc4, 0x6d, + 0x11, 0x82, 0x8d, 0x8a, 0xa8, 0x90, 0xd2, 0x06, 0x29, 0x80, + 0x82, 0x89, 0x00, 0xa8, 0x41, 0x00, 0x13, 0x6a, 0x12, 0xa8, + 0x04, 0x83, 0xc2, 0x51, 0x13, 0x09, 0x08, 0x62, 0xb4, 0x8d, + 0x94, 0xc2, 0x44, 0x5a, 0xb4, 0x08, 0x0a, 0x10, 0x48, 0xa1, + 0x28, 0x20, 0x1b, 0xb7, 0x64, 0x60, 0x24, 0x25, 0x48, 0xc0, + 0x00, 0x0a, 0x10, 0x09, 0x64, 0xb8, 0x88, 0xcb, 0x44, 0x64, + 0x54, 0x90, 0x05, 0xd2, 0xb8, 0x21, 0x49, 0x28, 0x28, 0x49, + 0x42, 0x0d, 0x63, 0xa0, 0x65, 0xcb, 0x90, 0x30, 0x51, 0x82, + 0x8d, 0x5c, 0xc6, 0x0c, 0x51, 0x06, 0x6a, 0x1a, 0x27, 0x22, + 0x01, 0xa8, 0x24, 0x61, 0xb2, 0x84, 0x23, 0x40, 0x86, 0xa3, + 0xb4, 0x48, 0x19, 0x28, 0x0c, 0x14, 0x06, 0x2e, 0xe2, 0x02, + 0x0d, 0xc4, 0x90, 0x09, 0x08, 0x06, 0x66, 0x9b, 0xc8, 0x10, + 0x5c, 0x46, 0x21, 0xca, 0xa8, 0x30, 0x83, 0x20, 0x89, 0x03, + 0x83, 0x6c, 0xa1, 0x46, 0x8c, 0x90, 0x14, 0x4c, 0x99, 0x02, + 0x81, 0x53, 0x02, 0x10, 0x8b, 0x48, 0x91, 0xe4, 0x40, 0x4a, + 0x22, 0xb1, 0x88, 0xc1, 0x06, 0x0e, 0xc3, 0xa8, 0x08, 0xc8, + 0x46, 0x92, 0x03, 0xb5, 0x4c, 0x23, 0x03, 0x0c, 0xa4, 0x06, + 0x2e, 0xdc, 0x92, 0x81, 0x0c, 0x45, 0x22, 0x40, 0x34, 0x91, + 0x90, 0x96, 0x48, 0x81, 0x82, 0x31, 0xcb, 0x16, 0x72, 0x49, + 0xc8, 0x29, 0x44, 0x86, 0x90, 0x60, 0x22, 0x4e, 0x42, 0x42, + 0x09, 0x4b, 0x82, 0x20, 0x0a, 0xb2, 0x64, 0x20, 0x86, 0x70, + 0x1a, 0xc0, 0x00, 0x1c, 0x41, 0x49, 0x89, 0x84, 0x05, 0x0c, + 0x36, 0x49, 0x19, 0x99, 0x6d, 0x00, 0x08, 0x50, 0x23, 0x96, + 0x6c, 0xe0, 0x44, 0x08, 0x98, 0x24, 0x2c, 0x0a, 0x23, 0x20, + 0x12, 0x04, 0x31, 0xc9, 0x06, 0x32, 0x14, 0x01, 0x41, 0x08, + 0x37, 0x08, 0x58, 0x00, 0x0c, 0x19, 0x04, 0x29, 0x90, 0x18, + 0x05, 0xe1, 0x88, 0x44, 0xc2, 0x20, 0x6c, 0xd1, 0x46, 0x64, + 0xd9, 0x26, 0x62, 0x09, 0x88, 0x68, 0x02, 0x29, 0x29, 0xe1, + 0x18, 0x65, 0x98, 0x04, 0x24, 0xe4, 0x34, 0x0c, 0x12, 0x85, + 0x2d, 0x20, 0x14, 0x06, 0x24, 0x15, 0x82, 0x89, 0x08, 0x91, + 0x60, 0x84, 0x28, 0x24, 0x34, 0x41, 0x1b, 0x49, 0x22, 0xd3, + 0x96, 0x64, 0x1b, 0x86, 0x4c, 0x0c, 0xb9, 0x20, 0x20, 0x39, + 0x04, 0x04, 0x34, 0x6d, 0xc1, 0x28, 0x32, 0x08, 0x14, 0x44, + 0x81, 0x18, 0x2e, 0xda, 0x38, 0x41, 0x63, 0x18, 0x26, 0xd8, + 0x48, 0x26, 0x12, 0x20, 0x21, 0x09, 0xc5, 0x25, 0x92, 0x42, + 0x0c, 0x88, 0x04, 0x64, 0x11, 0x43, 0x8a, 0x19, 0x92, 0x60, + 0x5c, 0xc6, 0x31, 0xa1, 0x24, 0x6a, 0xd8, 0xb6, 0x49, 0x1b, + 0x81, 0x90, 0xe2, 0x32, 0x4e, 0x62, 0x44, 0x21, 0x80, 0xb8, + 0x10, 0x4b, 0x90, 0x49, 0x5c, 0x06, 0x09, 0x48, 0x20, 0x49, + 0xa2, 0x92, 0x71, 0x5c, 0x48, 0x02, 0xc8, 0x08, 0x81, 0xa4, + 0x32, 0x66, 0xc9, 0x30, 0x11, 0xca, 0x92, 0x91, 0xc0, 0x00, + 0x41, 0x44, 0x98, 0x4d, 0x98, 0x12, 0x4e, 0x92, 0x46, 0x8e, + 0x49, 0xb8, 0x64, 0xdc, 0x18, 0x50, 0x51, 0xb4, 0x48, 0x08, + 0x47, 0x24, 0x08, 0x46, 0x32, 0x1b, 0x23, 0x00, 0x09, 0xb8, + 0x04, 0x0a, 0x44, 0x0c, 0x0b, 0xc7, 0x8d, 0x19, 0xa4, 0x09, + 0x11, 0x30, 0x41, 0xe3, 0x24, 0x45, 0x89, 0x1f, 0x65, 0x54, + 0xf6, 0x38, 0x04, 0x37, 0xcc, 0x89, 0xc3, 0xc5, 0xdc, 0x43, + 0xd9, 0x13, 0x56, 0x06, 0x05, 0x50, 0x29, 0x4e, 0x0f, 0xa5, + 0x5c, 0x5d, 0xd7, 0x82, 0xa1, 0x63, 0x59, 0x0d, 0x3e, 0x5b, + 0x00, 0xe6, 0x0e, 0xd8, 0x1c, 0xc7, 0xaf, 0xc0, 0x48, 0xb6, + 0x07, 0x5c, 0x65, 0x00, 0x89, 0xb3, 0x09, 0xbc, 0x4a, 0xaa, + 0xa6, 0x72, 0xbe, 0x6b, 0x9a, 0xb3, 0x5b, 0x27, 0x82, 0x65, + 0x9b, 0xc9, 0x6f, 0x19, 0x88, 0x94, 0x0b, 0x37, 0x44, 0x2f, + 0xe3, 0x9a, 0x02, 0xda, 0xff, 0x11, 0xb0, 0x48, 0x89, 0x70, + 0x8c, 0x84, 0xc2, 0xc0, 0x31, 0x4a, 0xad, 0x70, 0xe1, 0xa7, + 0x15, 0xfd, 0xb2, 0x6d, 0x93, 0xda, 0x17, 0x68, 0xc4, 0xe3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0xa1, 0x17, 0x39, 0x4a, 0xb5, 0xac, 0xc6, 0x41, 0x90, 0x66, + 0x85, 0xc4, 0x4b, 0x18, 0xc6, 0xe6, 0x09, 0x6d, 0x6e, 0xbb, + 0x7f, 0x72, 0x96, 0xd3, 0x21, 0x5a, 0x96, 0xaf, 0x9e, 0xb6, + 0x0b, 0x3f, 0xe8, 0x83, 0xe5, 0x53, 0x11, 0x81, 0xc6, 0xab, + 0x40, 0xa9, 0x09, 0xb6, 0x74, 0x5e, 0xe1, 0xc3, 0x82, 0x1e, + 0xda, 0x2f, 0x24, 0xe0, 0x94, 0x8f, 0x07, 0xb7, 0x9b, 0xc6, + 0x50, 0xef, 0x3a, 0x79, 0x89, 0x4d, 0x6f, 0x16, 0x33, 0x04, + 0x24, 0x7e, 0x4a, 0xab, 0x5d, 0x03, 0x29, 0xad, 0xba, 0xa3, + 0x6c, 0xe2, 0x05, 0xab, 0x4d, 0x69, 0xb6, 0x61, 0x39, 0x9d, + 0xc3, 0x53, 0x11, 0xc0, 0xe3, 0xaa, 0x2e, 0xdc, 0x74, 0x09, + 0xbd, 0x19, 0xb5, 0xbb, 0x51, 0x1e, 0x77, 0x3e, 0xce, 0x64, + 0x13, 0xeb, 0x74, 0x03, 0xb7, 0x49, 0x99, 0xb0, 0x71, 0x99, + 0xe6, 0x17, 0x3c, 0x80, 0xe6, 0xb5, 0x51, 0xe9, 0xb3, 0xe4, + 0x2b, 0xaa, 0x52, 0x15, 0x99, 0x4e, 0x46, 0x6d, 0x67, 0x8e, + 0x79, 0xc4, 0x3c, 0xa6, 0xdc, 0x8f, 0xed, 0x87, 0xb9, 0x68, + 0x6d, 0xdc, 0x19, 0xa1, 0x52, 0x37, 0x06, 0x76, 0xad, 0xe9, + 0x61, 0x5c, 0x82, 0x16, 0x81, 0xaf, 0x3a, 0x89, 0xbf, 0x72, + 0xb0, 0xc7, 0x88, 0x3c, 0x58, 0xfe, 0xe4, 0xa5, 0x41, 0x50, + 0xfc, 0x8a, 0x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92, 0x90, 0xa4, 0x5f, 0x34, 0x38, 0x93, + 0x92, 0x43, 0x87, 0xaf, 0xdd, 0x87, 0x63, 0x8c, 0x1d, 0xe5, + 0x86, 0x9e, 0xe6, 0xde, 0x94, 0xdd, 0x33, 0x5d, 0x95, 0x64, + 0xd8, 0xc4, 0x8a, 0x3c, 0xe7, 0x4b, 0xd6, 0x3f, 0xc5, 0x69, + 0x6a, 0xa8, 0x7f, 0x0f, 0x93, 0x77, 0x02, 0x46, 0x66, 0xa5, + 0xa0, 0x60, 0x8b, 0xec, 0xb1, 0xa2, 0xfc, 0x2a, 0x09, 0xb8, + 0x08, 0x1c, 0x05, 0x6b, 0x78, 0xb7, 0x7a, 0xe5, 0x60, 0xa4, + 0xaf, 0x3a, 0x9d, 0xaa, 0xf5, 0x22, 0x9b, 0x5e, 0xef, 0xc3, + 0x46, 0xed, 0x67, 0xd0, 0x8b, 0xda, 0xb4, 0xa3, 0x34, 0x32, + 0x20, 0x9d, 0x88, 0x7e, 0x43, 0x42, 0x6f, 0x02, 0xf8, 0x48, + 0x9b, 0xc5, 0x02, 0xad, 0xaa, 0xa9, 0xee, 0x19, 0x1b, 0xde, + 0x02, 0x83, 0x81, 0x10, 0xa6, 0x79, 0x4e, 0xad, 0x15, 0xf7, + 0x3e, 0x4e, 0x1e, 0x72, 0xfe, 0x52, 0x49, 0x24, 0xce, 0x82, + 0x31, 0x59, 0x72, 0xae, 0xd5, 0x34, 0x50, 0x87, 0x8b, 0xe3, + 0x8e, 0xec, 0x61, 0x35, 0x13, 0x57, 0xb1, 0xe6, 0xac, 0xfb, + 0x16, 0xc3, 0x1a, 0x98, 0x92, 0xcb, 0xcd, 0xc9, 0xf7, 0x10, + 0x6a, 0x43, 0x96, 0x33, 0x2d, 0x6f, 0x6c, 0x76, 0xb0, 0xf6, + 0x48, 0x4c, 0xae, 0x13, 0x67, 0x5d, 0x42, 0x01, 0x8e, 0x54, + 0x51, 0xcc, 0x65, 0xf1, 0x95, 0x11, 0x3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 0xf6, + 0xdc, 0x77, 0x55, 0x1e, 0x32, 0x19, 0xc8, 0xa1, 0xbb, 0xcf, + 0xcb, 0x41, 0x54, 0xa2, 0xcb, 0xe6, 0x61, 0xca, 0x43, 0x63, + 0xd2, 0x2c, 0xae, 0xf4, 0xd9, 0x49, 0xb1, 0x75, 0x1a, 0x06, + 0x92, 0x13, 0x90, 0x57, 0x89, 0x8e, 0x9f, 0x26, 0xc5, 0x14, + 0xd8, 0xc7, 0x93, 0xb2, 0xaa, 0x3a, 0x9c, 0x10, 0xd5, 0x68, + 0x52, 0x28, 0x39, 0xee, 0x30, 0xdc, 0x00, 0x4b, 0x65, 0x72, + 0x59, 0x98, 0xad, 0x2e, 0x8c, 0xaf, 0x4e, 0x79, 0x0a, 0x8c, + 0x0c, 0x9d, 0xb6, 0x43, 0x26, 0x83, 0x71, 0x7b, 0x1e, 0x86, + 0x4d, 0x33, 0xd7, 0x20, 0x29, 0x6a, 0xbf, 0x2f, 0x8e, 0x4b, + 0x13, 0x35, 0x65, 0xc8, 0xec, 0xe3, 0x2c, 0xde, 0xfb, 0x30, + 0x57, 0xa9, 0x92, 0x22, 0x5d, 0x79, 0x16, 0x07, 0x73, 0x9b, + 0xe2, 0x6e, 0xd4, 0x99, 0xb4, 0x35, 0xfd, 0xa2, 0xb5, 0xd9, + 0xe5, 0x74, 0xd1, 0xb2, 0xcf, 0x32, 0xf1, 0x19, 0x69, 0xcf, + 0x1e, 0x10, 0xcc, 0x3c, 0xaf, 0xbe, 0xa4, 0x33, 0x11, 0x83, + 0x64, 0xc0, 0x39, 0xe5, 0xb0, 0x8f, 0x32, 0xf4, 0x01, 0x6a, + 0x2a, 0x11, 0x8e, 0xdd, 0x03, 0x81, 0x39, 0xe7, 0x70, 0x16, + 0x2f, 0x0e, 0x24, 0xa9, 0x12, 0x0b, 0xdb, 0xa8, 0x6c, 0xb3, + 0xf3, 0x74, 0x95, 0xca, 0x64, 0x1d, 0xee, 0x25, 0xc5, 0x27, + 0xed, 0x0f, 0x82, 0xb5, 0x7a, 0x62, 0x27, 0xb2, 0x87, 0x53, + 0x11, 0x39, 0x5e, 0xb8, 0x11, 0xca, 0x25, 0xe8, 0x17, 0x46, + 0xd3, 0x0f, 0x5d, 0x70, 0x68, 0xe1, 0x5f, 0xd1, 0xab, 0x65, + 0xe5, 0x42, 0x87, 0x1e, 0x96, 0xaf, 0x13, 0x0c, 0x9b, 0x15, + 0x75, 0x14, 0x31, 0x75, 0xcc, 0x15, 0xbf, 0x2c, 0x74, 0xab, + 0xc9, 0x9c, 0xda, 0x62, 0x1d, 0xeb, 0x19, 0x81, 0x67, 0x5e, + 0xcd, 0x54, 0x87, 0x07, 0x67, 0xba, 0xe3, 0xf6, 0x03, 0xbe, + 0x6d, 0x64, 0x2d, 0xbc, 0xec, 0x54, 0x13, 0x12, 0x5b, 0x44, + 0x90, 0x95, 0x86, 0x77, 0x8c, 0x59, 0xbd, 0x8e, 0xba, 0xb1, + 0x12, 0xea, 0xc1, 0x94, 0x37, 0xa0, 0x11, 0xff, 0xb2, 0xa4, + 0xc3, 0x61, 0xf2, 0xa3, 0x49, 0xbe, 0xe7, 0xb6, 0x96, 0x2f, }; static const int sizeof_bench_dilithium_level2_key = sizeof(bench_dilithium_level2_key); -/* certs/dilithium/bench_dilithium_level3_key.der */ -static const unsigned char bench_dilithium_level3_key[] = -{ - 0x30, 0x82, 0x17, 0x5A, 0x02, 0x01, 0x00, 0x30, 0x0D, 0x06, - 0x0B, 0x2B, 0x06, 0x01, 0x04, 0x01, 0x02, 0x82, 0x0B, 0x07, - 0x06, 0x05, 0x04, 0x82, 0x17, 0x44, 0x04, 0x82, 0x17, 0x40, - 0x2E, 0xFE, 0x07, 0xDF, 0x5E, 0xF9, 0x18, 0xB4, 0x0E, 0xBF, - 0x9C, 0x1C, 0xCA, 0x84, 0xBA, 0x62, 0xB9, 0xA2, 0x96, 0x76, - 0xB6, 0xB7, 0x77, 0x9C, 0xBE, 0x0C, 0xF8, 0xA5, 0xEF, 0x74, - 0xB1, 0xC2, 0x8D, 0x95, 0x6D, 0x38, 0x49, 0x01, 0xA8, 0x3D, - 0x63, 0x0B, 0xDF, 0x4B, 0x5D, 0xF4, 0xC4, 0x98, 0x27, 0x77, - 0x88, 0xA0, 0xA9, 0xF2, 0x38, 0x32, 0x62, 0x17, 0x11, 0xD6, - 0xBE, 0xA0, 0xFD, 0xEB, 0xBF, 0x4A, 0xF2, 0x6C, 0x44, 0x62, - 0x2D, 0x87, 0x3D, 0xAD, 0x0C, 0x47, 0x06, 0x00, 0x7E, 0xAF, - 0x52, 0xE7, 0xA1, 0x8E, 0x7A, 0xA7, 0x7D, 0x3C, 0xE5, 0xB2, - 0x59, 0xDA, 0x89, 0x76, 0xF7, 0xD4, 0x73, 0x16, 0x33, 0x67, - 0x88, 0x46, 0x51, 0x13, 0x12, 0x38, 0x64, 0x76, 0x73, 0x40, - 0x16, 0x55, 0x70, 0x06, 0x32, 0x84, 0x47, 0x25, 0x33, 0x44, - 0x70, 0x68, 0x36, 0x25, 0x62, 0x47, 0x76, 0x65, 0x73, 0x11, - 0x28, 0x00, 0x75, 0x33, 0x81, 0x13, 0x62, 0x51, 0x31, 0x33, - 0x11, 0x41, 0x51, 0x62, 0x55, 0x33, 0x07, 0x60, 0x14, 0x18, - 0x30, 0x58, 0x22, 0x67, 0x26, 0x86, 0x12, 0x78, 0x17, 0x47, - 0x30, 0x06, 0x05, 0x36, 0x37, 0x23, 0x08, 0x67, 0x05, 0x05, - 0x06, 0x85, 0x33, 0x83, 0x14, 0x63, 0x44, 0x35, 0x00, 0x04, - 0x56, 0x03, 0x23, 0x03, 0x33, 0x13, 0x02, 0x23, 0x25, 0x80, - 0x22, 0x00, 0x53, 0x73, 0x13, 0x70, 0x03, 0x84, 0x15, 0x50, - 0x14, 0x20, 0x06, 0x74, 0x03, 0x41, 0x26, 0x74, 0x63, 0x65, - 0x42, 0x03, 0x00, 0x72, 0x66, 0x44, 0x36, 0x88, 0x60, 0x85, - 0x76, 0x86, 0x17, 0x72, 0x16, 0x37, 0x23, 0x82, 0x15, 0x84, - 0x57, 0x14, 0x20, 0x72, 0x15, 0x55, 0x26, 0x42, 0x82, 0x66, - 0x40, 0x54, 0x03, 0x54, 0x62, 0x61, 0x83, 0x35, 0x20, 0x76, - 0x62, 0x14, 0x37, 0x35, 0x42, 0x04, 0x32, 0x72, 0x08, 0x35, - 0x42, 0x74, 0x51, 0x24, 0x54, 0x86, 0x36, 0x56, 0x11, 0x83, - 0x64, 0x44, 0x54, 0x78, 0x80, 0x50, 0x55, 0x72, 0x84, 0x16, - 0x48, 0x13, 0x04, 0x17, 0x06, 0x36, 0x25, 0x48, 0x21, 0x33, - 0x45, 0x71, 0x21, 0x54, 0x10, 0x26, 0x13, 0x72, 0x12, 0x30, - 0x03, 0x73, 0x48, 0x84, 0x16, 0x22, 0x11, 0x38, 0x26, 0x43, - 0x53, 0x36, 0x56, 0x12, 0x15, 0x70, 0x07, 0x57, 0x00, 0x65, - 0x72, 0x11, 0x73, 0x48, 0x01, 0x13, 0x31, 0x58, 0x82, 0x60, - 0x61, 0x17, 0x78, 0x44, 0x48, 0x15, 0x48, 0x26, 0x62, 0x43, - 0x72, 0x44, 0x62, 0x76, 0x40, 0x15, 0x63, 0x26, 0x10, 0x51, - 0x82, 0x21, 0x05, 0x82, 0x30, 0x56, 0x58, 0x62, 0x76, 0x48, - 0x67, 0x82, 0x86, 0x51, 0x32, 0x37, 0x78, 0x38, 0x13, 0x82, - 0x55, 0x22, 0x45, 0x22, 0x68, 0x66, 0x15, 0x30, 0x35, 0x77, - 0x04, 0x28, 0x45, 0x85, 0x72, 0x48, 0x30, 0x26, 0x06, 0x24, - 0x12, 0x75, 0x42, 0x53, 0x88, 0x14, 0x15, 0x07, 0x08, 0x86, - 0x05, 0x08, 0x01, 0x56, 0x77, 0x44, 0x38, 0x53, 0x22, 0x21, - 0x20, 0x56, 0x25, 0x15, 0x72, 0x68, 0x27, 0x03, 0x71, 0x25, - 0x64, 0x11, 0x44, 0x34, 0x77, 0x60, 0x68, 0x58, 0x44, 0x74, - 0x76, 0x63, 0x86, 0x16, 0x01, 0x40, 0x68, 0x51, 0x20, 0x12, - 0x36, 0x55, 0x01, 0x84, 0x61, 0x80, 0x46, 0x36, 0x28, 0x82, - 0x44, 0x66, 0x14, 0x80, 0x50, 0x32, 0x34, 0x46, 0x21, 0x34, - 0x63, 0x04, 0x22, 0x20, 0x17, 0x84, 0x88, 0x88, 0x47, 0x02, - 0x52, 0x60, 0x45, 0x35, 0x86, 0x72, 0x71, 0x43, 0x30, 0x58, - 0x24, 0x11, 0x11, 0x64, 0x45, 0x36, 0x25, 0x18, 0x82, 0x18, - 0x16, 0x80, 0x27, 0x76, 0x53, 0x08, 0x70, 0x87, 0x64, 0x43, - 0x68, 0x86, 0x07, 0x04, 0x34, 0x10, 0x68, 0x30, 0x21, 0x01, - 0x86, 0x66, 0x06, 0x50, 0x41, 0x72, 0x18, 0x00, 0x05, 0x40, - 0x36, 0x35, 0x60, 0x50, 0x82, 0x82, 0x24, 0x73, 0x31, 0x35, - 0x81, 0x35, 0x02, 0x50, 0x22, 0x76, 0x44, 0x52, 0x27, 0x43, - 0x82, 0x66, 0x51, 0x38, 0x86, 0x72, 0x18, 0x54, 0x20, 0x65, - 0x45, 0x26, 0x03, 0x42, 0x24, 0x25, 0x27, 0x36, 0x02, 0x04, - 0x38, 0x77, 0x18, 0x44, 0x17, 0x78, 0x46, 0x34, 0x68, 0x00, - 0x72, 0x57, 0x72, 0x67, 0x53, 0x82, 0x51, 0x06, 0x34, 0x56, - 0x71, 0x26, 0x73, 0x55, 0x58, 0x11, 0x44, 0x15, 0x26, 0x81, - 0x14, 0x88, 0x25, 0x45, 0x52, 0x84, 0x13, 0x60, 0x12, 0x26, - 0x12, 0x36, 0x11, 0x61, 0x30, 0x25, 0x32, 0x83, 0x00, 0x71, - 0x73, 0x04, 0x48, 0x40, 0x70, 0x21, 0x36, 0x54, 0x45, 0x33, - 0x43, 0x00, 0x76, 0x62, 0x63, 0x71, 0x15, 0x35, 0x27, 0x50, - 0x06, 0x16, 0x30, 0x45, 0x08, 0x12, 0x51, 0x68, 0x38, 0x21, - 0x71, 0x61, 0x61, 0x18, 0x35, 0x15, 0x25, 0x47, 0x14, 0x62, - 0x51, 0x14, 0x76, 0x12, 0x62, 0x60, 0x63, 0x16, 0x20, 0x68, - 0x62, 0x31, 0x56, 0x64, 0x05, 0x84, 0x56, 0x26, 0x40, 0x42, - 0x88, 0x05, 0x60, 0x84, 0x82, 0x10, 0x23, 0x87, 0x63, 0x33, - 0x60, 0x40, 0x58, 0x12, 0x83, 0x26, 0x03, 0x13, 0x85, 0x23, - 0x02, 0x73, 0x05, 0x27, 0x40, 0x02, 0x75, 0x85, 0x46, 0x51, - 0x83, 0x71, 0x37, 0x16, 0x05, 0x86, 0x35, 0x01, 0x45, 0x00, - 0x53, 0x68, 0x27, 0x11, 0x06, 0x08, 0x82, 0x60, 0x58, 0x28, - 0x50, 0x07, 0x32, 0x56, 0x26, 0x46, 0x78, 0x63, 0x71, 0x16, - 0x48, 0x46, 0x86, 0x41, 0x37, 0x75, 0x06, 0x01, 0x11, 0x46, - 0x45, 0x21, 0x03, 0x82, 0x42, 0x75, 0x83, 0x30, 0x66, 0x00, - 0x74, 0x74, 0x46, 0x05, 0x33, 0x82, 0x33, 0x07, 0x34, 0x53, - 0x07, 0x78, 0x53, 0x07, 0x41, 0x37, 0x78, 0x54, 0x06, 0x11, - 0x42, 0x47, 0x05, 0x02, 0x62, 0x34, 0x27, 0x17, 0x78, 0x70, - 0x70, 0x46, 0x00, 0x38, 0x75, 0x48, 0x74, 0x46, 0x83, 0x35, - 0x08, 0x46, 0x14, 0x12, 0x20, 0x68, 0x00, 0x73, 0x57, 0x81, - 0x84, 0x62, 0x43, 0x11, 0x28, 0x87, 0x13, 0x30, 0x06, 0x70, - 0x15, 0x46, 0x51, 0x14, 0x74, 0x13, 0x53, 0x26, 0x84, 0x78, - 0x86, 0x15, 0x84, 0x18, 0x70, 0x56, 0x41, 0x33, 0x61, 0x56, - 0x28, 0x11, 0x30, 0x73, 0x82, 0x00, 0x57, 0x68, 0x61, 0x44, - 0x04, 0x64, 0x78, 0x68, 0x14, 0x02, 0x83, 0x88, 0x86, 0x88, - 0x40, 0x16, 0x81, 0x20, 0x68, 0x72, 0x67, 0x05, 0x76, 0x06, - 0x54, 0x74, 0x35, 0x71, 0x02, 0x67, 0x45, 0x24, 0x73, 0x64, - 0x87, 0x31, 0x60, 0x37, 0x04, 0x11, 0x85, 0x63, 0x40, 0x71, - 0x38, 0x46, 0x65, 0x16, 0x10, 0x85, 0x06, 0x37, 0x25, 0x53, - 0x05, 0x58, 0x45, 0x87, 0x17, 0x47, 0x78, 0x10, 0x22, 0x26, - 0x24, 0x86, 0x44, 0x63, 0x45, 0x00, 0x14, 0x77, 0x60, 0x04, - 0x54, 0x45, 0x40, 0x32, 0x45, 0x03, 0x60, 0x87, 0x05, 0x02, - 0x18, 0x22, 0x20, 0x61, 0x07, 0x36, 0x72, 0x52, 0x53, 0x65, - 0x27, 0x26, 0x37, 0x54, 0x31, 0x34, 0x22, 0x54, 0x37, 0x25, - 0x83, 0x14, 0x74, 0x75, 0x17, 0x61, 0x48, 0x74, 0x24, 0x43, - 0x80, 0x81, 0x15, 0x06, 0x88, 0x23, 0x84, 0x55, 0x20, 0x11, - 0x87, 0x83, 0x64, 0x36, 0x48, 0x88, 0x32, 0x20, 0x28, 0x54, - 0x88, 0x85, 0x35, 0x61, 0x00, 0x21, 0x01, 0x31, 0x44, 0x13, - 0x71, 0x48, 0x23, 0x47, 0x31, 0x62, 0x40, 0x18, 0x21, 0x78, - 0x34, 0x12, 0x88, 0x10, 0x76, 0x46, 0x72, 0x37, 0x70, 0x84, - 0x15, 0x41, 0x84, 0x22, 0x20, 0x22, 0x27, 0x44, 0x81, 0x03, - 0x46, 0x48, 0x26, 0x16, 0x21, 0x15, 0x31, 0x85, 0x73, 0x74, - 0x73, 0x06, 0x55, 0x21, 0x12, 0x53, 0x13, 0x34, 0x01, 0x64, - 0x40, 0x83, 0x08, 0x57, 0x24, 0x04, 0x18, 0x33, 0x70, 0x18, - 0x17, 0x06, 0x14, 0x28, 0x12, 0x58, 0x00, 0x25, 0x57, 0x20, - 0x00, 0x76, 0x73, 0x45, 0x68, 0x16, 0x60, 0x22, 0x17, 0x22, - 0x37, 0x75, 0x53, 0x48, 0x40, 0x21, 0x64, 0x27, 0x52, 0x48, - 0x53, 0x61, 0x64, 0x87, 0x57, 0x61, 0x13, 0x75, 0x80, 0x08, - 0x63, 0x33, 0x60, 0x26, 0x10, 0x25, 0x61, 0x78, 0x47, 0x78, - 0x07, 0x16, 0x00, 0x52, 0x31, 0x30, 0x63, 0x66, 0x46, 0x80, - 0x07, 0x10, 0x45, 0x11, 0x13, 0x80, 0x25, 0x61, 0x25, 0x53, - 0x80, 0x71, 0x38, 0x31, 0x47, 0x55, 0x02, 0x25, 0x50, 0x87, - 0x57, 0x35, 0x74, 0x11, 0x46, 0x44, 0x53, 0x24, 0x60, 0x33, - 0x15, 0x12, 0x77, 0x20, 0x36, 0x24, 0x70, 0x04, 0x87, 0x05, - 0x71, 0x07, 0x77, 0x36, 0x47, 0x01, 0x73, 0x61, 0x32, 0x62, - 0x28, 0x81, 0x67, 0x17, 0x38, 0x45, 0x21, 0x03, 0x24, 0x72, - 0x82, 0x64, 0x84, 0x43, 0x07, 0x11, 0x20, 0x72, 0x71, 0x04, - 0x58, 0x36, 0x22, 0x21, 0x33, 0x67, 0x55, 0x48, 0x03, 0x68, - 0x32, 0x70, 0x04, 0x63, 0x11, 0x34, 0x27, 0x82, 0x42, 0x56, - 0x28, 0x74, 0x77, 0x72, 0x18, 0x27, 0x35, 0x87, 0x03, 0x18, - 0x40, 0x32, 0x78, 0x07, 0x14, 0x43, 0x73, 0x73, 0x84, 0x63, - 0x78, 0x68, 0x03, 0x22, 0x55, 0x30, 0x18, 0x88, 0x15, 0x86, - 0x18, 0x51, 0x12, 0x42, 0x13, 0x60, 0x22, 0x44, 0x61, 0x44, - 0x35, 0x73, 0x08, 0x85, 0x53, 0x02, 0x73, 0x83, 0x25, 0x85, - 0x64, 0x78, 0x16, 0x12, 0x13, 0x63, 0x48, 0x35, 0x02, 0x71, - 0x72, 0x58, 0x12, 0x10, 0x65, 0x42, 0x22, 0x54, 0x80, 0x60, - 0x57, 0x84, 0x72, 0x76, 0x67, 0x35, 0x25, 0x14, 0x73, 0x70, - 0x48, 0x03, 0x78, 0x07, 0x74, 0x48, 0x67, 0x48, 0x01, 0x62, - 0x78, 0x05, 0x37, 0x66, 0x42, 0x45, 0x33, 0x65, 0x08, 0x70, - 0x42, 0x15, 0x72, 0x53, 0x13, 0x20, 0x14, 0x38, 0x05, 0x53, - 0x00, 0x45, 0x25, 0x20, 0x80, 0x75, 0x01, 0x65, 0x80, 0x70, - 0x61, 0x50, 0x15, 0x10, 0x77, 0x23, 0x38, 0x31, 0x21, 0x51, - 0x78, 0x11, 0x88, 0x71, 0x18, 0x06, 0x45, 0x62, 0x47, 0x35, - 0x43, 0x00, 0x52, 0x34, 0x41, 0x75, 0x18, 0x13, 0x51, 0x35, - 0x72, 0x11, 0x78, 0x17, 0x30, 0x44, 0x83, 0x25, 0x64, 0x42, - 0x65, 0x23, 0x50, 0x32, 0x85, 0x30, 0x67, 0x10, 0x70, 0x01, - 0x16, 0x62, 0x36, 0x46, 0x18, 0x53, 0x53, 0x80, 0x13, 0x65, - 0x66, 0x53, 0x61, 0x55, 0x07, 0x71, 0x34, 0x56, 0x31, 0x67, - 0x64, 0x42, 0x64, 0x41, 0x22, 0x56, 0x44, 0x67, 0x25, 0x52, - 0x08, 0x17, 0x38, 0x45, 0x76, 0x83, 0x37, 0x15, 0x76, 0x31, - 0x83, 0x47, 0x30, 0x21, 0x55, 0x73, 0x37, 0x82, 0x11, 0x56, - 0x67, 0x27, 0x23, 0x44, 0x72, 0x82, 0x10, 0x80, 0x43, 0x11, - 0x16, 0x02, 0x21, 0x40, 0x42, 0x10, 0x12, 0x74, 0x58, 0x40, - 0x74, 0x00, 0x66, 0x02, 0x85, 0x76, 0x21, 0x17, 0x83, 0x78, - 0x80, 0x40, 0x46, 0x87, 0x66, 0x24, 0x35, 0x80, 0x31, 0x77, - 0x87, 0x10, 0x47, 0x02, 0x20, 0x65, 0x43, 0x73, 0x41, 0x61, - 0x72, 0x18, 0x21, 0x52, 0x32, 0x82, 0x08, 0x82, 0x00, 0x57, - 0x52, 0x41, 0x45, 0x10, 0x51, 0x41, 0x28, 0x37, 0x72, 0x45, - 0x77, 0x10, 0x56, 0x06, 0x54, 0x30, 0x03, 0x74, 0x13, 0x56, - 0x77, 0x54, 0x04, 0x86, 0x13, 0x77, 0x81, 0x77, 0x57, 0x15, - 0x76, 0x13, 0x51, 0x75, 0x4C, 0xD3, 0x8C, 0xF8, 0x0F, 0x87, - 0x37, 0xBC, 0x26, 0x1B, 0x7A, 0x1C, 0xDC, 0x05, 0xFD, 0x9B, - 0x97, 0x8C, 0x4D, 0xE5, 0x06, 0xFF, 0x57, 0x65, 0xDC, 0xFC, - 0xBF, 0x55, 0x20, 0x8F, 0xC9, 0xAB, 0x63, 0x4C, 0x37, 0x02, - 0xB5, 0x51, 0x79, 0x6B, 0xC2, 0x02, 0x74, 0xE5, 0x74, 0x72, - 0xC4, 0x3C, 0x8F, 0xD2, 0x79, 0xCB, 0x65, 0x3C, 0xBD, 0xA6, - 0xC5, 0x19, 0xDF, 0xFC, 0x24, 0xB9, 0x91, 0x81, 0x41, 0x4D, - 0xDF, 0x2E, 0x6A, 0xBD, 0x5A, 0xC4, 0x04, 0x03, 0x7F, 0x71, - 0x7D, 0x51, 0xDD, 0x2F, 0xAE, 0x4C, 0x9A, 0xF8, 0x98, 0x11, - 0xA0, 0xCE, 0xF7, 0xDE, 0xF5, 0xC6, 0x91, 0xD3, 0xDC, 0xE7, - 0xAA, 0xD0, 0x7D, 0xDF, 0x5F, 0xF2, 0x5B, 0x55, 0x9C, 0xD6, - 0x8D, 0xC9,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x14, 0x6C, 0x0A, 0x85, 0x16, 0x2E, - 0x79, 0xA3, 0x64, 0xBF, 0xFC, 0x89, 0xB8, 0xFD, 0xB0, 0xC8, - 0x39, 0x9A, 0x83, 0x1B, 0x74, 0x41, 0x7C, 0xEA, 0xFD, 0x5F, - 0x83, 0x19 +#endif /* !WOLFSSL_DILITHIUM_NO_SIGN */ + +#ifndef WOLFSSL_DILITHIUM_NO_VERIFY + +static const unsigned char bench_dilithium_level2_pubkey[] = { + 0xea, 0x05, 0x24, 0x0d, 0x80, 0x72, 0x25, 0x55, 0xf4, 0x5b, + 0xc2, 0x13, 0x8b, 0x87, 0x5d, 0x31, 0x99, 0x2f, 0x1d, 0xa9, + 0x41, 0x09, 0x05, 0x76, 0xa7, 0xb7, 0x5e, 0x8c, 0x44, 0xe2, + 0x64, 0x79, 0xa0, 0xec, 0x1f, 0x24, 0xb6, 0xc8, 0x05, 0x5b, + 0xc1, 0x18, 0xb0, 0xb7, 0xcf, 0x8c, 0x60, 0x67, 0x6b, 0x81, + 0x44, 0x27, 0xb6, 0x0e, 0xfd, 0x9b, 0xc3, 0xcb, 0x52, 0x31, + 0xfa, 0xc9, 0x34, 0x8d, 0x22, 0x1e, 0x07, 0x9d, 0x96, 0x6a, + 0x63, 0x83, 0x5c, 0xd7, 0x83, 0x2d, 0x7f, 0x48, 0x64, 0x79, + 0xca, 0xb4, 0x9f, 0xa2, 0x02, 0xb7, 0x86, 0x1d, 0x0e, 0xc7, + 0xf9, 0x6c, 0x07, 0xc0, 0x35, 0x6a, 0x34, 0x79, 0x7c, 0xb8, + 0x0f, 0xed, 0x98, 0x50, 0xfb, 0x51, 0xe0, 0x36, 0x44, 0x4c, + 0xc6, 0x35, 0xa2, 0xbb, 0x55, 0xb0, 0x5c, 0x39, 0x08, 0x02, + 0x20, 0x35, 0x5c, 0x56, 0x6d, 0x2e, 0xb9, 0xef, 0x21, 0x26, + 0x87, 0x87, 0x85, 0x8a, 0x32, 0xb5, 0xa7, 0x68, 0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7a, 0x55, + 0xd0, 0x53, 0x15, 0x40, 0x4e, 0xc5, 0x86, 0xd7, 0x8f, 0x5f, + 0x2f, 0x55, 0x82, 0xc2, 0x4f, 0x16, 0xe5, 0xea, 0x1c, 0xbc, + 0xff, 0x5e, 0x1f, 0x39, 0x46, 0x70, 0x54, 0x7a, 0x3a, 0x27, + 0x16, 0x1a, 0x2b, 0x6c, 0xd2, 0xb7, 0x80, 0xd3, 0xd1, 0x9d, + 0x25, 0x59, 0xed, 0xe6, 0x51, 0xb1, 0xf2, 0xad, 0x7e, 0x51, + 0x78, 0x14, 0x2b, 0x19, 0xae, 0x64, 0x72, 0x0f, 0xd8, 0x18, + 0x79, 0x8e, 0x66, 0x88, 0xd3, 0xa4, 0xa3, 0xc3, 0x76, 0x21, + 0xcb, 0xe4, 0x79, 0x5e, 0x95, 0x74, 0xe3, 0x31, 0x18, 0x79, + 0xed, 0xc7, 0xe7, 0xfb, 0x86, 0x48, 0x1b, 0x7b, 0x75, 0x5b, + 0x7f, 0x7c, 0x82, 0xc5, 0xab, 0x11, 0xb4, 0x5d, 0x59, 0x6f, + 0x78, 0xb2, 0xa5, 0x39, 0xc6, 0x63, 0x38, 0x6c, 0xeb, 0x50, + 0x06, 0x14, 0x76, 0xf0, 0xe8, 0xfb, 0x11, 0x95, 0x1f, 0x9d, + 0x9c, 0xa6, 0xe1, 0xe2, 0x0d, 0xa3, 0x66, 0xfc, 0x20, 0x83, + 0x50, 0x0e, 0x53, 0x75, 0xb5, 0x12, 0xf4, 0xdf, 0x31, 0x46, + 0x83, 0xac, 0x5b, 0xf3, 0x99, 0xa6, 0xd1, 0x7b, 0x2b, 0xc5, + 0xdc, 0x71, 0x07, 0x27, 0x33, 0x35, 0x34, 0xf5, 0x30, 0x19, + 0xc1, 0x3b, 0xba, 0x8a, 0xaf, 0x7e, 0x49, 0x93, 0x48, 0x5b, + 0x38, 0xc0, 0xbc, 0x2e, 0xc7, 0x59, 0x1b, 0xd9, 0xf5, 0xcc, + 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x36, 0xd9, 0xcd, 0xc1, 0x93, 0x6d, 0xef, 0x39, + 0x5e, 0x43, 0x30, 0x5a, 0x2e, 0x66, 0xb6, 0xf2, 0xed, 0x9a, + 0x8d, 0x12, 0xdf, 0x5c, 0xae, 0xad, 0x16, 0x12, 0x7e, 0x81, + 0x82, 0x91, 0x7d, 0x2b, 0x12, 0xe9, 0x96, 0xb8, 0xb7, 0x42, + 0xcb, 0x1f, 0xf8, 0xd1, 0xfd, 0x83, 0x7a, 0xe4, 0x36, 0x1d, + 0x04, 0x27, 0x4c, 0xe5, 0xbd, 0x75, 0x24, 0xf7, 0xbd, 0xb6, + 0x6a, 0x68, 0x4e, 0x2c, 0x1b, 0x56, 0x3e, 0x60, 0xa4, 0x42, + 0xca, 0x7a, 0x54, 0xe5, 0x06, 0xe3, 0xda, 0x05, 0xf7, 0x77, + 0x36, 0x8b, 0x81, 0x26, 0x99, 0x92, 0x42, 0xda, 0x45, 0xb1, + 0xfe, 0x4b, +}; +static const int sizeof_bench_dilithium_level2_pubkey = + sizeof(bench_dilithium_level2_pubkey); + +#endif /* !WOLFSSL_DILITHIUM_NO_VERIFY */ + +#ifndef WOLFSSL_DILITHIUM_NO_SIGN + +static const unsigned char bench_dilithium_level3_key[] = { + 0x15, 0xc9, 0xe5, 0x53, 0x2f, 0xd8, 0x1f, 0xb4, 0xa3, 0x9f, + 0xae, 0xad, 0xb3, 0x10, 0xd0, 0x72, 0x69, 0xd3, 0x02, 0xf3, + 0xdf, 0x67, 0x5a, 0x31, 0x52, 0x19, 0xca, 0x39, 0x27, 0x77, + 0x61, 0x6d, 0x72, 0xdd, 0x85, 0x06, 0xf6, 0x94, 0x0a, 0x57, + 0x52, 0xcd, 0xac, 0x83, 0x4a, 0xe5, 0xbe, 0xa4, 0x30, 0x79, + 0x9e, 0xc6, 0xd6, 0x04, 0xc8, 0x73, 0xdc, 0x5e, 0x41, 0x75, + 0x2f, 0xac, 0x76, 0x57, 0x03, 0x08, 0x46, 0xcb, 0xaf, 0x4c, + 0x6a, 0x4f, 0x20, 0x18, 0xb3, 0x2e, 0x11, 0x54, 0xb5, 0x94, + 0xe6, 0x6f, 0x76, 0xf6, 0xb9, 0x73, 0x9a, 0x07, 0x73, 0xe8, + 0x90, 0xd1, 0x04, 0xda, 0xc5, 0x97, 0xb9, 0x52, 0x51, 0xc8, + 0xc9, 0xcc, 0x87, 0x29, 0xa1, 0xde, 0x79, 0x9b, 0xf8, 0x7f, + 0x80, 0x3f, 0xfd, 0xb3, 0x24, 0xa5, 0xba, 0xf5, 0xd6, 0xd4, + 0x07, 0xbd, 0xa7, 0x1b, 0xd0, 0xe1, 0xd0, 0x43, 0x14, 0x52, + 0x27, 0x03, 0x33, 0x76, 0x00, 0x67, 0x30, 0x23, 0x76, 0x34, + 0x72, 0x02, 0x41, 0x62, 0x12, 0x43, 0x86, 0x30, 0x18, 0x28, + 0x46, 0x27, 0x45, 0x20, 0x88, 0x33, 0x54, 0x10, 0x03, 0x81, + 0x44, 0x50, 0x06, 0x44, 0x56, 0x30, 0x37, 0x38, 0x38, 0x46, + 0x03, 0x85, 0x01, 0x86, 0x43, 0x80, 0x78, 0x28, 0x83, 0x55, + 0x37, 0x44, 0x80, 0x12, 0x17, 0x51, 0x78, 0x46, 0x22, 0x01, + 0x53, 0x54, 0x63, 0x87, 0x77, 0x38, 0x11, 0x81, 0x43, 0x30, + 0x15, 0x47, 0x66, 0x11, 0x40, 0x65, 0x70, 0x56, 0x62, 0x28, + 0x21, 0x65, 0x30, 0x45, 0x63, 0x53, 0x31, 0x80, 0x81, 0x71, + 0x23, 0x62, 0x85, 0x03, 0x07, 0x56, 0x16, 0x28, 0x18, 0x35, + 0x07, 0x38, 0x60, 0x68, 0x17, 0x30, 0x15, 0x20, 0x04, 0x13, + 0x13, 0x61, 0x51, 0x58, 0x00, 0x37, 0x51, 0x58, 0x14, 0x06, + 0x12, 0x55, 0x13, 0x46, 0x76, 0x05, 0x51, 0x87, 0x32, 0x62, + 0x50, 0x41, 0x88, 0x24, 0x50, 0x31, 0x65, 0x36, 0x31, 0x02, + 0x75, 0x35, 0x78, 0x27, 0x36, 0x08, 0x01, 0x77, 0x22, 0x77, + 0x30, 0x80, 0x11, 0x21, 0x28, 0x26, 0x68, 0x27, 0x13, 0x70, + 0x50, 0x44, 0x88, 0x20, 0x50, 0x67, 0x65, 0x74, 0x17, 0x46, + 0x50, 0x16, 0x42, 0x75, 0x35, 0x12, 0x60, 0x12, 0x17, 0x13, + 0x36, 0x72, 0x04, 0x77, 0x07, 0x55, 0x20, 0x27, 0x15, 0x02, + 0x25, 0x12, 0x57, 0x71, 0x37, 0x45, 0x43, 0x34, 0x40, 0x31, + 0x78, 0x50, 0x31, 0x28, 0x17, 0x84, 0x87, 0x43, 0x25, 0x75, + 0x58, 0x05, 0x61, 0x56, 0x41, 0x44, 0x57, 0x67, 0x85, 0x54, + 0x00, 0x88, 0x88, 0x50, 0x68, 0x11, 0x14, 0x42, 0x08, 0x74, + 0x73, 0x00, 0x38, 0x08, 0x45, 0x28, 0x62, 0x43, 0x36, 0x20, + 0x30, 0x10, 0x87, 0x83, 0x67, 0x62, 0x02, 0x48, 0x46, 0x50, + 0x08, 0x08, 0x41, 0x43, 0x78, 0x22, 0x65, 0x87, 0x43, 0x84, + 0x25, 0x36, 0x58, 0x64, 0x30, 0x10, 0x20, 0x68, 0x82, 0x47, + 0x60, 0x31, 0x76, 0x68, 0x74, 0x68, 0x75, 0x61, 0x16, 0x26, + 0x82, 0x50, 0x32, 0x61, 0x41, 0x22, 0x38, 0x20, 0x86, 0x75, + 0x74, 0x00, 0x77, 0x12, 0x81, 0x35, 0x51, 0x78, 0x88, 0x64, + 0x82, 0x00, 0x41, 0x55, 0x62, 0x87, 0x51, 0x41, 0x74, 0x51, + 0x53, 0x27, 0x33, 0x84, 0x68, 0x86, 0x57, 0x60, 0x44, 0x30, + 0x22, 0x32, 0x10, 0x52, 0x22, 0x83, 0x48, 0x53, 0x66, 0x74, + 0x14, 0x52, 0x32, 0x71, 0x41, 0x08, 0x83, 0x67, 0x41, 0x38, + 0x46, 0x80, 0x88, 0x14, 0x84, 0x30, 0x85, 0x35, 0x46, 0x20, + 0x54, 0x84, 0x56, 0x84, 0x54, 0x82, 0x14, 0x11, 0x52, 0x07, + 0x86, 0x46, 0x05, 0x82, 0x26, 0x85, 0x75, 0x07, 0x88, 0x75, + 0x51, 0x17, 0x54, 0x32, 0x68, 0x66, 0x08, 0x23, 0x66, 0x06, + 0x42, 0x28, 0x00, 0x84, 0x27, 0x27, 0x43, 0x47, 0x12, 0x27, + 0x13, 0x15, 0x17, 0x74, 0x85, 0x14, 0x12, 0x62, 0x06, 0x47, + 0x17, 0x60, 0x00, 0x10, 0x85, 0x16, 0x55, 0x64, 0x46, 0x62, + 0x77, 0x05, 0x51, 0x23, 0x52, 0x37, 0x51, 0x78, 0x35, 0x66, + 0x14, 0x15, 0x78, 0x40, 0x16, 0x54, 0x67, 0x30, 0x61, 0x24, + 0x26, 0x86, 0x56, 0x83, 0x62, 0x78, 0x88, 0x83, 0x50, 0x06, + 0x13, 0x21, 0x33, 0x73, 0x16, 0x44, 0x86, 0x77, 0x65, 0x28, + 0x12, 0x40, 0x62, 0x54, 0x55, 0x84, 0x00, 0x11, 0x77, 0x38, + 0x71, 0x51, 0x38, 0x32, 0x33, 0x67, 0x15, 0x77, 0x24, 0x33, + 0x44, 0x11, 0x05, 0x65, 0x13, 0x03, 0x72, 0x63, 0x81, 0x58, + 0x08, 0x03, 0x34, 0x23, 0x61, 0x00, 0x02, 0x63, 0x86, 0x40, + 0x03, 0x71, 0x34, 0x27, 0x45, 0x10, 0x34, 0x26, 0x83, 0x28, + 0x31, 0x35, 0x26, 0x05, 0x58, 0x41, 0x11, 0x10, 0x65, 0x35, + 0x22, 0x42, 0x28, 0x88, 0x46, 0x06, 0x57, 0x33, 0x88, 0x46, + 0x04, 0x86, 0x88, 0x88, 0x51, 0x74, 0x82, 0x27, 0x58, 0x14, + 0x11, 0x08, 0x13, 0x16, 0x61, 0x16, 0x14, 0x44, 0x83, 0x85, + 0x71, 0x44, 0x55, 0x82, 0x16, 0x62, 0x85, 0x05, 0x43, 0x41, + 0x73, 0x53, 0x60, 0x01, 0x80, 0x68, 0x33, 0x13, 0x43, 0x44, + 0x73, 0x36, 0x65, 0x35, 0x22, 0x26, 0x13, 0x31, 0x36, 0x83, + 0x30, 0x27, 0x15, 0x11, 0x54, 0x53, 0x24, 0x84, 0x75, 0x24, + 0x72, 0x78, 0x34, 0x24, 0x35, 0x80, 0x06, 0x38, 0x88, 0x11, + 0x41, 0x01, 0x34, 0x87, 0x77, 0x20, 0x14, 0x50, 0x55, 0x12, + 0x17, 0x48, 0x87, 0x74, 0x58, 0x42, 0x31, 0x46, 0x36, 0x37, + 0x26, 0x50, 0x04, 0x75, 0x77, 0x15, 0x41, 0x53, 0x04, 0x04, + 0x26, 0x61, 0x65, 0x87, 0x55, 0x56, 0x07, 0x81, 0x28, 0x21, + 0x41, 0x61, 0x41, 0x50, 0x17, 0x47, 0x25, 0x50, 0x20, 0x83, + 0x46, 0x87, 0x18, 0x45, 0x40, 0x21, 0x06, 0x08, 0x12, 0x25, + 0x71, 0x13, 0x35, 0x55, 0x54, 0x61, 0x00, 0x52, 0x74, 0x78, + 0x13, 0x84, 0x55, 0x40, 0x14, 0x40, 0x78, 0x12, 0x88, 0x43, + 0x33, 0x24, 0x66, 0x88, 0x22, 0x44, 0x15, 0x37, 0x81, 0x27, + 0x84, 0x18, 0x28, 0x11, 0x58, 0x51, 0x71, 0x21, 0x02, 0x83, + 0x70, 0x48, 0x32, 0x46, 0x00, 0x70, 0x17, 0x30, 0x63, 0x21, + 0x46, 0x60, 0x50, 0x72, 0x77, 0x45, 0x83, 0x75, 0x26, 0x31, + 0x47, 0x34, 0x47, 0x84, 0x87, 0x63, 0x22, 0x83, 0x21, 0x10, + 0x21, 0x51, 0x47, 0x46, 0x31, 0x06, 0x57, 0x82, 0x65, 0x24, + 0x61, 0x66, 0x24, 0x68, 0x14, 0x03, 0x43, 0x41, 0x04, 0x14, + 0x47, 0x61, 0x57, 0x87, 0x43, 0x83, 0x43, 0x25, 0x87, 0x36, + 0x72, 0x51, 0x38, 0x51, 0x54, 0x54, 0x84, 0x40, 0x15, 0x30, + 0x35, 0x34, 0x43, 0x61, 0x63, 0x42, 0x77, 0x31, 0x42, 0x06, + 0x61, 0x03, 0x01, 0x41, 0x08, 0x84, 0x02, 0x65, 0x04, 0x72, + 0x32, 0x00, 0x21, 0x10, 0x54, 0x73, 0x04, 0x42, 0x48, 0x11, + 0x74, 0x18, 0x63, 0x73, 0x28, 0x61, 0x36, 0x80, 0x20, 0x86, + 0x24, 0x42, 0x16, 0x11, 0x71, 0x83, 0x78, 0x38, 0x82, 0x47, + 0x67, 0x18, 0x56, 0x86, 0x85, 0x66, 0x18, 0x24, 0x50, 0x74, + 0x72, 0x02, 0x66, 0x83, 0x63, 0x08, 0x25, 0x32, 0x15, 0x78, + 0x33, 0x08, 0x34, 0x44, 0x08, 0x28, 0x10, 0x25, 0x40, 0x11, + 0x04, 0x76, 0x60, 0x16, 0x65, 0x16, 0x13, 0x30, 0x53, 0x14, + 0x77, 0x06, 0x06, 0x88, 0x64, 0x47, 0x08, 0x23, 0x11, 0x56, + 0x46, 0x61, 0x48, 0x64, 0x73, 0x66, 0x07, 0x65, 0x41, 0x24, + 0x67, 0x45, 0x42, 0x18, 0x62, 0x01, 0x70, 0x88, 0x03, 0x77, + 0x22, 0x85, 0x77, 0x02, 0x85, 0x03, 0x65, 0x15, 0x57, 0x51, + 0x28, 0x72, 0x53, 0x32, 0x05, 0x58, 0x84, 0x54, 0x03, 0x81, + 0x63, 0x23, 0x38, 0x27, 0x01, 0x85, 0x61, 0x12, 0x28, 0x62, + 0x22, 0x67, 0x56, 0x66, 0x63, 0x08, 0x74, 0x63, 0x21, 0x01, + 0x46, 0x10, 0x08, 0x18, 0x07, 0x86, 0x47, 0x70, 0x50, 0x25, + 0x45, 0x06, 0x55, 0x88, 0x46, 0x11, 0x23, 0x84, 0x70, 0x02, + 0x24, 0x88, 0x52, 0x60, 0x12, 0x72, 0x63, 0x05, 0x81, 0x21, + 0x26, 0x07, 0x64, 0x03, 0x56, 0x48, 0x27, 0x04, 0x38, 0x86, + 0x25, 0x65, 0x21, 0x25, 0x77, 0x21, 0x62, 0x28, 0x82, 0x71, + 0x85, 0x73, 0x78, 0x24, 0x78, 0x51, 0x61, 0x02, 0x81, 0x14, + 0x67, 0x61, 0x08, 0x88, 0x31, 0x77, 0x06, 0x24, 0x45, 0x13, + 0x67, 0x67, 0x54, 0x67, 0x00, 0x12, 0x62, 0x54, 0x11, 0x27, + 0x51, 0x48, 0x07, 0x33, 0x01, 0x24, 0x04, 0x64, 0x11, 0x83, + 0x18, 0x52, 0x55, 0x23, 0x24, 0x58, 0x53, 0x78, 0x30, 0x43, + 0x31, 0x76, 0x62, 0x01, 0x08, 0x73, 0x21, 0x32, 0x12, 0x78, + 0x22, 0x68, 0x33, 0x45, 0x33, 0x73, 0x02, 0x74, 0x21, 0x81, + 0x02, 0x16, 0x54, 0x31, 0x55, 0x76, 0x25, 0x76, 0x41, 0x36, + 0x75, 0x22, 0x78, 0x16, 0x60, 0x48, 0x58, 0x28, 0x83, 0x50, + 0x88, 0x66, 0x72, 0x70, 0x21, 0x21, 0x24, 0x16, 0x62, 0x57, + 0x20, 0x13, 0x80, 0x61, 0x15, 0x45, 0x42, 0x86, 0x00, 0x25, + 0x77, 0x58, 0x84, 0x01, 0x66, 0x16, 0x46, 0x56, 0x68, 0x57, + 0x12, 0x20, 0x75, 0x60, 0x41, 0x85, 0x02, 0x88, 0x12, 0x68, + 0x20, 0x02, 0x41, 0x18, 0x87, 0x13, 0x17, 0x33, 0x74, 0x11, + 0x08, 0x37, 0x47, 0x08, 0x31, 0x67, 0x08, 0x50, 0x61, 0x54, + 0x56, 0x71, 0x63, 0x26, 0x85, 0x22, 0x07, 0x87, 0x71, 0x28, + 0x20, 0x47, 0x48, 0x66, 0x54, 0x38, 0x03, 0x41, 0x38, 0x21, + 0x70, 0x50, 0x66, 0x53, 0x56, 0x70, 0x74, 0x55, 0x70, 0x28, + 0x52, 0x01, 0x42, 0x65, 0x53, 0x73, 0x32, 0x33, 0x67, 0x42, + 0x67, 0x85, 0x18, 0x45, 0x12, 0x37, 0x58, 0x82, 0x13, 0x73, + 0x78, 0x77, 0x03, 0x42, 0x04, 0x65, 0x55, 0x66, 0x07, 0x25, + 0x07, 0x37, 0x40, 0x78, 0x66, 0x71, 0x11, 0x21, 0x43, 0x25, + 0x87, 0x40, 0x58, 0x63, 0x33, 0x43, 0x52, 0x10, 0x31, 0x53, + 0x56, 0x48, 0x05, 0x55, 0x77, 0x77, 0x26, 0x87, 0x28, 0x43, + 0x61, 0x46, 0x11, 0x76, 0x82, 0x50, 0x42, 0x04, 0x32, 0x88, + 0x18, 0x66, 0x16, 0x36, 0x64, 0x41, 0x38, 0x17, 0x55, 0x43, + 0x06, 0x25, 0x80, 0x27, 0x21, 0x16, 0x81, 0x22, 0x64, 0x60, + 0x38, 0x16, 0x82, 0x40, 0x72, 0x34, 0x73, 0x52, 0x61, 0x85, + 0x11, 0x16, 0x00, 0x25, 0x03, 0x30, 0x06, 0x80, 0x21, 0x56, + 0x64, 0x52, 0x23, 0x26, 0x37, 0x75, 0x73, 0x65, 0x53, 0x27, + 0x37, 0x47, 0x56, 0x76, 0x80, 0x38, 0x53, 0x62, 0x14, 0x24, + 0x64, 0x03, 0x66, 0x21, 0x72, 0x16, 0x36, 0x34, 0x11, 0x65, + 0x61, 0x62, 0x86, 0x02, 0x83, 0x27, 0x80, 0x82, 0x70, 0x72, + 0x52, 0x60, 0x20, 0x87, 0x58, 0x58, 0x14, 0x38, 0x47, 0x03, + 0x10, 0x72, 0x60, 0x48, 0x02, 0x01, 0x17, 0x21, 0x61, 0x62, + 0x38, 0x64, 0x27, 0x53, 0x57, 0x13, 0x68, 0x18, 0x26, 0x62, + 0x43, 0x42, 0x21, 0x85, 0x70, 0x23, 0x58, 0x13, 0x72, 0x04, + 0x04, 0x08, 0x05, 0x82, 0x26, 0x18, 0x82, 0x47, 0x87, 0x71, + 0x32, 0x28, 0x68, 0x25, 0x87, 0x24, 0x06, 0x74, 0x41, 0x44, + 0x08, 0x64, 0x68, 0x30, 0x24, 0x44, 0x21, 0x73, 0x03, 0x45, + 0x70, 0x41, 0x06, 0x78, 0x38, 0x33, 0x88, 0x13, 0x31, 0x14, + 0x18, 0x17, 0x45, 0x06, 0x26, 0x67, 0x66, 0x73, 0x82, 0x56, + 0x66, 0x88, 0x70, 0x22, 0x55, 0x47, 0x27, 0x50, 0x86, 0x55, + 0x53, 0x00, 0x28, 0x55, 0x40, 0x62, 0xe9, 0x37, 0x65, 0xe1, + 0x30, 0x48, 0x6b, 0x35, 0x76, 0x96, 0x05, 0x21, 0xce, 0xed, + 0x46, 0xae, 0x7e, 0x6d, 0xc9, 0xf1, 0xc9, 0xb3, 0x7a, 0xa7, + 0xde, 0xa7, 0x62, 0x18, 0x11, 0xc0, 0xd8, 0xd0, 0x17, 0x0f, + 0x38, 0xaf, 0x0e, 0x3d, 0xaf, 0xe6, 0x63, 0xb0, 0xc4, 0x68, + 0x4e, 0x29, 0xa4, 0xf4, 0x20, 0x22, 0xbc, 0x82, 0x15, 0x1d, + 0x08, 0x39, 0x18, 0xfe, 0x69, 0x55, 0x06, 0x3d, 0xf4, 0xa3, + 0xe7, 0x29, 0x23, 0xa4, 0xd9, 0xa4, 0x22, 0x06, 0x2d, 0x5f, + 0x22, 0xb3, 0x9b, 0x1c, 0xb6, 0x3e, 0xf3, 0xf4, 0x8a, 0xb3, + 0x35, 0x18, 0x4c, 0x1f, 0xaf, 0xd4, 0xcf, 0x5b, 0x9b, 0xa7, + 0xf8, 0xd2, 0x86, 0x71, 0x8e, 0x64, 0x96, 0xd1, 0x6e, 0xad, + 0xd2, 0x7e, 0x16, 0x5b, 0x38, 0x91, 0x0e, 0x40, 0xaa, 0x07, + 0x6a, 0x63, 0x2a, 0xc0, 0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, 0x03, 0x7b, + 0x75, 0x2c, 0xe5, 0x72, 0xec, 0xc9, 0x25, 0x06, 0x6b, 0x3a, + 0x5e, 0x0e, 0x96, 0xd0, 0xe3, 0x85, 0xb0, 0xb5, 0x6a, 0x83, + 0x40, 0x41, 0x94, 0xce, 0xa1, 0x07, 0x79, 0x07, 0xe2, 0x50, + 0xa4, 0xde, 0x7d, 0x64, 0x2f, 0x7e, 0x43, 0xd5, 0x72, 0xd1, + 0xa7, 0xb9, 0x76, 0xa3, 0xfc, 0x25, 0x33, 0xd7, 0x95, 0xb5, + 0xd9, 0x94, 0x93, 0x55, 0xaf, 0x04, 0x86, 0x4a, 0xfc, 0x2f, + 0x5f, 0x3d, 0x34, 0x86, 0xf2, 0x9a, 0x31, 0x4c, 0xc9, 0xad, + 0x08, 0xa5, 0x03, 0x91, 0x8a, 0x7e, 0x46, 0xc9, 0x44, 0x61, + 0x11, 0x59, 0x4f, 0xbb, 0x70, 0xf9, 0x9d, 0x3e, 0x6d, 0x53, + 0xb4, 0x16, 0x28, 0xd3, 0x67, 0x52, 0x14, 0xad, 0xba, 0xb1, + 0x21, 0xaf, 0x84, 0x18, 0xc9, 0x37, 0x78, 0xb3, 0x78, 0x92, + 0x95, 0xad, 0x1b, 0xc0, 0x70, 0xe7, 0xe9, 0x06, 0x02, 0xed, + 0x6c, 0x99, 0x4e, 0x43, 0xc0, 0xa4, 0x6f, 0x23, 0xa8, 0x02, + 0xc4, 0xbd, 0xc0, 0x16, 0xc4, 0xed, 0xe0, 0xe1, 0x56, 0x06, + 0x3f, 0xf4, 0x77, 0x12, 0x72, 0x52, 0x04, 0xe8, 0xe4, 0x26, + 0xe5, 0x01, 0x47, 0x5b, 0x8a, 0xca, 0x07, 0x3b, 0xc9, 0xb1, + 0x42, 0x8f, 0x7d, 0x64, 0x7d, 0x5d, 0x6a, 0x95, 0xde, 0x4d, + 0x4b, 0xd3, 0xfa, 0xcf, 0xf0, 0x25, 0x27, 0x96, 0x48, 0xb6, + 0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24, 0x66, 0x86, 0x96, 0xb8, 0xc8, 0xe9, 0xd0, + 0x38, 0x0e, 0x96, 0x4d, 0xcc, 0x45, 0xab, 0xe1, 0xca, 0x50, + 0x10, 0x20, 0x01, 0xbe, 0x89, 0xc0, 0x43, 0x84, 0xd8, 0x38, + 0x52, 0xc0, 0xaf, 0x4d, 0x6b, 0x99, 0x0b, 0xc0, 0xc2, 0x99, + 0x07, 0xc6, 0x78, 0xa8, 0xf7, 0x32, 0x84, 0x86, 0xc5, 0x1a, + 0x95, 0x81, 0xa6, 0x6a, 0x05, 0xa7, 0x9d, 0x81, 0x0e, 0x32, + 0x18, 0x11, 0x4a, 0x0f, 0xfc, 0x17, 0x9e, 0xf7, 0xbf, 0x54, + 0x82, 0xed, 0xba, 0x6f, 0xbd, 0x41, 0xc1, 0xca, 0x55, 0x6c, + 0xff, 0x32, 0x6b, 0xa2, 0x59, 0xae, 0xae, 0x92, 0xc1, 0xb5, + 0xa6, 0xfc, 0xaf, 0x09, 0x48, 0x57, 0xd6, 0xee, 0x38, 0x99, + 0xb4, 0xe3, 0x8f, 0xb7, 0xfc, 0x6a, 0x0a, 0x3b, 0x08, 0xe1, + 0x81, 0x46, 0x11, 0xeb, 0x4a, 0x98, 0x43, 0x16, 0x16, 0x1f, + 0x68, 0xdb, 0xb9, 0x71, 0x19, 0xfe, 0x8b, 0xe6, 0xb7, 0x8b, + 0xc1, 0x3b, 0x90, 0xc5, 0x89, 0x1d, 0xca, 0xd9, 0x19, 0x6c, + 0xe8, 0x01, 0xf4, 0x19, 0x50, 0x3e, 0x93, 0x84, 0xbf, 0xaa, + 0x9a, 0x3d, 0x20, 0x4c, 0x4e, 0x79, 0x83, 0xec, 0x46, 0x83, + 0x09, 0x00, 0xc3, 0x8a, 0xad, 0xd5, 0x2b, 0x08, 0xd1, 0x47, + 0xac, 0x96, 0x0e, 0x34, 0xf0, 0x89, 0x1a, 0x0f, 0xf2, 0x51, + 0x8d, 0x2c, 0xb5, 0xf2, 0xfe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5, 0x9b, + 0x08, 0xaa, 0xcd, 0x24, 0x86, 0x98, 0x59, 0x0f, 0xc6, 0x0e, + 0xd2, 0x71, 0xb2, 0x5e, 0xae, 0x72, 0xc9, 0x69, 0x3b, 0x80, + 0xc2, 0x27, }; static const int sizeof_bench_dilithium_level3_key = sizeof(bench_dilithium_level3_key); -/* certs/dilithium/bench_dilithium_level5_key.der */ -static const unsigned char bench_dilithium_level5_key[] = -{ - 0x30, 0x82, 0x1D, 0x3A, 0x02, 0x01, 0x00, 0x30, 0x0D, 0x06, - 0x0B, 0x2B, 0x06, 0x01, 0x04, 0x01, 0x02, 0x82, 0x0B, 0x07, - 0x08, 0x07, 0x04, 0x82, 0x1D, 0x24, 0x04, 0x82, 0x1D, 0x20, - 0x0A, 0xDB, 0x85, 0x3A, 0x41, 0x2C, 0x30, 0x56, 0x65, 0x04, - 0x0A, 0x20, 0x31, 0x2A, 0xF3, 0x88, 0x4C, 0x38, 0x64, 0x86, - 0x14, 0x06, 0xF5, 0xF0, 0x7F, 0x63, 0xC1, 0x87, 0x24, 0x39, - 0xFB, 0xC0, 0x28, 0x0C, 0xBE, 0x81, 0xF7, 0xCD, 0x25, 0x8B, - 0x86, 0x42, 0xAD, 0x74, 0x54, 0xCB, 0xA4, 0xDA, 0xC7, 0x94, - 0x70, 0xA3, 0x41, 0xDA, 0x1F, 0xD8, 0x4F, 0x94, 0x5C, 0x0B, - 0xA5, 0x35, 0x60, 0xB2, 0x8C, 0x50, 0xED, 0x0B, 0xCB, 0x75, - 0x6F, 0x14, 0x64, 0x48, 0x86, 0x21, 0xBC, 0x4A, 0x4C, 0xC5, - 0x22, 0xBC, 0x2D, 0x28, 0x32, 0x39, 0x13, 0x57, 0xC9, 0xE5, - 0x74, 0xF4, 0xE6, 0x3A, 0xC2, 0xE2, 0x49, 0x24, 0x31, 0x88, - 0x82, 0x08, 0x03, 0x89, 0x6C, 0x8B, 0x84, 0x08, 0x81, 0xC2, - 0x08, 0xDB, 0x44, 0x60, 0xA0, 0xB2, 0x91, 0x88, 0x36, 0x28, - 0x12, 0x89, 0x89, 0x4B, 0xA4, 0x01, 0x62, 0x12, 0x4C, 0x08, - 0x02, 0x44, 0x19, 0x15, 0x64, 0x8B, 0x04, 0x65, 0xE4, 0x14, - 0x06, 0x08, 0xC7, 0x04, 0x5B, 0x28, 0x81, 0x89, 0xC2, 0x70, - 0xD0, 0xB4, 0x71, 0x4C, 0x24, 0x80, 0xA1, 0x28, 0x86, 0xD1, - 0x06, 0x25, 0x13, 0x03, 0x84, 0x8C, 0x18, 0x41, 0x49, 0x34, - 0x09, 0xCB, 0x22, 0x71, 0x0C, 0xA3, 0x90, 0x22, 0x94, 0x51, - 0x58, 0x02, 0x2D, 0x53, 0x30, 0x00, 0xC2, 0x06, 0x42, 0x48, - 0xC4, 0x70, 0x8A, 0x32, 0x89, 0x80, 0x16, 0x06, 0x90, 0x44, - 0x91, 0xCB, 0xC8, 0x71, 0xA2, 0xB6, 0x64, 0xD0, 0x26, 0x0A, - 0x21, 0x05, 0x88, 0x0C, 0xB0, 0x6C, 0x03, 0x49, 0x24, 0x80, - 0x02, 0x11, 0xD1, 0x36, 0x06, 0x84, 0x32, 0x11, 0x81, 0x44, - 0x91, 0x9B, 0xB0, 0x01, 0x91, 0x02, 0x25, 0x44, 0x92, 0x69, - 0x5A, 0x08, 0x6C, 0x90, 0x00, 0x0D, 0x09, 0x17, 0x64, 0x89, - 0xB2, 0x2D, 0x02, 0x06, 0x2C, 0xDC, 0x92, 0x45, 0xE1, 0x34, - 0x31, 0x11, 0x03, 0x2D, 0x00, 0x94, 0x29, 0xCA, 0x34, 0x89, - 0xA3, 0x40, 0x22, 0xC4, 0x30, 0x08, 0x02, 0x33, 0x6E, 0x1C, - 0x85, 0x10, 0xE4, 0x92, 0x30, 0xC4, 0x46, 0x84, 0xE0, 0x26, - 0x28, 0xC3, 0x10, 0x65, 0x51, 0x06, 0x4A, 0x03, 0xC1, 0x11, - 0x48, 0x32, 0x4E, 0x9A, 0xC4, 0x6C, 0x91, 0x38, 0x40, 0xC0, - 0x92, 0x64, 0xE3, 0xA4, 0x85, 0x22, 0x32, 0x52, 0x92, 0x08, - 0x20, 0x82, 0x22, 0x12, 0x49, 0x20, 0x6C, 0x91, 0x06, 0x01, - 0x1B, 0x30, 0x06, 0x12, 0xC3, 0x41, 0x4B, 0x40, 0x42, 0x0B, - 0xA7, 0x01, 0x60, 0x12, 0x89, 0x24, 0x98, 0x30, 0x99, 0xA6, - 0x64, 0x61, 0x26, 0x6A, 0x91, 0xB0, 0x11, 0x03, 0xC2, 0x2D, - 0x41, 0xC8, 0x6D, 0xD8, 0x38, 0x28, 0x4B, 0x98, 0x04, 0x98, - 0x18, 0x09, 0x18, 0xA6, 0x65, 0x81, 0x38, 0x69, 0x5B, 0xC4, - 0x6D, 0x98, 0x26, 0x0D, 0x62, 0xC6, 0x71, 0xC3, 0xC6, 0x4C, - 0xC2, 0x02, 0x46, 0x5B, 0x94, 0x65, 0x09, 0x29, 0x0E, 0xA2, - 0xA2, 0x41, 0xE4, 0x02, 0x69, 0xA3, 0x90, 0x4D, 0x8B, 0xA6, - 0x70, 0xA3, 0x40, 0x85, 0x5C, 0x36, 0x48, 0x22, 0xC5, 0x84, - 0x19, 0x91, 0x25, 0x00, 0xC2, 0x65, 0xC4, 0x46, 0x2E, 0xDC, - 0xB0, 0x51, 0x94, 0x28, 0x01, 0x9B, 0x22, 0x66, 0x01, 0xA8, - 0x90, 0x9A, 0xC4, 0x08, 0xD1, 0x22, 0x41, 0x42, 0x34, 0x62, - 0x60, 0x40, 0x92, 0x93, 0xC8, 0x45, 0xD8, 0x04, 0x20, 0x8A, - 0x30, 0x25, 0xE1, 0x14, 0x40, 0x11, 0x13, 0x00, 0x54, 0x22, - 0x62, 0x50, 0x10, 0x22, 0x03, 0xA9, 0x85, 0x9B, 0x42, 0x4D, - 0x50, 0xB2, 0x41, 0x10, 0x13, 0x48, 0x63, 0x38, 0x68, 0xA1, - 0xB0, 0x0D, 0x1B, 0x88, 0x84, 0x8A, 0x28, 0x51, 0xD4, 0x38, - 0x2A, 0x12, 0x43, 0x61, 0x80, 0x38, 0x32, 0x18, 0xC6, 0x29, - 0x22, 0xB5, 0x21, 0x02, 0x99, 0x28, 0xCC, 0x18, 0x85, 0x83, - 0xB4, 0x8C, 0x81, 0x24, 0x51, 0x10, 0x83, 0x68, 0x1C, 0x47, - 0x71, 0x8C, 0x40, 0x6C, 0x00, 0xB6, 0x0D, 0x88, 0x22, 0x90, - 0x0C, 0xC7, 0x49, 0xC0, 0x82, 0x89, 0xDA, 0x22, 0x4A, 0xC8, - 0x18, 0x08, 0xD1, 0x00, 0x2C, 0xDA, 0x30, 0x49, 0x49, 0xC8, - 0x91, 0x5A, 0x96, 0x64, 0x11, 0x96, 0x20, 0xD2, 0xC4, 0x60, - 0xE0, 0x46, 0x6A, 0x02, 0xB5, 0x21, 0x19, 0xB9, 0x81, 0x23, - 0x00, 0x22, 0x11, 0x37, 0x32, 0x19, 0xA4, 0x0D, 0x51, 0x96, - 0x89, 0x1B, 0x11, 0x11, 0xC3, 0x14, 0x88, 0x4C, 0x96, 0x0C, - 0x01, 0x13, 0x72, 0x83, 0x16, 0x12, 0x24, 0x38, 0x51, 0x40, - 0x34, 0x89, 0xD9, 0x26, 0x01, 0x54, 0x42, 0x8D, 0x00, 0xC1, - 0x85, 0x13, 0x14, 0x84, 0x82, 0x16, 0x25, 0x88, 0xB0, 0x51, - 0x11, 0x80, 0x30, 0x23, 0x25, 0x46, 0x04, 0x27, 0x66, 0x11, - 0x28, 0x30, 0xD4, 0x94, 0x84, 0x10, 0xA0, 0x8C, 0xC1, 0x36, - 0x0C, 0x14, 0x98, 0x28, 0x5B, 0x02, 0x90, 0xD9, 0x90, 0x31, - 0xD3, 0x28, 0x68, 0x23, 0x90, 0x80, 0x24, 0xC7, 0x84, 0xA1, - 0x00, 0x09, 0xC1, 0x36, 0x84, 0x58, 0xB6, 0x28, 0x4A, 0xB0, - 0x69, 0x08, 0x10, 0x51, 0x1C, 0xB6, 0x84, 0x83, 0x84, 0x81, - 0x03, 0x39, 0x90, 0x81, 0x42, 0x12, 0x13, 0xB4, 0x49, 0x0A, - 0x20, 0x09, 0x93, 0x22, 0x42, 0xD4, 0x26, 0x21, 0xA3, 0x32, - 0x89, 0x89, 0x84, 0x81, 0x0B, 0x02, 0x21, 0x64, 0x28, 0x90, - 0x89, 0xB2, 0x29, 0xE1, 0x36, 0x2C, 0x11, 0x30, 0x51, 0x21, - 0x83, 0x2C, 0x04, 0x36, 0x26, 0x61, 0x12, 0x8C, 0x19, 0x43, - 0x52, 0x89, 0x90, 0x88, 0x43, 0xB8, 0x71, 0x0C, 0x43, 0x09, - 0x84, 0x26, 0x6A, 0x50, 0x36, 0x20, 0x00, 0xC3, 0x68, 0x91, - 0x38, 0x0E, 0x12, 0x12, 0x52, 0x82, 0xC4, 0x4D, 0x64, 0x90, - 0x4D, 0x8C, 0x30, 0x22, 0x14, 0x26, 0x6E, 0x10, 0x46, 0x8E, - 0x58, 0x34, 0x46, 0x22, 0x97, 0x68, 0x02, 0x43, 0x61, 0x41, - 0x06, 0x01, 0x88, 0x42, 0x40, 0x08, 0x06, 0x6D, 0x80, 0x42, - 0x22, 0x84, 0x48, 0x89, 0xDB, 0x84, 0x90, 0xC0, 0x22, 0x71, - 0x43, 0x96, 0x45, 0x0A, 0xA3, 0x30, 0x12, 0x28, 0x44, 0x51, - 0x00, 0x52, 0x99, 0xA0, 0x8D, 0xC2, 0x28, 0x00, 0xC8, 0x18, - 0x6E, 0xA2, 0x40, 0x8E, 0x03, 0x47, 0x31, 0x61, 0x22, 0x41, - 0xD3, 0xB4, 0x01, 0x48, 0x14, 0x40, 0x4C, 0x06, 0x0C, 0x41, - 0x06, 0x2A, 0x5B, 0x90, 0x25, 0xCC, 0xC6, 0x41, 0xC3, 0x86, - 0x28, 0x99, 0x26, 0x50, 0x11, 0xC4, 0x8D, 0x8C, 0x30, 0x68, - 0x8C, 0x08, 0x0C, 0x50, 0x38, 0x86, 0xDC, 0x10, 0x92, 0xD4, - 0x18, 0x72, 0x02, 0xA8, 0x2C, 0x42, 0x82, 0x44, 0x53, 0x36, - 0x0E, 0x90, 0x32, 0x49, 0x84, 0x24, 0x09, 0x12, 0xA2, 0x41, - 0x82, 0x10, 0x4D, 0x01, 0xA0, 0x8C, 0x11, 0xB2, 0x80, 0x21, - 0x89, 0x69, 0x24, 0x21, 0x28, 0x02, 0x03, 0x6E, 0x49, 0x32, - 0x0C, 0x08, 0x88, 0x84, 0x91, 0x80, 0x10, 0x0C, 0x33, 0x12, - 0x43, 0x24, 0x8A, 0x82, 0x26, 0x10, 0x60, 0xC6, 0x60, 0x48, - 0xA2, 0x10, 0x12, 0x83, 0x24, 0x0B, 0x03, 0x40, 0xCA, 0x08, - 0x20, 0x99, 0x36, 0x86, 0x5B, 0x24, 0x41, 0x10, 0x87, 0x04, - 0x0C, 0x15, 0x04, 0x14, 0xB2, 0x68, 0x0B, 0x89, 0x29, 0x99, - 0x16, 0x8D, 0x00, 0x42, 0x00, 0x9B, 0x48, 0x44, 0x12, 0x45, - 0x6C, 0x0A, 0x25, 0x92, 0xC0, 0xC4, 0x00, 0x1A, 0xC8, 0x31, - 0x21, 0x26, 0x8A, 0x81, 0xA0, 0x2C, 0x11, 0x85, 0x65, 0x9A, - 0x08, 0x61, 0xD9, 0x22, 0x12, 0xCB, 0x36, 0x71, 0xA2, 0x08, - 0x0A, 0xE4, 0x06, 0x32, 0x19, 0x19, 0x4A, 0x1B, 0x34, 0x45, - 0x51, 0x06, 0x6E, 0x48, 0x02, 0x68, 0x13, 0xB7, 0x10, 0x44, - 0xC8, 0x85, 0x13, 0x81, 0x2C, 0xC4, 0x40, 0x45, 0x42, 0x98, - 0x21, 0x62, 0x18, 0x92, 0x9B, 0x44, 0x25, 0xA1, 0x06, 0x28, - 0x52, 0x82, 0x11, 0x44, 0x24, 0x32, 0x02, 0xC6, 0x80, 0x10, - 0x45, 0x4E, 0x22, 0x93, 0x0D, 0x44, 0x02, 0x68, 0x4A, 0x30, - 0x81, 0xC9, 0x94, 0x85, 0x08, 0x07, 0x08, 0x24, 0x39, 0x64, - 0xD2, 0x08, 0x22, 0xD0, 0xA0, 0x41, 0x81, 0x92, 0x91, 0x8C, - 0x24, 0x6A, 0xCA, 0x36, 0x32, 0x1C, 0x12, 0x45, 0x92, 0x94, - 0x80, 0x82, 0x86, 0x4C, 0xDA, 0xA2, 0x84, 0x98, 0x24, 0x49, - 0x0A, 0x13, 0x90, 0x1B, 0xC3, 0x01, 0x49, 0x28, 0x60, 0x08, - 0x21, 0x92, 0x0B, 0xB0, 0x20, 0x52, 0x90, 0x84, 0x8A, 0x32, - 0x11, 0x50, 0x28, 0x8C, 0x5B, 0x38, 0x2E, 0xDC, 0xB4, 0x08, - 0x12, 0x20, 0x84, 0xD1, 0x12, 0x22, 0x99, 0x08, 0x11, 0x19, - 0x95, 0x10, 0x80, 0x44, 0x6A, 0xE1, 0x12, 0x85, 0xCC, 0xB0, - 0x24, 0x23, 0x15, 0x4C, 0x63, 0x34, 0x68, 0x5C, 0xB6, 0x65, - 0x42, 0xC2, 0x4D, 0x20, 0x95, 0x84, 0x8A, 0x42, 0x00, 0x4C, - 0x24, 0x50, 0x98, 0x02, 0x6C, 0x21, 0x44, 0x84, 0x20, 0x85, - 0x21, 0x80, 0x48, 0x6C, 0x9C, 0x14, 0x86, 0x81, 0x86, 0x91, - 0x1C, 0x09, 0x04, 0xDC, 0xC6, 0x28, 0x09, 0x27, 0x30, 0x4B, - 0x02, 0x64, 0x44, 0x46, 0x30, 0x9C, 0xA2, 0x8C, 0x20, 0x11, - 0x68, 0x11, 0x24, 0x51, 0x0B, 0x02, 0x00, 0xD2, 0x82, 0x4D, - 0xC3, 0x80, 0x71, 0xE0, 0x48, 0x2C, 0x4A, 0x88, 0x50, 0xA0, - 0x20, 0x49, 0x4B, 0xB4, 0x31, 0x08, 0x12, 0x71, 0x90, 0xA2, - 0x89, 0xCA, 0x46, 0x85, 0x91, 0x96, 0x91, 0x8A, 0x30, 0x31, - 0x0B, 0xC2, 0x21, 0x61, 0x10, 0x49, 0x10, 0x99, 0x81, 0x53, - 0x36, 0x0C, 0x23, 0x81, 0x88, 0x62, 0x28, 0x0A, 0x12, 0x43, - 0x70, 0x02, 0xC7, 0x51, 0x14, 0x34, 0x88, 0x23, 0x84, 0x49, - 0x23, 0x86, 0x08, 0x0C, 0x28, 0x28, 0x94, 0xA0, 0x8D, 0x11, - 0x33, 0x60, 0xA3, 0x38, 0x6E, 0xC0, 0x42, 0x2E, 0x52, 0xB4, - 0x40, 0x0A, 0x25, 0x4D, 0x1C, 0x10, 0x2A, 0x9A, 0x96, 0x64, - 0x10, 0xC1, 0x60, 0x8C, 0x46, 0x60, 0x5A, 0x24, 0x89, 0x42, - 0x40, 0x86, 0xD0, 0x34, 0x89, 0x5C, 0x02, 0x02, 0x00, 0x34, - 0x21, 0x00, 0x24, 0x00, 0xA0, 0x20, 0x60, 0x03, 0xA6, 0x40, - 0xDC, 0x30, 0x80, 0x4B, 0xA8, 0x20, 0x0B, 0xA2, 0x24, 0xE2, - 0xB0, 0x89, 0xA2, 0xB2, 0x65, 0xD4, 0xA6, 0x68, 0x20, 0xA3, - 0x04, 0x4C, 0xC2, 0x11, 0x4A, 0x38, 0x24, 0x08, 0x17, 0x4D, - 0xE2, 0xA2, 0x00, 0x02, 0xC8, 0x00, 0x08, 0x00, 0x30, 0xA4, - 0xB6, 0x25, 0x5A, 0x30, 0x01, 0x40, 0x92, 0x4C, 0xC8, 0x44, - 0x92, 0x43, 0xC8, 0x60, 0xA3, 0x86, 0x84, 0x18, 0x04, 0x70, - 0x53, 0xB2, 0x40, 0x4C, 0x04, 0x84, 0x09, 0xC8, 0x48, 0x21, - 0x13, 0x31, 0x04, 0xA5, 0x0D, 0x90, 0x92, 0x88, 0xC1, 0x10, - 0x8D, 0xE0, 0x88, 0x28, 0x0B, 0x06, 0x84, 0x23, 0x22, 0x6C, - 0xDB, 0xB2, 0x05, 0xC8, 0x08, 0x6E, 0x93, 0x86, 0x4C, 0x0C, - 0x37, 0x86, 0xDA, 0x16, 0x51, 0x9B, 0x08, 0x32, 0x00, 0x91, - 0x45, 0xA4, 0x00, 0x2D, 0x14, 0x02, 0x0E, 0x60, 0x90, 0x4C, - 0x23, 0xB4, 0x09, 0x00, 0xA5, 0x81, 0x19, 0x21, 0x32, 0xC2, - 0x00, 0x02, 0x18, 0x10, 0x50, 0x08, 0xA2, 0x6D, 0x20, 0x31, - 0x6A, 0x90, 0x46, 0x90, 0x8B, 0x94, 0x30, 0x21, 0x44, 0x52, - 0x10, 0x19, 0x51, 0x94, 0xC0, 0x29, 0xC8, 0x20, 0x4E, 0x48, - 0xA6, 0x4C, 0x11, 0xC4, 0x64, 0xDC, 0x34, 0x10, 0x48, 0xC4, - 0x84, 0xCA, 0x46, 0x0C, 0x58, 0x12, 0x49, 0x0B, 0x16, 0x00, - 0x20, 0x42, 0x50, 0x04, 0x00, 0x46, 0xF8, 0x68, 0xB1, 0xA7, - 0x5E, 0xA7, 0xE6, 0xCE, 0xF5, 0x88, 0x8A, 0x5F, 0x79, 0xC9, - 0x3A, 0x5F, 0xF2, 0x7F, 0x5A, 0xED, 0xB4, 0xB4, 0x25, 0x44, - 0xD2, 0x7E, 0xED, 0xCE, 0x46, 0x40, 0xAC, 0xC2, 0x53, 0xD0, - 0xD3, 0xE7, 0xF6, 0x1C, 0xFA, 0x23, 0x4A, 0xB0, 0xEA, 0x32, - 0x91, 0xB7, 0xDA, 0x8B, 0x72, 0x35, 0xB7, 0x74, 0xD5, 0x9A, - 0x9B, 0x22, 0x3D, 0x49, 0x08, 0xBA, 0xD1, 0x7D, 0x9F, 0x64, - 0xD5, 0xAD, 0x7A, 0x37, 0xBD, 0x11, 0xD0, 0xA0, 0x7C, 0x53, - 0x05, 0x1A, 0x66, 0x6C, 0x5D, 0x42, 0x45, 0x55, 0x34, 0xC0, - 0x1F, 0xCA, 0xDB, 0x0D, 0x4F, 0x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, - 0x35, 0x6D, 0x36, 0xBA, 0xA4, 0x38, 0x98, 0x38, 0xD9, 0x59, - 0x81, 0x16, 0x8C, 0xCE, 0x78, 0xCA, 0xD1, 0x86, 0x8B, 0x3A, - 0xD9, 0xA5, 0x5B, 0x7C, 0x53, 0x24, 0xB8, 0xD2, 0x2B, 0x09, - 0x73, 0x04, 0x87, 0x3E, 0x39, 0x64, 0x42, 0x5A, 0xE1, 0xC8, - 0x72, 0xD5, 0x00, 0x06, 0x06, 0x81, 0x91, 0x7A, 0x12, 0xA1, - 0x91, 0xEC, 0xBF, 0xD6, 0xBC, 0xFD, 0x82, 0xDA, 0xEE, 0x3A, - 0xB7, 0xF1, 0x54, 0xE3, 0xBD, 0xE5, 0xC0, 0x18, 0xE9, 0x5C, - 0x49, 0x0C, 0xFA, 0x64, 0x80, 0x98, 0x5C, 0x44, 0x9B, 0x4A, - 0x48, 0x3E, 0x0C, 0xBE, 0x5E, 0xBB, 0x68, 0xDA, 0x09, 0xD7, - 0x00, 0x51, 0x5B, 0x13, 0x96, 0xC2, 0x8A, 0xCE, 0xB0, 0x8F, - 0xDF, 0x84, 0x77, 0x70, 0x4B, 0x0F, 0x6E, 0xC7, 0x62, 0x47, - 0xFA, 0xA8, 0x35, 0x18, 0x43, 0x93, 0x4C, 0x83, 0x13, 0x45, - 0x74, 0x76, 0x19, 0xA7, 0x71, 0x98, 0x8C, 0x2E, 0xFC, 0xA9, - 0x83, 0x64, 0xD1, 0xA3, 0x95, 0x33, 0x31, 0xDB, 0xA8, 0xC3, - 0xB9, 0x72, 0x80, 0x58, 0xEC, 0xEB, 0xFC, 0xF3, 0x03, 0x44, - 0xDC, 0x11, 0x06, 0x3A, 0x95, 0x81, 0x28, 0xDB, 0xAB, 0x36, - 0xC4, 0x37, 0x0C, 0xD4, 0x6B, 0xAF, 0x04, 0xD0, 0x23, 0x3F, - 0xDD, 0x08, 0x88, 0x06, 0x23, 0x39, 0xCF, 0xB2, 0xCF, 0x13, - 0x27, 0x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EA, - 0x6B, 0xA6, 0x64, 0x09, 0x7B, 0x2F, 0x34, 0xE0, 0x21, 0x29, - 0xDA, 0xE3, 0xCF, 0xFE, 0xA7, 0x8E, 0x14, 0x3A, 0xD7, 0x53, - 0x26, 0xD7, 0x82, 0x0E, 0x2A, 0x00, 0x43, 0xEB, 0x6A, 0x23, - 0x75, 0x28, 0xD0, 0x9B, 0x85, 0xE0, 0xFB, 0x14, 0x19, 0xF3, - 0x6A, 0x73, 0x6C, 0x97, 0x0E, 0x21, 0xFC, 0x0F, 0x26, 0xC5, - 0xCE, 0xB7, 0xC6, 0x59, 0xA2, 0xE6, 0x4C, 0xF4, 0xC7, 0xBB, - 0x9B, 0xA8, 0xFA, 0x12, 0xC7, 0xDA, 0x33, 0x26, 0x69, 0x83, - 0x49, 0xA8, 0x0A, 0x3E, 0xF0, 0xD4 +#endif /* !WOLFSSL_DILITHIUM_NO_SIGN */ + +#ifndef WOLFSSL_DILITHIUM_NO_VERIFY + +static const unsigned char bench_dilithium_level3_pubkey[] = { + 0x15, 0xc9, 0xe5, 0x53, 0x2f, 0xd8, 0x1f, 0xb4, 0xa3, 0x9f, + 0xae, 0xad, 0xb3, 0x10, 0xd0, 0x72, 0x69, 0xd3, 0x02, 0xf3, + 0xdf, 0x67, 0x5a, 0x31, 0x52, 0x19, 0xca, 0x39, 0x27, 0x77, + 0x61, 0x6d, 0x0f, 0xc1, 0x33, 0x26, 0x09, 0xf0, 0xf9, 0x4d, + 0x12, 0x7a, 0xef, 0xf7, 0x21, 0x26, 0x2c, 0xe0, 0xe2, 0x92, + 0x1f, 0x9d, 0xd1, 0xaa, 0xaf, 0x08, 0x14, 0xf2, 0xaa, 0x24, + 0x99, 0x0f, 0x20, 0x57, 0x35, 0x04, 0x32, 0x96, 0x8e, 0x6e, + 0x10, 0x64, 0xe3, 0xe3, 0x57, 0x26, 0x33, 0x32, 0x7b, 0xe4, + 0x18, 0x41, 0x77, 0xd3, 0x24, 0x63, 0x3d, 0x11, 0xea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0x90, 0x65, 0x73, 0xa2, 0x2a, 0x6e, 0x49, 0x95, 0x0d, + 0xab, 0x24, 0xdf, 0x2d, 0xbf, 0x76, 0x46, 0x01, 0x44, 0xe4, + 0x18, 0x8e, 0xd5, 0x9a, 0x76, 0xc9, 0xc6, 0xbc, 0xdb, 0x7f, + 0x80, 0x52, 0xc6, 0x40, 0x41, 0x12, 0x36, 0x7c, 0x80, 0x69, + 0xce, 0x7b, 0xe1, 0xa0, 0x53, 0xa2, 0xd6, 0x8f, 0x3f, 0xf7, + 0xd7, 0x61, 0x09, 0x70, 0xa2, 0xa0, 0xc6, 0xaf, 0xa0, 0xd0, + 0xfa, 0x13, 0xbf, 0xc0, 0x69, 0x15, 0xce, 0x15, 0xec, 0x24, + 0x4b, 0x6b, 0xdc, 0x93, 0x51, 0xc6, 0x82, 0x19, 0x92, 0x84, + 0x5d, 0x99, 0xb0, 0x90, 0x2c, 0xcc, 0x2a, 0x81, 0x6b, 0x22, + 0x64, 0x0a, 0xcb, 0x51, 0x25, 0x82, 0x50, 0x02, 0x2d, 0x3e, + 0xd4, 0x72, 0xb3, 0x0c, 0x15, 0x77, 0xd2, 0xca, 0x98, 0x2f, + 0x41, 0x93, 0x14, 0xb2, 0x7f, 0xa1, 0x97, 0xa3, 0xb8, 0x8a, + 0x56, 0x24, 0x38, 0xa7, 0x36, 0xc5, 0x01, 0xc0, 0x9f, 0x3f, + 0x3e, 0x9a, 0xf6, 0xe9, 0x16, 0x82, 0x01, 0x58, 0x70, 0x0e, + 0x0d, 0xbc, 0xfa, 0x03, 0x57, 0x65, 0xa8, 0x5a, 0x3d, 0x57, + 0x81, 0x23, 0xbe, 0x6e, 0xa9, 0xe8, 0x22, 0xdf, 0x2f, 0x70, + 0xeb, 0x0a, 0x03, 0x96, 0x6b, 0xef, 0x20, 0x9f, 0xf2, 0x62, + 0xe7, 0xb2, 0x6e, 0x3a, 0x1e, 0x40, 0x1f, 0xd2, 0x97, 0x48, + 0xd1, 0x18, 0xf0,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36, 0x78, 0xc0, 0x1c, 0x0e, 0x23, + 0x05, 0x0e, 0x04, 0x61, 0x16, 0x34, 0xf9, 0xc6, 0x63, 0x58, + 0xdf, 0xf4, 0x52, 0xce, 0xd0, 0x0f, 0x0c, 0xec, 0xb1, 0x82, + 0xf4, 0x72, 0x73, 0x72, 0x3f, 0x02, 0xbe, 0xe3, 0x9c, 0x63, + 0x73, 0xc8, 0x21, 0x65, 0xba, 0x57, 0x52, 0xa9, 0x19, 0xac, + 0x68, 0x50, 0xbd, 0x2d, 0x72, 0x5b, 0x93, 0x0f, 0x1c, 0x81, + 0x77, 0xd7, 0x2e, 0xc3, 0x93, 0x52, 0x6e, 0xdc, 0x79, 0x52, + 0x9f, 0xe3, 0xde, 0xe1, 0xba, 0x58, 0x55, 0xab, 0x8a, 0xf2, + 0x35, 0x6a, 0xcf, 0x94, 0x1f, 0x17, 0xa4, 0x23, 0x2e, 0x8e, + 0x18, 0x21, 0xbe, 0x14, 0xfa, 0xe7, 0x59, 0xc5, 0x44, 0x34, + 0xce, 0x03, 0xf4, 0xb7, 0x75, 0xd3, 0x51, 0x55, 0xdf, 0xff, + 0xcf, 0x4f, 0x44, 0xee, 0x13, 0x9b, 0xcb, 0x12, 0xae, 0xe5, + 0x5b, 0x44, 0x65, 0x28, 0xcb, 0x6a, 0x9c, 0x24, 0x1d, 0xea, + 0x2d, 0x5e, 0xa5, 0xc3, 0x78, 0xad, 0xed, 0x0c, 0x05, 0xa6, + 0xaf, 0x95, 0x04, 0xd2, 0xb5, 0x91, 0x0e, 0xa0, 0x06, 0x77, + 0xc5, 0x82, 0xf6, 0xdd, 0x72, 0x83, 0x04, 0xcc, 0xb0, 0xab, + 0x7a, 0xf0, 0xb4, 0x4d, 0x36, 0x71, 0x72, 0x1a, 0x9a, 0x0d, + 0xcd, 0xa3, 0x11, 0xa8, 0x0d, 0x7d, 0x49, 0xce, 0x9c, 0x09, + 0x1d, 0x08, 0xa4, 0x39, 0x2e, 0x03, 0xdf, 0x3a, 0xc8, 0xfe, + 0x6a, 0x2b, 0x0b, 0x07, 0x80, 0x55, 0x8a, 0xa8, 0xe6, 0x0e, + 0xc9, 0x7e, 0x83, 0xce, 0x3a, 0x98, 0x98, 0x4e, 0x3e, 0x08, + 0x20, 0x8f, 0x10, 0xfc, 0xc1, 0xc4, 0xcf, 0x37, 0x8d, 0x69, + 0xd8, 0x57, 0x9d, 0x48, 0x80, 0x6a, 0xef, 0x0c, 0xdd, 0x27, + 0x99, 0xf9, 0xe7, 0xd0, 0xd2, 0x36, 0xd8, 0xed, 0x41, 0x14, + 0x1b, 0x10, +}; +static const int sizeof_bench_dilithium_level3_pubkey = + sizeof(bench_dilithium_level3_pubkey); + +#endif /* !WOLFSSL_DILITHIUM_NO_VERIFY */ + +#ifndef WOLFSSL_DILITHIUM_NO_SIGN + +static const unsigned char bench_dilithium_level5_key[] = { + 0xef, 0x49, 0x79, 0x47, 0x15, 0xc4, 0x8a, 0xa9, 0x74, 0x2a, + 0xf0, 0x36, 0x94, 0x5c, 0x91, 0x1c, 0x5d, 0xff, 0x2c, 0x83, + 0xf2, 0x8b, 0x04, 0xfc, 0x5d, 0x64, 0xbd, 0x49, 0x73, 0xcd, + 0xcc, 0x99, 0xfd, 0x0f, 0x8f, 0x6e, 0xad, 0x75, 0x9b, 0xc9, + 0xb1, 0xb9, 0x90, 0x93, 0xbf, 0xce, 0x02, 0x2d, 0x12, 0x0c, + 0x54, 0x2e, 0xe2, 0x3e, 0x52, 0xff, 0xe0, 0x7a, 0xca, 0x2d, + 0x81, 0x84, 0xea, 0x16, 0x1f, 0x10, 0xc4, 0xc9, 0xde, 0xcd, + 0xf6, 0xbd, 0x60, 0xc9, 0xb3, 0xd0, 0x0f, 0x57, 0xeb, 0x71, + 0x78, 0x9b, 0xb5, 0x72, 0x2a, 0x65, 0x11, 0x14, 0xff, 0x63, + 0x8d, 0x38, 0xcf, 0xa4, 0xf4, 0xad, 0xd0, 0x68, 0x84, 0x97, + 0xfe, 0xd3, 0x91, 0xa0, 0xe4, 0xc3, 0x74, 0xcf, 0x20, 0x87, + 0x89, 0x84, 0x1f, 0x75, 0x91, 0xe3, 0xb3, 0x47, 0x8b, 0xfe, + 0x76, 0xb7, 0x2d, 0x30, 0x89, 0x02, 0x04, 0xc9, 0x93, 0xa8, + 0x31, 0xd3, 0x84, 0x2d, 0xe4, 0x26, 0x12, 0xdb, 0x94, 0x08, + 0x12, 0x45, 0x45, 0xca, 0x44, 0x89, 0x52, 0xc4, 0x28, 0x41, + 0x46, 0x01, 0x1c, 0x93, 0x20, 0x8b, 0x40, 0x6d, 0x09, 0x36, + 0x65, 0x4c, 0xa2, 0x40, 0x62, 0xb8, 0x2c, 0x1b, 0x00, 0x20, + 0x61, 0x42, 0x8c, 0x24, 0xa7, 0x10, 0x19, 0x27, 0x25, 0x22, + 0x14, 0x31, 0x13, 0x33, 0x46, 0x0c, 0x22, 0x22, 0x18, 0xa7, + 0x91, 0x0c, 0x24, 0x61, 0xd9, 0x32, 0x46, 0xc8, 0x96, 0x49, + 0x5c, 0x90, 0x89, 0x9b, 0x84, 0x01, 0x5c, 0x08, 0x42, 0x64, + 0x84, 0x85, 0x0c, 0x42, 0x21, 0x20, 0x48, 0x21, 0x92, 0x00, + 0x28, 0x83, 0x20, 0x4c, 0x08, 0xc7, 0x51, 0x99, 0x06, 0x66, + 0x01, 0x18, 0x51, 0x13, 0x48, 0x0a, 0x0b, 0x42, 0x90, 0x4c, + 0x14, 0x08, 0x83, 0x14, 0x6d, 0x10, 0x10, 0x91, 0xe2, 0xc4, + 0x8d, 0xe1, 0x12, 0x11, 0x10, 0x40, 0x29, 0x99, 0x92, 0x30, + 0x12, 0x39, 0x6c, 0x91, 0x86, 0x68, 0x08, 0x83, 0x0c, 0x54, + 0x80, 0x80, 0xa2, 0x08, 0x52, 0x09, 0x30, 0x71, 0x0c, 0x10, + 0x04, 0x53, 0x00, 0x65, 0x91, 0x12, 0x2d, 0x0c, 0xa2, 0x8c, + 0x18, 0x14, 0x45, 0xd8, 0x14, 0x06, 0xe4, 0x36, 0x72, 0x93, + 0x10, 0x68, 0x09, 0xc2, 0x08, 0x51, 0x14, 0x8c, 0x13, 0x39, + 0x11, 0xd8, 0x44, 0x02, 0x18, 0x39, 0x29, 0x98, 0x16, 0x71, + 0x82, 0x40, 0x70, 0x01, 0x10, 0x8c, 0x1a, 0x30, 0x08, 0x02, + 0x03, 0x41, 0x5a, 0x00, 0x40, 0xa4, 0x16, 0x90, 0x20, 0x26, + 0x32, 0x00, 0x49, 0x61, 0x20, 0x20, 0x0c, 0x1a, 0xb0, 0x10, + 0x63, 0x10, 0x11, 0x58, 0x30, 0x0d, 0x59, 0x80, 0x68, 0x90, + 0x46, 0x2a, 0x91, 0xa8, 0x71, 0x98, 0x20, 0x40, 0x21, 0x83, + 0x6c, 0xc0, 0x48, 0x0d, 0x8b, 0x90, 0x11, 0x08, 0x09, 0x31, + 0x8c, 0x00, 0x12, 0x10, 0x14, 0x6e, 0xc2, 0x06, 0x32, 0x1a, + 0x26, 0x10, 0x0a, 0x91, 0x44, 0x08, 0x99, 0x8d, 0x60, 0x86, + 0x28, 0x11, 0x20, 0x6d, 0xa3, 0x12, 0x81, 0x8b, 0xc6, 0x51, + 0xcb, 0xa0, 0x61, 0x09, 0x97, 0x61, 0x48, 0xb6, 0x0d, 0x21, + 0x49, 0x51, 0x08, 0x13, 0x0c, 0x0a, 0x34, 0x86, 0x49, 0x80, + 0x65, 0x14, 0x39, 0x04, 0x21, 0x01, 0x81, 0x9a, 0xb8, 0x4d, + 0x04, 0x41, 0x48, 0x03, 0x92, 0x81, 0x62, 0x14, 0x6c, 0x10, + 0x16, 0x11, 0xe2, 0xa2, 0x49, 0xe3, 0x30, 0x65, 0x04, 0x93, + 0x8d, 0x1c, 0x33, 0x70, 0x1b, 0x15, 0x50, 0xe4, 0x38, 0x80, + 0x21, 0x37, 0x06, 0x20, 0xc6, 0x24, 0xc8, 0x22, 0x88, 0x4a, + 0x44, 0x80, 0x14, 0x43, 0x88, 0x54, 0x44, 0x42, 0x11, 0x49, + 0x41, 0x19, 0xb9, 0x2d, 0xcc, 0x04, 0x0d, 0x19, 0xc1, 0x65, + 0x5b, 0xa0, 0x11, 0x94, 0x00, 0x84, 0xe4, 0xb6, 0x41, 0xc2, + 0x18, 0x72, 0x5c, 0x02, 0x69, 0x11, 0x85, 0x24, 0x13, 0x35, + 0x00, 0x62, 0x34, 0x04, 0x58, 0x40, 0x21, 0x00, 0xc4, 0x28, + 0x0c, 0x17, 0x30, 0x10, 0x47, 0x60, 0x4b, 0xc2, 0x61, 0x9c, + 0x80, 0x2c, 0x20, 0x94, 0x31, 0x58, 0x92, 0x09, 0xcc, 0x00, + 0x02, 0x42, 0x94, 0x69, 0x99, 0x28, 0x06, 0x98, 0x02, 0x52, + 0x90, 0x32, 0x6e, 0x8a, 0x18, 0x2e, 0x54, 0x94, 0x81, 0x03, + 0xc6, 0x89, 0x03, 0xa1, 0x84, 0x48, 0x82, 0x48, 0x52, 0xc4, + 0x00, 0x91, 0x30, 0x24, 0x20, 0x12, 0x0d, 0x83, 0x80, 0x05, + 0x92, 0x48, 0x61, 0x98, 0x46, 0x92, 0xe1, 0xa6, 0x25, 0x20, + 0x93, 0x4d, 0x1c, 0x37, 0x2c, 0x9b, 0x94, 0x8d, 0xc8, 0x88, + 0x80, 0xa2, 0x18, 0x72, 0x0c, 0x09, 0x70, 0x81, 0x36, 0x90, + 0x24, 0x45, 0x69, 0x53, 0x36, 0x6c, 0xd2, 0x20, 0x51, 0x23, + 0xc1, 0x8c, 0x62, 0xb0, 0x70, 0x11, 0xb2, 0x70, 0xcb, 0x84, + 0x69, 0x4b, 0x32, 0x89, 0x01, 0x21, 0x81, 0x02, 0x38, 0x66, + 0xa3, 0x26, 0x12, 0x24, 0xa3, 0x30, 0x22, 0x24, 0x84, 0x18, + 0xb9, 0x84, 0x40, 0x16, 0x50, 0x22, 0x44, 0x31, 0x1b, 0x13, + 0x8d, 0x53, 0x02, 0x89, 0x4a, 0x22, 0x10, 0x53, 0x18, 0x01, + 0x58, 0x30, 0x2d, 0x00, 0x05, 0x08, 0x13, 0x80, 0x84, 0xc2, + 0x22, 0x0e, 0x88, 0x26, 0x2a, 0x04, 0xc4, 0x4c, 0x19, 0x43, + 0x01, 0xc8, 0x38, 0x4c, 0xd1, 0xb2, 0x90, 0x13, 0x29, 0x10, + 0x12, 0x48, 0x22, 0x01, 0xa8, 0x51, 0xd1, 0x92, 0x40, 0x11, + 0x27, 0x62, 0x10, 0x01, 0x0c, 0x0c, 0xc6, 0x28, 0xe3, 0x46, + 0x60, 0x24, 0x01, 0x8d, 0x14, 0xb6, 0x10, 0x50, 0xb6, 0x25, + 0x44, 0x38, 0x40, 0x44, 0xc2, 0x0c, 0x19, 0xc0, 0x64, 0x9c, + 0x44, 0x02, 0x21, 0x25, 0x65, 0x02, 0x23, 0x86, 0x1a, 0x12, + 0x70, 0x51, 0x24, 0x91, 0x09, 0x08, 0x44, 0x09, 0x35, 0x66, + 0x91, 0x04, 0x12, 0x43, 0x42, 0x8d, 0x22, 0xa0, 0x70, 0x14, + 0x91, 0x25, 0xa0, 0x00, 0x80, 0xe4, 0x00, 0x90, 0x44, 0xb2, + 0x61, 0x14, 0x20, 0x6e, 0xca, 0x14, 0x0d, 0x23, 0x85, 0x68, + 0xda, 0x40, 0x92, 0x0b, 0xb1, 0x20, 0x92, 0x04, 0x46, 0xc0, + 0x08, 0x8a, 0x40, 0xc4, 0x4d, 0x0c, 0x17, 0x45, 0xd3, 0x18, + 0x52, 0x1b, 0x46, 0x24, 0xc2, 0x24, 0x71, 0x83, 0x10, 0x80, + 0xc8, 0x82, 0x68, 0xc2, 0x96, 0x81, 0x0a, 0x01, 0x92, 0x60, + 0xb4, 0x84, 0x09, 0xc6, 0x00, 0x04, 0x37, 0x90, 0x0b, 0xa0, + 0x28, 0x12, 0x27, 0x09, 0x94, 0x80, 0x50, 0xd8, 0x04, 0x86, + 0x08, 0x13, 0x8a, 0x4a, 0x06, 0x89, 0x9b, 0xc4, 0x60, 0xe3, + 0xa2, 0x20, 0xe0, 0x38, 0x21, 0x22, 0xb4, 0x68, 0x0a, 0xa1, + 0x0c, 0x01, 0x24, 0x32, 0x4c, 0x48, 0x30, 0xa2, 0x80, 0x8d, + 0x58, 0x44, 0x10, 0xc8, 0x94, 0x6d, 0x21, 0xc3, 0x61, 0xcb, + 0x98, 0x24, 0xdc, 0x38, 0x11, 0xc9, 0x18, 0x11, 0x20, 0x01, + 0x50, 0x1c, 0x34, 0x8d, 0x02, 0x03, 0x09, 0x0a, 0x40, 0x61, + 0xd4, 0xb8, 0x84, 0x9c, 0xc2, 0x09, 0x04, 0xb1, 0x89, 0x83, + 0x86, 0x84, 0x19, 0x83, 0x0c, 0x5a, 0x86, 0x89, 0x10, 0x21, + 0x0d, 0xd1, 0xc2, 0x80, 0x18, 0x29, 0x2a, 0x0c, 0x01, 0x50, + 0x89, 0x88, 0x48, 0x03, 0xa7, 0x85, 0x21, 0x92, 0x64, 0xc4, + 0x16, 0x81, 0x94, 0x06, 0x6c, 0x53, 0x26, 0x12, 0x90, 0xb6, + 0x21, 0x0b, 0xa8, 0x64, 0x43, 0x96, 0x84, 0x41, 0x88, 0x70, + 0xe3, 0xa6, 0x44, 0x12, 0xc0, 0x09, 0x01, 0xc7, 0x60, 0xc3, + 0x20, 0x42, 0xc3, 0x40, 0x68, 0x10, 0xa6, 0x51, 0xa4, 0xa0, + 0x71, 0x54, 0x98, 0x04, 0x88, 0xb2, 0x00, 0x54, 0x18, 0x6a, + 0x48, 0x98, 0x20, 0x21, 0xb2, 0x8d, 0x82, 0x20, 0x81, 0x99, + 0x16, 0x81, 0x0a, 0xc5, 0x88, 0x0a, 0x23, 0x11, 0x8a, 0x16, + 0x44, 0x24, 0xc9, 0x29, 0x59, 0x08, 0x91, 0x1c, 0x29, 0x05, + 0x14, 0xc9, 0x44, 0xe3, 0x20, 0x10, 0x1b, 0xa1, 0x64, 0x82, + 0xa2, 0x90, 0x00, 0x00, 0x82, 0x98, 0xb2, 0x85, 0xc8, 0x04, + 0x28, 0xc8, 0xb2, 0x65, 0xc9, 0xc6, 0x88, 0xcc, 0x08, 0x91, + 0x84, 0x08, 0x30, 0x94, 0x94, 0x8d, 0xc0, 0x18, 0x46, 0x82, + 0x36, 0x4c, 0x83, 0x10, 0x72, 0x23, 0xb1, 0x88, 0x81, 0x20, + 0x8e, 0x19, 0x03, 0x8a, 0x94, 0x46, 0x22, 0x21, 0x35, 0x8e, + 0x04, 0xc0, 0x88, 0x5b, 0xb6, 0x09, 0x0a, 0x18, 0x44, 0x21, + 0x90, 0x65, 0x03, 0xb2, 0x21, 0xc4, 0x10, 0x50, 0xc1, 0x80, + 0x0c, 0x09, 0x40, 0x49, 0xe4, 0xa8, 0x8c, 0xa4, 0x36, 0x61, + 0x59, 0x12, 0x86, 0x20, 0x08, 0x2d, 0x10, 0x19, 0x85, 0xe4, + 0x34, 0x60, 0xc4, 0xb6, 0x60, 0x00, 0x18, 0x06, 0x8c, 0xb8, + 0x45, 0x19, 0x13, 0x4a, 0x53, 0xc4, 0x40, 0xc9, 0x38, 0x71, + 0xd9, 0x48, 0x10, 0x59, 0x08, 0x02, 0x02, 0x10, 0x69, 0x53, + 0x28, 0x80, 0x22, 0x81, 0x4c, 0xc9, 0x16, 0x26, 0xa1, 0x48, + 0x64, 0x19, 0x21, 0x11, 0x1c, 0x37, 0x88, 0x4b, 0x94, 0x2c, + 0x48, 0xc8, 0x6c, 0x63, 0x88, 0x65, 0x81, 0x40, 0x61, 0xa1, + 0x44, 0x31, 0x82, 0x18, 0x08, 0x80, 0x00, 0x26, 0x50, 0x14, + 0x49, 0xa1, 0x32, 0x50, 0x02, 0xc8, 0x45, 0x0c, 0x07, 0x24, + 0x13, 0x01, 0x6d, 0x0a, 0xb3, 0x90, 0x64, 0x30, 0x85, 0x21, + 0x09, 0x61, 0x44, 0x44, 0x72, 0x08, 0x32, 0x06, 0xe1, 0xa2, + 0x21, 0xdb, 0xa4, 0x09, 0x5a, 0xb4, 0x71, 0x43, 0xb2, 0x09, + 0x82, 0xc4, 0x64, 0x88, 0xa0, 0x91, 0xca, 0x14, 0x90, 0xa4, + 0xa8, 0x41, 0xc1, 0x38, 0x85, 0x12, 0x32, 0x60, 0x1a, 0x11, + 0x72, 0x53, 0x32, 0x2c, 0xe3, 0x08, 0x4d, 0x24, 0xc6, 0x28, + 0x0a, 0x03, 0x8c, 0x88, 0x06, 0x05, 0xa0, 0xa8, 0x05, 0x84, + 0xa2, 0x4c, 0x80, 0x40, 0x62, 0xda, 0x24, 0x81, 0x9a, 0x16, + 0x91, 0x24, 0x81, 0x04, 0xa4, 0x46, 0x51, 0xc2, 0xa8, 0x25, + 0x20, 0x28, 0x42, 0x13, 0x46, 0x2c, 0x63, 0x42, 0x72, 0x03, + 0x88, 0x28, 0xa3, 0x22, 0x24, 0x1a, 0x02, 0x26, 0x42, 0xa2, + 0x11, 0x11, 0xb0, 0x51, 0x92, 0xb4, 0x6c, 0xe2, 0x32, 0x85, + 0x10, 0xc2, 0x41, 0xc1, 0x40, 0x46, 0x4c, 0x26, 0x01, 0x1c, + 0x35, 0x02, 0x0c, 0x14, 0x0c, 0x18, 0x81, 0x00, 0x10, 0x26, + 0x02, 0xc8, 0x32, 0x8c, 0xe4, 0x02, 0x68, 0xcc, 0x14, 0x2e, + 0x89, 0x38, 0x60, 0x10, 0x12, 0x24, 0x93, 0x42, 0x65, 0xe3, + 0x24, 0x29, 0x08, 0x80, 0x41, 0x09, 0x29, 0x46, 0x5b, 0x26, + 0x49, 0x5b, 0x30, 0x80, 0x03, 0xc1, 0x2c, 0x04, 0x09, 0x82, + 0x4c, 0x48, 0x2d, 0x1c, 0x36, 0x4d, 0xdb, 0x02, 0x86, 0x21, + 0xb5, 0x51, 0x81, 0x80, 0x2d, 0xcb, 0x20, 0x81, 0x5b, 0x34, + 0x41, 0x89, 0x36, 0x48, 0x44, 0xa0, 0x05, 0x59, 0xb6, 0x64, + 0x12, 0x45, 0x21, 0x20, 0x31, 0x51, 0x0a, 0xc3, 0x8c, 0x14, + 0x48, 0x71, 0x18, 0x35, 0x24, 0x20, 0x45, 0x05, 0x88, 0x20, + 0x09, 0x08, 0xb1, 0x29, 0x18, 0xa0, 0x09, 0x4a, 0x00, 0x8a, + 0xe2, 0xb8, 0x45, 0x02, 0x27, 0x89, 0xd8, 0x10, 0x25, 0x51, + 0x82, 0x8c, 0x13, 0x92, 0x30, 0x1c, 0x24, 0x8e, 0x1c, 0x93, + 0x4d, 0xa3, 0x48, 0x51, 0x93, 0xa8, 0x69, 0xe2, 0x04, 0x89, + 0x13, 0x13, 0x61, 0xcb, 0x98, 0x8c, 0x09, 0x21, 0x62, 0x4b, + 0x14, 0x4e, 0x11, 0xa3, 0x09, 0x98, 0x40, 0x42, 0x91, 0x12, + 0x08, 0x80, 0x84, 0x2d, 0xc0, 0x12, 0x60, 0x03, 0xa4, 0x29, + 0x18, 0x80, 0x01, 0x94, 0x44, 0x8a, 0x12, 0x11, 0x72, 0xc4, + 0x22, 0x32, 0x9a, 0x46, 0x88, 0x1b, 0x16, 0x4d, 0x4b, 0x08, + 0x11, 0x02, 0x48, 0x45, 0x81, 0xa4, 0x64, 0xe1, 0x88, 0x0c, + 0x63, 0x10, 0x70, 0x48, 0x98, 0x05, 0x9b, 0xb8, 0x84, 0x03, + 0x14, 0x05, 0x44, 0x86, 0x0c, 0x20, 0x11, 0x68, 0xbe, 0x71, + 0x83, 0xc2, 0x69, 0xde, 0x49, 0xad, 0xb4, 0xdb, 0x93, 0xcb, + 0x20, 0x2b, 0xbd, 0x95, 0x97, 0x57, 0x7e, 0xcb, 0xbc, 0x73, + 0xb6, 0x3d, 0x16, 0x4a, 0x0e, 0xe4, 0x9c, 0x81, 0xb1, 0x5d, + 0x27, 0x64, 0xa2, 0x14, 0x12, 0x1b, 0x8e, 0xd0, 0xd8, 0x38, + 0xf6, 0xc7, 0xbb, 0x9f, 0x77, 0x3c, 0x62, 0x04, 0x92, 0xe1, + 0x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 0x9c, + 0x61, 0xa3, 0x5d, 0xcf, 0x23, 0xe7, 0xce, 0xf5, 0x7f, 0xbb, + 0xf7, 0x89, 0x5e, 0xa8, 0xf0, 0xa1, 0xff, 0x1a, 0xaf, 0x15, + 0xc8, 0x3d, 0x8b, 0xce, 0x06, 0xa4, 0x60, 0xd6, 0x40, 0x19, + 0x48, 0x33, 0x53, 0x34, 0x9e, 0xd8, 0x75, 0xfc, 0x45, 0x73, + 0x35, 0x8f, 0x70, 0x04, 0x80, 0xa1, 0xe5, 0xfc, 0x98, 0xb0, + 0x52, 0x63, 0x41, 0x84, 0x57, 0xa2, 0x85, 0x4e, 0x68, 0x13, + 0x2d, 0x3e, 0x4b, 0x68, 0x7f, 0x43, 0x04, 0x05, 0x02, 0x5a, + 0x16, 0x67, 0x5a, 0xc5, 0xea, 0xac, 0x25, 0x61, 0xd4, 0xa4, + 0xe7, 0xbe, 0x13, 0x95, 0xbd, 0x03, 0xb4, 0x26, 0xe3, 0xbf, + 0x7e, 0xe5, 0x0b, 0x34, 0xeb, 0x59, 0x5d, 0xd7, 0xdb, 0x1e, + 0x07, 0xfc, 0x63, 0xab, 0xbb, 0xc6, 0x7a, 0x51, 0x50, 0x59, + 0x13, 0x4b, 0x27, 0x88, 0x98, 0xdc, 0x01, 0x37, 0xeb, 0x58, + 0x75, 0xde, 0x5a, 0xa4, 0x6b, 0xdd, 0xba, 0x01, 0x40, 0xf7, + 0x1c, 0x0a, 0xf3, 0x02, 0x3d, 0x54, 0x64, 0xf2, 0x85, 0x43, + 0x90, 0xc0, 0x69, 0x18, 0x94, 0x95, 0x6e, 0x57, 0x14, 0xda, + 0x27, 0x0a, 0x42, 0xb2, 0x5a, 0x78, 0xe4, 0xf1, 0x45, 0x85, + 0x54, 0xec, 0x44, 0xa0, 0xcb, 0xf4, 0xd1, 0x3a, 0x85, 0x74, + 0x0f, 0x04, 0x67, 0xf4, 0x42, 0x01, 0xc4, 0x04, 0x66, 0x48, + 0x6c, 0xbe, 0x84, 0x38, 0x6e, 0xda, 0x23, 0xd0, 0xd1, 0x26, + 0x94, 0x11, 0x65, 0x2e, 0xc6, 0xd8, 0x6e, 0x25, 0x17, 0x43, + 0x9f, 0x55, 0x2d, 0x1d, 0x55, 0xa9, 0xdd, 0x3b, 0xc7, 0x09, + 0xde, 0x26, 0x64, 0xd4, 0x85, 0x21, 0x15, 0x0d, 0x4a, 0x45, + 0x4d, 0xba, 0x13, 0x9e, 0x3b, 0x5e, 0xc2, 0xf7, 0xc1, 0x34, + 0xc5, 0x74, 0xd4, 0x95, 0x19, 0x3d, 0x69, 0x9c, 0xae, 0xef, + 0x13, 0x95, 0x2c, 0x77, 0xdd, 0x64, 0x2c, 0x12, 0x31, 0x7d, + 0xb5, 0x55, 0xde, 0x69, 0x35, 0x3f, 0x77, 0x72, 0xc6, 0x21, + 0x22, 0x23, 0x7a, 0x05, 0xbf, 0x92, 0xae, 0x49, 0x7f, 0x74, + 0x17, 0x97, 0x5f, 0x5b, 0x4d, 0x7d, 0x86, 0x23, 0x04, 0xe0, + 0xff, 0x10, 0x06, 0xc3, 0xd3, 0x05, 0xde, 0xc4, 0xae, 0xaf, + 0x3d, 0x2d, 0xaf, 0x3c, 0xaf, 0xd3, 0xd5, 0xfd, 0x84, 0xd8, + 0x3b, 0x6c, 0x8e, 0x8b, 0x23, 0x8b, 0x16, 0xaa, 0x67, 0xf1, + 0xde, 0xa4, 0x4b, 0x5a, 0x39, 0x60, 0x73, 0xd2, 0x9f, 0x1f, + 0x8c, 0xcf, 0xbc, 0xaa, 0x74, 0x9e, 0x8d, 0xfd, 0xc3, 0xb7, + 0x86, 0xe5, 0xbb, 0x5a, 0x4d, 0x3d, 0xe2, 0xc3, 0x28, 0x78, + 0x26, 0xd4, 0xb3, 0x45, 0x94, 0xd3, 0x2d, 0xbf, 0x8c, 0x92, + 0x56, 0x3c, 0x6e, 0xea, 0x53, 0x38, 0x7f, 0x22, 0x67, 0xc9, + 0xa7, 0x14, 0x20, 0xb9, 0x13, 0xc4, 0xa0, 0x44, 0x83, 0xc4, + 0x19, 0xca, 0x98, 0x71, 0xc7, 0x13, 0x70, 0x3a, 0xa7, 0xfb, + 0x9e, 0xc4, 0x94, 0x8c, 0xfd, 0x21, 0x36, 0x88, 0xea, 0x23, + 0xc7, 0x43, 0x52, 0x9f, 0xf4, 0x9e, 0xb1, 0xb4, 0xd3, 0x20, + 0x65, 0xd8, 0x18, 0x25, 0x80, 0xb7, 0xe4, 0x5c, 0x96, 0x3a, + 0xa3, 0xb5, 0x40, 0x63, 0xac, 0x02, 0x34, 0x51, 0xf7, 0x12, + 0xea, 0x97, 0x9d, 0x3e, 0xe7, 0xcb, 0x88, 0x15, 0xaa, 0xe3, + 0xfe, 0xe5, 0x42, 0xe5, 0x48, 0xcf, 0xc6, 0x8e, 0x0e, 0xc6, + 0x48, 0xdb, 0xe5, 0x1e, 0x79, 0x99, 0xed, 0x78, 0xa6, 0x37, + 0xdd, 0xe3, 0x7b, 0x01, 0xdd, 0x20, 0x63, 0x45, 0x57, 0xd1, + 0x0f, 0x05, 0x5d, 0x29, 0xad, 0x99, 0x6c, 0x27, 0xa3, 0x0c, + 0x72, 0x81, 0xb1, 0x26, 0x16, 0xaf, 0x11, 0x65, 0xba, 0x79, + 0xbc, 0xb8, 0xfe, 0xe7, 0xc5, 0xe6, 0x4c, 0xfa, 0x37, 0xc5, + 0xe0, 0x2e, 0x4e, 0xef, 0x75, 0xe4, 0x04, 0xaf, 0xfa, 0x41, + 0x7f, 0x58, 0x2e, 0x8f, 0x95, 0x5f, 0x15, 0x5c, 0x15, 0x23, + 0x81, 0xb7, 0x2c, 0x81, 0x70, 0xf5, 0xcc, 0x60, 0x09, 0x7e, + 0xf1, 0x0d, 0x9c, 0x9d, 0xcc, 0xa0, 0x30, 0xa8, 0x82, 0x23, + 0x5f, 0x94, 0xcb, 0x18, 0xc4, 0x32, 0xe6, 0xab, 0xcd, 0x96, + 0x9e, 0xab, 0xcd, 0x68, 0x6f, 0x88, 0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ee, 0x72, 0xb5, + 0xb8, 0x6e, 0xea, 0x13, 0xde, 0xeb, 0x82, 0x03, 0x8e, 0x6c, + 0xb3, 0x67, 0xb1, 0x5f, 0xd4, 0xe1, 0xd9, 0xc2, 0x7a, 0x97, + 0xbb, 0xd4, 0x5e, 0x0b, 0xfe, 0xc1, 0xb3, 0x1f, 0x2b, 0x1a, + 0x37, 0x98, 0x26, 0x27, 0xb1, 0xaf, 0x4c, 0x55, 0xe1, 0xae, + 0x4c, 0x86, 0x80, 0x4b, 0xc5, 0xf2, 0x35, 0x48, 0x81, 0xf7, + 0x83, 0x75, 0x63, 0x08, 0x0d, 0x77, 0x41, 0x14, 0xbc, 0xf3, + 0x6e, 0x46, 0xbd, 0x9c, 0x5a, 0x4f, 0x5c, 0x89, 0x26, 0xb6, + 0x6c, 0xde, 0x0d, 0x15, 0x31, 0xec, 0x7e, 0x13, 0xf2, 0x99, + 0x74, 0x40, 0x3c, 0xe1, 0xea, 0xa0, 0xc9, 0x99, 0x0a, 0x4b, + 0x17, 0x74, 0xff, 0x47, 0x15, 0x76, 0x5e, 0x44, 0xa2, 0x1c, + 0x93, 0xd3, 0xe6, 0xa2, 0x82, 0x0f, 0x7f, 0x55, 0xa8, 0xf3, + 0x79, 0xc3, 0xa8, 0x9f, 0x37, 0x2b, 0x97, 0x7e, 0x90, 0x71, + 0xfc, 0xa7, 0xff, 0xc6, 0xc7, 0x93, 0x5c, 0xc9, 0xed, 0x20, + 0x60, 0xbd, 0x5c, 0x36, 0x05, 0x55, 0x51, 0x55, 0x51, 0x15, + 0x36, 0x01, 0x17, 0xa9, 0x56, 0x27, 0x44, 0x66, 0xc9, 0x3a, + 0xb9, 0xbb, 0xee, 0x04, 0xb6, 0x2a, 0xfd, 0x10, 0x9a, 0x46, + 0xdd, 0x5d, 0x6d, 0xad, 0x21, 0x86, 0x6d, 0x62, 0x8a, 0x4a, + 0xbc, 0x73, 0xf0, 0x9d, 0x93, 0x0d, 0xf1, 0x62, 0xfa, 0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0x52, + 0x20, 0xc1, 0x24, 0x08, 0x49, 0xd9, 0x05, 0x04, 0x53, 0x73, + 0xf3, 0xcf, 0x14, 0x70, 0xac, 0x3c, 0x45, 0x0f, 0x08, 0xa3, + 0xae, 0x43, 0xe7, 0x7f, 0x1f, 0xe2, 0x14, 0xf1, 0xbb, 0x25, + 0x20, 0xfd, 0xe4, 0xaf, 0x44, 0x9e, 0x77, 0x88, 0x4d, 0x26, + 0x09, 0xb1, 0xb0, 0x12, 0xf5, 0xdf, 0x3c, 0x53, 0x48, 0x78, + 0xb9, 0x60, 0x41, 0xd3, 0x8f, 0x8d, 0x11, 0x63, 0x60, 0x28, + 0x30, 0x07, 0xa2, 0x14, 0x3b, 0x8c, 0x50, 0xe2, 0xee, 0x73, + 0x39, 0x66, 0xd1, 0x51, 0x87, 0xac, 0x90, 0x9b, 0x2c, 0x6d, + 0x8d, 0xd5, 0x75, 0x3f, 0xc6, 0xf1, 0x8f, 0xdf, 0xdb, 0x45, + 0x38, 0xf8, 0xd6, 0x7e, 0xc7, 0x7c, 0x44, 0x08, 0x4a, 0x14, + 0xa0, 0x84, 0x7c, 0x8b, 0x88, 0x40, 0x93, 0x89, 0xae, 0x2c, + 0x20, 0x07, 0x80, 0xec, 0xce, 0x4c, 0x2c, 0x4e, 0x49, 0x79, + 0x53, 0xe7, 0xde, 0xa2, 0x9e, 0x67, 0x21, 0x53, 0x7c, 0x85, + 0xe7, 0x6f, 0xbd, 0x93, 0xab, 0x63, 0xba, 0xf0, 0xbd, 0xea, + 0x39, 0x16, 0x47, 0xbf, 0xe6, 0x0c, 0xcb, 0x63, 0xc7, 0xc5, + 0xf1, 0xdc, 0x5a, 0x52, 0xcd, 0x4c, 0x53, 0x8b, 0x7e, 0xb1, + 0xc3, 0x4e, 0xe7, 0x61, 0x25, 0x01, 0xec, 0xae, 0x06, 0x74, + 0x9f, 0xbc, 0xbb, 0x2a, 0x47, 0x46, 0xe8, 0xae, 0xf2, 0xab, + 0x15, 0xed, 0xa6, 0x86, 0x8f, 0x2f, 0xe5, 0x67, 0x0f, 0xdd, + 0xbf, 0x70, 0x53, 0xaa, 0x9b, 0x74, }; static const int sizeof_bench_dilithium_level5_key = sizeof(bench_dilithium_level5_key); -#endif /* HAVE_PQC && HAVE_DILITHIUM */ +#endif /* !WOLFSSL_DILITHIUM_NO_SIGN */ + +#ifndef WOLFSSL_DILITHIUM_NO_VERIFY + +static const unsigned char bench_dilithium_level5_pubkey[] = { + 0xef, 0x49, 0x79, 0x47, 0x15, 0xc4, 0x8a, 0xa9, 0x74, 0x2a, + 0xf0, 0x36, 0x94, 0x5c, 0x91, 0x1c, 0x5d, 0xff, 0x2c, 0x83, + 0xf2, 0x8b, 0x04, 0xfc, 0x5d, 0x64, 0xbd, 0x49, 0x73, 0xcd, + 0xcc, 0x99, 0x50, 0x5f, 0x2b, 0x16, 0x3a, 0xbb, 0x98, 0xc0, + 0xa7, 0x69, 0x0e, 0x95, 0x99, 0x0b, 0xa2, 0x6c, 0xfe, 0x6c, + 0xdb, 0xc8, 0xa7, 0x09, 0x46, 0x6c, 0x90, 0x50, 0xa4, 0x75, + 0x30, 0xf7, 0x90, 0xac, 0x31, 0xb6, 0xdd, 0x21, 0xaf, 0xc6, + 0xf9, 0xfe, 0xee, 0xc6, 0x5b, 0xa8, 0x8f, 0x0a, 0x2e, 0xd0, + 0x42, 0xab, 0xa8, 0x3c, 0x8d, 0xbf, 0xf7, 0x44, 0xbd, 0x0d, + 0xcf, 0xf4, 0x68, 0xfc, 0x16, 0x67, 0xf7, 0x39, 0x48, 0x5f, + 0x56, 0xd1, 0xe7, 0x1f, 0x49, 0x80, 0x50, 0xbe, 0x54, 0xd1, + 0xb7, 0xc9, 0xd2, 0x32, 0xc7, 0x08, 0x8c, 0xde, 0x2c, 0x31, + 0xf6, 0x1d, 0xc7, 0xac, 0xb3, 0x79, 0xd7, 0x4b, 0x1b, 0x23, + 0x89, 0x0a, 0xdc, 0x8e, 0x44, 0x41, 0x14, 0x28, 0x99, 0x13, + 0xb3, 0x26, 0xa6, 0x0e, 0x83, 0x60, 0xaa, 0x8d, 0x7c, 0x23, + 0x13, 0xba, 0x6c, 0x28, 0x90, 0x56, 0x84, 0xa1, 0x23, 0x8b, + 0x81, 0x20, 0x97, 0x7c, 0x66, 0x3f, 0xed, 0x5d, 0xd0, 0xe4, + 0x5d, 0xee, 0x46, 0xbc, 0x4b, 0x3c, 0x03, 0xb5, 0xbc, 0x4d, + 0x8d, 0x37, 0xa3, 0x56, 0x4b, 0x33, 0xad, 0xef, 0xd4, 0xb6, + 0xec, 0xdb, 0x04, 0x9a, 0x19, 0x58, 0x57, 0xd8, 0x00, 0x3a, + 0x92, 0x61, 0x0c, 0x0b, 0xc8, 0x52, 0xe5, 0x04, 0x02, 0x9a, + 0x00, 0x7e, 0xec, 0x7e, 0x94, 0xaa, 0xef, 0x2d, 0x7f, 0xb6, + 0x2e, 0x7c, 0xb0, 0x73, 0xa2, 0x20, 0xc0, 0x07, 0x30, 0x41, + 0x50, 0x20, 0x14, 0x18, 0x21, 0x5e, 0x2a, 0x6f, 0x70, 0x21, + 0xd6, 0x97, 0x13, 0xb9, 0xc1, 0x9e, 0x90, 0x67, 0xcc, 0x55, + 0x8a, 0xec, 0xec, 0x0a, 0x1e, 0x90, 0xdc, 0x3f, 0xb0, 0x4d, + 0xd1, 0x18, 0xea, 0x4f, 0xcb, 0x5d, 0x15, 0x4c, 0xb8, 0x35, + 0x9b, 0x34, 0x24, 0x30, 0x06, 0x53, 0x17, 0xf0, 0xbe, 0x27, + 0x36, 0xb3, 0x04, 0x6a, 0xbd, 0xbf, 0xa7, 0x39, 0xee, 0xa9, + 0x8f, 0x0e, 0x98, 0xc5, 0xf5, 0x9f, 0x46, 0x25, 0x93, 0xc9, + 0xf2, 0xf6, 0x2b, 0x8e, 0x92, 0x06, 0x01, 0x3d, 0x81, 0x18, + 0xf2, 0xec, 0xf1, 0x05, 0x4c, 0xad, 0x4b, 0xcb, 0x98, 0xa4, + 0xb5, 0x61, 0x20, 0xda, 0x81, 0xa1, 0xfb, 0x92, 0x4c, 0xaf, + 0x87, 0x6f, 0x6e, 0xd2, 0x57, 0xec, 0xcd, 0x94, 0xb3, 0x79, + 0xbf, 0x59, 0x88, 0x17, 0x81, 0xce, 0x8a, 0x57, 0xce, 0x57, + 0xae, 0x3e, 0x82, 0x81, 0x2f, 0x83, 0x61, 0xd8, 0xf9, 0x68, + 0x21, 0xe7, 0x72, 0x5b, 0xd6, 0x80, 0x55, 0x68, 0x5d, 0x67, + 0x15, 0x0c, 0x8b, 0xdc, 0x4f, 0xc3, 0x89, 0x36, 0x3c, 0xac, + 0xaf, 0x16, 0x5e, 0x1c, 0xfa, 0x68, 0x74, 0x6a, 0xab, 0x68, + 0xd8, 0x59, 0x96, 0x2d, 0x33, 0x62, 0xe4, 0xbd, 0xb3, 0xb7, + 0x4d, 0x88, 0x35, 0xb8, 0xed, 0xb2, 0x16, 0x85, 0x97, 0x08, + 0x71, 0x71, 0x39, 0x7e, 0x0c, 0x53, 0x16, 0xda, 0x38, 0xe5, + 0x28, 0x09, 0x9c, 0xd9, 0x46, 0xec, 0x68, 0xda, 0x8d, 0xd0, + 0xad, 0xb2, 0x79, 0x28, 0x3b, 0x1e, 0x12, 0xc9, 0xdf, 0xa9, + 0x6d, 0x3d, 0x29, 0x99, 0x2f, 0x53, 0xc2, 0xd0, 0xf9, 0x88, + 0x26, 0x94, 0x47, 0xaf, 0xf6, 0x96, 0xf3, 0xe1, 0x11, 0xa6, + 0x82, 0x3d, 0x43, 0x3f, 0x1f, 0xbc, 0xf6, 0x98, 0xbe, 0xff, + 0x06, 0x86, 0x61, 0x27, 0xdc, 0x91, 0x54, 0xd4, 0xfc, 0x68, + 0x83, 0xe8, 0x35, 0x3e, 0xee, 0x94, 0x59, 0x28, 0x2f, 0xde, + 0xdd, 0x03, 0x60, 0x66, 0xc1, 0x49, 0x57, 0xdd, 0xbc, 0xd5, + 0x0a, 0x67, 0x34, 0xf1, 0xa6, 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xf2, 0x59, 0x20, + 0x39, 0xd9, 0xc5, 0xaf, 0xf2, 0x36, 0x8c, 0x58, 0x00, 0x1b, + 0xd0, 0xc5, 0x8e, 0x1a, 0x49, 0xa8, 0x60, 0xbe, 0xd1, 0xd7, + 0x2a, 0xb0, 0xc2, 0xab, 0x58, 0x8a, 0x7a, 0xa9, 0x41, 0x68, + 0x70, 0xbd, 0xea, 0x73, 0xa5, 0x03, 0x11, 0xb2, 0x27, 0xd9, + 0xcd, 0xf5, 0x09, 0xe8, 0x1c, 0xe2, 0x4f, 0x50, 0x6a, 0x84, + 0x34, 0x62, 0x2e, 0x36, 0xaa, 0x4c, 0xc1, 0x83, 0x78, 0x98, + 0x35, 0x7a, 0x27, 0x7e, 0xfe, 0xf1, 0x6f, 0x59, 0x27, 0x35, + 0x73, 0xce, 0x74, 0xaa, 0xb4, 0x72, 0x82, 0xa8, 0xe2, 0x81, + 0x7a, 0x6b, 0xca, 0x33, 0xa5, 0xda, 0xa2, 0x63, 0xca, 0x2e, + 0x90, 0x03, 0x32, 0xec, 0x63, 0xdb, 0x52, 0x7b, 0x16, 0xfc, + 0x01, 0x2d, 0x30, 0x12, 0x1e, 0xf9, 0xa3, 0x72, 0x21, 0x3c, + 0x75, 0x0c, 0x61, 0x9c, 0x7e, 0x73, 0x04, 0x71, 0x41, 0x45, + 0x5d, 0x7f, 0x49, 0x1c, 0x09, 0x08, 0xa4, 0xec, 0x2f, 0xfd, + 0xc4, 0xfb, 0x59, 0x6a, 0x27, 0x7a, 0xd4, 0xfc, 0x5f, 0x20, + 0x04, 0x34, 0x7d, 0x08, 0xed, 0x82, 0x5a, 0x90, 0xe1, 0xab, + 0xfd, 0x35, 0x3a, 0x8d, 0xbb, 0x0a, 0x9d, 0x73, 0xff, 0x69, + 0xe5, 0xe9, 0x09, 0x55, 0x14, 0xd9, 0x7b, 0x6f, 0x0d, 0x99, + 0xd2, 0x7e, 0x71, 0xf8, 0x4f, 0x72, 0x2f, 0xbb, 0xc6, 0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 0xaa, + 0x50, 0x14, 0x93, 0x3b, 0x9f, 0x25, 0xcb, 0x40, 0xb8, 0x08, + 0xcc, 0x13, 0xe5, 0xdc, 0x3f, 0x84, 0x96, 0xe0, 0x73, 0x7b, + 0x7d, 0x9e, 0x41, 0x92, 0x5d, 0xcc, 0xa4, 0xea, 0x4f, 0x93, + 0x0c, 0x40, 0x2e, 0x42, 0x8a, 0xe9, 0xb9, 0x12, 0x74, 0xbb, + 0x79, 0x7c, 0xb0, 0x37, 0x20, 0xb6, 0xaf, 0x43, 0x3a, 0x88, + 0x59, 0x7c, 0x68, 0x28, 0x5f, 0x98, 0xc2, 0xf0, 0x2a, 0xbc, + 0xa1, 0x61, 0x88, 0x1f, 0x43, 0xbc, 0x42, 0x8f, 0x43, 0xf3, + 0x7e, 0x16, 0x96, 0xfa, 0x92, 0x70, 0xaf, 0x3c, 0x9f, 0x4b, + 0xd9, 0x60, 0xe9, 0xf6, 0x2e, 0x84, 0xda, 0x88, 0x31, 0x34, + 0xa6, 0x85, 0x10, 0x05, 0xef, 0x40, 0xa8, 0xa5, 0x4f, 0x92, + 0x59, 0xf7, 0xe0, 0xc4, 0x2b, 0x12, 0x17, 0x71, 0xbe, 0x8c, + 0x4a, 0x02, 0xfe, 0x12, 0xb6, 0x3b, 0x85, 0x75, 0x37, 0xf3, + 0x73, 0x2d, 0x9c, 0x00, 0x5d, 0x80, 0xad, 0x20, 0x2f, 0x5a, + 0x0b, 0x17, 0x7e, 0x67, 0x72, 0x24, 0x5a, 0xb9, 0xf3, 0xb1, + 0x33, 0xa4, 0x57, 0x1d, 0x49, 0x72, 0x2c, 0x7f, 0x47, 0x15, + 0x07, 0xe0, 0x45, 0x14, 0xdd, 0x77, 0x86, 0x6d, 0x03, 0xbe, + 0x57, 0xd0, 0xaa, 0x18, 0xa6, 0xdd, 0x94, 0x18, 0x3f, 0x8a, + 0xf3, 0xb5, 0xd7, 0x5a, 0xec, 0xc8, 0x79, 0x7f, 0x51, 0x61, + 0x3c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x64, 0x9a, 0x52, 0x20, 0x48, 0xc6, 0xb9, 0x40, + 0xd3, 0x2c, 0x52, 0xca, 0x93, 0xcf, 0xbb, 0x94, 0x06, 0xf3, + 0x97, 0xee, 0xcc, 0x5d, 0xa3, 0xea, 0xf8, 0x5a, 0x39, 0x77, + 0x34, 0xd7, 0xf6, 0x4e, 0xbe, 0x8a, 0x07, 0x5f, 0x51, 0x53, + 0xc5, 0x1b, 0x8c, 0x47, 0x8f, 0x34, 0x0e, 0x60, 0x0a, 0x90, + 0xe2, 0xda, 0x7b, 0xef, 0xd6, 0xf5, 0x5d, 0xe5, 0x32, 0x37, + 0x75, 0x99, 0x81, 0x4a, 0x2a, 0x78, 0x71, 0xdc, 0xf4, 0xe5, + 0xca, 0xd8, 0x6b, 0x3b, 0x90, 0x68, 0x2e, 0x93, 0xc5, 0x10, + 0x42, 0x5d, 0x38, 0x90, 0x32, 0x46, 0xea, 0x87, 0xe0, 0xbc, + 0xb8, 0x9a, 0x18, 0x20, 0x68, 0x85, 0x6d, 0x9b, 0xc9, 0x8f, + 0x9b, 0xd2, 0xbe, 0x15, 0x12, 0x68, 0xd0, 0xb0, 0x16, 0x5f, + 0xe2, 0x69, 0x1d, 0x04, 0x00, 0xfc, 0x63, 0x33, 0xcd, 0x1f, + 0x89, 0xcd, 0x52, 0xff, 0xec, 0x19, 0x69, 0x74, 0xa3, 0xce, + 0x4d, 0xab, 0x93, 0xe4, 0xc6, 0x13, 0x56, 0x27, 0xc9, 0x25, + 0x5a, 0x01, 0xb2, 0x36, 0x8b, 0x61, 0xe5, 0x8b, 0x98, 0xac, + 0xe4, 0x2a, 0xb6, 0x40, 0x9f, 0x42, 0xe4, 0x1b, 0x52, 0xf7, + 0xfd, 0xd8, 0x30, 0x07, 0x33, 0xf9, 0x47, 0xcb, 0x3c, 0xad, + 0x12, 0xc1, 0xcc, 0x29, 0x62, 0x49, 0x04, 0x0c, 0x23, 0x97, + 0x5a, 0xa4, 0x84, 0x67, 0xde, 0x5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0xa0, 0xf5, 0x32, + 0x69, 0xb3, 0x5f, 0x27, 0x0f, 0xbe, 0xc9, 0xbd, 0xeb, 0xfa, + 0x4b, 0x5c, 0xc5, 0x99, 0x9e, 0x5a, 0x04, 0xcc, 0xd0, 0x4d, + 0x29, 0xe8, 0x84, 0x55, 0x8c, 0xd7, 0xc4, 0x06, 0x13, 0x4d, + 0x92, 0xe5, 0x98, 0x9c, 0x4c, 0xc1, 0xf7, 0xaf, 0x7b, 0xd5, + 0x2b, 0x92, 0x68, 0x68, 0x19, 0x70, 0x4c, 0x9e, 0x46, 0xb8, + 0x34, 0xeb, 0x01, 0x47, 0xbe, 0x59, 0xab, 0x0b, 0x22, 0x25, + 0xe7, 0x56, 0xa8, 0xb4, 0x93, 0x3c, 0xd5, 0x98, 0x9f, 0x61, + 0x2e, 0xfa, 0xcb, 0x5f, 0x5b, 0xd8, 0x09, 0x83, 0xe9, 0x40, + 0xe9, 0x0e, 0x42, 0xdd, 0x17, 0xd7, 0x6e, 0x19, 0x8d, 0x95, + 0x0a, 0x93, +}; +static const int sizeof_bench_dilithium_level5_pubkey = + sizeof(bench_dilithium_level5_pubkey); + +#endif /* !WOLFSSL_DILITHIUM_NO_VERIFY */ + +#endif /* HAVE_DILITHIUM */ -#if defined(HAVE_PQC) && defined(HAVE_SPHINCS) +#if defined(HAVE_SPHINCS) /* certs/sphincs/bench_sphincs_fast_level1_key.der */ static const unsigned char bench_sphincs_fast_level1_key[] = @@ -5999,7 +6034,7 @@ static const unsigned char bench_sphincs_small_level5_key[] = }; static const int sizeof_bench_sphincs_small_level5_key = sizeof(bench_sphincs_small_level5_key); -#endif /* HAVE_PQC && HAVE_SPHINCS */ +#endif /* HAVE_SPHINCS */ #if defined(HAVE_ECC) && defined(USE_CERT_BUFFERS_256) diff --git a/wolfssl/internal.h b/wolfssl/internal.h index 0ae722d50f..57a246d301 100644 --- a/wolfssl/internal.h +++ b/wolfssl/internal.h @@ -122,8 +122,10 @@ #ifdef HAVE_CURVE448 #include #endif -#ifdef HAVE_PQC +#ifdef HAVE_FALCON #include +#endif +#ifdef HAVE_DILITHIUM #include #endif #ifdef HAVE_HKDF @@ -1554,7 +1556,7 @@ enum Misc { MAXEARLYDATASZ_LEN = 4, /* maxEarlyDataSz size in ticket */ #endif #endif -#ifdef HAVE_PQC +#if defined(HAVE_FALCON) || defined(HAVE_DILITHIUM) ENCRYPT_LEN = 5120, /* Allow 5k byte buffer for dilithium and * hybridization with other algs. */ #else @@ -1803,7 +1805,7 @@ enum Misc { MIN_RSA_SHA512_PSS_BITS = 512 * 2 + 8 * 8, /* Min key size */ MIN_RSA_SHA384_PSS_BITS = 384 * 2 + 8 * 8, /* Min key size */ -#if defined(HAVE_PQC) +#if defined(HAVE_FALCON) || defined(HAVE_DILITHIUM) MAX_CERT_VERIFY_SZ = 6000, /* For Dilithium */ #elif defined(WOLFSSL_CERT_EXT) MAX_CERT_VERIFY_SZ = 2048, /* For larger extensions */ @@ -1855,13 +1857,13 @@ enum Misc { #define WOLFSSL_NAMED_GROUP_IS_FFHDE(group) \ (MIN_FFHDE_GROUP <= (group) && (group) <= MAX_FFHDE_GROUP) -#ifdef HAVE_PQC +#ifdef WOLFSSL_HAVE_KYBER #define WOLFSSL_NAMED_GROUP_IS_PQC(group) \ ((WOLFSSL_PQC_SIMPLE_MIN <= (group) && (group) <= WOLFSSL_PQC_SIMPLE_MAX) || \ (WOLFSSL_PQC_HYBRID_MIN <= (group) && (group) <= WOLFSSL_PQC_HYBRID_MAX)) #else #define WOLFSSL_NAMED_GROUP_IS_PQC(group) ((void)(group), 0) -#endif /* HAVE_PQC */ +#endif /* WOLFSSL_HAVE_KYBER */ /* minimum Downgrade Minor version */ #ifndef WOLFSSL_MIN_DOWNGRADE @@ -1891,7 +1893,7 @@ enum Misc { /* number of items in the signature algo list */ #ifndef WOLFSSL_MAX_SIGALGO -#ifdef HAVE_PQC +#if defined(HAVE_FALCON) || defined(HAVE_DILITHIUM) /* If we are building with post-quantum algorithms, we likely want to * inter-op with OQS's OpenSSL and they send a lot more sigalgs. */ @@ -1920,10 +1922,12 @@ enum Misc { #endif #define MIN_ECCKEY_SZ (WOLFSSL_MIN_ECC_BITS / 8) -#ifdef HAVE_PQC +#ifdef HAVE_FALCON #ifndef MIN_FALCONKEY_SZ #define MIN_FALCONKEY_SZ 1281 #endif +#endif +#ifdef HAVE_DILITHIUM #ifndef MIN_DILITHIUMKEY_SZ #define MIN_DILITHIUMKEY_SZ 2528 #endif @@ -1968,7 +1972,7 @@ enum Misc { #endif #ifndef MAX_X509_SIZE - #if defined(HAVE_PQC) + #if defined(HAVE_FALCON) || defined(HAVE_DILITHIUM) #define MAX_X509_SIZE (8*1024) /* max static x509 buffer size; dilithium is big */ #elif defined(WOLFSSL_HAPROXY) #define MAX_X509_SIZE 3072 /* max static x509 buffer size */ @@ -2637,8 +2641,10 @@ struct WOLFSSL_CERT_MANAGER { /* with CTX free. */ #endif wolfSSL_Ref ref; -#ifdef HAVE_PQC +#ifdef HAVE_FALCON short minFalconKeySz; /* minimum allowed Falcon key size */ +#endif +#ifdef HAVE_DILITHIUM short minDilithiumKeySz; /* minimum allowed Dilithium key size */ #endif #if defined(WOLFSSL_CUSTOM_OID) && defined(WOLFSSL_ASN_TEMPLATE) \ @@ -3417,7 +3423,7 @@ typedef struct KeyShareEntry { word32 keyLen; /* Key size (bytes) */ byte* pubKey; /* Public key */ word32 pubKeyLen; /* Public key length */ -#if !defined(NO_DH) || defined(HAVE_PQC) +#if !defined(NO_DH) || defined(HAVE_FALCON) || defined(HAVE_DILITHIUM) byte* privKey; /* Private key - DH and PQ KEMs only */ word32 privKeyLen;/* Only for PQ KEMs. */ #endif @@ -3750,8 +3756,10 @@ struct WOLFSSL_CTX { #if defined(HAVE_ECC) || defined(HAVE_ED25519) || defined(HAVE_ED448) short minEccKeySz; /* minimum ECC key size */ #endif -#ifdef HAVE_PQC +#ifdef HAVE_FALCON short minFalconKeySz; /* minimum Falcon key size */ +#endif +#ifdef HAVE_DILITHIUM short minDilithiumKeySz;/* minimum Dilithium key size */ #endif unsigned long mask; /* store SSL_OP_ flags */ @@ -4910,8 +4918,10 @@ struct Options { #if defined(HAVE_ECC) || defined(HAVE_ED25519) || defined(HAVE_ED448) short minEccKeySz; /* minimum ECC key size */ #endif -#if defined(HAVE_PQC) +#if defined(HAVE_FALCON) short minFalconKeySz; /* minimum Falcon key size */ +#endif +#if defined(HAVE_DILITHIUM) short minDilithiumKeySz;/* minimum Dilithium key size */ #endif #if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL) @@ -5105,9 +5115,9 @@ struct WOLFSSL_X509 { int pubKeyOID; DNS_entry* altNamesNext; /* hint for retrieval */ #if defined(HAVE_ECC) || defined(HAVE_ED25519) || defined(HAVE_ED448) || \ - defined(HAVE_PQC) + defined(HAVE_FALCON) || defined(HAVE_DILITHIUM) word32 pkCurveOID; -#endif /* HAVE_ECC || HAVE_PQC */ +#endif #ifndef NO_CERTS DerBuffer* derCert; /* may need */ #endif @@ -5700,9 +5710,11 @@ struct WOLFSSL { curve448_key* peerX448Key; byte peerX448KeyPresent; #endif -#ifdef HAVE_PQC +#ifdef HAVE_FALCON falcon_key* peerFalconKey; byte peerFalconKeyPresent; +#endif +#ifdef HAVE_DILITHIUM dilithium_key* peerDilithiumKey; byte peerDilithiumKeyPresent; #endif diff --git a/wolfssl/wolfcrypt/asn.h b/wolfssl/wolfcrypt/asn.h index 65168bb245..8e8a031110 100644 --- a/wolfssl/wolfcrypt/asn.h +++ b/wolfssl/wolfcrypt/asn.h @@ -948,7 +948,7 @@ enum Misc_ASN { ASN_GEN_TIME_SZ = 15, /* 7 numbers * 2 + Zulu tag */ #ifdef HAVE_SPHINCS MAX_ENCODED_SIG_SZ = 51200, -#elif defined(HAVE_PQC) +#elif defined(HAVE_FALCON) || defined(HAVE_DILITHIUM) MAX_ENCODED_SIG_SZ = 5120, #elif !defined(NO_RSA) #ifdef WOLFSSL_HAPROXY @@ -983,7 +983,7 @@ enum Misc_ASN { MAX_DSA_PRIVKEY_SZ = (DSA_INTS * MAX_DSA_INT_SZ) + MAX_SEQ_SZ + MAX_VERSION_SZ, /* Maximum size of a DSA Private key taken from DsaKeyIntsToDer. */ -#if defined(HAVE_PQC) +#if defined(HAVE_FALCON) || defined(HAVE_DILITHIUM) MAX_PQC_PUBLIC_KEY_SZ = 2592, /* Maximum size of a Dilithium public key. */ #endif MAX_RSA_E_SZ = 16, /* Max RSA public e size */ @@ -1032,7 +1032,7 @@ enum Misc_ASN { OCSP_NONCE_EXT_SZ = 35, /* OCSP Nonce Extension size */ MAX_OCSP_EXT_SZ = 58, /* Max OCSP Extension length */ MAX_OCSP_NONCE_SZ = 16, /* OCSP Nonce size */ -#if defined(HAVE_PQC) +#if defined(HAVE_FALCON) || defined(HAVE_DILITHIUM) MAX_PUBLIC_KEY_SZ = MAX_PQC_PUBLIC_KEY_SZ + MAX_ALGO_SZ + MAX_SEQ_SZ * 2, #else MAX_PUBLIC_KEY_SZ = MAX_DSA_PUBKEY_SZ + MAX_ALGO_SZ + MAX_SEQ_SZ * 2, @@ -1497,9 +1497,13 @@ struct SignatureCtx { #ifdef HAVE_ED448 struct ed448_key* ed448; #endif - #ifdef HAVE_PQC + #if defined(HAVE_FALCON) struct falcon_key* falcon; + #endif + #if defined(HAVE_DILITHIUM) struct dilithium_key* dilithium; + #endif + #if defined(HAVE_SPHINCS) struct sphincs_key* sphincs; #endif void* ptr; @@ -2375,8 +2379,11 @@ WOLFSSL_LOCAL void FreeSignatureCtx(SignatureCtx* sigCtx); WOLFSSL_LOCAL int SetAsymKeyDerPublic(const byte* pubKey, word32 pubKeyLen, byte* output, word32 outLen, int keyType, int withHeader); -WOLFSSL_LOCAL int DecodeAsymKeyPublic(const byte* input, word32* inOutIdx, word32 inSz, - byte* pubKey, word32* pubKeyLen, int keyType); +WOLFSSL_LOCAL int DecodeAsymKeyPublic_Assign(const byte* input, + word32* inOutIdx, word32 inSz, const byte** pubKey, word32* pubKeyLen, + int keyType); +WOLFSSL_LOCAL int DecodeAsymKeyPublic(const byte* input, word32* inOutIdx, + word32 inSz, byte* pubKey, word32* pubKeyLen, int keyType); #ifndef NO_CERTS @@ -2683,9 +2690,10 @@ WOLFSSL_LOCAL void FreeDecodedCRL(DecodedCRL* dcrl); || (defined(HAVE_CURVE25519) && defined(HAVE_CURVE25519_KEY_IMPORT)) \ || (defined(HAVE_ED448) && defined(HAVE_ED448_KEY_IMPORT)) \ || (defined(HAVE_CURVE448) && defined(HAVE_CURVE448_KEY_IMPORT)) \ - || (defined(HAVE_PQC) && defined(HAVE_FALCON)) \ - || (defined(HAVE_PQC) && defined(HAVE_DILITHIUM)) \ - || (defined(HAVE_PQC) && defined(HAVE_SPHINCS))) + || defined(HAVE_FALCON) || defined(HAVE_DILITHIUM) || defined(HAVE_SPHINCS)) +WOLFSSL_LOCAL int DecodeAsymKey_Assign(const byte* input, word32* inOutIdx, + word32 inSz, const byte** privKey, word32* privKeyLen, const byte** pubKey, + word32* pubKeyLen, int keyType); WOLFSSL_LOCAL int DecodeAsymKey(const byte* input, word32* inOutIdx, word32 inSz, byte* privKey, word32* privKeyLen, byte* pubKey, word32* pubKeyLen, int keyType); diff --git a/wolfssl/wolfcrypt/asn_public.h b/wolfssl/wolfcrypt/asn_public.h index d3df2a0765..b99fe7aeb9 100644 --- a/wolfssl/wolfcrypt/asn_public.h +++ b/wolfssl/wolfcrypt/asn_public.h @@ -799,8 +799,7 @@ WOLFSSL_API int wc_DhPrivKeyToDer(DhKey* key, byte* out, word32* outSz); (defined(HAVE_CURVE25519) && defined(HAVE_CURVE25519_KEY_EXPORT)) || \ (defined(HAVE_ED448) && defined(HAVE_ED448_KEY_EXPORT)) || \ (defined(HAVE_CURVE448) && defined(HAVE_CURVE448_KEY_EXPORT)) || \ - (defined(HAVE_PQC) && (defined(HAVE_FALCON) || \ - defined(HAVE_DILITHIUM) || defined(HAVE_SPHINCS)))) + (defined(HAVE_FALCON) || defined(HAVE_DILITHIUM) || defined(HAVE_SPHINCS))) #define WC_ENABLE_ASYM_KEY_EXPORT #endif @@ -809,8 +808,7 @@ WOLFSSL_API int wc_DhPrivKeyToDer(DhKey* key, byte* out, word32* outSz); (defined(HAVE_CURVE25519) && defined(HAVE_CURVE25519_KEY_IMPORT)) || \ (defined(HAVE_ED448) && defined(HAVE_ED448_KEY_IMPORT)) || \ (defined(HAVE_CURVE448) && defined(HAVE_CURVE448_KEY_IMPORT)) || \ - (defined(HAVE_PQC) && (defined(HAVE_FALCON) || \ - defined(HAVE_DILITHIUM) || defined(HAVE_SPHINCS)))) + (defined(HAVE_FALCON) || defined(HAVE_DILITHIUM) || defined(HAVE_SPHINCS))) #define WC_ENABLE_ASYM_KEY_IMPORT #endif diff --git a/wolfssl/wolfcrypt/cryptocb.h b/wolfssl/wolfcrypt/cryptocb.h index 8f66777504..549dbbe724 100644 --- a/wolfssl/wolfcrypt/cryptocb.h +++ b/wolfssl/wolfcrypt/cryptocb.h @@ -71,7 +71,7 @@ #if defined(WOLFSSL_SHA512) || defined(WOLFSSL_SHA384) #include #endif -#ifdef HAVE_PQC +#ifdef WOLFSSL_HAVE_KYBER #include #ifdef WOLFSSL_WC_KYBER #include @@ -79,10 +79,10 @@ #include #endif #endif -#if defined(HAVE_PQC) && defined(HAVE_DILITHIUM) +#if defined(HAVE_DILITHIUM) #include #endif -#if defined(HAVE_PQC) && defined(HAVE_FALCON) +#if defined(HAVE_FALCON) #include #endif @@ -216,7 +216,7 @@ typedef struct wc_CryptoInfo { byte contextLen; } ed25519verify; #endif - #if defined(HAVE_PQC) && defined(WOLFSSL_HAVE_KYBER) + #if defined(WOLFSSL_HAVE_KYBER) struct { WC_RNG* rng; int size; @@ -241,8 +241,7 @@ typedef struct wc_CryptoInfo { int type; /* enum wc_PqcKemType */ } pqc_decaps; #endif - #if defined(HAVE_PQC) && \ - (defined(HAVE_FALCON) || defined(HAVE_DILITHIUM)) + #if defined(HAVE_FALCON) || defined(HAVE_DILITHIUM) struct { WC_RNG* rng; int size; @@ -525,7 +524,7 @@ WOLFSSL_LOCAL int wc_CryptoCb_Ed25519Verify(const byte* sig, word32 sigLen, const byte* context, byte contextLen); #endif /* HAVE_ED25519 */ -#if defined(HAVE_PQC) && defined(WOLFSSL_HAVE_KYBER) +#if defined(WOLFSSL_HAVE_KYBER) WOLFSSL_LOCAL int wc_CryptoCb_PqcKemGetDevId(int type, void* key); WOLFSSL_LOCAL int wc_CryptoCb_MakePqcKemKey(WC_RNG* rng, int type, @@ -538,9 +537,9 @@ WOLFSSL_LOCAL int wc_CryptoCb_PqcEncapsulate(byte* ciphertext, WOLFSSL_LOCAL int wc_CryptoCb_PqcDecapsulate(const byte* ciphertext, word32 ciphertextLen, byte* sharedSecret, word32 sharedSecretLen, int type, void* key); -#endif /* HAVE_PQC && WOLFSSL_HAVE_KYBER */ +#endif /* WOLFSSL_HAVE_KYBER */ -#if defined(HAVE_PQC) && (defined(HAVE_FALCON) || defined(HAVE_DILITHIUM)) +#if defined(HAVE_FALCON) || defined(HAVE_DILITHIUM) WOLFSSL_LOCAL int wc_CryptoCb_PqcSigGetDevId(int type, void* key); WOLFSSL_LOCAL int wc_CryptoCb_MakePqcSignatureKey(WC_RNG* rng, int type, @@ -554,7 +553,7 @@ WOLFSSL_LOCAL int wc_CryptoCb_PqcVerify(const byte* sig, word32 siglen, WOLFSSL_LOCAL int wc_CryptoCb_PqcSignatureCheckPrivKey(void* key, int type, const byte* pubKey, word32 pubKeySz); -#endif /* HAVE_PQC && (HAVE_FALCON || HAVE_DILITHIUM) */ +#endif /* HAVE_FALCON || HAVE_DILITHIUM */ #ifndef NO_AES #ifdef HAVE_AESGCM diff --git a/wolfssl/wolfcrypt/dilithium.h b/wolfssl/wolfcrypt/dilithium.h index 5472d092ef..dc56505b4e 100644 --- a/wolfssl/wolfcrypt/dilithium.h +++ b/wolfssl/wolfcrypt/dilithium.h @@ -35,34 +35,458 @@ #include #endif -#if defined(HAVE_PQC) && defined(HAVE_DILITHIUM) +#if defined(HAVE_DILITHIUM) #ifdef HAVE_LIBOQS #include #include #endif +#if defined(WOLFSSL_DILITHIUM_NO_MAKE_KEY) && \ + defined(WOLFSSL_DILITHIUM_NO_SIGN) && \ + !defined(WOLFSSL_DILITHIUM_NO_VERIFY) && \ + !defined(WOLFSSL_DILITHIUM_VERIFY_ONLY) + #define WOLFSSL_DILITHIUM_VERIFY_ONLY +#endif +#ifdef WOLFSSL_DILITHIUM_VERIFY_ONLY + #ifndef WOLFSSL_DILITHIUM_NO_MAKE_KEY + #define WOLFSSL_DILITHIUM_NO_MAKE_KEY + #endif + #ifndef WOLFSSL_DILITHIUM_NO_SIGN + #define WOLFSSL_DILITHIUM_NO_SIGN + #endif +#endif + +#if !defined(WOLFSSL_DILITHIUM_NO_MAKE_KEY) || \ + !defined(WOLFSSL_DILITHIUM_NO_VERIFY) + #define WOLFSSL_DILITHIUM_PUBLIC_KEY +#endif +#if !defined(WOLFSSL_DILITHIUM_NO_MAKE_KEY) || \ + !defined(WOLFSSL_DILITHIUM_NO_SIGN) + #define WOLFSSL_DILITHIUM_PRIVATE_KEY +#endif + +#if defined(WOLFSSL_DILITHIUM_PUBLIC_KEY) && \ + defined(WOLFSSL_DILITHIUM_PRIVATE_KEY) && \ + !defined(WOLFSSL_DILITHIUM_NO_CHECK_KEY) && \ + !defined(WOLFSSL_DILITHIUM_CHECK_KEY) + #define WOLFSSL_DILITHIUM_CHECK_KEY +#endif + +#ifdef WOLFSSL_WC_DILITHIUM + #include +#ifndef WOLFSSL_DILITHIUM_VERIFY_ONLY + #include +#endif +#endif + +#if defined(WC_DILITHIUM_CACHE_PRIV_VECTORS) && \ + !defined(WC_DILITHIUM_CACHE_MATRIX_A) + #define WC_DILITHIUM_CACHE_MATRIX_A +#endif +#if defined(WC_DILITHIUM_CACHE_PUB_VECTORS) && \ + !defined(WC_DILITHIUM_CACHE_MATRIX_A) + #define WC_DILITHIUM_CACHE_MATRIX_A +#endif + #ifdef __cplusplus extern "C" { #endif /* Macros Definitions */ -#ifdef HAVE_LIBOQS -#define DILITHIUM_LEVEL2_KEY_SIZE OQS_SIG_dilithium_2_length_secret_key -#define DILITHIUM_LEVEL2_SIG_SIZE OQS_SIG_dilithium_2_length_signature -#define DILITHIUM_LEVEL2_PUB_KEY_SIZE OQS_SIG_dilithium_2_length_public_key -#define DILITHIUM_LEVEL2_PRV_KEY_SIZE (DILITHIUM_LEVEL2_PUB_KEY_SIZE+DILITHIUM_LEVEL2_KEY_SIZE) +#ifdef WOLFSSL_WC_DILITHIUM + +#ifndef WOLFSSL_DILITHIUM_ALIGNMENT + #if defined(__arch64__) + #define WOLFSSL_DILITHIUM_ALIGNMENT 8 + #elif defined(__arm__) + #define WOLFSSL_DILITHIUM_ALIGNMENT 4 + #elif !defined(WOLFSSL_AESNI) && defined(WOLFSSL_GENERAL_ALIGNMENT) + #define WOLFSSL_DILITHIUM_ALIGNMENT WOLFSSL_GENERAL_ALIGNMENT + #else + #define WOLFSSL_DILITHIUM_ALIGNMENT 8 + #endif +#endif /* WOLFSSL_DILITHIUM_ALIGNMENT */ + +#define DILITHIUM_LEVEL2_KEY_SIZE 2560 +#define DILITHIUM_LEVEL2_SIG_SIZE 2420 +#define DILITHIUM_LEVEL2_PUB_KEY_SIZE 1312 +#define DILITHIUM_LEVEL2_PRV_KEY_SIZE \ + (DILITHIUM_LEVEL2_PUB_KEY_SIZE + DILITHIUM_LEVEL2_KEY_SIZE) + +#define DILITHIUM_LEVEL3_KEY_SIZE 4032 +#define DILITHIUM_LEVEL3_SIG_SIZE 3309 +#define DILITHIUM_LEVEL3_PUB_KEY_SIZE 1952 +#define DILITHIUM_LEVEL3_PRV_KEY_SIZE \ + (DILITHIUM_LEVEL3_PUB_KEY_SIZE + DILITHIUM_LEVEL3_KEY_SIZE) + +#define DILITHIUM_LEVEL5_KEY_SIZE 4896 +#define DILITHIUM_LEVEL5_SIG_SIZE 4627 +#define DILITHIUM_LEVEL5_PUB_KEY_SIZE 2592 +#define DILITHIUM_LEVEL5_PRV_KEY_SIZE \ + (DILITHIUM_LEVEL5_PUB_KEY_SIZE + DILITHIUM_LEVEL5_KEY_SIZE) + + +/* Modulus. */ +#define DILITHIUM_Q 0x7fe001 +/* Number of bits in modulus. */ +#define DILITHIUM_Q_BITS 23 +/* Number of elements in polynomial. */ +#define DILITHIUM_N 256 + +/* Number of dropped bits. */ +#define DILITHIUM_D 13 +/* Maximum value of dropped bits. */ +#define DILITHIUM_D_MAX (1 << DILITHIUM_D) +/* Half maximum value. */ +#define DILITHIUM_D_MAX_HALF (1 << (DILITHIUM_D - 1)) +/* Number of undropped bits. */ +#define DILITHIUM_U (DILITHIUM_Q_BITS - DILITHIUM_D) + +/* Bits in coefficient range of y, GAMMA1, of 2^17 is 17. */ +#define DILITHIUM_GAMMA1_BITS_17 17 +/* Coefficient range of y, GAMMA1, of 2^17. */ +#define DILITHIUM_GAMMA1_17 (1 << 17) +/* # encoding bits of y is GAMMA1 + 1. */ +#define DILITHIUM_GAMMA1_17_ENC_BITS 18 +/* Coefficient range of y, GAMMA1, of 2^17. */ +/* Bits in coefficient range of y, GAMMA1, of 2^19 is 19. */ +#define DILITHIUM_GAMMA1_BITS_19 19 +/* Coefficient range of y, GAMMA1, of 2^19. */ +#define DILITHIUM_GAMMA1_19 (1 << 19) +/* # encoding bits of y is GAMMA1 + 1. */ +#define DILITHIUM_GAMMA1_19_ENC_BITS 20 + +/* Low-order rounding range, GAMMA2, is Q divided by 88. */ +#define DILITHIUM_Q_LOW_88 ((DILITHIUM_Q - 1) / 88) +/* Absolute low-order rounding range, GAMMA2, is Q divided by 88. */ +#define DILITHIUM_Q_LOW_88_2 (((DILITHIUM_Q - 1) / 88) * 2) +/* # encoding bits of w1 when range is 88. */ +#define DILITHIUM_Q_HI_88_ENC_BITS 6 +/* Low-order rounding range, GAMMA2, is Q divided by 32. */ +#define DILITHIUM_Q_LOW_32 ((DILITHIUM_Q - 1) / 32) +/* Absolute low-order rounding range, GAMMA2, is Q divided by 32. */ +#define DILITHIUM_Q_LOW_32_2 (((DILITHIUM_Q - 1) / 32) * 2) +/* # encoding bits of w1 when range is 32. */ +#define DILITHIUM_Q_HI_32_ENC_BITS 4 + +/* Private key range, eta, of 2. */ +#define DILITHIUM_ETA_2 2 +/* Bits needed to encode values in range -2..2 as a positive number. */ +#define DILITHIUM_ETA_2_BITS 3 +/* Extract count of valid values. */ +#define DILITHIUM_ETA_2_MOD 15 +/* Private key range, eta, of 4. */ +#define DILITHIUM_ETA_4 4 +/* Bits needed to encode values in range -4..4 as a positive number. */ +#define DILITHIUM_ETA_4_BITS 4 +/* Extract count of valid values. */ +#define DILITHIUM_ETA_4_MOD 9 + +/* Number of bytes in a polynomial in memory. */ +#define DILITHIUM_POLY_SIZE (DILITHIUM_N * sizeof(sword32)) + +#ifndef WOLFSSL_NO_ML_DSA_44 + +/* Fist dimension of A, k, for ML-DSA-44. */ +#define PARAMS_ML_DSA_44_K 4 +/* Second dimension of A, l, for ML-DSA-44. */ +#define PARAMS_ML_DSA_44_L 4 +/* Private key range, ETA, for ML-DSA-44. */ +#define PARAMS_ML_DSA_44_ETA DILITHIUM_ETA_2 +/* Number of bits in private key for ML-DSA-44. */ +#define PARAMS_ML_DSA_44_ETA_BITS DILITHIUM_ETA_2_BITS +/* Collision strength of c-tilde, LAMBDA, in bytes for ML-DSA-44. */ +#define PARAMS_ML_DSA_44_LAMBDA 16 +/* # +/-1's in polynomial c, TAU, for ML-DSA-44. */ +#define PARAMS_ML_DSA_44_TAU 39 +/* BETA = TAU * ETA for ML-DSA-44. */ +#define PARAMS_ML_DSA_44_BETA \ + (PARAMS_ML_DSA_44_TAU * PARAMS_ML_DSA_44_ETA) +/* Max # 1's in the hint h, OMEGA, for ML-DSA-44. */ +#define PARAMS_ML_DSA_44_OMEGA 80 +/* Bits in coefficient range of y, GAMMA1, for ML-DSA-44. */ +#define PARAMS_ML_DSA_44_GAMMA1_BITS DILITHIUM_GAMMA1_BITS_17 +/* Ccoefficient range of y, GAMMA1, for ML-DSA-44. */ +#define PARAMS_ML_DSA_44_GAMMA1 (1 << PARAMS_ML_DSA_44_GAMMA1_BITS) +/* Low-order rounding range, GAMMA2, for ML-DSA-44. */ +#define PARAMS_ML_DSA_44_GAMMA2 DILITHIUM_Q_LOW_88 +/* Bits in high-order rounding range, GAMMA2, for ML-DSA-44. */ +#define PARAMS_ML_DSA_44_GAMMA2_HI_BITS 6 +/* Encoding size of w1 in bytes for ML-DSA-44. + * K * N / 8 * 6 - 6 bits as max value is 43 in high bits. */ +#define PARAMS_ML_DSA_44_W1_ENC_SZ \ + (PARAMS_ML_DSA_44_K * DILITHIUM_N / 8 * PARAMS_ML_DSA_44_GAMMA2_HI_BITS) +/* Size of memory used for matrix a in bytes for ML-DSA-44. */ +#define PARAMS_ML_DSA_44_A_SIZE \ + (PARAMS_ML_DSA_44_K * PARAMS_ML_DSA_44_L * DILITHIUM_POLY_SIZE) +/* Size of memory used for vector s1 in bytes for ML-DSA-44. */ +#define PARAMS_ML_DSA_44_S1_SIZE \ + (PARAMS_ML_DSA_44_L * DILITHIUM_POLY_SIZE) +/* Encoding size of s1 in bytes for ML-DSA-44. */ +#define PARAMS_ML_DSA_44_S1_ENC_SIZE \ + (PARAMS_ML_DSA_44_S1_SIZE / sizeof(sword32) * PARAMS_ML_DSA_44_ETA_BITS / 8) +/* Size of memory used for vector s2 in bytes for ML-DSA-44. */ +#define PARAMS_ML_DSA_44_S2_SIZE \ + (PARAMS_ML_DSA_44_K * DILITHIUM_POLY_SIZE) +/* Encoding size of s2 in bytes for ML-DSA-44. */ +#define PARAMS_ML_DSA_44_S2_ENC_SIZE \ + (PARAMS_ML_DSA_44_S2_SIZE / sizeof(sword32) * PARAMS_ML_DSA_44_ETA_BITS / 8) +/* Encoding size of z in bytes for ML-DSA-44. */ +#define PARAMS_ML_DSA_44_Z_ENC_SIZE \ + (PARAMS_ML_DSA_44_S1_SIZE / sizeof(sword32) / 8 * \ + (PARAMS_ML_DSA_44_GAMMA1_BITS + 1)) +/* Encoding size of public key in bytes for ML-DSA-44. */ +#define PARAMS_ML_DSA_44_PK_SIZE \ + (DILITHIUM_PUB_SEED_SZ + PARAMS_ML_DSA_44_K * DILITHIUM_N * DILITHIUM_U / 8) +/* Encoding size of signature in bytes for ML-DSA-44. */ +#define PARAMS_ML_DSA_44_SIG_SIZE \ + ((PARAMS_ML_DSA_44_LAMBDA * 2) + \ + PARAMS_ML_DSA_44_L * DILITHIUM_N/8 * (PARAMS_ML_DSA_44_GAMMA1_BITS + 1) + \ + PARAMS_ML_DSA_44_OMEGA + PARAMS_ML_DSA_44_K) + +#endif /* WOLFSSL_NO_ML_DSA_44 */ + +#ifndef WOLFSSL_NO_ML_DSA_65 + +/* Fist dimension of A, k, for ML-DSA-65. */ +#define PARAMS_ML_DSA_65_K 6 +/* Second dimension of A, l, for ML-DSA-65. */ +#define PARAMS_ML_DSA_65_L 5 +/* Private key range, ETA, for ML-DSA-65. */ +#define PARAMS_ML_DSA_65_ETA DILITHIUM_ETA_4 +/* Number of bits in private key for ML-DSA-65. */ +#define PARAMS_ML_DSA_65_ETA_BITS DILITHIUM_ETA_4_BITS +/* Collision strength of c-tilde, LAMBDA, in bytes for ML-DSA-65. */ +#define PARAMS_ML_DSA_65_LAMBDA 24 +/* # +/-1's in polynomial c, TAU, for ML-DSA-65. */ +#define PARAMS_ML_DSA_65_TAU 49 +/* BETA = TAU * ETA for ML-DSA-65. */ +#define PARAMS_ML_DSA_65_BETA \ + (PARAMS_ML_DSA_65_TAU * PARAMS_ML_DSA_65_ETA) +/* Max # 1's in the hint h, OMEGA, for ML-DSA-65. */ +#define PARAMS_ML_DSA_65_OMEGA 55 +/* Bits in coefficient range of y, GAMMA1, for ML-DSA-65. */ +#define PARAMS_ML_DSA_65_GAMMA1_BITS DILITHIUM_GAMMA1_BITS_19 +/* Ccoefficient range of y, GAMMA1, for ML-DSA-65. */ +#define PARAMS_ML_DSA_65_GAMMA1 (1 << PARAMS_ML_DSA_65_GAMMA1_BITS) +/* Low-order rounding range, GAMMA2, for ML-DSA-65. */ +#define PARAMS_ML_DSA_65_GAMMA2 DILITHIUM_Q_LOW_32 +/* Bits in high-order rounding range, GAMMA2, for ML-DSA-65. */ +#define PARAMS_ML_DSA_65_GAMMA2_HI_BITS 4 +/* Encoding size of w1 in bytes for ML-DSA-65. + * K * N / 8 * 4 - 4 bits as max value is 15 in high bits. */ +#define PARAMS_ML_DSA_65_W1_ENC_SZ \ + (PARAMS_ML_DSA_65_K * DILITHIUM_N / 8 * PARAMS_ML_DSA_65_GAMMA2_HI_BITS) +/* Size of memory used for matrix a in bytes for ML-DSA-65. */ +#define PARAMS_ML_DSA_65_A_SIZE \ + (PARAMS_ML_DSA_65_K * PARAMS_ML_DSA_65_L * DILITHIUM_POLY_SIZE) +/* Size of memory used for vector s1 in bytes for ML-DSA-65. */ +#define PARAMS_ML_DSA_65_S1_SIZE \ + (PARAMS_ML_DSA_65_L * DILITHIUM_POLY_SIZE) +/* Encoding size of s1 in bytes for ML-DSA-65. */ +#define PARAMS_ML_DSA_65_S1_ENC_SIZE \ + (PARAMS_ML_DSA_65_S1_SIZE / sizeof(sword32) * PARAMS_ML_DSA_65_ETA_BITS / 8) +/* Size of memory used for vector s2 in bytes for ML-DSA-65. */ +#define PARAMS_ML_DSA_65_S2_SIZE \ + (PARAMS_ML_DSA_65_K * DILITHIUM_POLY_SIZE) +/* Encoding size of s2 in bytes for ML-DSA-65. */ +#define PARAMS_ML_DSA_65_S2_ENC_SIZE \ + (PARAMS_ML_DSA_65_S2_SIZE / sizeof(sword32) * PARAMS_ML_DSA_65_ETA_BITS / 8) +/* Encoding size of z in bytes for ML-DSA-65. */ +#define PARAMS_ML_DSA_65_Z_ENC_SIZE \ + (PARAMS_ML_DSA_65_S1_SIZE / sizeof(sword32) / 8 * \ + (PARAMS_ML_DSA_65_GAMMA1_BITS + 1)) +/* Encoding size of public key in bytes for ML-DSA-65. */ +#define PARAMS_ML_DSA_65_PK_SIZE \ + (DILITHIUM_PUB_SEED_SZ + PARAMS_ML_DSA_65_K * DILITHIUM_N * DILITHIUM_U / 8) +/* Encoding size of signature in bytes for ML-DSA-65. */ +#define PARAMS_ML_DSA_65_SIG_SIZE \ + ((PARAMS_ML_DSA_65_LAMBDA * 2) + \ + PARAMS_ML_DSA_65_L * DILITHIUM_N/8 * (PARAMS_ML_DSA_65_GAMMA1_BITS + 1) + \ + PARAMS_ML_DSA_65_OMEGA + PARAMS_ML_DSA_65_K) + +#endif /* WOLFSSL_NO_ML_DSA_65 */ + +#ifndef WOLFSSL_NO_ML_DSA_87 + +/* Fist dimension of A, k, for ML-DSA-87. */ +#define PARAMS_ML_DSA_87_K 8 +/* Second dimension of A, l, for ML-DSA-87. */ +#define PARAMS_ML_DSA_87_L 7 +/* Private key range, ETA, for ML-DSA-87. */ +#define PARAMS_ML_DSA_87_ETA DILITHIUM_ETA_2 +/* Number of bits in private key for ML-DSA-87. */ +#define PARAMS_ML_DSA_87_ETA_BITS DILITHIUM_ETA_2_BITS +/* Collision strength of c-tilde, LAMBDA, in bytes for ML-DSA-87. */ +#define PARAMS_ML_DSA_87_LAMBDA 32 +/* # +/-1's in polynomial c, TAU, for ML-DSA-87. */ +#define PARAMS_ML_DSA_87_TAU 60 +/* BETA = TAU * ETA for ML-DSA-87. */ +#define PARAMS_ML_DSA_87_BETA \ + (PARAMS_ML_DSA_87_TAU * PARAMS_ML_DSA_87_ETA) +/* Max # 1's in the hint h, OMEGA, for ML-DSA-87. */ +#define PARAMS_ML_DSA_87_OMEGA 75 +/* Bits in coefficient range of y, GAMMA1, for ML-DSA-87. */ +#define PARAMS_ML_DSA_87_GAMMA1_BITS DILITHIUM_GAMMA1_BITS_19 +/* Ccoefficient range of y, GAMMA1, for ML-DSA-87. */ +#define PARAMS_ML_DSA_87_GAMMA1 (1 << PARAMS_ML_DSA_87_GAMMA1_BITS) +/* Low-order rounding range, GAMMA2, for ML-DSA-87. */ +#define PARAMS_ML_DSA_87_GAMMA2 DILITHIUM_Q_LOW_32 +/* Bits in high-order rounding range, GAMMA2, for ML-DSA-87. */ +#define PARAMS_ML_DSA_87_GAMMA2_HI_BITS 4 +/* Encoding size of w1 in bytes for ML-DSA-87. + * K * N / 8 * 4 - 4 bits as max value is 15 in high bits. */ +#define PARAMS_ML_DSA_87_W1_ENC_SZ \ + (PARAMS_ML_DSA_87_K * DILITHIUM_N / 8 * PARAMS_ML_DSA_87_GAMMA2_HI_BITS) +/* Size of memory used for matrix A in bytes for ML-DSA-87. */ +#define PARAMS_ML_DSA_87_A_SIZE \ + (PARAMS_ML_DSA_87_K * PARAMS_ML_DSA_87_L * DILITHIUM_POLY_SIZE) +#define PARAMS_ML_DSA_87_S_SIZE 4 +/* Size of memory used for vector s1 in bytes for ML-DSA-87. */ +#define PARAMS_ML_DSA_87_S1_SIZE \ + (PARAMS_ML_DSA_87_L * DILITHIUM_POLY_SIZE) +/* Encoding size of s1 in bytes for ML-DSA-87. */ +#define PARAMS_ML_DSA_87_S1_ENC_SIZE \ + (PARAMS_ML_DSA_87_S1_SIZE / sizeof(sword32) * PARAMS_ML_DSA_87_ETA_BITS / 8) +/* Size of memory used for vector s2 in bytes for ML-DSA-87. */ +#define PARAMS_ML_DSA_87_S2_SIZE \ + (PARAMS_ML_DSA_87_K * DILITHIUM_POLY_SIZE) +/* Encoding size of s2 in bytes for ML-DSA-87. */ +#define PARAMS_ML_DSA_87_S2_ENC_SIZE \ + (PARAMS_ML_DSA_87_S2_SIZE / sizeof(sword32) * PARAMS_ML_DSA_87_ETA_BITS / 8) +/* Encoding size of z in bytes for ML-DSA-87. */ +#define PARAMS_ML_DSA_87_Z_ENC_SIZE \ + (PARAMS_ML_DSA_87_S1_SIZE / sizeof(sword32) / 8 * \ + (PARAMS_ML_DSA_87_GAMMA1_BITS + 1)) +/* Encoding size of public key in bytes for ML-DSA-87. */ +#define PARAMS_ML_DSA_87_PK_SIZE \ + (DILITHIUM_PUB_SEED_SZ + PARAMS_ML_DSA_87_K * DILITHIUM_N * DILITHIUM_U / 8) +/* Encoding size of signature in bytes for ML-DSA-87. */ +#define PARAMS_ML_DSA_87_SIG_SIZE \ + ((PARAMS_ML_DSA_87_LAMBDA * 2) + \ + PARAMS_ML_DSA_87_L * DILITHIUM_N/8 * (PARAMS_ML_DSA_87_GAMMA1_BITS + 1) + \ + PARAMS_ML_DSA_87_OMEGA + PARAMS_ML_DSA_87_K) + +#endif /* WOLFSSL_NO_ML_DSA_87 */ + + +#ifndef WOLFSSL_NO_ML_DSA_87 + +#define DILITHIUM_MAX_W1_ENC_SZ PARAMS_ML_DSA_87_W1_ENC_SZ +/* Maximum collision strength of c-tilde in bytes. */ +#define DILITHIUM_MAX_LAMBDA PARAMS_ML_DSA_87_LAMBDA + +/* Maximum count of elements of a vector with dimension K. */ +#define DILITHIUM_MAX_K_VECTOR_COUNT \ + (PARAMS_ML_DSA_87_K * DILITHIUM_N) +/* Maximum count of elements of a vector with dimension L. */ +#define DILITHIUM_MAX_L_VECTOR_COUNT \ + (PARAMS_ML_DSA_87_L * DILITHIUM_N) + +#elif !defined(WOLFSSL_NO_ML_DSA_65) + +/* Maximum w1 encoding size in bytes. */ +#define DILITHIUM_MAX_W1_ENC_SZ PARAMS_ML_DSA_65_W1_ENC_SZ +/* Maximum collision strength of c-tilde in bytes. */ +#define DILITHIUM_MAX_LAMBDA PARAMS_ML_DSA_65_LAMBDA + +/* Maximum count of elements of a vector with dimension K. */ +#define DILITHIUM_MAX_K_VECTOR_COUNT \ + (PARAMS_ML_DSA_65_K * DILITHIUM_N) +/* Maximum count of elements of a vector with dimension L. */ +#define DILITHIUM_MAX_L_VECTOR_COUNT \ + (PARAMS_ML_DSA_65_L * DILITHIUM_N) + +#else + +/* Maximum w1 encoding size in bytes. */ +#define DILITHIUM_MAX_W1_ENC_SZ PARAMS_ML_DSA_44_W1_ENC_SZ +/* Maximum collision strength of c-tilde in bytes. */ +#define DILITHIUM_MAX_LAMBDA PARAMS_ML_DSA_44_LAMBDA + +/* Maximum count of elements of a vector with dimension K. */ +#define DILITHIUM_MAX_K_VECTOR_COUNT \ + (PARAMS_ML_DSA_44_K * DILITHIUM_N) +/* Maximum count of elements of a vector with dimension L. */ +#define DILITHIUM_MAX_L_VECTOR_COUNT \ + (PARAMS_ML_DSA_44_L * DILITHIUM_N) + +#endif + +/* Length of K in bytes. */ +#define DILITHIUM_K_SZ 32 +/* Length of TR in bytes. */ +#define DILITHIUM_TR_SZ 64 +/* Length of public key seed in bytes when expanding a. */ +#define DILITHIUM_PUB_SEED_SZ 32 +/* Length of private key seed in bytes when generating a key. */ +#define DILITHIUM_PRIV_SEED_SZ 64 + +/* Length of seed when creating vector c. */ +#define DILITHIUM_SEED_SZ 32 +/* Length of seeds created when making a key. */ +#define DILITHIUM_SEEDS_SZ 128 + +/* Length of MU in bytes. */ +#define DILITHIUM_MU_SZ 64 +/* Length of random in bytes when generating a signature. */ +#define DILITHIUM_RND_SZ 32 +/* Length of private random in bytes when generating a signature. */ +#define DILITHIUM_PRIV_RAND_SEED_SZ 64 + +/* 5 blocks, each block 21 * 8 bytes = 840 bytes. + * Minimum required is 256 * 3 = 768. */ +#define DILITHIUM_GEN_A_NBLOCKS 5 +/* Number of bytes to generate with Shake128 when generating A. */ +#define DILITHIUM_GEN_A_BYTES \ + (DILITHIUM_GEN_A_NBLOCKS * WC_SHA3_128_COUNT * 8) +/* Number of bytes to a block of SHAKE-128 when generating A. */ +#define DILITHIUM_GEN_A_BLOCK_BYTES (WC_SHA3_128_COUNT * 8) + +/* Number of bytes to a block of SHAKE-256 when generating c. */ +#define DILITHIUM_GEN_C_BLOCK_BYTES (WC_SHA3_256_COUNT * 8) + + +#ifndef WOLFSSL_DILITHIUM_SMALL +#if defined(LITTLE_ENDIAN_ORDER) && (WOLFSSL_DILITHIUM_ALIGNMENT == 0) + /* A block SHAKE-128 output plus one for reading 4 bytes at a time. */ + #define DILITHIUM_REJ_NTT_POLY_H_SIZE (DILITHIUM_GEN_A_BYTES + 1) +#else + /* A block SHAKE-128 output. */ + #define DILITHIUM_REJ_NTT_POLY_H_SIZE DILITHIUM_GEN_A_BYTES +#endif /* LITTLE_ENDIAN_ORDER && WOLFSSL_DILITHIUM_ALIGNMENT == 0 */ +#else +#if defined(LITTLE_ENDIAN_ORDER) && (WOLFSSL_DILITHIUM_ALIGNMENT == 0) + /* A block SHAKE-128 output plus one for reading 4 bytes at a time. */ + #define DILITHIUM_REJ_NTT_POLY_H_SIZE (DILITHIUM_GEN_A_BLOCK_BYTES + 1) +#else + /* A block SHAKE-128 output. */ + #define DILITHIUM_REJ_NTT_POLY_H_SIZE DILITHIUM_GEN_A_BLOCK_BYTES +#endif /* LITTLE_ENDIAN_ORDER && WOLFSSL_DILITHIUM_ALIGNMENT == 0 */ +#endif + +#elif defined(HAVE_LIBOQS) + +#define DILITHIUM_LEVEL2_KEY_SIZE OQS_SIG_ml_dsa_44_ipd_length_secret_key +#define DILITHIUM_LEVEL2_SIG_SIZE OQS_SIG_ml_dsa_44_ipd_length_signature +#define DILITHIUM_LEVEL2_PUB_KEY_SIZE OQS_SIG_ml_dsa_44_ipd_length_public_key +#define DILITHIUM_LEVEL2_PRV_KEY_SIZE \ + (DILITHIUM_LEVEL2_PUB_KEY_SIZE+DILITHIUM_LEVEL2_KEY_SIZE) -#define DILITHIUM_LEVEL3_KEY_SIZE OQS_SIG_dilithium_3_length_secret_key -#define DILITHIUM_LEVEL3_SIG_SIZE OQS_SIG_dilithium_3_length_signature -#define DILITHIUM_LEVEL3_PUB_KEY_SIZE OQS_SIG_dilithium_3_length_public_key -#define DILITHIUM_LEVEL3_PRV_KEY_SIZE (DILITHIUM_LEVEL3_PUB_KEY_SIZE+DILITHIUM_LEVEL3_KEY_SIZE) +#define DILITHIUM_LEVEL3_KEY_SIZE OQS_SIG_ml_dsa_65_ipd_length_secret_key +#define DILITHIUM_LEVEL3_SIG_SIZE OQS_SIG_ml_dsa_65_ipd_length_signature +#define DILITHIUM_LEVEL3_PUB_KEY_SIZE OQS_SIG_ml_dsa_65_ipd_length_public_key +#define DILITHIUM_LEVEL3_PRV_KEY_SIZE \ + (DILITHIUM_LEVEL3_PUB_KEY_SIZE+DILITHIUM_LEVEL3_KEY_SIZE) + +#define DILITHIUM_LEVEL5_KEY_SIZE OQS_SIG_ml_dsa_87_ipd_length_secret_key +#define DILITHIUM_LEVEL5_SIG_SIZE OQS_SIG_ml_dsa_87_ipd_length_signature +#define DILITHIUM_LEVEL5_PUB_KEY_SIZE OQS_SIG_ml_dsa_87_ipd_length_public_key +#define DILITHIUM_LEVEL5_PRV_KEY_SIZE \ + (DILITHIUM_LEVEL5_PUB_KEY_SIZE+DILITHIUM_LEVEL5_KEY_SIZE) -#define DILITHIUM_LEVEL5_KEY_SIZE OQS_SIG_dilithium_5_length_secret_key -#define DILITHIUM_LEVEL5_SIG_SIZE OQS_SIG_dilithium_5_length_signature -#define DILITHIUM_LEVEL5_PUB_KEY_SIZE OQS_SIG_dilithium_5_length_public_key -#define DILITHIUM_LEVEL5_PRV_KEY_SIZE (DILITHIUM_LEVEL5_PUB_KEY_SIZE+DILITHIUM_LEVEL5_KEY_SIZE) #endif #define DILITHIUM_MAX_KEY_SIZE DILITHIUM_LEVEL5_KEY_SIZE @@ -77,9 +501,34 @@ /* Structs */ +#ifdef WOLFSSL_WC_DILITHIUM +typedef struct wc_dilithium_params { + byte level; + byte k; + byte l; + byte eta; + byte eta_bits; + byte tau; + byte beta; + byte omega; + byte lambda; + byte gamma1_bits; + word32 gamma2; + word32 w1EncSz; + word16 aSz; + word16 s1Sz; + word16 s1EncSz; + word16 s2Sz; + word16 s2EncSz; + word16 zEncSz; + word16 pkSz; + word16 sigSz; +} wc_dilithium_params; +#endif + struct dilithium_key { - bool pubKeySet; - bool prvKeySet; + byte pubKeySet; + byte prvKeySet; byte level; /* 2,3 or 5 */ #ifdef WOLF_CRYPTO_CB @@ -93,8 +542,43 @@ struct dilithium_key { int labelLen; #endif +#ifndef WOLFSSL_DILITHIUM_ASSIGN_KEY byte p[DILITHIUM_MAX_PUB_KEY_SIZE]; - byte k[DILITHIUM_MAX_PRV_KEY_SIZE]; + byte k[DILITHIUM_MAX_KEY_SIZE]; +#else + const byte* p; + const byte* k; +#endif + +#ifdef WOLFSSL_WC_DILITHIUM + const wc_dilithium_params* params; + wc_Shake shake; +#ifdef WC_DILITHIUM_CACHE_MATRIX_A + sword32* a; + byte aSet; +#endif +#ifdef WC_DILITHIUM_CACHE_PRIV_VECTORS + sword32* s1; + sword32* s2; + sword32* t0; + byte privVecsSet; +#endif +#ifdef WC_DILITHIUM_CACHE_PUB_VECTORS + sword32* t1; + byte pubVecSet; +#endif +#if defined(WOLFSSL_DILITHIUM_VERIFY_NO_MALLOC) && \ + defined(WOLFSSL_DILITHIUM_VERIFY_SMALL_MEM) + sword32 z[DILITHIUM_MAX_L_VECTOR_COUNT]; + sword32 c[DILITHIUM_N]; + sword32 w[DILITHIUM_N]; + sword32 t1[DILITHIUM_N]; + byte w1e[DILITHIUM_MAX_W1_ENC_SZ]; + byte h[DILITHIUM_REJ_NTT_POLY_H_SIZE]; + byte block[DILITHIUM_GEN_C_BLOCK_BYTES]; +#endif /* WOLFSSL_DILITHIUM_VERIFY_NO_MALLOC && + * WOLFSSL_DILITHIUM_VERIFY_SMALL_MEM */ +#endif /* WOLFSSL_WC_DILITHIUM */ }; #ifndef WC_DILITHIUMKEY_TYPE_DEFINED @@ -104,12 +588,17 @@ struct dilithium_key { /* Functions */ +#ifndef WOLFSSL_DILITHIUM_VERIFY_ONLY WOLFSSL_API -int wc_dilithium_sign_msg(const byte* in, word32 inLen, byte* out, word32 *outLen, - dilithium_key* key, WC_RNG* rng); +int wc_dilithium_make_key(dilithium_key* key, WC_RNG* rng); + +WOLFSSL_API +int wc_dilithium_sign_msg(const byte* in, word32 inLen, byte* out, + word32 *outLen, dilithium_key* key, WC_RNG* rng); +#endif WOLFSSL_API int wc_dilithium_verify_msg(const byte* sig, word32 sigLen, const byte* msg, - word32 msgLen, int* res, dilithium_key* key); + word32 msgLen, int* res, dilithium_key* key); WOLFSSL_API int wc_dilithium_init(dilithium_key* key); @@ -120,10 +609,10 @@ int wc_dilithium_init_ex(dilithium_key* key, void* heap, int devId); #ifdef WOLF_PRIVATE_KEY_ID WOLFSSL_API int wc_dilithium_init_id(dilithium_key* key, const unsigned char* id, int len, - void* heap, int devId); + void* heap, int devId); WOLFSSL_API int wc_dilithium_init_label(dilithium_key* key, const char* label, void* heap, - int devId); + int devId); #endif WOLFSSL_API @@ -133,54 +622,142 @@ int wc_dilithium_get_level(dilithium_key* key, byte* level); WOLFSSL_API void wc_dilithium_free(dilithium_key* key); +#ifdef WOLFSSL_DILITHIUM_PRIVATE_KEY WOLFSSL_API -int wc_dilithium_import_public(const byte* in, word32 inLen, dilithium_key* key); -WOLFSSL_API -int wc_dilithium_import_private_only(const byte* priv, word32 privSz, - dilithium_key* key); -WOLFSSL_API -int wc_dilithium_import_private_key(const byte* priv, word32 privSz, - const byte* pub, word32 pubSz, - dilithium_key* key); - -WOLFSSL_API -int wc_dilithium_export_public(dilithium_key* key, byte* out, word32* outLen); +int wc_dilithium_size(dilithium_key* key); +#endif +#if defined(WOLFSSL_DILITHIUM_PRIVATE_KEY) && \ + defined(WOLFSSL_DILITHIUM_PUBLIC_KEY) WOLFSSL_API -int wc_dilithium_export_private_only(dilithium_key* key, byte* out, word32* outLen); +int wc_dilithium_priv_size(dilithium_key* key); +#endif +#ifdef WOLFSSL_DILITHIUM_PUBLIC_KEY WOLFSSL_API -int wc_dilithium_export_private(dilithium_key* key, byte* out, word32* outLen); +int wc_dilithium_pub_size(dilithium_key* key); +#endif +#if !defined(WOLFSSL_DILITHIUM_NO_SIGN) || !defined(WOLFSSL_DILITHIUM_NO_VERIFY) WOLFSSL_API -int wc_dilithium_export_key(dilithium_key* key, byte* priv, word32 *privSz, - byte* pub, word32 *pubSz); +int wc_dilithium_sig_size(dilithium_key* key); +#endif +#ifdef WOLFSSL_DILITHIUM_CHECK_KEY WOLFSSL_API int wc_dilithium_check_key(dilithium_key* key); +#endif +#ifdef WOLFSSL_DILITHIUM_PUBLIC_KEY WOLFSSL_API -int wc_dilithium_size(dilithium_key* key); +int wc_dilithium_import_public(const byte* in, word32 inLen, + dilithium_key* key); +#endif +#ifdef WOLFSSL_DILITHIUM_PRIVATE_KEY WOLFSSL_API -int wc_dilithium_priv_size(dilithium_key* key); +int wc_dilithium_import_private(const byte* priv, word32 privSz, + dilithium_key* key); +#define wc_dilithium_import_private_only wc_dilithium_import_private WOLFSSL_API -int wc_dilithium_pub_size(dilithium_key* key); +int wc_dilithium_import_key(const byte* priv, word32 privSz, + const byte* pub, word32 pubSz, dilithium_key* key); +#endif + +#ifdef WOLFSSL_DILITHIUM_PUBLIC_KEY WOLFSSL_API -int wc_dilithium_sig_size(dilithium_key* key); +int wc_dilithium_export_public(dilithium_key* key, byte* out, word32* outLen); +#endif +#ifdef WOLFSSL_DILITHIUM_PRIVATE_KEY +WOLFSSL_API +int wc_dilithium_export_private(dilithium_key* key, byte* out, word32* outLen); +#endif +#ifdef WOLFSSL_DILITHIUM_PRIVATE_KEY +WOLFSSL_API +int wc_dilithium_export_key(dilithium_key* key, byte* priv, word32 *privSz, + byte* pub, word32 *pubSz); +#endif +#ifndef WOLFSSL_DILITHIUM_NO_ASN1 +#if defined(WOLFSSL_DILITHIUM_PRIVATE_KEY) && \ + defined(WOLFSSL_DILITHIUM_PUBLIC_KEY) WOLFSSL_API int wc_Dilithium_PrivateKeyDecode(const byte* input, - word32* inOutIdx, - dilithium_key* key, word32 inSz); + word32* inOutIdx, dilithium_key* key, word32 inSz); +#endif +#ifdef WOLFSSL_DILITHIUM_PUBLIC_KEY WOLFSSL_API int wc_Dilithium_PublicKeyDecode(const byte* input, - word32* inOutIdx, - dilithium_key* key, word32 inSz); + word32* inOutIdx, dilithium_key* key, word32 inSz); +#endif + +#ifdef WC_ENABLE_ASYM_KEY_EXPORT +WOLFSSL_API int wc_Dilithium_PublicKeyToDer(dilithium_key* key, byte* output, + word32 inLen, int withAlg); +#endif +#if defined(WOLFSSL_DILITHIUM_PRIVATE_KEY) && \ + defined(WOLFSSL_DILITHIUM_PUBLIC_KEY) WOLFSSL_API int wc_Dilithium_KeyToDer(dilithium_key* key, byte* output, - word32 inLen); + word32 inLen); +#endif +#ifdef WOLFSSL_DILITHIUM_PRIVATE_KEY WOLFSSL_API int wc_Dilithium_PrivateKeyToDer(dilithium_key* key, byte* output, - word32 inLen); -WOLFSSL_API int wc_Dilithium_PublicKeyToDer(dilithium_key* key, byte* output, - word32 inLen, int withAlg); + word32 inLen); +#endif +#endif /* WOLFSSL_DILITHIUM_NO_ASN1 */ + + + +#define WC_ML_DSA_44 2 +#define WC_ML_DSA_65 3 +#define WC_ML_DSA_87 5 + +#define DILITHIUM_ML_DSA_44_KEY_SIZE 2560 +#define DILITHIUM_ML_DSA_44_SIG_SIZE 2420 +#define DILITHIUM_ML_DSA_44_PUB_KEY_SIZE 1312 +#define DILITHIUM_ML_DSA_44_PRV_KEY_SIZE \ + (DILITHIUM_ML_DSA_44_PUB_KEY_SIZE + DILITHIUM_ML_DSA_44_KEY_SIZE) + +#define DILITHIUM_ML_DSA_65_KEY_SIZE 4032 +#define DILITHIUM_ML_DSA_65_SIG_SIZE 3309 +#define DILITHIUM_ML_DSA_65_PUB_KEY_SIZE 1952 +#define DILITHIUM_ML_DSA_65_PRV_KEY_SIZE \ + (DILITHIUM_ML_DSA_65_PUB_KEY_SIZE + DILITHIUM_ML_DSA_65_KEY_SIZE) + +#define DILITHIUM_ML_DSA_87_KEY_SIZE 4896 +#define DILITHIUM_ML_DSA_87_SIG_SIZE 4627 +#define DILITHIUM_ML_DSA_87_PUB_KEY_SIZE 2592 +#define DILITHIUM_ML_DSA_87_PRV_KEY_SIZE \ + (DILITHIUM_ML_DSA_87_PUB_KEY_SIZE + DILITHIUM_ML_DSA_87_KEY_SIZE) + + +#define MlDsaKey dilithium_key + + +#define wc_MlDsaKey_Init(key, heap, devId) \ + wc_dilithium_init_ex(key, heap, devId) +#define wc_MlDsaKey_SetParams(key, id) \ + wc_dilithium_set_level(key, id) +#define wc_MlDsaKey_GetParams(key, id) \ + wc_dilithium_get_level(key, id) +#define wc_MlDsaKey_MakeKey(key, rng) \ + wc_dilithium_make_key(key, rng) +#define wc_MlDsaKey_ExportPrivRaw(key, out, outLen) \ + wc_dilithium_export_private_only(key, out, outLen) +#define wc_MlDsaKey_ImportPrivRaw(key, in, inLen) \ + wc_dilithium_import_private_only(out, outLen, key) +#define wc_MlDsaKey_Sign(key, sig, sigSz, msg, msgSz, rng) \ + wc_dilithium_sign_msg(msg, msgSz, sig, sigSz, key, rng) +#define wc_MlDsaKey_Free(key) \ + wc_dilithium_free(key) +#define wc_MlDsaKey_ExportPubRaw(key, out, outLen) \ + wc_dilithium_export_public(key, out, outLen) +#define wc_MlDsaKey_ImportPubRaw(key, in, inLen) \ + wc_dilithium_import_public(out, outLen, key) +#define wc_MlDsaKey_Verify(key, sig, sigSz, msg, msgSz, res) \ + wc_dilithium_verify_msg(sig, sigSz, msg, msgSz, res, key) + +int wc_MlDsaKey_GetPrivLen(MlDsaKey* key, int* len); +int wc_MlDsaKey_GetPubLen(MlDsaKey* key, int* len); +int wc_MlDsaKey_GetSigLen(MlDsaKey* key, int* len); #ifdef __cplusplus } /* extern "C" */ #endif -#endif /* HAVE_PQC && HAVE_DILITHIUM */ +#endif /* HAVE_DILITHIUM */ #endif /* WOLF_CRYPT_DILITHIUM_H */ diff --git a/wolfssl/wolfcrypt/settings.h b/wolfssl/wolfcrypt/settings.h index 146e5c5948..a7dd7512b2 100644 --- a/wolfssl/wolfcrypt/settings.h +++ b/wolfssl/wolfcrypt/settings.h @@ -3349,7 +3349,9 @@ extern void uITRON4_free(void *p) ; #ifdef HAVE_LIBOQS #define HAVE_PQC #define HAVE_FALCON -#define HAVE_DILITHIUM +#ifndef HAVE_DILITHIUM + #define HAVE_DILITHIUM +#endif #ifndef WOLFSSL_NO_SPHINCS #define HAVE_SPHINCS #endif @@ -3371,6 +3373,7 @@ extern void uITRON4_free(void *p) ; #if (defined(HAVE_LIBOQS) || \ defined(WOLFSSL_WC_KYBER) || \ + defined(WOLFSSL_WC_DILITHIUM) || \ defined(HAVE_LIBXMSS) || \ defined(HAVE_LIBLMS) || \ defined(WOLFSSL_DUAL_ALG_CERTS)) && \ diff --git a/wolfssl/wolfcrypt/types.h b/wolfssl/wolfcrypt/types.h index b7ceec220b..9dd2f754ed 100644 --- a/wolfssl/wolfcrypt/types.h +++ b/wolfssl/wolfcrypt/types.h @@ -1216,14 +1216,14 @@ typedef struct w64wrapper { WC_PK_TYPE_CURVE25519_KEYGEN = 16, WC_PK_TYPE_RSA_GET_SIZE = 17, #define _WC_PK_TYPE_MAX WC_PK_TYPE_RSA_GET_SIZE - #if defined(HAVE_PQC) && defined(WOLFSSL_HAVE_KYBER) + #if defined(WOLFSSL_HAVE_KYBER) WC_PK_TYPE_PQC_KEM_KEYGEN = 18, WC_PK_TYPE_PQC_KEM_ENCAPS = 19, WC_PK_TYPE_PQC_KEM_DECAPS = 20, #undef _WC_PK_TYPE_MAX #define _WC_PK_TYPE_MAX WC_PK_TYPE_PQC_KEM_DECAPS #endif - #if defined(HAVE_PQC) && (defined(HAVE_DILITHIUM) || defined(HAVE_FALCON)) + #if defined(HAVE_DILITHIUM) || defined(HAVE_FALCON) WC_PK_TYPE_PQC_SIG_KEYGEN = 21, WC_PK_TYPE_PQC_SIG_SIGN = 22, WC_PK_TYPE_PQC_SIG_VERIFY = 23, @@ -1234,7 +1234,7 @@ typedef struct w64wrapper { WC_PK_TYPE_MAX = _WC_PK_TYPE_MAX }; - #if defined(HAVE_PQC) +#if defined(WOLFSSL_HAVE_KYBER) /* Post quantum KEM algorithms */ enum wc_PqcKemType { WC_PQC_KEM_TYPE_NONE = 0, @@ -1246,7 +1246,9 @@ typedef struct w64wrapper { #endif WC_PQC_KEM_TYPE_MAX = _WC_PQC_KEM_TYPE_MAX }; +#endif +#if defined(HAVE_DILITHIUM) || defined(HAVE_FALCON) /* Post quantum signature algorithms */ enum wc_PqcSignatureType { WC_PQC_SIG_TYPE_NONE = 0, @@ -1263,7 +1265,7 @@ typedef struct w64wrapper { #endif WC_PQC_SIG_TYPE_MAX = _WC_PQC_SIG_TYPE_MAX }; - #endif +#endif /* settings detection for compile vs runtime math incompatibilities */ enum {