Pseudorandomness and Computationally Secure Encryption
Introduction
Topic: Pseudorandomness and computationally secure encryption
Presenter: Ming-Deh Huang
Affiliation: Computer Science Department, University of Southern California
Date: January 25, 2026
Course: Lectures on CSCI 556 Introduction to Cryptography
Subunits
Unit 2.A: Secure encryption in the idealized setting
Unit 2.1: Pseudorandom generators and Pseudorandom functions
Suggested supplemental reading:
Chapter 3 and 6 A and B from "Introduction to Modern Cryptography" by Jonathan Katz and Yehuda Lindell, Chapman & Hall/CRC
Importance of Randomness in Cryptography
Definition: Randomness is an essential resource in both cryptography and computation.
Application of Randomness
In a one-time pad:
Requires n random bits to encrypt (and hide) a message of n bits.
The encryption process can be expressed as:
Where:
(message)
(key, uniformly randomly chosen from all n-bit strings)
Explanation: The notation represents the set of all n-bit strings. For instance, .
Efficiency of Randomness Usage
The question arises: Can we use randomness more efficiently?
Is it possible to "stretch" a random seed (of n bits) into a longer random-looking bit string (of -length, with \gamma(n) > n )?
Pseudorandomness
Pseudorandom Generators
Definition: A pseudorandom generator is an efficient function that "stretches" a random seed into a longer random-looking bit string:
The expression is:
r \overset{G}{\longrightarrow} G(r), |r| << |G(r)|
Request:
The output of G(r) is computationally/practically indistinguishable from a true random bit string of the same length.
Application: Transform the one-time pad:
Instead of ,
Use
This results in a shorter key: can be much smaller than .
Computational Indistinguishability
Pseudorandom generator: defined as a function that produces outputs indistinguishable from true random bit strings for every polynomial-time algorithm.
Key Aspect: No polynomial-time algorithm can distinguish the output of G from true random bit strings.
Construction of Pseudorandom Generators
Family of Functions:
Consider a family of functions parameterized by , where:
This is efficient to compute (in time).
Stretching Definition
Definition of Stretching: \gamma(n) >> n , for instance, or (noting that ).
Probability Condition: For a polynomial-time decision algorithm , the condition verifies:
|Pr{r \in {0, 1}^{\gamma(n)}}[P(r) = 1] - Pr{s \in {0, 1}^n}[P(G(s)) = 1]| < \frac{1}{n^c}
For sufficiently large , for all c > 0 .
Remarks on Polynomial-Time Decision Algorithm
Context: This algorithm models all possible randomness tests efficiently.
Experimental Design: The distinguisher receives the output of the generator without knowledge of the input in one instance and a random bit string of equal length in another.
Sufficiency of Tests: Traditional statistical randomness tests include:
The last bit is 0 with probability .
The XOR of all bits is 0 with probability .
Under these conditions, for example, the bit string generated by , where can appear statistically random, but it is not computationally pseudorandom.
Further Contextual Notes
Computational Indistinguishability: The output is computationally indistinguishable from random bit strings under the condition that the generator function is known, and is secret and uniformly random.
Application to Encryption
Encryption Process
Generative Process: Suppose is a pseudorandom generator, with for the example.
Encrypting a message of N-bits requires:
Choose a uniform random n-bit string where .
For example, if then .
Perform encryption:
Here, serves as the secret key.
Pseudorandomness Usage with Keyed Cryptography
Example: If is public, then all aspects of the encryption function are known except for the key.
Construction and Security of Pseudorandom Functions
Theoretical Framework
Function Definition: The family {} indexed by keys , such that:
for every .
Pseudorandom Family Condition: For every polynomial-time oracle Turing machine (an algorithm with an oracle) ,
There exists a negligible function so that:
|Pr{k \in R{0,1}^n}[A{fk(·)}(1^n) = 1] - Pr{f \in R {0,1}n}[A_{f(·)}(1^n) = 1]| < \epsilon(n) for every .
Oracle Function Explanation
Setup: The algorithm can query the oracle for inputs and receive outputs.
Maintains efficiency in time, terminating with an output of either 0 or 1.
Behavior: In this setting, can ask to see polynomially many outputs before deciding a binary result.
Theorem on Pseudorandom Functions
Existence Condition
Statement: If a pseudorandom generator exists with stretch , then a pseudorandom function family exists.
For , denote:
as the first n bits and as the last n bits of .
Define: .
Vulnerability of Encryption Schemes
Vulnerability Under Chosen-Plaintext Attack (CPA)
Discussion: The encryption scheme defined as is vulnerable under CPA due to the reduced key length .
If an adversary acquires the ciphertext , the relation reveals .
CPA Definition: Given ciphertext, the adversary queries the encryption of polynomially many plaintext messages using key .
Notably, a deterministic encryption scheme is especially vulnerable, particularly if only two candidate messages are available.
Historical Case Study
Midway Island Attack (World War II)
Historical Context: May 1942, during the Pacific War.
The US Navy intercepted Japanese communication containing the ciphertext fragment "AF”.
They speculated that "AF" referred to "Midway Island", contrary to Washington’s initial disbelief.
To confirm their suspicion, they surreptitiously asked Midway troops to send a plaintext indicating fresh water supply levels, leading to strategic military advantage.
Conclusion
Final Remarks on Encryption Security
To establish the security of newer encryption schemes:
Need to correlate security to the strength of pseudorandom generators.
Semantic security asserts that if a ciphertext does not reveal bits of a message with better than probability, it aligns with confidentiality principles.
Summary of Findings
The one-time pad and its characteristics, including vulnerabilities when reusing keys.
The introduction of probabilistic encryption methods which refresh randomness through new keys for every encryption operation.
The persistence of chosen-plaintext attacks and their implications for function templates in encryption practices.
The dual principles of empirical verification from historical contexts and detailed algorithmic definitions to provide a grounded understanding of both practical cryptography and theoretical underpinnings in the digital age.