No linear feedback shift register is a pseudorandom generator #
A family of linear feedback shift registers is a word function: on a seed of length n it runs
the n-bit register with tap mask taps n for ℓ n clock cycles
(Cslib.Crypto.PRG.LFSR.output). The tap masks are public: they depend only on the seed length.
Boneh and Shoup, Section 3.8, p. 75 observe that a single LFSR is insecure as a
generator, because n consecutive output bits determine all later ones. This file states that
for uniform probabilistic polynomial-time distinguishers. The distinguisher runs the generator on
the first n bits of a word and accepts when it reproduces bit n. On words of the output length
it is the test built from Cslib.Crypto.PRG.LFSR.predictor, which accepts every output word and
a uniform word with probability 1 / 2. It is a polynomial-time program whenever the generator
is, so the theorem that no LFSR family is a pseudorandom generator has no hypothesis. Every seed
is allowed, including the all-zero seed that [BS23] excludes.
Main definitions #
Cslib.Crypto.PRG.LFSR.wordGenerator: the LFSR family as a word function.Cslib.Crypto.PRG.LFSR.rerunDistinguisher: the distinguisher that re-runs the generator.
Main results #
Cslib.Crypto.PRG.LFSR.isPPT_rerunDistinguisher: the distinguisher is a uniform polynomial-time program when the generator runs in polynomial time.Cslib.Crypto.PRG.LFSR.eval_rerunDistinguisher_ofFn: on words of the output length it is the test built from the predictor for positionn.Cslib.Crypto.PRG.LFSR.not_pseudorandomGenerator: no LFSR family is a pseudorandom generator.Cslib.Crypto.PRG.LFSR.not_computationallyIndistinguishable: for a polynomial-time family withn < ℓ n, the output is not computationally indistinguishable from uniform.Cslib.Crypto.PRG.LFSR.computableInPolyTime_wordGenerator: the LFSR family is computable in polynomial time when its tap masks and output length are, so for a stretchingℓsecurity is the only condition of a pseudorandom generator that fails.
References #
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, Section 3.8, p. 75.
The distinguisher that uses the generator as a black box: run the register on the first n
bits of the word and accept exactly when it reproduces bit n.
Re-running a polynomial-time generator is one uniform polynomial-time program.
On words of the output length, re-running the register is the test of Attack Game 3.1 built
from the predictor for position n.
The tests built from the predictor for position n are realized by one uniform
polynomial-time program when the generator runs in polynomial time.
No LFSR family is a pseudorandom generator
Boneh and Shoup, Section 3.8, p. 75. No hypothesis on the tap masks is needed:
when the generator runs in polynomial time, re-running it on the first n bits of a word is a
polynomial-time test, and it is the test built from the predictor, with advantage 1 / 2.
For a polynomial-time LFSR family with output length ℓ n > n, the output on a uniform seed
is not computationally indistinguishable from a uniform word.
The LFSR family is computable in polynomial time when its tap masks and its output length
are. With length_wordGenerator this gives every condition of
Cslib.Crypto.PseudorandomGenerator except security, for every stretching ℓ.