PRF/PRP Switching Lemma #
The PRF/PRP switching lemma states that the advantage of distinguishing a random function from a random permutation (both from a domain of size N) is bounded by the birthday bound:
`Adv(RF, RP) ≤ q(q-1)/(2N)`
where q is the number of queries.
Overview #
The key insight: a random function and random permutation differ only when the random function produces a collision. By the birthday bound, collisions among q uniform samples from {1,...,N} occur with probability at most q(q-1)/(2N).
Proof Strategy #
We state the switching lemma in terms of:
- An abstract "collision" event (bad event)
- The failure event lemma (FEL):
Adv ≤ Pr[bad] - The birthday bound:
Pr[bad] ≤ q(q-1)/(2N)
The concrete game definitions and collision probabilities are left as hypotheses, allowing the lemma to be instantiated for different query models.
Key Theorems #
switching_from_birthday— PRF/PRP switching via birthday + FELswitching_via_hybrid— Direct advantage bound q(q-1)/(2N)prf_prp_composition— Compose PRF security with the switch
References #
- [Bellare & Rogaway, The Security of Triple Encryption]
- [Impagliazzo & Luby, One-Way Functions are Essential for Complexity-Based Cryptography]
- [Shoup, Sequences of Games, Lemma 1]
Abstract Switching Lemma #
The switching lemma is decomposed into:
1. FEL: games agree except on bad (collision) events
2. Birthday bound: bad events are rare
PRF/PRP Switching Lemma (abstract form): Given two games (RF and RP) that agree except when a "bad" event (collision) occurs, and the collision probability is bounded by the birthday bound, the advantage is at most q(q-1)/(2N).
This combines the failure event lemma with the birthday bound.
PRF/PRP Switching with explicit hybrid: The switching lemma expressed via a sequence of hybrid games where each step introduces one collision opportunity.
This form is more suitable when the game is structured as q oracle queries processed sequentially.
Composition with PRF Security #
The switching lemma is typically used in combination with a PRF
security bound to get: `Adv_PRP ≤ Adv_PRF + q(q-1)/(2N)`.
PRF to PRP reduction: If the PRF advantage is ε_prf and the PRF/PRP switching costs q(q-1)/(2N), then the PRP advantage is at most ε_prf + q(q-1)/(2N).
This is the standard composition used in block cipher security.
PRF to PRP reduction with adversary: Version with explicit adversary.