~ MathDefs ~
CS 127: Cryptography / Boaz Barak
Total of 128 points.
(No points, just food for thought.) Based on this exercise, what do you believe can we say about a distribution \(X\) if it passes the FIPS 140-2 testing suite for randomness?
(10 points) \(\{ X_n \}\) where \(X_n\) be the following distribution: we pick \(x_1,\ldots,x_{n-1}\) uniformly at random in \(\zo^{n-1}\), and let \(x_n\) be the parity (i.e. XOR) of \(x_1,\ldots,x_{n-1}\), we output \(x_1,\ldots, x_n\).
(10 points) \(\{Z_n \}\) where for \(n\) large enough, with probability \(2^{-n/10}\) we output an \(n\) bit string encoding the text (say encode in ASCII and pad with zeros), and with probability \(1-2^{-n/10}\) pick a random string. For \(n\) that is not large enough to encode the text, \(Z_n\) always outputs the all zeroes string.
(Padding inputs and outputs, 8 points) Suppose that \(\{ f_s \}\) is a pseudorandom function collection where for every \(s\in\zo^n\), \(f_s\) maps \(\zo^n\) to \(\zo^n\). Prove that if we define \(f'_s\) to be function that on input \(i\in [2^{n/2}]\) outputs the first bit of \(f_s(2^{n/2}+i)\) then \(\{ f'_s \}\) is a pseudorandom function collection (with one bit output).
(Increasing output size, 8 points) Prove that if there exists a collection \(\{ f_s \}\) where \(f_s:\zo^{|s|}\rightarrow \zo\) (i.e., one bit output), then then there exists a collection \(\{ f'_s \}\) with \(f'_s:\zo^{|s|}\rightarrow\zo^{|s|}\). See footnote for hint.1
(Changing PRFs input size, 8 points) Prove that if there exists a collection \(\{ f_s \}\) of pseudorandom functions with \(f_s:\zo^{|s|}\rightarrow\zo^{|s|}\) then there exists a collection \(\{ f'_s \}\) with \(f'_s:\zo^{*}\rightarrow\zo^{|s|}\) (i.e., \(f'_s\) for a random \(s\in\zo^n\) is indistinguishable from a random function from \(\zo^*\) to \(\zo^n\). (If it makes your life easier, it’s fine to construct a collection \(\{ f'_s \}\) with a single output bit.)
First come up with a pseudorandom family with output longer than \(1\) but shorter than \(|s|\). For example, if \(s \in \zo^{n^2}\) then the output can be \(n\). Then show that existence of PRF implies existence of pseudorandom generators and use that to expand your output.↩