Skip to content

Commit

Permalink
mlkem: poly.jinc update from formosa-crypto/formosa-mlkem#20 (single …
Browse files Browse the repository at this point in the history
…it. var. get_noise)
  • Loading branch information
tfaoliveira committed Feb 9, 2024
1 parent a5aeef9 commit fb6f6da
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/crypto_kem/mlkem/mlkem768/amd64/ref/poly.jinc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down

0 comments on commit fb6f6da

Please sign in to comment.