Zig 0.17.0-dev (Split by item)

This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.

polyUseHint

Applies hints to reconstruct high bits from a perturbed polynomial.

This is used during signature verification to recover the high bits using the hints provided in the signature.

ml_dsa.polyUseHint
fn polyUseHint(q: Poly, hint: Poly, comptime gamma2: u32) Poly

File

lib/std/crypto/ml_dsa.zig:944

Code

fn polyUseHint(q: Poly, hint: Poly, comptime gamma2: u32) Poly {
    var result = Poly.zero;

    for (0..N) |i| {
        result.cs[i] = useHint(q.cs[i], hint.cs[i], gamma2);
    }

    return result;
}