Auxiliary ML-DSA matrix sampling from bounded fair coins #
A reduction simulating a matrix random oracle needs fresh independent matrices. A 23-bit candidate is accepted at 8380417 of its 8388608 values. Capping the attempts at each coefficient gives a strict fair-bit program with a statistical loss for its entire saved tape.
Draw a matrix from fair bits with a fixed budget per coefficient. Each attempt reads 23 bits and accepts its unsigned value if it is below the modulus. An exhausted coefficient is zero. This samples auxiliary random-oracle answers in the reduction.
On every path the matrix tape costs at most 23 times the number of coefficient attempts
times the price of one fair bit (query 1 selects from Fin 2). Giving all other queries
unit price and fair bits price zero also shows the program uses only fair bits.
Statistical distance of all Q independent matrices in a saved reduction tape, including
the zero fallback on exhaustion. There are 4096, 7680 and 14336 coefficients per matrix at
ML-DSA-44, -65 and -87, respectively. The sampler draws exactly 23 bits per attempt.
Rows, columns and polynomial coefficients in increasing index order, with each list entry framed and residues in binary. The reduction saves a framed list of matrices with this encoding.
A strict fair-coin machine samples the list of matrices used in the reduction. Both the matrix count and the retry budget may vary with the input and are charged in unary. The clock includes writing every framed binary coefficient of the saved tape.