I have understood the proof that shows that a PRP is a PRF except for negligible probability $\frac{q(n)^2}{2^{-l(n)}}$. My computations suggest me that the same argument, perhaps with minor mathematical details, can show that a PRF can be treated as a PRP (if we forget about the fact that a PRP needs to be a DPT computable permutation while a PRF needs not).
Now I stumble upon this question:
Show that there is a PPT-adversary which distinguished a PRP F from RFO with a negligible, but non-zero advantage.
My problem is to give the code in the distinguisher side. Let me phrase it:
- Alice picks $b \stackrel{u}{\in} \{0,1\}$. If $b = 0$ sends to Eve the RFO and if $b = 1$ sends to Eve the PRP $F$.
- Here I need to describe what the distinguisher $D$ does.
I guess that I should make $D$ query the oracle he receives a polynomial number of time $q(n)$ defined by its efficiency bound. But what can be the details of the construction?
Glossary
- PRP = pseudo random permutation
- PRF = pseudo random function
- RFO = random function oracle
- RPO = random permutation oracle
A RFO is essentially supposed to generate a random function in the sense that when a new input (it has not been seen before) it will assign to this input a random output. The RPO is similar to this construction but ensures that the output have not been used before for other inputs, so that the generated function is injective.