🌑

Explore / Study / Computer Science / Cryptography 826 words | 5 minutes

§6 Pseudorandom Functions

  1. Random Functions
  2. Keyed Functions
  3. Pseudorandom Functions
  4. Pseudorandom Permutations
  5. Strong Pseudorandom (Unpredictable) Permutations
  6. Pseudorandom Generators from Pseudorandom Functions
  7. Pseudorandom Functions from Pseudorandom Generators

Random Functions

  • A Random Function corresponds to choosing uniformly at random fFuncn:={ff:{0,1}n{0,1}n}f \in \texttt{Func}_n:= \{f | f : \{0,1\}^n \rightarrow \{0,1\}^n\}.
  • Equivalently, for each x{0,1}nx \in \{0,1\}^n, we choose a bit string f(x)f(x) uniformly at random from {0,1}n\{0,1\}^n.
  • Equivalently, a random function corresponds to choosing uniformly a string of length n2nn \cdot 2^n.

Keyed Functions

  • A Keyed Function F:{0,1}×{0,1}{0,1}F : \{0,1\}^* \times \{0,1\}^* \rightarrow \{0,1\}^* is a two-input function, with first input the key kk. We will be interested in Efficient Keyed Functions, i.e., for which is a polynomial-time algorithm to compute F(k,x)F(k, x) for each given k,xk, x.

Pseudorandom Functions

  • Definition. Let F:{0,1}×{0,1}{0,1}F : \{0,1\}^* \times \{0,1\}^* \rightarrow \{0,1\}^* be an efficient, length-preserving, keyed function. FF is a Pseudorandom Function if for all probabilistic polynomial-time distinguishers DD, there is a negligible function ϵ\epsilon such that

    Prk{0,1}n[DFk()(1n)=1]PrfFuncn[Df()(1n)=1]ϵ(n)\left| \operatorname{Pr}_{k \leftarrow\{0,1\}^{n}}\left[D^{F_{k}(\cdot)}\left(1^{n}\right)=1\right]-\operatorname{Pr}_{f \leftarrow \texttt{Func}_{n}}\left[D^{f(\cdot)}\left(1^{n}\right)=1\right] \right| \leq \epsilon(n)

    where the first probability is over uniform choice of k{0,1}nk \in \{0,1\}^n and over any randomness of DD, and the second probability is over uniform choice of fFuncnf \in \texttt{Func}_n and over any randomness of DD.

Pseudorandom Permutations

  • We say that a keyed function FF is a Keyed Permutation if lin=loutl_{in} = l_{out} and if for all keys kk, the function Fk:{0,1}lin(n){0,1}lin(n)F_k : \{0,1\}^{l_{in}(n)} \rightarrow \{0,1\}^{l_{in}(n)} is a permutation. We call linl_{in} the block length of FF.

Strong Pseudorandom (Unpredictable) Permutations

  • Definition. Let F:{0,1}×{0,1}{0,1}F : \{0,1\}^* \times \{0,1\}^* \rightarrow \{0,1\}^* be an efficient, length-preserving, keyed permutation. FF is a Strong Pseudorandom Permutation if for all probabilistic polynomial-time distinguishers DD, there exists a negligible function ϵ\epsilon such that

    Pr[DFk(),Fk1()(1n)=1]Pr[Df(),f1()(1n)=1]ϵ(n)\left|\operatorname{Pr}\left[D^{F_{k}(\cdot), F_{k}^{-1}(\cdot)}\left(1^{n}\right)=1\right]-\operatorname{Pr}\left[D^{f(\cdot), f^{-1}(\cdot)}\left(1^{n}\right)=1\right]\right| \leq \epsilon(n)

    where the first probability is over uniform choice of k{0,1}nk \in \{0,1\}^n and the randomness of DD, and the second probability is over uniform choice of fPermnf \in \texttt{Perm}_n and the randomness of DD.

Pseudorandom Generators from Pseudorandom Functions

  • Define G(s):=Fs(1)Fs(2)Fs(l)G(s) := F_s(1) \Vert F_s(2) \Vert \ldots \Vert F_s(l) for desired length ll, where we encode each of the integers 1,,l1,\ldots, l as an nn-bit string.

Pseudorandom Functions from Pseudorandom Generators

  • Suppose GG has expansion factor n2t(n)n \cdot 2^{t(n)} with t(n)=O(logn)t(n) = O(\log n).
  • Define the keyed function F:{0,1}n×{0,1}t(n){0,1}nF : \{0,1\}^n \times \{0,1\}^{t(n)} \rightarrow \{0,1\}^n as follows.
  • To compute Fk(x)F_k(x) for k{0,1}nk \in \{0,1\}^n, and x{0,1}t(n)x \in \{0,1\}^{t(n)}, first compute G(k)G(k) and get the output bit string of length n2t(n)n \cdot 2^{t(n)}.
  • Split the output bit string into 2t(n)2^{t(n)} pieces of nn bits each and output the xx-th piece. Since t(n)=O(logn)t(n) = O(\log n), this runs in polynomial time.

— Feb 10, 2023

Creative Commons License
§6 Pseudorandom Functions by Lu Meng is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Permissions beyond the scope of this license may be available at About.