forked from wolfSSL/wolfssl
ML-KEM/Kyber: fix for big-endian
Don't pull apart the nibbles when big-endian in reject uniform C code.
This commit is contained in:
@ -3166,7 +3166,8 @@ static unsigned int mlkem_rej_uniform_c(sword16* p, unsigned int len,
|
|||||||
unsigned int i;
|
unsigned int i;
|
||||||
unsigned int j;
|
unsigned int j;
|
||||||
|
|
||||||
#if defined(WOLFSSL_MLKEM_SMALL) || !defined(WC_64BIT_CPU)
|
#if defined(WOLFSSL_MLKEM_SMALL) || !defined(WC_64BIT_CPU) || \
|
||||||
|
defined(BIG_ENDIAN_ORDER)
|
||||||
/* Keep sampling until maximum number of integers reached or buffer used up.
|
/* Keep sampling until maximum number of integers reached or buffer used up.
|
||||||
* Step 4. */
|
* Step 4. */
|
||||||
for (i = 0, j = 0; (i < len) && (j <= rLen - 3); j += 3) {
|
for (i = 0, j = 0; (i < len) && (j <= rLen - 3); j += 3) {
|
||||||
|
Reference in New Issue
Block a user