Skip to content

Commit 2db2bed

Browse files
authored
Merge pull request #8027 from SparkiDev/kyber_original_fix
Kyber original: fix to work
2 parents 47add7e + bb67069 commit 2db2bed

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

wolfcrypt/src/wc_kyber.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,11 @@ int wc_KyberKey_EncapsulateWithRandom(KyberKey* key, unsigned char* ct,
631631

632632
if (ret == 0) {
633633
/* Encapsulate the message using the key and the seed (coins). */
634+
#ifdef WOLFSSL_KYBER_ORIGINAL
635+
ret = kyberkey_encapsulate(key, msg, kr + KYBER_SYM_SZ, ct);
636+
#else
634637
ret = kyberkey_encapsulate(key, rand, kr + KYBER_SYM_SZ, ct);
638+
#endif
635639
}
636640

637641
#ifdef WOLFSSL_KYBER_ORIGINAL

0 commit comments

Comments
 (0)