Merge pull request #8027 from SparkiDev/kyber_original_fix

Kyber original: fix to work
pull/8031/head
David Garske 2024-09-30 07:58:30 -07:00 committed by GitHub
commit 2db2bedd5f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -631,7 +631,11 @@ int wc_KyberKey_EncapsulateWithRandom(KyberKey* key, unsigned char* ct,
if (ret == 0) {
/* Encapsulate the message using the key and the seed (coins). */
#ifdef WOLFSSL_KYBER_ORIGINAL
ret = kyberkey_encapsulate(key, msg, kr + KYBER_SYM_SZ, ct);
#else
ret = kyberkey_encapsulate(key, rand, kr + KYBER_SYM_SZ, ct);
#endif
}
#ifdef WOLFSSL_KYBER_ORIGINAL