From a2acc41b3f76b248a813116e027594c931475fa1 Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Wed, 14 Aug 2024 21:51:12 -0500 Subject: [PATCH] wolfcrypt/src/wc_kyber.c: in kyberkey_encapsulate(), don't overallocate "at" for USE_INTEL_SPEEDUP. --- wolfcrypt/src/wc_kyber.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/wolfcrypt/src/wc_kyber.c b/wolfcrypt/src/wc_kyber.c index ec689efcd8..4ce8c3fafe 100644 --- a/wolfcrypt/src/wc_kyber.c +++ b/wolfcrypt/src/wc_kyber.c @@ -407,14 +407,8 @@ static int kyberkey_encapsulate(KyberKey* key, const byte* msg, byte* coins, if (ret == 0) { /* Allocate dynamic memory for all matrices, vectors and polynomials. */ -#ifndef USE_INTEL_SPEEDUP at = (sword16*)XMALLOC(((kp + 3) * kp + 3) * KYBER_N * sizeof(sword16), key->heap, DYNAMIC_TYPE_TMP_BUFFER); -#else - at = (sword16*)XMALLOC( - ((KYBER_MAX_K + 3) * KYBER_MAX_K + 3) * KYBER_N * sizeof(sword16), - key->heap, DYNAMIC_TYPE_TMP_BUFFER); -#endif if (at == NULL) { ret = MEMORY_E; }