Guessing a committed bit #
This module derives guessing guarantees from chosen-pair hiding. In the single-bit protocol of [Nao91], Section 3, the receiver sends a challenge before seeing the commitment to a fair bit. Its private coins may influence both that challenge and its later guess. The auxiliary-input remark of [Nao91], Section 2, p. 3 of the author's copy, compares the receiver's chance of guessing a bit after the commit stage with its chance given prior information alone. Here the prior is any joint distribution on a bit and an auxiliary word. It may be biased and correlated, and it need not have an efficient sampler.
Main results #
Cslib.Crypto.PseudorandomGenerator.naorCommit_guessing_and_binding: a uniform strict-PPT receiver has negligible guessing advantage. Binding error is below $2^{-n}$ at positive length.Cslib.Crypto.StatefulHiding.exists_priorPredictor: for a strict-PPT receiver of an efficient hiding commitment, a single strict-PPT predictor given only the auxiliary word reproduces the receiver's guessing probability up to negligible error. The prediction target is the selector of the receiver's two choices. Choosing(false, true)makes it the actual committed bit.
The single-bit protocol of [Nao91], Section 3, Theorem 3.1, p. 6 of the author's copy.
Here generator produces the requested prefix of the pseudorandom stream: 3 * n bits at every
positive security parameter, and one bit at zero to preserve strict expansion. For an arbitrary
expanding finite-output generator this prefix length is available by truncating to one extra bit
and applying PseudorandomGenerator.amplify as in Section 2, p. 4.
A uniform strict-PPT receiver chooses its challenge and saves its state before seeing the
commitment. Its absolute deviation from success probability one half in guessing the fair
committed bit is negligible. For an honest uniform challenge of length 3 * n, the probability
that some commitment has accepted openings to both bits is strictly below 2⁻ⁿ for every positive
n. In the reveal stage the sender discloses the seed. Acceptance for the asserted bit is
naorVerify, which checks the seed length and the recomputed commitment.
For every efficient commitment receiver, there is an efficient predictor using only the
auxiliary input whose success probability differs negligibly from the receiver's. The predictor
is fixed before the joint law of the secret selector and the auxiliary word, whose supported
lengths have one polynomial bound. To predict the committed bit itself, the receiver chooses
(false, true) as its challenge pair.
The predictor runs the receiver with a locally generated commitment to its first choice. This is an original formulation of the prior-information comparison in [Nao91], Section 2, p. 3 (author's copy), for a single-bit, two-message commitment with polynomial-length auxiliary inputs.