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.

divstepPrecomp

The function divstepPrecomp returns the precomputed value for Bernstein-Yang-inversion (in montgomery form).

Postconditions: eval (from_montgomery out1) = ⌊(m - 1) / 2⌋^(if ⌊log2 m⌋ + 1 < 46 then ⌊(49 * (⌊log2 m⌋ + 1) + 80) / 17⌋ else ⌊(49 * (⌊log2 m⌋ + 1) + 57) / 17⌋) 0 ≤ eval out1 < m

Output Bounds: out1: [[0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff]]

p256_scalar_64.divstepPrecomp
pub fn divstepPrecomp(out1: *[4]u64) void

File

lib/std/crypto/pcurves/p256/p256_scalar_64.zig:2022

Code

pub fn divstepPrecomp(out1: *[4]u64) void {
    @setRuntimeSafety(mode == .debug);

    out1[0] = 0xd739262fb7fcfbb5;
    out1[1] = 0x8ac6f75d20074414;
    out1[2] = 0xc67428bfb5e3c256;
    out1[3] = 0x444962f2eda7aedf;
}