diff --git a/src/tls.c b/src/tls.c index 3b8a5a030..c3d7f01c8 100644 --- a/src/tls.c +++ b/src/tls.c @@ -8195,7 +8195,7 @@ static int TLSX_KeyShare_ProcessPqc(WOLFSSL* ssl, KeyShareEntry* keyShareEntry) ret = wc_KyberKey_Decapsulate(kem, sharedSecret + outlen, keyShareEntry->ke + keyShareEntry->keLen - ctSz, ctSz); if (ret != 0) { - WOLFSSL_MSG("Kyber decapsulation failure."); + WOLFSSL_MSG("wc_KyberKey decapsulation failure."); ret = BAD_FUNC_ARG; } } @@ -9015,7 +9015,7 @@ static int server_generate_pqc_ciphertext(WOLFSSL* ssl, ret = wc_KyberKey_Encapsulate(kem, ciphertext + ecc_kse->pubKeyLen, sharedSecret + outlen, ssl->rng); if (ret != 0) { - WOLFSSL_MSG("OQS Encapsulation failure."); + WOLFSSL_MSG("wc_KyberKey encapsulation failure."); } } diff --git a/wolfcrypt/benchmark/benchmark.c b/wolfcrypt/benchmark/benchmark.c index fb3930072..282069f7d 100644 --- a/wolfcrypt/benchmark/benchmark.c +++ b/wolfcrypt/benchmark/benchmark.c @@ -8529,10 +8529,14 @@ int main(int argc, char** argv) } #if defined(HAVE_LIBOQS) /* Both bench_pq_asym_opt and bench_pq_asym_opt2 are looking for - * -pq, so we need to reset optMatched in case it was set to 1 just - * above. */ - optMatched = 0; - for (i=0; !optMatched && bench_pq_asym_opt2[i].str != NULL; i++) { + * -pq, so we need to do a special case for -pq since optMatched + * was set to 1 just above. */ + if (string_matches(argv[1], bench_pq_asym_opt[0].str)) { + bench_pq_asym_algs2 |= bench_pq_asym_opt2[0].val; + bench_all = 0; + optMatched = 1; + } + for (i=1; !optMatched && bench_pq_asym_opt2[i].str != NULL; i++) { if (string_matches(argv[1], bench_pq_asym_opt2[i].str)) { bench_pq_asym_algs2 |= bench_pq_asym_opt2[i].val; bench_all = 0; diff --git a/wolfssl/wolfcrypt/settings.h b/wolfssl/wolfcrypt/settings.h index 934213852..e65336c38 100644 --- a/wolfssl/wolfcrypt/settings.h +++ b/wolfssl/wolfcrypt/settings.h @@ -2734,6 +2734,7 @@ extern void uITRON4_free(void *p) ; #define HAVE_DILITHIUM #define HAVE_SPHINCS #define HAVE_KYBER +#define WOLFSSL_HAVE_KYBER #endif #ifdef HAVE_PQM4