(CS555) Pseudorandom Functions and CPA Security

Outline and Readings

Outline

  • Keyed Function
  • Pseudorandom function (PRF)
  • Encryption using PRF
  • Pseudorandom Permutation (PRP)

Readings

  • Katz and Lindell: 3.6.1 ~ 3.6.3

Keyed Function

  • A key function
    • Takes two inputs, first called the key, second input
    • When is fixed,
    • We say is length-preserving when
  • Informal: A keyed function is pseudorandom, iff when the resulting function is indistinguishable from a function chosen at uniform random from all functions

Use : The Set of All Functions

  • How large is the set ?
      • When , this is ; , this is
  • can be viewed as a big look-up table, storing values for each string in
    • The table can then be viewed as a string of length
    • Can define a keyed function such that each key selects a function in ; call this the Random Function.
  • How to implement a function that is randomly chosen from ?
    • Maintains a table that is initially empty. When one queries , first looks in the table, if does not exist, randomly chooses , add to the table, and return ; if exists, then return .

Properties of Random Functions

  • Let be the random function such that , when randomly chosen, gives a random function in
    • Knowing gives absolutely no information about for
  • How to use the random function for encryption?
    • How about ?
  • Correct way: Given message , randomly chooses , then
    • So long as does not repeat, no information is leaked about
    • Assuming sharing an (extremely) long random string, different portions are used to encrypt different messages

Pseudorandom Function (PRF)

Definition 2.3. Given an efficient, length-preserving key function , we say is a pseudorandom function iff for all PPT distinguisher , there exists a negligible function such that

  • Where is chosen uniformly at random and is chosen uniformly at random from .
  • is given oracle access to a function, and needs to tell whether the function is a random one, or one from .

TIP

Q: What does PPT distinguisher D mean in cryptography?

A(AI generated): In the context of cryptography, the term "PPT" stands for "Probabilistic Polynomial Time." It refers to an algorithm or a Turing machine that runs in polynomial time with a randomization component. PPT algorithms are probabilistic because they can use randomness during their computation.

A "distinguisher" is an algorithm or an attacker that aims to distinguish between different cryptographic objects or properties. In the case of PPT distinguishers, they are used to distinguish between cryptographic schemes or primitives, such as encryption algorithms or hash functions.

The subscript "D" in "PPT distinguisher D" typically denotes a specific distinguisher algorithm. The purpose of such a distinguisher is to analyze a cryptographic scheme or primitive and determine whether it possesses certain desirable properties or security guarantees. For example, in the field of symmetric-key cryptography, a PPT distinguisher may be employed to determine whether an encryption algorithm exhibits strong pseudo-randomness or if it is vulnerable to certain attacks.

It's important to note that the specific functionality and goals of a PPT distinguisher may vary depending on the context and the cryptographic primitive being analyzed.

An Encryption Scheme Using PRF

  • Construction 3.24. using a PRF
      • where is chosen at uniform random
    • : given
    • Intuitively this is secure: so long as is not used for different messages, should look completely random, hence is like being encrypted using OTP
  • Theorem 3.25. If is PRF, then Construction 3.24 is CPA-scure.

Proof of Theorem 3.25

  • Given any that breaks CPA-security of construction 3.24, construct a distinguisher as follows:
    • is given oracle access to a function , and needs to tell from which distribution is drawn
    • When requests an encryption, uses
    • If succeeds in guessing which of and is encrypted under the challenge ciphertext, outputs (PRF), otherwise output (Random)
  • When is given a random function
    • Assuming that makes at most requests for encryption,
    • We use to denote Construction 3.24 with random function
    • When used in the challenge message does not appear in other messages,
    • Prob that appears in other challenges is
  • When is given a pseudorandom function
  • Thus
    • if and only if

Pseudorandom Permutations (PRP)

  • We say that a length-preserving keyed function , is a keyed permutation if and only if each is a bijection
  • A Pseudorandom Permutation (PRP) is a keyed permutation that is indistinguishable from a random permutation
  • A Strong PRP is a keyed permutation is indistinguishable from a random permutation when the distinguisher is given access to both the function and its inverse
  • We assume block ciphers are PRP.
Last Updated:
Contributors: Klee1453