Digital Signatures and Public-Key Infrastructure

Public-key authentication, from definitions to deployed infrastructure. Signatures versus MACs (one signature for many verifiers, public verifiability, transferability, non-repudiation; MACs are about 100–1000× faster and deniable), and why signing is not 'decrypting'. Syntax and existential unforgeability under adaptive chosen-message attack. Textbook RSA signatures and their forgeries (no-message, multiplicative 2^q − q), hashed RSA. Hash-and-sign: secure signature + collision-resistant hash ⇒ secure signature for arbitrary-length messages. Lamport one-time signatures from any one-way function (reduction loses 2ℓ), and why two signatures break them. Stateful ℓ-time, chain-based and tree-based (Merkle/Goldwasser–Micali–Rivest) signatures from one-time signatures; the tree proof (loss 2nℓ* + 1); statelessness by deriving node keys from a PRF (Goldreich); CRHFs ⇒ secure signatures (OWFs suffice: Naor–Yung, Rompel). Certificates and PKI: single CA, multiple CAs (weakest link), delegation and certificate chains, web of trust (PGP), expiry and signed revocation lists. The random oracle model: methodology, on-the-fly sampling, programmability and query observation, objections (Canetti–Goldreich–Halevi, Merkle–Damgård), and why proofs there still count; RSA-FDH with a tight-enough 1/q reduction. Exercises worked.

· 22 min read · 4,305 words

Corresponds to Katz & Lindell, Introduction to Modern Cryptography, Chapters 12–13 (Chapter 13’s encryption half lives in the encryption note).

Motivation: authentication that anyone can check

IntuitionSigning software patches

A vendor generates (pk,sk)(pk, sk) and ships pkpk with the original software (a one-time authenticated distribution). For each patch mm it computes one signature σ←Signsk(m)\sigma\leftarrow\mathrm{Sign}_{sk}(m) and broadcasts (m,σ)(m,\sigma). Every client checks Vrfypk(m,σ)\mathrm{Vrfy}_{pk}(m,\sigma). A forger must fail on any m′m' never signed, even one differing from a real patch in a single bit.

Authenticated distribution of pkpk is still needed, but once; afterwards an unlimited number of messages are authenticated. (Exactly as a shared key is set up once and then encrypts many messages.)

Signatures versus MACs

MAC (Chapter 4)Digital signature
Keysshared secret per receiverone sksk; pkpk public
Many receiversseparate key and tag per receiverone signature for everyone
Public verifiabilityno: a cheating sender can give A a good tag and B a bad oneyes: if one verifier accepts, all do
Transferabilitynoyes: show σ\sigma to a third party, who can show it on
Non-repudiationimpossible: a judge can’t check the tag, can’t trust a revealed key, and S and R are symmetricyes: only sksk‘s holder can sign
Speedabout 2–3 orders of magnitude fasterslower
Deniabilitybuilt inabsent: use MACs (or more) if the signer wants only the recipient convinced

Transferability and public verifiability are what make certificates possible.

WarningSigning is not “decrypting”

The folklore “sign = decrypt with sksk, verify = encrypt with pkpk” comes from textbook RSA, where the operations happen to coincide. It is unfounded in general, and neither textbook RSA encryption nor textbook RSA signatures are secure anyway.


Definitions

DefinitionSignature scheme (Def. 12.1)

Ppt (Gen,Sign,Vrfy)(\mathrm{Gen},\mathrm{Sign},\mathrm{Vrfy}):

  • (pk,sk)←Gen(1n)(pk,sk)\leftarrow\mathrm{Gen}(1^n);
  • σ←Signsk(m)\sigma\leftarrow\mathrm{Sign}_{sk}(m);
  • b:=Vrfypk(m,σ)b := \mathrm{Vrfy}_{pk}(m,\sigma), deterministic.

Correctness: Vrfypk(m,Signsk(m))=1\mathrm{Vrfy}_{pk}(m,\mathrm{Sign}_{sk}(m)) = 1. The message space should be bit strings of arbitrary (or super-polynomial) length. Any encoding into a structured space must be one-to-one, or at least collision-resistant. Like MACs, signatures say nothing about when mm was sent: replays remain possible.

DefinitionExistential unforgeability under adaptive chosen-message attack (Def. 12.2)

Sig-forgeA,Πcma(n)\mathrm{Sig\text{-}forge}^{\mathrm{cma}}_{\mathcal A,\Pi}(n): A\mathcal A gets pkpk and a Signsk(⋅)\mathrm{Sign}_{sk}(\cdot) oracle, and outputs (m,σ)(m,\sigma). It wins if m∉Qm\notin\mathcal Q (the queried set) and Vrfypk(m,σ)=1\mathrm{Vrfy}_{pk}(m,\sigma) = 1. Secure if Pr⁡[win]≤negl(n)\Pr[\text{win}]\le\mathrm{negl}(n). The direct analogue of Definition 4.2, and the standard notion.


RSA signatures

AlgorithmTextbook RSA signatures (Construction 12.3)

pk=⟨N,e⟩pk = \langle N,e\rangle, sk=⟨N,d⟩sk = \langle N,d\rangle from GenRSA. σ:=md mod N\sigma := m^d\bmod N; accept iff m=σe mod Nm = \sigma^e\bmod N. Correct since (md)e=m(m^d)^e = m.

WarningTwo forgeries

  • No-message forgery: pick any σ\sigma, set m=σe mod Nm = \sigma^e\bmod N. Valid, with zero signing queries. “But the attacker doesn’t control mm” is irrelevant to the definition, and false anyway: retrying random σ\sigma fixes any few bits of mm. Never assume semantics about which messages matter.
  • Arbitrary-message forgery from two queries: for target mm, pick random m1m_1, set m2=m/m1m_2 = m/m_1, query both, output σ1σ2\sigma_1\sigma_2: (σ1σ2)e=m1m2=m(\sigma_1\sigma_2)^e = m_1m_2 = m. More generally, signatures on qq messages give forgeries on products of every subset of size at least 2: 2q−q−12^q - q - 1 new messages (the book’s 2q−q2^q - q counts the empty product too).

AlgorithmHashed RSA

Put H:{0,1}∗→ZN∗H : \{0,1\}^*\to\mathbb Z_N^* in pkpk; σ:=H(m)d mod N\sigma := H(m)^d\bmod N; accept iff σe=H(m)\sigma^e = H(m). Signs arbitrary-length messages.

  • HH must be collision-resistant: H(m1)=H(m2)H(m_1) = H(m_2) means a signature on m1m_1 also signs m2m_2.
  • Intuitively blocks both attacks: the no-message attack now needs mm with H(m)=σeH(m) = \sigma^e (inverting HH); the multiplicative one needs H(m)=H(m1)H(m2) mod NH(m) = H(m_1)H(m_2)\bmod N.
  • No standard-model proof for any concrete HH. With HH a random oracle onto ZN∗\mathbb Z_N^* it is RSA-FDH, provably secure (below).

The hash-and-sign paradigm

AlgorithmHash-and-sign (Construction 12.4)

Given a signature scheme Π\Pi for nn-bit messages and a hash family (GenH,H)(\mathrm{Gen}_H, H) with nn-bit outputs: pk′=⟨pk,s⟩pk' = \langle pk,s\rangle, sk′=⟨sk,s⟩sk' = \langle sk,s\rangle; Sign′(m)=Signsk(Hs(m))\mathrm{Sign}'(m) = \mathrm{Sign}_{sk}(H^s(m)); Vrfy′(m,σ)=Vrfypk(Hs(m),σ)\mathrm{Vrfy}'(m,\sigma) = \mathrm{Vrfy}_{pk}(H^s(m),\sigma). (The message space must be super-polynomially large, because collision-resistant hashes need super-logarithmic output.)

TheoremTheorem 12.5 — Secure signature + CRHF ⇒ secure signature for {0,1}∗\{0,1\}^*

ProofSplit on whether the forgery collides with a queried hash

Let coll\mathsf{coll} be the event that the forged mm satisfies Hs(m)=Hs(m′)H^s(m) = H^s(m') for some queried m′m'. Then Pr⁡[forge]≤Pr⁡[coll]+Pr⁡[forge∧¬coll]\Pr[\text{forge}]\le\Pr[\mathsf{coll}] + \Pr[\text{forge}\wedge\neg\mathsf{coll}].

  • Collision finder C(s)C(s): generate (pk,sk)(pk,sk) itself, answer signing queries honestly, and output (m,mi)(m,m_i) if they collide. Its success is Pr⁡[coll]\Pr[\mathsf{coll}], which is negligible.
  • Forger A(pk)\mathcal A(pk) for Π\Pi: generate ss itself, answer query mim_i by asking its own oracle for Signsk(Hs(mi))\mathrm{Sign}_{sk}(H^s(m_i)), and output (Hs(m),σ)(H^s(m),\sigma). Under ¬coll\neg\mathsf{coll}, Hs(m)H^s(m) was never queried, so this is a Π\Pi-forgery.

Both terms are negligible. The same proof works for one-time signatures and gives variable-length MACs too (though Chapter 4 got those without CRHFs).

∎


Lamport one-time signatures

DefinitionOne-time signatures (Def. 12.6)

Sig-forge1-time\mathrm{Sig\text{-}forge}^{1\text{-time}}: A\mathcal A may ask for one signature on m′m', then must forge on some m≠m′m\ne m'. Weaker, but enough as a building block.

AlgorithmLamport (Construction 12.7)

For ℓ\ell-bit messages and a one-way function ff: choose 2ℓ2\ell random preimages

sk=(x1,0⋯xℓ,0x1,1⋯xℓ,1),pk=(y1,0⋯yℓ,0y1,1⋯yℓ,1), yi,b=f(xi,b)sk = \begin{pmatrix}x_{1,0}&\cdots&x_{\ell,0}\\x_{1,1}&\cdots&x_{\ell,1}\end{pmatrix},\qquad pk = \begin{pmatrix}y_{1,0}&\cdots&y_{\ell,0}\\y_{1,1}&\cdots&y_{\ell,1}\end{pmatrix},\ y_{i,b} = f(x_{i,b})

Sign mm by revealing (x1,m1,…,xℓ,mℓ)(x_{1,m_1},\ldots,x_{\ell,m_\ell}) (one preimage per column, chosen by the bit). Verify f(xi)=yi,mif(x_i) = y_{i,m_i} for all ii. Example: m=011m = 011 reveals (x1,0,x2,1,x3,1)(x_{1,0},x_{2,1},x_{3,1}).

TheoremTheorem 12.8 — One-way function ⇒ Lamport is one-time secure

Corollary 12.9: one-way functions imply one-time signatures.

ProofPlant the challenge in a random cell

A forgery on m≠m′m\ne m' must reveal a preimage at some cell (i,b)(i,b) with mi=b≠mi′m_i = b\ne m'_i, one the signature on m′m' never revealed. The inverter I(y)I(y):

  1. pick random (i∗,b∗)(i^*,b^*) and set yi∗,b∗:=yy_{i^*,b^*} := y; generate all other cells honestly;
  2. answer the query m′m' honestly, aborting if mi∗′=b∗m'_{i^*} = b^* (that cell is unknown);
  3. if the forgery is “at” (i∗,b∗)(i^*,b^*), output its i∗i^*-th component.

Mental experiment: give II the preimage too, so it never aborts. A\mathcal A’s view is then identical to the real game and independent of (i∗,b∗)(i^*,b^*), so a forgery lands at the planted cell with probability at least ε/2ℓ\varepsilon/2\ell. The real experiment differs only when mi∗′=b∗m'_{i^*} = b^*, and then a forgery at (i∗,b∗)(i^*,b^*) is impossible anyway. So Pr⁡[Invert]≥ε/2ℓ\Pr[\mathrm{Invert}]\ge\varepsilon/2\ell, and ε\varepsilon is negligible.

∎

WarningTwo signatures destroy Lamport (Exercise 12.2)

Query 0ℓ0^\ell and 1ℓ1^\ell: together they reveal every xi,bx_{i,b}. Now sign anything. (Even two random messages reveal both preimages in about half the columns.)

ExampleVariants (Exercises 12.1, 12.3, 12.4)

  • 12.1, one-time signatures for 1-bit messages ⇒ OWF: let f(r)=pkf(r) = pk where (pk,sk)=Gen(1n;r)(pk,sk) = \mathrm{Gen}(1^n;r). An inverter returns r′r' with Gen(r′)=(pk,sk′)\mathrm{Gen}(r') = (pk,sk'); by correctness for all of Gen’s outputs, sk′sk' signs validly under pkpk. Forge on bit 0 with no queries.
  • 12.3, subset Lamport: 2ℓ2\ell secrets, a message maps injectively to an ℓ\ell-subset SmS_m, sign by revealing {xi}i∈Sm\{x_i\}_{i\in S_m}. Distinct equal-size subsets satisfy Sm⊈Sm′S_m\not\subseteq S_{m'}, so a forgery reveals some unrevealed xix_i: plant at a random index, loss 2ℓ2\ell. Message length up to ⌊log⁡2(2ℓℓ)⌋≈2ℓ−12log⁡2(πℓ)\lfloor\log_2\binom{2\ell}{\ell}\rfloor\approx2\ell - \frac12\log_2(\pi\ell), almost double Lamport’s.
  • 12.4, strong one-time signatures (also forbid a new σ′≠σ\sigma'\ne\sigma on the same mm). (b) Lamport with f′(x∥c)=f(x)f'(x\Vert c) = f(x) (ignore a last bit) is one-way, yet flipping cc in any revealed preimage gives a new valid signature on mm. (c) Use a CRHF hsh^s as Lamport’s ff: a second valid signature on mm reveals x′≠xx'\ne x with hs(x′)=hs(x)h^s(x') = h^s(x), a collision; a forgery on new mm inverts hsh^s (one-way by 12.5). Hash long messages first.
  • 12.5, CRHF ⇒ OWF: for H:{0,1}2n→{0,1}nH : \{0,1\}^{2n}\to\{0,1\}^n, at most 2n2^n inputs have a unique preimage, i.e. a 2−n2^{-n} fraction. Otherwise the inverter’s output is independent of which preimage was sampled, so it differs from xx with probability at least 12\frac12: collision probability ≥(ε−2−n)/2\ge(\varepsilon - 2^{-n})/2.

(Worked here.)


From one-time to many-time: hash-based signatures

Stateful schemes and chains

DefinitionStateful signatures (Def. 12.10)

Gen\mathrm{Gen} also outputs an initial state s0s_0; (σ,si)←Signsk,si−1(m)(\sigma,s_i)\leftarrow\mathrm{Sign}_{sk,s_{i-1}}(m). Verification needs no state. The security game is the same, with the oracle updating state invisibly. Schemes without state are stateless.

NoteThree stateful designs, increasingly good

SchemeIdeaDrawback
ℓ\ell-timepk=(pk1,…,pkℓ)pk = (pk_1,\ldots,pk_\ell); message ii uses key iibound fixed at key generation; keys linear in ℓ\ell
Chainsign mi∥pki+1m_i\Vert pk_{i+1} with skisk_i, generating the next key on the flysignature, state and verification grow linearly; every signature reveals all previous messages; no easy way to remove state
Treebinary tree of keys, leaf = messagesignature and verification O(n)O(n), independent of how many were signed; stateless via PRF

Chains and trees sign public keys (longer than themselves), so the one-time scheme must sign long messages: Lemma 12.11, CRHFs give arbitrary-length one-time signatures (Lamport plus hash-and-sign; CRHFs give the needed OWF by Exercise 12.5).

Tree-based signatures

AlgorithmTree-based signatures (Construction 12.12; Merkle, Goldwasser–Micali–Rivest)

A depth-nn binary tree, nodes labelled by prefixes ww (root ε\varepsilon, children w0,w1w0, w1), each with a one-time key pair (pkw,skw)(pk_w,sk_w). The root key pkεpk_\varepsilon is the public key. To sign m∈{0,1}nm\in\{0,1\}^n, generating keys lazily:

  1. for each proper prefix w=m∣iw = m|_i: σw=Signskw(pkw0∥pkw1)\sigma_w = \mathrm{Sign}_{sk_w}(pk_{w0}\Vert pk_{w1}) (“certify the children”);
  2. at the leaf, σm=Signskm(m)\sigma_m = \mathrm{Sign}_{sk_m}(m).

Output ({σm∣i,pkm∣i0,pkm∣i1}i<n, σm)\big(\{\sigma_{m|_i},pk_{m|_i0},pk_{m|_i1}\}_{i<n},\ \sigma_m\big); verify every link from root to leaf. Each internal key signs exactly one thing (its children pair), each leaf key signs exactly one message, and stored values are reused, so no one-time key is ever used twice.

graph TD
  R["pk_ε (public key)"] -->|"signs pk_0 ‖ pk_1"| A["pk_0"]
  R --> B["pk_1"]
  A -->|"signs pk_00 ‖ pk_01"| C["pk_00"]
  A --> D["pk_01"]
  D -->|"signs m = 01"| M["σ_m"]

TheoremTheorem 12.13 — One-time signatures for long messages ⇒ tree scheme is CMA-secure

ProofGuess which one-time key gets forged

With ℓ∗\ell^* signing queries, at most ℓ=2nℓ∗+1\ell = 2n\ell^* + 1 one-time keys are ever used (each query creates at most 2n2n; plus the root). The one-time forger A\mathcal A plants its challenge pkpk at a random position i∗∈[ℓ]i^*\in[\ell] in the order keys are created, generates the rest itself, and answers queries using its own secret keys, plus its single one-time query for the planted key. Given a forgery from A∗\mathcal A^*:

  • Case 1: the forged path departs from the real tree. At the first jj where the claimed children pkm∣j0′∥pkm∣j1′pk'_{m|_j0}\Vert pk'_{m|_j1} differ from the real ones, σm∣j′\sigma'_{m|_j} is a one-time forgery under pkm∣jpk_{m|_j} (which signed only the true children).
  • Case 2: the path matches all the way, so σm′\sigma'_m forges a fresh message under leaf key pkmpk_m, which signed nothing.

Either way the forged key is the planted one with probability exactly 1/ℓ1/\ell (independent of A∗\mathcal A^*‘s view), so the one-time advantage is ε/ℓ\varepsilon/\ell, and ε\varepsilon is negligible.

∎

AlgorithmMaking it stateless (Goldreich)

Precomputing the whole tree is exponential, and so is storing randomness per node. Instead keep two PRF keys k,k′k, k' and derive everything: (pkw,skw):=Gen(1n;Fk(w))(pk_w,sk_w) := \mathrm{Gen}(1^n;F_k(w)) and σw:=Signskw(pkw0∥pkw1;Fk′(w))\sigma_w := \mathrm{Sign}_{sk_w}(pk_{w0}\Vert pk_{w1};F_{k'}(w)). The same node always yields the same keys and the same signature, so no one-time key ever signs two different things.

TheoremTheorem 12.14 — CRHFs ⇒ stateless CMA-secure signatures

CRHF ⇒ OWF ⇒ PRF (GGM) plus tree signatures. (Exercise 12.7: replace FF by a random function, a hybrid to the stateful scheme with fresh randomness, which is Theorem 12.13.) In fact one-way functions suffice (Naor–Yung via one-way permutations; Rompel for any OWF), so, as for private-key cryptography, signatures are equivalent to OWFs. Today this design lives on as SPHINCS+/SLH-DSA, the stateless hash-based post-quantum standard (my addition).

ExampleWhy the chain can’t be made stateless this way (Exercise 12.6)

In a chain, what message ii signs (and which key signs it) depends on how many and which messages came before: the position in the chain is history, not a function of mm. Deriving keys from Fk(i)F_k(i) still needs the counter ii, and two parties signing different ii-th messages would reuse a one-time key. Trees work because the message itself addresses its leaf.


Certificates and public-key infrastructure

DefinitionCertificate

If Charlie holds signing keys (pkC,skC)(pk_C,sk_C) and knows pkBpk_B is Bob’s:

certC→B=SignskC("Bob’s key is pkB")\mathrm{cert}_{C\to B} = \mathrm{Sign}_{sk_C}(\text{"Bob's key is }pk_B\text{"})

(with an unambiguous identity such as an email address). Bob sends (pkB,certC→B)(pk_B,\mathrm{cert}_{C\to B}) to Alice over any channel: tampering can’t produce a certificate for a different key unless Charlie signed one. If Alice holds pkCpk_C and trusts Charlie, she accepts pkBpk_B. One authentic key bootstraps arbitrarily many, so secure key distribution must be solved only once. It assumes Charlie is honest and skCsk_C uncompromised. Open questions (how Alice gets pkCpk_C, how Charlie checks Bob, when Alice accepts) define a PKI.

PKI modelHow it worksWeakness
Single CAeveryone trusts one CA; pkCApk_{CA} distributed physically or bundled (browser, OS); in-person, ID-checked issuanceuniversal trust unrealistic; single point of compromise, failure, load
Multiple CAsusers choose which CAs to trustas strong as the weakest trusted CA: browsers ship many CAs as equally trusted, almost anyone can pay to be one
Delegation / chainsroot CA certifies second-level CAs, with the stronger meaning “and may issue certificates”eases load; more points of attack, harder management
Web of trust (PGP)anyone certifies anyone; each user weighs signers; key-signing parties; public key serversgrassroots, but unsuitable for high-stakes or organisational keys (would you trust strangers to certify your bank?)
sequenceDiagram
  participant Ch as Charlie (root, trusted by Dave)
  participant B as Bob (intermediate)
  participant A as Alice
  participant D as Dave
  Ch->>B: cert C→B ("Bob's key, may certify")
  B->>A: cert B→A ("Alice's key")
  A->>D: pk_A, cert B→A, pk_B, cert C→B
  Note over D: verify cert C→B with pk_C, then cert B→A with pk_B

NoteInvalidating certificates

Keys get stolen and employees leave, so certificates must die.

  • Expiry: sign (“Bob’s key is pkBpk_B”, date). Coarse: a departing employee keeps a valid certificate until expiry.
  • Revocation: each certificate has a unique serial number. The CA records it, verifies revocation requests, and periodically (say daily) signs the list of revoked serials together with the date. Verifiers check the signature, absence from the latest list, and the list’s own signature. The lag is at most a day.

(Modern practice adds OCSP and Certificate Transparency logs: my addition.)

ExampleRevocation exercises (12.8, 12.9)

  • 12.8, self-signed revocation: Bob signs “my key is compromised” under pkBpk_B, and the CA revokes without checking identity. Safe because the only key such a message can revoke is pkBpk_B itself, and anyone holding skBsk_B (Bob or thief) has shown the key is compromised. Revoking it is exactly right.
  • 12.9, posting individually signed serials immediately: each entry is signed but the list is not, and there’s no date. With no authenticated channel, a thief holding skBsk_B shows victims an old copy of the page (or strips the entry): every remaining entry still verifies, and nothing proves the copy is stale. The daily list signed with the date defeats this: a verifier demands today’s list.

(Worked here.)


The random oracle model

IntuitionWhy an idealised model at all

Efficient, standard-model-secure public-key schemes are scarce: no RSA-based encryption as efficient as textbook RSA, no practical RSA-based CCA encryption, and only the impractical tree signatures above. This stays true even granting AES as a PRF and SHA as a CRHF. Practitioners won’t use inefficient schemes, and ad-hoc ones are unacceptable. The random oracle model (Bellare–Rogaway) is the middle ground:

  1. design and prove the scheme assuming a public random function HH (possibly plus standard assumptions);
  2. deploy it with HH replaced by a (suitably adapted) cryptographic hash.

DefinitionThe model

A public, consistent, inscrutable box: anyone (honest or adversarial) queries xx and gets H(x)H(x); queries are private. Security probabilities are over the parties’ coins and the uniform choice of HH among all 2n2⋅2n12^{n_2\cdot2^{n_1}} functions. Equivalently, sample lazily: keep a table, answer repeats consistently, answer new xx with fresh random yy. Security holds only on average over HH, never for a particular HH. The model without an oracle is the standard model.

ExampleA random oracle behaves like…

  • a one-way function: with ℓ\ell queries, hitting xx has probability at most ℓ/2n1\ell/2^{n_1} and hitting an output equal to yy at most ℓ/2n2\ell/2^{n_2}: total at most 2ℓ/2n2\ell/2^n;
  • a collision-resistant hash: ℓ\ell lazy samples collide with probability O(ℓ2/2n2)O(\ell^2/2^{n_2}) (birthday);
  • a PRF: Fk(x)=H(k∥x)F_k(x) = H(k\Vert x) (Exercise 13.1: unless A\mathcal A queries HH on k∥⋅k\Vert\cdot, which happens with probability at most q/2nq/2^n, the values Fk(x)F_k(x) are fresh random strings, exactly like a random function).

These hold even for unbounded adversaries limited to polynomially many queries: something with no real-world meaning.

ImportantWhat the model buys in proofs

  1. Unqueried points are truly random, even if xx is known or merely hard to guess. A PRG’s output is pseudorandom only for uniform, secret seeds.
  2. Programmability: the reduction simulates HH and may choose answers on the fly, as long as they are correctly distributed. (RSA-FDH below; CCA simulation in the encryption note.)
  3. Observability: the reduction sees every query A\mathcal A makes, which is how it extracts an RSA solution.

WarningObjections

  • No justification: a ROM proof implies nothing formally about any instantiation. Once H^\hat H‘s code is public, ”H^(x)\hat H(x) random unless explicitly evaluated” is meaningless: an adversary can evaluate in any way, and the reduction can no longer observe or program queries.
  • Provable counterexamples (Canetti–Goldreich–Halevi): schemes secure in the ROM but insecure under every instantiation. Toy version, Exercise 13.2: Πy\Pi_y signs normally unless H(0)=yH(0) = y, in which case it outputs sksk. In the ROM, Pr⁡[H(0)=y]=2−n2\Pr[H(0) = y] = 2^{-n_2}, so it’s secure; with y:=SHA-1(0)y := \mathrm{SHA\text{-}1}(0) it leaks the key on the first query.
  • “Behaves like a random oracle” is not a definable assumption, unlike “SHA is collision-resistant” or “AES is a PRF”. A random oracle is unkeyed and public yet random-looking, while a PRF looks random only under a secret key.
  • Practical gaps: Merkle–Damgård hashes are easily distinguished from random oracles on variable-length inputs (length extension); outputs may need to land in ZN∗\mathbb Z_N^*, not just bit strings. (Oracle derivation: G(x)=Hˉ(0x)G(x) = \bar H(0x), H(x)=Hˉ(1x)H(x) = \bar H(1x) gives independent oracles.)

ImportantWhy use it anyway

A ROM proof is much better than no proof. It shows the design has no inherent flaw: any break must exploit the hash function, which can then be replaced. No natural ROM-proven scheme has been broken in practice, standards expect such proofs, and almost every deployed public-key scheme (OAEP, FDH/PSS, Fiat–Shamir signatures) relies on one. Still, proofs in the standard model are preferred, and what ROM proofs really guarantee is open.


RSA-FDH: full-domain hash signatures

AlgorithmRSA-FDH (Construction 13.10)

Hashed RSA with HH a random oracle onto ZN∗\mathbb Z_N^* (the book writes {0,1}2n\{0,1\}^{2n}, but the proof needs uniform elements of ZN∗\mathbb Z_N^*): σ=H(m)d mod N\sigma = H(m)^d\bmod N; accept iff σe=H(m)\sigma^e = H(m).

  • No-message attack now needs mm with H(m)=σeH(m) = \sigma^e: inverting a random oracle.
  • Multiplicative attack needs H(m1m2)=H(m1)H(m2)H(m_1m_2) = H(m_1)H(m_2): negligible for a random HH.

Difference from hash-and-sign: Theorem 12.5 extends a secure scheme’s message length using any CRHF. Here a hash turns a completely insecure scheme into a secure one, and only because HH is modelled as a random oracle; collision resistance alone proves nothing.

TheoremTheorem 13.11 — RSA ⇒ RSA-FDH is CMA-secure in the ROM

ProofProgram every hash so you know its signature, except one

Warm-up (no signing queries): answer one random hash query out of qq with the RSA challenge y∗y^* and the rest with random values. A forgery (m,σ)(m,\sigma) on that query gives σ=(y∗)1/e\sigma = (y^*)^{1/e}: success ε/q\varepsilon/q.

With signing queries (WLOG: no repeated hash queries; every signed or forged mm was hashed first): A′(N,e,y∗)\mathcal A'(N,e,y^*) guesses j←[q]j\leftarrow[q].

  • Hash query i≠ji\ne j: pick σi←ZN∗\sigma_i\leftarrow\mathbb Z_N^*, answer yi=σie mod Ny_i = \sigma_i^e\bmod N, store (mi,σi,yi)(m_i,\sigma_i,y_i). Since x↦xex\mapsto x^e is a permutation, yiy_i is uniform: a perfect simulation.
  • Hash query jj: answer y∗y^*.
  • Signing query on mim_i: return the stored σi\sigma_i, which is valid (σie=H(mi)\sigma_i^e = H(m_i)) without knowing dd. If i=ji = j, abort.
  • Output σ\sigma if the forgery is on mjm_j.

When the guess is right, A\mathcal A‘s view is exactly the real game, and jj is independent of that view until A\mathcal A asks to sign mjm_j, which already means the guess is wrong (it can’t then forge on mjm_j). So Pr⁡[RSA solved]=ε/q\Pr[\text{RSA solved}] = \varepsilon/q. (Coron improved the loss to about the number of signing queries; PSS gives a tight reduction and is in PKCS #1 v2.1.)

∎


Quick reference

ObjectStatementNote
Signature vs MACpublic verifiability, transferability, non-repudiationMACs faster and deniable
Securityexistential unforgeability under adaptive CMAreplays still possible
Textbook RSAmdm^dno-message and product forgeries
Hashed RSAH(m)dH(m)^dneeds CRHF; no standard proof
Hash-and-signsecure sig + CRHF ⇒ secure sig on {0,1}∗\{0,1\}^*split on collision
Lamportreveal xi,mix_{i,m_i}OWF ⇒ one-time; loss 2ℓ2\ell; two sigs break it
Chainsign mi∥pki+1m_i\Vert pk_{i+1}linear growth; stateful
Treecertify children, leaf signs mmloss 2nℓ∗+12n\ell^* + 1
Stateless treekeys and coins from Fk(w)F_k(w)CRHF (even OWF) ⇒ signatures
CertificateSignskC("B’s key is pkB")\mathrm{Sign}_{sk_C}(\text{"B's key is }pk_B\text{"})bootstraps trust once
PKI modelssingle CA, multiple CAs, chains, web of trustweakest trusted CA
Invalidationexpiry; dated signed revocation listsunsigned/undated lists fail
Random oraclepublic random HH, lazy samplingprogrammable, observable
ROM caveatsuninstantiable counterexamples; MD length extensionbetter than no proof
RSA-FDHH(m)dH(m)^d, HH a random oracleRSA ⇒ CMA-secure, loss qq

Facts to keep to hand

  • Signatures are publicly verifiable MACs, and that changes what they can do. One signature serves every verifier, can be passed along, and binds the signer (non-repudiation), at a 2–3 order-of-magnitude cost. Textbook RSA “signing by decrypting” is forgeable outright.
  • Hashing does two jobs. With a CRHF it extends a secure scheme to long messages (hash-and-sign); modelled as a random oracle it turns textbook RSA into a provably secure scheme (FDH). The second needs the idealisation.
  • Signatures need only one-way functions. Lamport gives one-time signatures from any OWF; trees of one-time keys certifying their children give unlimited signatures, and a PRF removes the state.
  • PKI is signatures applied to keys. Certificates bootstrap trust from one authentic key; the hard parts are whom to trust (single, multiple and chained CAs, or a web of trust) and how to kill certificates (expiry plus dated, signed revocation lists).
  • The random oracle model trades rigour for efficiency. Proofs observe and program oracle queries, which no real hash allows, and uninstantiable counterexamples exist. Yet no natural ROM-proven scheme has fallen, and most deployed public-key schemes rest on such proofs.

References

  • Katz & Lindell, Introduction to Modern Cryptography — Chapters 12–13
  • Lamport, “Constructing Digital Signatures from a One-Way Function” (1979)
  • Goldwasser, Micali & Rivest, “A Digital Signature Scheme Secure Against Adaptive Chosen-Message Attacks” (1988)
  • Bellare & Rogaway, “Random Oracles are Practical” (1993)
  • Canetti, Goldreich & Halevi, “The Random Oracle Methodology, Revisited” (1998)
  • Kohnfelder, Towards a Practical Public-Key Cryptosystem (1978) — certificates

← All notes