title | tags | ||||
---|---|---|---|---|---|
13. PRF |
|
Authors: Evta, looking forward to your joining
PRF is similar to a block cipher PRP, where a random function resembles a random permutation, and attackers aim to distinguish between a randomly chosen function and a function based on a key. A block cipher can also be referred to as a PRP because it shares similarities with PRF in terms of definition and security models. Compared to PRF, PRP is a pseudo-random permutation with an inverse function. PRF is a deterministic function that takes a key and a data block as input and produces an output, y = F(k,x) ∈ Y. The security requirement for PRF is that, given a randomly generated key k, the function F(k,⋅) should appear "random" when mapped from X to Y. In the security model of PRF, attackers attempt to distinguish between randomly chosen functions and key-based functions.
PRP (Pseudo-Random Permutation) and PRF (Pseudo-Random Function) are related, but the security of one does not guarantee the security of the other. PRP and PRF are conceptually related but not entirely the same. PRP is a part of PRF, but a secure PRP does not necessarily imply a secure PRF. The PRF Switching Lemma states that when the number of queries Q is polynomial, a secure PRP can also be considered a secure PRF. If (E,D) is a secure PRP defined on (K,X) with N=∣X∣, and an attacker A queries the challenger at most Q times (where Q is polynomial), then:|Adv_PRP(A) - Adv_PRF(A) | ≤ Q^2/2N. Here, Adv_PRP(A) represents the advantage of attacker A in the PRP security model, and Adv_PRF(A) represents the advantage of attacker A in the PRF security model.
Both block ciphers (PRF) and stream ciphers (PRG) can be constructed based on each other. Utilizing PRF to construct PRG is straightforward. Let F be a PRF defined on (K,X,Y), and let
Tree-based Construction (previous output is the subsequent input):