Replacing independent samples one coordinate at a time #
sequenceHybrid draws an initial segment from a replacement source and the remaining segment
from the original source. spliceTest samples the surrounding coordinates and inserts one
challenge into the resulting list. Its adjacent-game laws expose the usual hybrid proof without
tuple-index bookkeeping, and apply to arbitrary discrete sample types.
Main definitions #
Cslib.Crypto.sequenceHybrid: replace an initial segment of independent samples.Cslib.Crypto.spliceTest: insert one challenge between two independently sampled segments.Cslib.Crypto.sequenceTest: select one coordinate from a padded dyadic range.
Main results #
Cslib.Crypto.sequenceTest_gap: an exact signed gap with the dyadic sampling-range loss.Cslib.Crypto.sequenceTest_advantage: the corresponding exact unsigned loss, including count zero.Cslib.Crypto.isPPTOn_sequenceTest: a uniform strict PPT certificate, including padding indices.
References #
- T. Holenstein, Pseudorandom Generators from One-Way Functions: A Simple Construction for Any Hardness, Section 5, Games 3–5.
Adapted from Crypto/Computational/Hybrid/Sequence.lean on the cslib crypto branch at
5ff69ca93402e7c947208dc56396d6d86203ccd8, using the current nonnegative game API.
An original challenge supplies the first draw of the remaining original segment.
A replacement challenge supplies the last draw of the replacement segment.
Inserting an original challenge gives the earlier adjacent hybrid.
Inserting a replacement challenge gives the later adjacent hybrid.
Sample a coordinate uniformly from a dyadic range and run its adjacent-hybrid test. Unused coordinates reject, so they contribute zero signed gap.
Instances For
One uniform single-sample distinguisher captures the entire sequence gap, with the linear dyadic-range loss. The identity also covers zero repetitions.
The exact unsigned sequence-hybrid loss, including the empty sequence.
Efficient source programs and counts give an efficient independent hybrid sequence.
The inserted challenge and every simulated coordinate are charged by the strict PPT certificate. The test may capture the complete original input.
Random-coordinate hybrid reduction is uniformly strict PPT, including zero repetitions and all rejected padding indices.
Repeating two computationally indistinguishable PPT samplers a polynomially bounded number of times and applying an efficient postprocessor preserves computational indistinguishability.