MCPcopy Create free account
hub / github.com/RustCrypto/KEMs / sample_fixed_wt_mod

Function sample_fixed_wt_mod

hqc-kem/src/sampling.rs:24–71  ·  view source on GitHub ↗

Sample a fixed-weight vector using modular mapping (v5.0.0 encrypt). Reads 4*weight bytes from XOF (with alignment waste), maps each u32 to position via multiplication-based reduction, deduplicates.

(
    xof: &mut SeedExpander,
    v: &mut [u64],
    weight: usize,
    p: &HqcParameters,
)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

pke_encryptFunction · 0.85

Calls 1

get_bytesMethod · 0.80

Tested by

no test coverage detected