Skip to content

Commit a2acc41

Browse files
committed
wolfcrypt/src/wc_kyber.c: in kyberkey_encapsulate(), don't overallocate "at" for USE_INTEL_SPEEDUP.
1 parent 7a29b1e commit a2acc41

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

wolfcrypt/src/wc_kyber.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -407,14 +407,8 @@ static int kyberkey_encapsulate(KyberKey* key, const byte* msg, byte* coins,
407407

408408
if (ret == 0) {
409409
/* Allocate dynamic memory for all matrices, vectors and polynomials. */
410-
#ifndef USE_INTEL_SPEEDUP
411410
at = (sword16*)XMALLOC(((kp + 3) * kp + 3) * KYBER_N * sizeof(sword16),
412411
key->heap, DYNAMIC_TYPE_TMP_BUFFER);
413-
#else
414-
at = (sword16*)XMALLOC(
415-
((KYBER_MAX_K + 3) * KYBER_MAX_K + 3) * KYBER_N * sizeof(sword16),
416-
key->heap, DYNAMIC_TYPE_TMP_BUFFER);
417-
#endif
418412
if (at == NULL) {
419413
ret = MEMORY_E;
420414
}

0 commit comments

Comments
 (0)