diff --git a/src/crypto_kem/mlkem/mlkem768/amd64/ref/poly.jinc b/src/crypto_kem/mlkem/mlkem768/amd64/ref/poly.jinc index 62ac2a65..ca421d99 100644 --- a/src/crypto_kem/mlkem/mlkem768/amd64/ref/poly.jinc +++ b/src/crypto_kem/mlkem/mlkem768/amd64/ref/poly.jinc @@ -144,23 +144,21 @@ fn _poly_compress(reg u64 rp, reg ptr u16[MLKEM_N] a) -> reg ptr u16[MLKEM_N] { reg u16 t; reg u32 d0, d1; - reg u64 i j; + reg u64 i; a = _poly_csubq(a); i = 0; - j = 0; while(i < 128) { - t = a[(int)j]; + t = a[2 * i]; d0 = (32u)t; d0 <<= 4; d0 += 1665; d0 *= 80635; d0 >>= 28; d0 &= 0xf; - j += 1; - t = a[(int)j]; + t = a[2 * i + 1]; d1 = (32u)t; d1 <<= 4; d1 += 1665; @@ -171,7 +169,6 @@ fn _poly_compress(reg u64 rp, reg ptr u16[MLKEM_N] a) -> reg ptr u16[MLKEM_N] d0 |= d1; (u8)[rp+i] = d0; i += 1; - j += 1; } return a; }