Strict fair-bit implementations of bounded sampling #
Except in the early-stopping sampler, every attempt is sampled and stored before searching, and all coordinates and output framing are charged. The unary certificates charge the numerical bound, radius, dimension and attempt count. They do not imply polynomial dependence on the logarithm of a cryptographic modulus. Failure remains in the certified program's output.
Main results #
Cslib.Probability.isPPTOn_sampleUniformInterval: unary-bound interval sampling.Cslib.Probability.isPPTOn_sampleUniformInterval_binary: binary bounds with an efficient unary attempt budget, including exponentially large interval bounds.Cslib.Probability.isPPTOn_sampleUniformIntervalRetry: the early-stopping sampler, with binary bounds and a unary attempt budget.Cslib.Probability.isPPTOn_sampleIntegerBox: unary-radius runtime-dimensional boxes.Cslib.Probability.length_enc_sampleIntegerBox: a bound for the complete framed output.
Unary bounds and attempt counts give a uniform strict PPT sampler, including its failure result and every stored attempt.
Binary bounds need only a unary attempt count. The sampler draws log₂ bound + 1 bits, a
width computed in polynomial time from the binary bound, not a unary copy of bound; exponential
cryptographic bounds are therefore permitted when the bound and attempt count are efficient.
Early stopping is strict PPT for binary bounds and a unary attempt budget. Each attempt draws
bound.size bits, a width computed in polynomial time from the binary bound.
A runtime-varying integer box is sampled in uniform strict PPT when the numerical radius, dimension and per-coordinate attempt budget are efficiently supplied in unary. The full optional, framed list output and all attempted coordinates are charged.
The complete framed optional output has a direct linear bound in dimension and unary radius; failure encodes as the empty word.