From 76fd5319d4a75fe6f83263098aa25351468a1bdb Mon Sep 17 00:00:00 2001 From: Alex Lanzano Date: Fri, 9 May 2025 10:42:15 -0400 Subject: [PATCH 1/2] Remove redefinition of MlKemKey Removes the redundant typedef of MlKemKey which will break builds on pre-C11 compilers. KyberKey is defined as a macro for MlKemKey. --- wolfssl/wolfcrypt/wc_mlkem.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/wolfssl/wolfcrypt/wc_mlkem.h b/wolfssl/wolfcrypt/wc_mlkem.h index f79e1883a..1ee093c67 100644 --- a/wolfssl/wolfcrypt/wc_mlkem.h +++ b/wolfssl/wolfcrypt/wc_mlkem.h @@ -146,9 +146,6 @@ struct MlKemKey { extern "C" { #endif -/* For backward compatibility */ -typedef struct MlKemKey KyberKey; - WOLFSSL_LOCAL void mlkem_init(void); From 88ae4266cf93dccc016a226bd1bf2b9217ae2316 Mon Sep 17 00:00:00 2001 From: Alex Lanzano Date: Wed, 14 May 2025 08:43:27 -0400 Subject: [PATCH 2/2] Don't define PQC option strings in benchmark if WOLFSSL_BENCHMARK_ALL is defined This fixes the 'defined but not used' build issue in benchmark.c if any PQC algos are enabled and WOLFSSL_BENCHMARK_ALL is defined. --- wolfcrypt/benchmark/benchmark.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wolfcrypt/benchmark/benchmark.c b/wolfcrypt/benchmark/benchmark.c index 7c7f4702a..d40d9dd1a 100644 --- a/wolfcrypt/benchmark/benchmark.c +++ b/wolfcrypt/benchmark/benchmark.c @@ -1124,6 +1124,7 @@ static const bench_pq_hash_sig_alg bench_pq_hash_sig_opt[] = { }; #endif /* BENCH_PQ_STATEFUL_HBS */ +#ifndef WOLFSSL_BENCHMARK_ALL #if defined(WOLFSSL_HAVE_MLKEM) || defined(HAVE_FALCON) || \ defined(HAVE_DILITHIUM) || defined(HAVE_SPHINCS) /* The post-quantum-specific mapping of command line option to bit values and @@ -1181,6 +1182,8 @@ static const bench_pq_alg bench_pq_asym_opt2[] = { #endif /* HAVE_SPHINCS */ #endif +#endif + #ifdef HAVE_WNR const char* wnrConfigFile = "wnr-example.conf"; #endif