Pseudorandom permutation

A pseudorandom permutation (PRP) is a keyed family of efficiently invertible permutations of a domain that no efficient adversary can distinguish from a uniformly random permutation of given oracle access to ; a strong PRP remains indistinguishable when the adversary also has oracle access to the inverse.

Syntax

A PRP is a triple of efficient algorithms with respect to keyspace and domain :

  • is a randomized algorithm that samples a key
  • is a deterministic algorithm that takes a key and input , outputting
  • is a deterministic algorithm that takes a key and input , outputting

For every key , is a bijection on . The domain is a family of finite sets of strings of length polynomial in , with an efficient uniform sampler and superpolynomial in ( is negligible); the standard instance is with (PRPs on bit strings). With polynomial, as for , a key holding the table of a uniformly random permutation of and of its inverse is strongly pseudorandom unconditionally — standard. Small domains are the small-domain PRPs below.

A block cipher , a permutation of for every key , is modelled as a PRP on bit strings or a strong PRP on bit strings with uniform on , and — standard. Concrete-security treatments drop the asymptotics and measure a block cipher by the maximal PRP advantage of adversaries making at most queries in time — BKR00.

Properties

Correctness

A PRP is correct if for all and ,

Security

\begin{algorithm}
\algname{Game}
\caption{$\Game^{\mathrm{prp}}_{\PRP,\calA}(\secpar)$}
\begin{algorithmic}
\State $k \gets \KeyGen(1^\secpar)$; $b \getsr \bits$
\State $\pi \getsr \Perms(\calD)$
\Comment{Can be sampled lazily}
\State $\calO_0(x) := \Eval(k,x)$
\State $\calO_1(x) := \pi(x)$
\State $b' \gets \calA^{\calO_b}(1^\secpar)$
\Return $[b' = b]$
\end{algorithmic}
\end{algorithm}

A PRP is pseudorandom if for all efficient ,

is negligible.

As an object, a PRP denotes a correct and pseudorandom scheme.

Strong Security

In the strong PRP (sPRP) security game, the adversary additionally receives an inverse oracle. Assuming PRPs exist, this is a strictly stronger notion than standard PRP security (sPRP ⇒ PRP): the three-round Feistel network with independently keyed length-preserving PRF round functions is a PRP (Length-preserving PRF ⇒ PRP on bit strings) but not a strong PRP (Feistel networks) — LR88.

\begin{algorithm}
\algname{Game}
\caption{$\Game^{\mathrm{sprp}}_{\PRP,\calA}(\secpar)$}
\begin{algorithmic}
\State $k \gets \KeyGen(1^\secpar)$; $b \getsr \bits$
\State $\pi \getsr \Perms(\calD)$
\Comment{Can be sampled lazily}
\State $\calO_0(x) := \Eval(k,x)$ ; $\calO_0^{-1}(y) := \Invert(k,y)$
\State $\calO_1(x) := \pi(x)$ ; $\calO_1^{-1}(y) := \pi^{-1}(y)$
\State $b' \gets \calA^{\calO_b,\calO_b^{-1}}(1^\secpar)$
\Return $[b' = b]$
\end{algorithmic}
\end{algorithm}

A PRP is strongly pseudorandom if for all efficient ,

is negligible.

As an object, a strong PRP denotes a correct and strongly pseudorandom scheme.

Variations

PRPs on bit strings

A PRP on bit strings is a PRP with domain for a block length that is polynomially bounded, computable from in polynomial time, and ; is unconstrained. As an object, a PRP on bit strings denotes, for some such , a correct PRP on that is pseudorandom in . Every one is a PRP (PRP on bit strings ⇒ PRP) — folklore — and its is a length-preserving PRF on , up to the birthday term for queries (PRP on bit strings ⇒ Length-preserving PRF) — BKR00.

CBC encryption, XCBC and the tweakable block ciphers LRW1 and LRW2 XOR message blocks, chaining values, keys, tweaks or hashed tweaks into the input of , so they need the group , which the domain of a PRP need not carry: for a PRP on , the map is a PRP on , and the XOR of two points of that domain begins with and lies outside it — standard. The block length is quantified existentially because the construction that produces the PRP fixes it: three Feistel rounds over a length-preserving PRF on give a PRP on , so only even lengths arise there (Length-preserving PRF ⇒ PRP on bit strings) — LR88.

Strong PRPs on bit strings

A strong PRP on bit strings is a PRP on bit strings that is strongly pseudorandom in . As an object, a strong PRP on bit strings denotes, for some block length as above, a correct PRP on that is strongly pseudorandom. Every one is a PRP on bit strings (Strong PRP on bit strings ⇒ PRP on bit strings) and a strong PRP (Strong PRP on bit strings ⇒ Strong PRP) — folklore. Four Feistel rounds over a length-preserving PRF on give one on (Length-preserving PRF ⇒ Strong PRP on bit strings) — LR88.

Small-domain PRPs

A small-domain PRP is a pseudorandom keyed permutation family on a domain of polynomial, possibly constant, size whose keys do not grow with the domain. Fix a polynomial . For a domain size , computable from in polynomial time, with for a polynomial , a small-domain PRP on is a triple with the syntax of a PRP, except that its domain is in place of a superpolynomial one, whose samples . It is secure if it is pseudorandom in on , where an efficient may query every point of the domain. As an object, a small-domain PRP denotes a polynomial such that for every such there is a correct small-domain PRP on with keys in that is pseudorandom. A domain with an efficiently computable and invertible bijection to reduces to — standard.

The key-length bound carries the content: without it could output the table of a uniformly random permutation of , so is fixed before — standard. Since can query all of , pseudorandomness implies strong pseudorandomness here: a adversary is simulated by one that first queries all points and answers inverse queries from the table, with the same advantage — standard. For the same reason neither the switching-lemma term of PRP ⇒ PRF (IR89) nor the birthday term of the Feistel construction of Length-preserving PRF ⇒ PRP on bit strings (LR88) is negligible at . The prefix cipher ranks under a PRP on bit strings to give a small-domain PRP with the same key (PRP on bit strings ⇒ Small-domain PRP (prefix cipher)) — BR02.

Tweakable PRPs

A tweakable block cipher takes a public tweak as an extra input to and , and is indistinguishable from an independent uniformly random permutation for each tweak — LRW02.

Other results

  • Length-preserving PRF ⇒ PRP on bit strings
  • PRP ⇒ PRF
  • Even–Mansour. In the random permutation model, let be a uniformly random permutation of that every party, the adversary included, can query in both directions. The cipher with is broken by every attack making queries to and queries to with probability at most — EM91. The single-key variant has the same bound — DKS12.
  • The Even–Mansour bound is tight: with queries to the cipher and evaluations of , the key is recovered once , from chosen plaintexts (Dae91) and, by the slidex attack, from known plaintexts (DKS12).

Feistel networks

For round functions , the -round Feistel network maps to , where

the second identity inverting round , so is a permutation of computable in both directions with forward evaluations of the only, whatever the — standard. Take for a length-preserving PRF with domain and range and independent keys . Each attack below works for every choice of round functions, with the stated advantage in or :

  • One round is not a PRP: the left half of is , which a uniform permutation of matches with probability , so one query has advantage — folklore.
  • Two rounds are not a PRP: has left half , so the answers to and with have left halves XORing to , which two distinct outputs of a uniform permutation do with probability ; two queries have advantage (two-round barrier) — folklore.
  • Three rounds are a PRP (Length-preserving PRF ⇒ PRP on bit strings) — LR88 — but not a strong PRP: two forward queries and one inverse query have advantage at least for (three-round barrier) — folklore.
  • Four rounds are a strong PRP (Length-preserving PRF ⇒ Strong PRP on bit strings) — LR88.

Multiple encryption

For a block cipher , double encryption with independent keys has a -bit key, but a meet-in-the-middle attack recovers it from known pairs with about evaluations of and table entries: tabulate for every , compute for every , and look it up. Each wrong key pair matches a known pair with probability about when is an ideal cipher, so about wrong pairs survive and pairs isolate the key; three-key triple encryption falls to the same attack, tabulating the side and searching with computed once per , with about evaluations, table entries and pairs. TODO: cite the meet-in-the-middle attacks on double and triple encryption (Diffie–Hellman, Computer 1977; Merkle–Hellman, CACM 1981) once the passages are read. The security of triple encryption in the ideal-cipher model is under results in the model.

Participates in

Builds on Pseudorandom permutation

Produces Pseudorandom permutation

Barriers