Provable security notes / VI

Random oracles and programmability

The random oracle model gives the reduction a public random function it can answer consistently and sometimes program.

A random oracle is an ideal public function

\[H:\{0,1\}^*\to R.\]

For classical queries and finite output set \(R\), the proof simulates this oracle by lazy sampling. It maintains a table, returns the stored value on a repeated input, and otherwise samples an independent uniform element of \(R\) and stores it.

Why it helps

Random oracles are useful because they let reductions control the hash interface. The adversary sees a consistent random function. The reduction may use the oracle table to embed a challenge, detect when the adversary has queried an important value, or make a simulated ciphertext or signature distribution consistent.

Programmability

Programming means assigning the oracle value at a selected input as part of the reduction. The assigned value must agree with prior replies, and the proof must show that the resulting joint distribution is the required random-oracle distribution or bound the distinguishing error. Choosing an unqueried input ensures consistency; the distributional argument justifies the programming.

Programming is the reason many random-oracle proofs track hash-query lists explicitly.

Fiat-Shamir example

Let \(G=\langle g\rangle\) have prime order \(q\), let \(x\in\mathbb Z_q\) be the secret key, and let \(Y=g^x\) be the public key. In Schnorr identification, the prover samples \(r\) uniformly from \(\mathbb Z_q\), sends \(R=g^r\), receives a challenge \(c\in\mathbb Z_q\), and answers

\[s=r+cx\bmod q.\]

Verification checks

\[g^s=RY^c.\]

For a fixed public key, Fiat-Shamir replaces the challenge by \(c=H(R,m)\), using an unambiguous encoding of the commitment and message. A forking proof reruns the adversary with the same random coins and the same oracle replies before the selected query, then gives a fresh challenge there. If both runs yield valid responses for the same commitment and distinct challenges \(c\ne c'\), division of the verification equations gives

\[x=(s-s')(c-c')^{-1}\bmod q.\]

Since \(q\) is prime, \(c-c'\) is invertible. The forking lemma bounds the probability of obtaining these two successful runs in terms of the original forgery probability and query budget. For multiple public keys or protocol contexts, the hashed input also binds the public key and context required by the security statement.

Instantiating the random oracle

A random-oracle theorem proves security when all parties share an ideal random function and the adversary accesses that function through oracle queries. Replacing the oracle by a concrete hash function is a separate modeling step: the implementation has a fixed public algorithm whose structure the adversary can use.

Where model gaps appear

Unambiguous encodings and domain separation specify which mathematical inputs reach the oracle; ambiguities can cause attacks even inside the random-oracle model. Structural properties of a concrete hash, such as length extension, and leakage from its implementation require additional analysis beyond that ideal interface.

Classical and quantum query models

The random oracle model supports proofs of OAEP, Fujisaki-Okamoto transforms, and Fiat-Shamir signatures by making the hash interface explicit. Recording each use of programmability identifies which parts of the argument rely on this model. In the quantum random oracle model, an adversary may query a superposition of inputs; classical query tables and rewinding arguments must then be replaced by a proof that handles quantum queries.