Padding expanding generators to a common input length #
Run an expander on the required seed prefix, retain the unused input bits, and truncate the result to one bit more than the common input length. Independent uniform padding preserves the distinguishing advantage exactly through an efficient reduction.
This is used to give the entropy guesses in the OWF-to-PRG construction a common seed length before amplification and XOR combination.
Main definitions #
generate: pad a raw expanding function to one bit of stretch at a common input length.test: reduce a padded-output test to a test of the raw output.
Main results #
isPolyTime_generate,isPPTOn_test: certify the construction and its security reduction.length_generate: exactly one bit of stretch for correctly sized inputs.advantage_eq: the reduction preserves distinguishing advantage exactly.
References #
Thomas Holenstein, Pseudorandom Generators from One-Way Functions: A Simple Construction for Any Hardness, TCC 2006, Section 5, final proof of Theorem 1, [Hol06].
Adapted from the cslib crypto branch at
5ff69ca93402e7c947208dc56396d6d86203ccd8.
Padding uses only the supplied generator, word slicing, and concatenation.
One bit of raw expansion suffices, also when no padding is needed.
The unused suffix of a uniform padded seed is fresh independent randomness.
Uniform raw output and independent padding give exactly the desired uniform output.
The reduction charges the padding and the call to the captured adversary.
Padding preserves the tested distinguishing advantage exactly.