mldsa44_verify
stdlib/mersenne61/mldsa/mldsa44_verify.nbv only in the mersenne61 field
mldsa44_verify(pk, msg, sig)
ML-DSA-44 signature verification (FIPS 204 Algorithms 3 and 8) with an empty context string, in the 61 bit Mersenne field.
pk (1312 bytes), msg (at least one byte) and sig (2420 bytes) are vectors of byte values. The constraints are satisfiable exactly when the signature is valid. Returns the 512 bits of mu = H(H(pk) || 0 || 0 || msg).
Only the arithmetic (mldsa44_w_approx) is field specific, this entry point is defined per field so it is unavailable in fields without an implementation.
- Calls
bits/bytes_to_bits,mldsa/mldsa44_finish,mldsa/mldsa44_mu,mldsa/mldsa44_parse,mersenne61/mldsa/mldsa44_w_approx,mldsa/mldsa_expand_a,mldsa/mldsa_sample_in_ball- Precompiles
clone!
Source
# ML-DSA-44 signature verification (FIPS 204 Algorithms 3 and 8) with an
# empty context string, in the 61 bit Mersenne field.
#
# `pk` (1312 bytes), `msg` (at least one byte) and `sig` (2420 bytes) are
# vectors of byte values. The constraints are satisfiable exactly when the
# signature is valid. Returns the 512 bits of mu = H(H(pk) || 0 || 0 || msg).
#
# Only the arithmetic (mldsa44_w_approx) is field specific, this entry point
# is defined per field so it is unavailable in fields without an
# implementation.
(pk, msg, sig)
(let pk_bits, let rho, let t1, let ctilde, let v_bits, let h) = mldsa44_parse(pk, sig)
let a_hat = mldsa_expand_a(rho, 4, 4)
let mu = mldsa44_mu(pk_bits, bytes_to_bits(msg))
let c = mldsa_sample_in_ball(clone! ctilde)
let w = mldsa44_w_approx(a_hat, v_bits, c, t1)
mldsa44_finish(mu, w, h, ctilde)