Documentation

CslibFrontier.Crypto.Computational.MLDSA.RejNTTExhaustion

Exhaustion of the matrix rejection sampler #

FIPS 204, Appendix C, Table 3 allows 894 bytes for each invocation of Algorithm 30. An exhausted stream contains at least 43 rejected triples. Each such triple has its middle byte at least 224 and the low seven bits of its last byte all set.

With 894 uniformly sampled bytes, FIPS 204 Algorithm 30 exhausts with probability below 2⁻²⁵⁶. The union counts the possible locations of 43 rejections among 298 three-byte proposals.

At a fixed public seed with independent uniform raw SHAKE128 prefixes, the probability that FIPS 204 Algorithm 32 exhausts at any entry is below the number of entries times 2⁻²⁵⁶.