diff --git a/lib/std/crypto/kyber_d00.zig b/lib/std/crypto/kyber_d00.zig index ba6ed67ec8..ad8e060765 100644 --- a/lib/std/crypto/kyber_d00.zig +++ b/lib/std/crypto/kyber_d00.zig @@ -1020,8 +1020,15 @@ const Poly = struct { // = ⌊(2ᵈ/q)x+½⌋ mod⁺ 2ᵈ // = ⌊((x << d) + q/2) / q⌋ mod⁺ 2ᵈ // = DIV((x << d) + q/2, q) & ((1<> 36) == 1); + const u: u32 = @intCast((@as(u64, t + q_over_2) * 20642679) >> 36); + in[i] = @intCast(u & two_d_min_1); } // Now we pack the d-bit integers from `in' into out as bytes.