Skip to content

Commit

Permalink
Merge pull request #8027 from SparkiDev/kyber_original_fix
Browse files Browse the repository at this point in the history
Kyber original: fix to work
  • Loading branch information
dgarske authored Sep 30, 2024
2 parents 47add7e + bb67069 commit 2db2bed
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions wolfcrypt/src/wc_kyber.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2db2bed

Please sign in to comment.