Wrocław University of Science and TechnologyDepartment of Fundamentals of Computer Science

System Security II

Constructions, simulation, rewinding and security reductions

01 / System Security IIA construction and its proof are one object

The central question of this course is not only how to compute a signature or a session key. It is how an algorithm that breaks the construction could be used to solve a problem assumed to be hard. We study the reduction as an executable algorithm: it receives a challenge, creates the adversary's environment, answers queries and transforms a successful output into a solution.

The original lectures develop Schnorr and Okamoto identification, pairing-based modifications, signatures, encryption and authenticated key exchange. The chapters below retain that progression and make the proof obligations explicit. Complete elementary derivations are given where possible. A labelled proof outline identifies what still has to be established; it is not presented as a full theorem for a larger adversarial model.

You should be comfortable with System Security I, prime-order groups, conditional probability and algorithmic reductions. The goal is to be able to read an original cryptography paper, reproduce its scheme with correct types, and audit the interface between its construction and its proof.

The route through the course

First learn to simulate one transcript and extract from two. Then account for an adversary that succeeds only sometimes, chooses its queries adaptively and requests signatures before forging. Next compare three extraction styles: recovering a scalar by rewinding, reading a hard group element directly from a forgery, and recognising an informative random-oracle query. Finally apply the same discipline to anonymity and session-key experiments.

An elementary lemma below is proved in full. A construction-specific argument is accompanied by its model and any remaining conditions. This matters especially for the historical leakage-oriented protocols: a cancellation identity is useful, but it does not answer every oracle query in a full key-exchange experiment.

After this course you should be able to: write a reduction without secretly using its challenge solution; explain every change of distribution; identify the exact pair of transcripts needed by an extractor; and distinguish an anonymity proof from an unforgeability proof. The worked examples are classical. They do not claim security against quantum algorithms or quantum access to a random oracle.

02 / System Security IINotation, assumptions and proof contracts

Use G=gG=\langle g\rangle of prime order qq, secret aa, public key A=gaA=g^a, nonce xx, commitment X=gxX=g^x, challenge cc and response ss. Scalar arithmetic is in Zq\mathbb Z_q. Unless stated otherwise, nonces and challenges are sampled uniformly from the whole field. This convention matters for exact simulation. Secret keys are nonzero. The adversary is A\mathcal A and the reduction is B\mathcal B.

Hash notation and output types

Function Output and use
:{0,1}Zq\H:\{0,1\}^*\to\mathbb Z_q A scalar, for challenges or derived exponents
G1:{0,1}G1\H_{G_1}:\{0,1\}^*\to G_1 A point from the specified secure hash-to-group construction
KDF\mathsf{KDF} Bit-string keys of the length required by the symmetric algorithm
D\mathcal D_\ell An \ell-bit digest or mask, not a scalar or a curve point
bad\mathcal{H}_{\mathrm{bad}} A deliberately defective replacement, defined locally in an exercise

The group subscript names the actual output group. When a derivation uses a generic group GG, write G\H_G; use G2\H_{G_2} if the output is in G2G_2. This does not identify distinct source groups or change a proof's assumptions. All hash inputs are unambiguously encoded byte strings; writing a tuple or group point as an input abbreviates its specified encoding. Independent roles use separate domains, even when they share the symbol \H.

A public deterministic hash-to-group function must not provide a publicly computable discrete logarithm of its output relative to the generator. Merely returning a point of the right type is insufficient. In the BLS WebAssembly demo, G1\H_{G_1} denotes the group-hashing role implemented with MCL's hashAndMapToG1; scalar hashing has a different interface, hashToFr. The notation alone does not assert compatibility with an RFC 9380 suite or a standard BLS byte format. See RFC 9380 and MCL WebAssembly.

Problem Input Required output
Discrete logarithm, DL g,gag,g^a aa
Computational Diffie–Hellman, CDH g,ga,gbg,g^a,g^b gabg^{a\cdot b}
Decisional Diffie–Hellman, DDH g,ga,gb,Tg,g^a,g^b,T Distinguish T=gabT=g^{a\cdot b} from uniform TGT\in G
Gap CDH A CDH input and a DDH decision oracle Compute the CDH output despite that oracle

The assumption must match the group family and available oracles. In a symmetric pairing group, a pairing can make DDH easy while CDH may remain hard. One cannot transport an ordinary DDH-based argument into that group without checking the assumption.

A proof contract specifies the adversary's running time, query bounds, public-key distribution, corruption rules and winning event. “Secure under DL” omits the attack model and reduction loss. Also distinguish a standard-model theorem from one that treats \H as a programmable random oracle. An implementation using a fixed hash is an instantiation, not a programmable oracle service.

Write the reduction's state first

List the values the reduction knows and those it must not know. In a DL reduction with input (g,A)(g,A), computing aa to answer a training query is circular. A valid simulation must answer from available values or explicitly stop on a bounded bad event.

The direction of a reduction

Suppose an adversary breaks a signature scheme. To reduce forgery to DL, construct B\mathcal B that receives a DL instance, runs that adversary as a subroutine and outputs the unknown logarithm. The implication is: an efficient successful forger would give an efficient successful DL solver. We do not assume a DL solver and use it to forge; that reverse implication is usually easy and proves no useful security guarantee.

Write a concrete inequality. If TT is the adversary's time and ϵ\epsilon its success probability, the reduction might run in time about 2T2T and succeed with probability ϵ2/Q\epsilon^2/Q, or take expected time about QT/ϵQ\cdot T/\epsilon until success. These are different ways to state a loss. Never quote the runtime from one theorem and the success probability from another as if they described the same algorithm.

A reduction's four interfaces: challenge input, public setup, adversary queries and final output. At every stage list known scalars, known group elements and unavailable values. From A=gaA=g^a one may compute ArA^r for known rr; one may not compute ara\cdot r as a scalar. This distinction often makes an otherwise impossible simulation possible.

Why assumptions do not transfer automatically

A DL solver gives a CDH solver by recovering one exponent and exponentiating the other public point. A CDH solver gives a DDH distinguisher by computing the proposed product and comparing it to the fourth input. The converses do not follow. In a symmetric pairing group, e(ga,gb)=e(g,T)e(g^a,g^b)=e(g,T) tests whether T=gabT=g^{a\cdot b}, so DDH is easy even if computing that source-group point is still hard.

In Type-3 settings the pairing takes one point from each of two distinct source groups. A DDH test requiring an unavailable second-group representative cannot simply be carried out. State the supplied tuples and maps rather than using the word “pairing” as a substitute for an assumption.

Exact distribution or a small statistical difference?

Sampling a scalar from Zq\mathbb Z_q and sampling from Zq\mathbb Z_q^* differ by probability 1/q1/q. That may be negligible, but it is not zero. Across tt samples, a union bound gives at most t/qt/q for encountering a zero in the full-field experiment. The historical slides sometimes use nonzero sampling where their simulator argument assumes the full field. Here nonce and challenge sampling is explicitly full-field unless rejection is part of a stated algorithm. Nonzero keys and inversion denominators remain separate requirements.

03 / System Security IIThree-move protocols: simulation and extraction

For a relation RR, a statement yy and witness ww satisfy (y,w)R(y,w)\in R. In Schnorr's case y=Ay=A and w=aw=a, with A=gaA=g^a. A three-move public-coin protocol exchanges a commitment, a challenge and a response. Here “Sigma protocol” refers to this proof structure; it is unrelated to the name SIGMA for authenticated key exchange.

Three properties play different roles:

  1. Completeness: an honest prover with a valid witness is accepted.
  2. Special soundness: two accepting transcripts with the same first message and different challenges allow witness extraction.
  3. Special honest-verifier zero knowledge: for a specified challenge, a simulator produces the corresponding accepting-transcript distribution without the witness.

For Schnorr, the verifier checks gs=XAcg^s=X\cdot A^c. To simulate an honest transcript, sample c,s$Zqc,s\leftarrow_{\$}\mathbb Z_q and set X=gsAcX=g^s\cdot A^{-c}. In an honest execution, s=x+acs=x+a\cdot c. For fixed a,ca,c, adding aca\cdot c is a bijection on the field, so uniform xx gives uniform ss. The simulated and honest transcript distributions are identical under this sampling convention.

For extraction, divide two verification equations:

gss=Acc,a=(ss)(cc)1(modq).g^{s-s'}=A^{c-c'},\qquad a=(s-s')\cdot(c-c')^{-1}\pmod q.

The inverse exists because qq is prime and ccc\ne c'. Verify the extracted witness by checking ga=Ag^a=A. This last check is useful both in a reduction and in an implementation test.

Scope. Honest-verifier zero knowledge does not by itself prove zero knowledge against arbitrary malicious verifiers, concurrent security, or a general deniability claim. A verifier may select its challenge as a function of the commitment. A simulator that chooses the challenge first has not yet simulated that interaction.

A full distribution calculation

Fix a public key A=gaA=g^a and a challenge cc. An honest nonce xx has probability 1/q1/q and determines exactly one pair (X,s)=(gx,x+ac)(X,s)=(g^x,x+a\cdot c). A simulator samples ss with probability 1/q1/q and computes X=gsAcX=g^s\cdot A^{-c}. These describe the same set of pairs with the same probabilities. With a uniformly sampled challenge, each accepting transcript has probability 1/q21/q^2.

The simulator does not calculate x=sacx=s-a\cdot c. That equation is used only in the mathematical argument comparing distributions. Its executable computation uses s,c,As,c,A. In proofs, distinguish expressions that define a distribution from values that the simulator actually knows.

The two accepting equations are enough

The extractor does not need an honest explanation of the adversary's response. It starts with the public checks gs=XAcg^s=X\cdot A^c and gs=XAcg^{s'}=X\cdot A^{c'}. Division cancels XX. Because gg has prime order and cc0c-c'\ne0, the extracted scalar is the unique witness for AA. We need not assume the adversary internally computed s=x+acs=x+a\cdot c or knew any nonce. This is why extraction applies to arbitrary accepting algorithms, not only to an honest prover reused as a test fixture.

Worked example. In the order-2323 subgroup modulo 4747, use (X,c,s)=(42,3,7)(X,c,s)=(42,3,7) and (X,c,s)=(42,11,17)(X,c',s')=(42,11,17). Then ss=13s-s'=13, cc=15c-c'=15 and 151=20(mod23)15^{-1}=20\pmod{23}. Extraction gives 1320=7(mod23)13\cdot20=7\pmod{23}, whose public image is 27=34(mod47)2^7=34\pmod{47}.

04 / System Security IIPassive identification and rewinding

Suppose an impersonator receives honest training transcripts for AA and then talks to an honest verifier. A DL reduction sets the target public key to its input AA, simulates the training transcripts as above, and runs the impersonation phase. After the adversary sends XX, the reduction saves its state, including its random tape and the transcript prefix.

It sends a challenge cc, obtains an accepting response, and restores the saved state. It now sends a fresh challenge cc'. If the second run also accepts and ccc'\ne c, special soundness extracts the DL. Rewinding means restoring the same computation, not launching an independent adversary with new coins.

Rewinding at the challenge

A fixed successful prover illustrates extraction, not the success probability of an arbitrary adversary. The group has order 23 modulo 47.

  1. Commitment X
  2. First answer
  3. Restore state
  4. Second answer
  5. Extract a
A reduction preserves the state and random tape before a challenge, reruns from that point with a new challenge, and checks the conditions needed for extraction.
Rewinding preserves the computation prefix. It does not guarantee that the replay succeeds.

Why success needs a probability argument

Fix a saved state vv and its random tape. Let pvp_v be the fraction of challenges that lead to acceptance. Two independent challenges both succeed with probability pv2p_v^2. The event that they coincide and succeed has probability pv/qp_v/q. Averaging over states and writing ϵ=E[pv]\epsilon=\mathbb E[p_v] gives

Pr[two distinct accepting challenges]ϵ2ϵq.\Pr[\text{two distinct accepting challenges}] \ge \epsilon^2-\frac{\epsilon}{q}.

This follows from E[pv2]E[pv]2\mathbb E[p_v^2]\ge\mathbb E[p_v]^2. A negative lower bound is replaced by zero. The argument assumes a bounded execution with replayable state and exact simulation. A prover that guesses one challenge in advance can have acceptance probability 1/q1/q without giving an extractable pair. That is the knowledge-error scale, not a contradiction.

Proof exercise. Write the passive-identification reduction as pseudocode. Explain why training transcripts can be simulated and why the same simulator does not automatically answer an active verifier whose challenge depends on XX.

An executable reduction outline

Input: group parameters and a target public key A; do not compute log_g(A).
Training: answer each passive transcript request with the exact simulator.
Impersonation: run the adversary until its first message X is fixed.
Save: random tape, complete machine state, and transcript prefix.
Branch 1: sample c; run to the answer; record s and the acceptance result.
Restore the saved state.
Branch 2: sample an independent c'; record s' and the acceptance result.
If either branch rejects or c = c', return failure.
Otherwise extract the scalar, check its public image, and return it.

This is a black-box proof experiment. It does not assert that an attacker can rewind a remote physical user. In a practical protocol, however, a device reset that reuses a nonce can accidentally give an attacker the same pair of transcripts. The mathematics is the same; the authority to obtain the pair is different.

Why the square cannot be skipped

For a fixed state vv, let SvS_v be its accepting challenge set, of size tvt_v. Exactly tv(tv1)t_v\cdot(t_v-1) ordered pairs of distinct challenges accept, out of q2q^2 ordered pairs. Thus the conditional probability is (tv/q)2tv/q2=pv2pv/q(t_v/q)^2-t_v/q^2=p_v^2-p_v/q. Averaging first, then using nonnegative variance, gives the bound in the preceding section. Assuming every successful first branch has a successful second branch would replace a conditional probability by one without justification.

For instance, a prover may answer only one challenge per commitment. Its success is 1/q1/q, but there are zero distinct accepting pairs. At the other extreme, a prover that answers all challenges gives a useful pair with probability 11/q1-1/q. Both boundary cases agree with the formula.

An active training verifier can choose cc after inspecting XX. The passive simulator cannot simply choose that cc in advance. The next construction addresses this by embedding the hard problem somewhere else, so the reduction can know an actual prover witness.

05 / System Security IIOkamoto identification and active training

Okamoto's representation-based protocol uses generators g1,g2g_1,g_2 of the same prime-order group. Sample the secret pair (a1,a2)(a_1,a_2) uniformly from Zq2\mathbb Z_q^2 and set A=g1a1g2a2A=g_1^{a_1}\cdot g_2^{a_2}, resampling if AA is the identity. Individual coordinates may be zero. Choose fresh uniform x1,x2Zqx_1,x_2\in\mathbb Z_q, send X=g1x1g2x2X=g_1^{x_1}\cdot g_2^{x_2}, and return

s1=x1+a1c,s2=x2+a2c.s_1=x_1+a_1\cdot c,\qquad s_2=x_2+a_2\cdot c.

Verification checks g1s1g2s2=XAcg_1^{s_1}\cdot g_2^{s_2}=X\cdot A^c. Substitution proves completeness. The witness is now a representation of AA, and a public key has qq such representations. Knowing one does not give the discrete logarithm between g1g_1 and g2g_2.

Where the DL challenge is embedded

Given g1g_1 and g2=g1αg_2=g_1^\alpha with unknown α\alpha, the reduction samples its own (a1,a2)(a_1,a_2) and publishes AA. It knows a valid witness, so it can run honest prover instances even when the training verifier chooses challenges actively. The unknown challenge is in the relation between the two generators, not in the user's secret representation.

After two accepting impersonation transcripts with the same XX and distinct challenges, define Δc=cc\Delta c=c-c', Δs1=s1s1\Delta s_1=s_1-s'_1 and Δs2=s2s2\Delta s_2=s_2-s'_2. The extracted representation is aˉi=Δsi(Δc)1\bar a_i=\Delta s_i\cdot(\Delta c)^{-1} for i{1,2}i\in\{1,2\}. Combining it with the reduction's original representation yields

α=(aˉ1a1)(a2aˉ2)1(modq).\alpha=(\bar a_1-a_1)\cdot(a_2-\bar a_2)^{-1} \pmod q.

If the two representations differ, the denominator cannot be zero: equal second coordinates would force equal first coordinates as well. But the extractor may return the original representation, in which case this computation fails.

Why a different representation is plausible

Conditioned on AA, the reduction's representation is uniform among its qq possible representations. With full-field fresh nonces, prover transcripts do not reveal which representation was chosen: conditioned on the commitment and challenge, response pairs are uniform among the pairs satisfying the verification equation. Thus an extracted representation determined from that view hits the particular hidden representation with probability 1/q1/q. This is the witness-hiding step that must accompany the algebra, along with the probability of obtaining a fork.

This explanation addresses the sequential active-training setting followed by impersonation, not an unrestricted concurrent relay model. See Okamoto, Provably Secure and Practical Identification Schemes and Corresponding Signature Schemes. The local modified-Okamoto demo is a different, pairing-based construction: its responses are group elements, whereas the classical protocol above returns scalars. Its leakage analysis needs its own model.

Witness independence against an active training verifier

Write g2=g1αg_2=g_1^\alpha. For a fixed public key AA, the valid representations satisfy a1+αa2=logg1Aa_1+\alpha\cdot a_2=\log_{g_1}A. There are exactly qq pairs: choose a2a_2 freely and the first coordinate is determined. The prover does not need to know α\alpha to use its own pair.

Fix the verifier's random tape and the transcript so far. For the next commitment XX, the nonce pairs satisfying g1x1g2x2=Xg_1^{x_1}\cdot g_2^{x_2}=X form a set of size qq and are uniform on that set. The verifier's challenge is now fixed as a function of its view and XX. Translation by (a1c,a2c)(a_1\cdot c,a_2\cdot c) maps those nonce pairs bijectively onto the qq response pairs satisfying g1s1g2s2=XAcg_1^{s_1}\cdot g_2^{s_2}=X\cdot A^c.

That latter set does not depend on which secret representation the prover used. Inductively, any number of sequential training sessions with fresh full-field coins has a view independent of that representation, conditioned on the public key. The extractor's output, as a function of this view and its own coins, cannot guess the reduction's particular representation with probability greater than 1/q1/q. This is stronger and more precise than saying that the secret is “probably different”.

Finish the reduction, including failure

The impersonation fork extracts (aˉ1,aˉ2)(\bar a_1,\bar a_2). Subtracting the two representation equations gives

aˉ1a1=α(a2aˉ2)(modq).\bar a_1-a_1=\alpha\cdot(a_2-\bar a_2)\pmod q.

If a2=aˉ2a_2=\bar a_2, the equality forces a1=aˉ1a_1=\bar a_1. Otherwise inversion gives α\alpha. In this sequential, exact-simulation experiment the fork event and extracted witness depend on the public view, not on the hidden choice among representations. A lower bound on useful extraction is therefore (11/q)max{0,ϵ2ϵ/q}(1-1/q)\cdot\max\{0,\epsilon^2-\epsilon/q\}. State this sampling/model convention before using the bound.

Exercise. Deliberately replace the full-field nonce pair by a biased distribution. Identify which sentence of the view-independence proof now fails. Completeness still holds, but the distribution proof needs to be redone. Then show why revealing both nonces from one accepting response defeats the ordinary scalar-response version when the challenge is nonzero.

06 / System Security IIFiat–Shamir and the random-oracle table

Use the teaching Schnorr signature σ=(X,s)\sigma=(X,s) with c=(sigAXm)c=\H(\mathtt{sig}\|A\|X\|m) and s=x+acs=x+a\cdot c. EUF-CMA allows chosen-message signatures and requires a forgery on a fresh message. The reduction is given A=gaA=g^a without aa.

A random oracle is sampled lazily. Its table maps each exact encoded input to one output. A repeated query returns the stored output. It is not resampled. To simulate signing mm, the reduction chooses c,sc,s uniformly, computes X=gsAcX=g^s\cdot A^{-c}, and installs the value cc at the corresponding hash input. If that input already has an incompatible answer, the simulator must abort or use a justified retry rule. It may not overwrite the old answer.

The reduction returns a consistent hash answer for each exact input and programs signing transcripts only at compatible entries.
Both oracle interfaces share one consistent table. A signing simulation must not overwrite an incompatible hash answer.

If the adversary never queried the challenge of its eventual fresh-message forgery, then, for a nonidentity public key, the accepting challenge for fixed (X,s)(X,s) is unique. A uniformly sampled unseen answer matches it with probability 1/q1/q. Otherwise the reduction can identify a critical oracle query associated with the forgery. The next chapter describes how that index is used.

Let QHQ_H and QSQ_S bound hash and signing queries. A simple programming-collision estimate scales like QS(QH+QS)/qQ_S\cdot(Q_H+Q_S)/q: each signing simulation chooses a uniform commitment, and only previously occupied inputs for that context can collide. State the counting convention before quoting a concrete bound; internal signing queries also populate the table.

The oracle table is shared state

Hash(input):
    if input is in Table: return Table[input]
    sample a uniform scalar c
    store Table[input] = c
    return c

SimulatedSign(m):
    sample independent uniform c and s
    compute X = g^s / A^c
    encode input = (signature domain, A, X, m)
    if input is already in Table: abort this simulation
    store Table[input] = c
    return (X, s)

The simulator above uses the conservative rule of aborting at any occupied input, even one with a coincidentally compatible value. For signing query number jj, at most QH+j1Q_H+j-1 entries have already been installed, and XX is uniform. A union bound gives

δprogQSQH+QS(QS1)/2q.\delta_{\rm prog}\le \frac{Q_S\cdot Q_H+Q_S\cdot(Q_S-1)/2}{q}.

This overcounts entries for other messages and contexts, which is safe for an upper bound. The bound assumes uniform full-field simulator coins and a fixed upper bound on the query counts. Rejecting an identity commitment or using a different signing distribution changes the exact accounting. Repeating the same hash query must never create a fresh entry.

If the real forgery probability is ϵreal\epsilon_{\rm real}, the simulated success after programming aborts is at least ϵrealδprog\epsilon_{\rm real}-\delta_{\rm prog}. Requiring the forger to have asked its final challenge costs at most another 1/q1/q. Define

ϵ0=max{0,ϵrealδprog1/q}.\epsilon_0=\max\{0,\epsilon_{\rm real}-\delta_{\rm prog}-1/q\}.

This is a lower bound on a specific algorithm's success, not a renamed real-world advantage. To apply a forking theorem, include internal oracle use in its execution model, restore all relevant state, and count the random answers that the chosen theorem actually indexes.

07 / System Security IIForking lemma: what is replayed, what is changed

The Pointcheval–Stern technique turns a successful Fiat–Shamir forgery into two compatible transcripts. A useful abstraction is the general forking experiment of Bellare and Neven. Let an algorithm consume at most QQ random answers from a space of size hh. On success it outputs a relevant query index I{1,,Q}I\in\{1,\ldots,Q\} and auxiliary output; index zero denotes failure. Let its success probability be ϵ\epsilon.

Run it once. Restore the same input and random tape, replay answers before index II, and resample answer II and the suffix. The fork succeeds only if the second run selects the same index and the answers at that index differ.

Shared input, random tape and oracle answers before the selected query
First branch

The selected query is answered. The adversary continues and produces a valid forgery selecting that query.

Replayed branch

Restore the prefix. Sample a new answer and suffix. A useful fork must succeed at the same query with a different answer.

The prefix is fixed; the suffix is resampled. Neither acceptance nor selection of the same query is guaranteed.

The lower bound is

Pr[fork succeeds]max{0,ϵ(ϵ/Q1/h)}.\Pr[\text{fork succeeds}] \ge \max\{0,\epsilon\cdot(\epsilon/Q-1/h)\}.

For Schnorr the two runs then have the same encoded commitment and message but different challenges, so the extraction equation applies. Here ϵ\epsilon is the success probability of the actual simulated algorithm after its aborts, not automatically the raw EUF-CMA advantage. See Bellare and Neven, Lemma 1 and Pointcheval and Stern's security arguments.

Audit a proposed application

  • The reset preserves the adversary's coins and all earlier oracle answers.
  • The forked query really determines the forgery's challenge.
  • The two signatures refer to the same statement, public key and commitment.
  • Repeated queries remain consistent within each run.
  • Signing simulation still works on both branches.
  • Query guessing, malformed outputs and programming failures are included in the loss.

Forking is not a promise that a second run will forge. A different critical index, rejection or identical challenge is a failed attempt. Nor does this classical reset argument automatically apply to quantum random-oracle access. It relies on the particular query interface and rewinding model.

Exercise. Set Q=1000Q=1000, h=2128h=2^{128} and ϵ=0.1\epsilon=0.1. Evaluate the lemma's lower bound and compare it with the false claim that the fork succeeds with probability 0.10.1. Explain why a valid but loose reduction may still require larger parameters than a tight one.

A probability proof of the general bound

For each possible selected index ii, fix the random tape and the oracle answers before ii. Call that prefix vv. Let pi(v)p_i(v) be the probability, over the remaining independent answers, that the algorithm succeeds and selects ii. Two independently completed branches from this prefix both select ii with probability pi(v)2p_i(v)^2.

Summing over indices and averaging over prefixes, the probability of two successful runs with the same selected index is

i=1QE[pi(v)2]i=1Q(E[pi(v)])2ϵ2Q.\sum_{i=1}^{Q}\mathbb E[p_i(v)^2] \ge\sum_{i=1}^{Q}\bigl(\mathbb E[p_i(v)]\bigr)^2 \ge\frac{\epsilon^2}{Q}.

The first inequality is nonnegative variance. The second is Cauchy–Schwarz: the sum of the QQ means is ϵ\epsilon. We must remove the event that the second answer at the selected query repeats the first. After a successful first run that event has probability 1/h1/h, giving an upper bound ϵ/h\epsilon/h on the discarded probability. Subtraction gives ϵ2/Qϵ/h\epsilon^2/Q-\epsilon/h.

This derivation explains the three visible terms: two successful branches cause the square, selecting the same one of QQ possible indices causes the query loss, and distinct challenges cause the subtraction. It does not add a second independent factor 1/Q1/Q for “guessing” the index; that would count a loss already present in this experiment.

Forking probability: a lower bound, not a prediction

From a fork to Schnorr's secret

For the Schnorr teaching profile, the selected query encodes A,X,mA,X,m before its answer is supplied. If both executions select that query index, the shared prefix fixes its input. The two accepting signatures therefore have the same public key, commitment and message. Their differing hash answers are precisely the differing challenges required by special soundness.

The reduction must restore the simulated environment as well as the forger. A hash entry created after the fork cannot remain copied from the first branch if the second branch is meant to resample it. Signing-oracle replies and their table updates must follow the same documented rules on both branches. This is where a mathematically correct extractor can be attached to an incorrect implementation of the proof experiment.

08 / System Security IIPointcheval–Stern: where the constants come from

The historical forking analysis of David Pointcheval and Jacques Stern has more visible constants than the compact general lemma. It constructs a replay strategy with a success threshold and then an expected-time strategy that does not need the adversary's success probability as an input. These are different algorithms. A large constant in the latter is not the cost of one modular inversion.

Let QQ be the hash-query bound, let the challenge space have size h=2kh=2^k, and write ϵ\epsilon for the no-message forger's success. Under the generic-signature conditions and ϵ7Q/h\epsilon\ge7Q/h, their Lemma 2 gives a constant-success fork using at most 16Q/ϵ16Q/\epsilon executions, with success at least 1/91/9. Their Theorem 1 gives expected time at most 84480QT/ϵ84480\cdot Q\cdot T/\epsilon. See the original paper, Section 3.1.

Reconstruct the accounting

Let SS be successful executions that queried their eventual challenge, and ν=Pr[S]\nu=\Pr[S]. Losing an unqueried challenge costs at most 1/h1/h, so the threshold implies ν6ϵ/7\nu\ge6\epsilon/7. Split SS into buckets by the index of that query. There are at most QQ buckets.

Call a bucket heavy if its conditional mass within SS is at least 1/(2Q)1/(2Q). All light buckets together have mass at most 1/21/2. Within a heavy bucket, a splitting argument retains at least half its successful executions with a sufficiently good replay prefix. Thus a successful execution has a suitable bucket and prefix with probability at least 1/41/4. The fractions are deliberately conservative lower bounds, not special properties of Schnorr arithmetic.

Stage Accounting Interpretation
First success About 2/ϵ2/\epsilon trials; success at least 4/54/5 Find an execution in SS
Good prefix At least 1/21/2=1/41/2\cdot1/2=1/4 of successes Heavy query bucket, then splitting
Different successful replay At least ν/(4Q)1/hϵ/(14Q)\nu/(4Q)-1/h\ge\epsilon/(14Q) per trial Retain the prefix, change the challenge
Replay batch About 14Q/ϵ14Q/\epsilon trials; success at least 3/53/5 Amplify the conditional replay chance
Combined At least (4/5)(1/4)(3/5)>1/9(4/5)\cdot(1/4)\cdot(3/5)>1/9 Both stages succeed

The total trial budget is bounded by (2+14Q)/ϵ16Q/ϵ(2+14Q)/\epsilon\le16Q/\epsilon. Round repetition counts to integers in an implementation; the paper's bounds use the usual harmless rounding convention. The assumption ϵ7Q/h\epsilon\ge7Q/h makes the subtraction of the repeated-challenge probability small enough. Without that threshold, this particular constant-success estimate does not follow.

The expected-time multiplier

In the expected-time schedule, the replay budget grows geometrically. Using the paper's schedule parameters α=8/7\alpha=8/7 and tail bound γ=6/7\gamma=6/7, one has αγ=48/49<1\alpha\cdot\gamma=48/49<1, so the expected sum converges. The final bound reduces to the numerical expression

165647(7+49)=84480.165\cdot\frac{64}{7}\cdot(7+49)=84480.

Here 7=1/(α1)7=1/(\alpha-1) and 49=1/(1αγ)49=1/(1-\alpha\cdot\gamma) are geometric-sum factors. The factor 64/764/7 bounds the schedule's overshoot relative to QQ. The factor 165165 is a rounded upper bound after replacing 1/ν1/\nu by 7/(6ϵ)7/(6\epsilon) in the per-stage cost 141/ν141/\nu. The 141141 counts the initial run and a replay budget multiplied by 140140. This explains the origin of the number without suggesting it is an optimal universal loss.

For chosen-message simulation, the paper's collision estimate retains at least 7ϵ/107\epsilon/10 under its stated threshold ϵ10(R+1)(R+Q)/h\epsilon\ge10(R+1)(R+Q)/h, where RR bounds signing queries. Substitution explains

84480107<120686.84480\cdot\frac{10}{7}<120686.

Use the runtime convention of that theorem, including the simulated signing work. Do not combine its threshold with a different simulator's collision estimate. In the next ring-signature analysis, the same bookkeeping idea uses a much larger number of query-index patterns.

Checkpoint. A large upper bound is not an attack. A negative lower bound on extraction means that the estimate is uninformative, not that the scheme is insecure. The right security parameters depend on the best applicable analysis, not on treating every historical proof constant as a measured implementation cost.

09 / System Security IIPairings and leakage-oriented responses

A Type-3 pairing has type e:G1×G2GTe:G_1\times G_2\to G_T, where all three groups have order qq. With additive source groups and generators PG1P\in G_1, QG2Q\in G_2,

e(aP,bQ)=e(P,Q)ab.e(a\cdot P,b\cdot Q)=e(P,Q)^{a\cdot b}.

The map is efficiently computable and nondegenerate. Do not interchange its arguments or pass two G1G_1 points to it. A historical symmetric pairing uses one source group in both positions; its algebra is not a literal API specification for a Type-3 library.

A modified Schnorr response from the original lectures

In the symmetric multiplicative setting of the lecture derivation, replace the scalar response by a group element. Let h=G(X,c)Gh=\H_G(X,c)\in G and return S=hx+acS=h^{x+a\cdot c}. Verification is

e(S,g)=e(h,XAc).e(S,g)=e(h,X\cdot A^c).

The scalar s=x+acs=x+a\cdot c is not sent. Therefore the ordinary division attack on a leaked nonce no longer immediately applies to the wire response. This observation alone is not a proof of security in every leakage or randomness-injection model.

If a simulator programs G(X,c)=gr\H_G(X,c)=g^r, it can answer with S=(XAc)rS=(X\cdot A^c)^r without knowing aa. For the extraction branch, suppose a CDH challenge contains B=gbB=g^b and the simulator has obtained two compatible accepting responses using programmed points h=Bdh=B^d and h=Bdh'=B^{d'}, with nonzero known d,dd,d' and distinct c,cc,c'. Then

(Sd1(S)(d)1)(cc)1=gab.\left(S^{d^{-1}}\cdot(S')^{-(d')^{-1}}\right)^{(c-c')^{-1}} =g^{a\cdot b}.

The nonce term cancels. The remaining proof must explain how these two hash points are distributed, how the target queries are selected, which oracle queries are answered, and how often the required accepting pair is obtained. That is the difference between the extraction identity and a complete CDH or gap-CDH reduction. The identification demo and research prototype have their own explicit implementation profiles; check their group types instead of silently translating this symmetric sketch.

Read the extraction in three typed steps

Set A=gaA=g^a and B=gbB=g^b from the challenge. With h=Bdh=B^d, a valid response has the uniquely determined group value S=Bd(x+ac)S=B^{d\cdot(x+a\cdot c)}. Nondegeneracy in the prime-order symmetric setting makes the pairing verification injective in the response point. Raise SS to d1d^{-1} to remove the known randomiser. Do the same for the other branch. Divide the resulting group elements to cancel xx, and raise the quotient to (cc)1(c-c')^{-1} to obtain BaB^a.

At no point does the reduction recover aa, bb or xx as a scalar. All inversions are of known nonzero field elements. This explains why the result is a CDH solution rather than a DL solution. A DDH oracle, if required to recognise target tuples in the full simulation, changes the claimed assumption to gap CDH.

The lecture's noninteractive variant

The signature variant uses two distinct hash functions on a context containing the message and commitment: a scalar c=(X,m)c=\H(X,m) and a group point h=G(X,m)h=\H_G(X,m). It returns (X,S)(X,S) with S=hx+acS=h^{x+a\cdot c}. The same pairing equation verifies it. This paragraph retains the lecture's symmetric algebra; a concrete protocol must specify its domain-separated encodings and any public-key binding.

For an ordinary group-hash entry, the simulator chooses secret-to-the-adversary rr and returns h=grh=g^r. It answers even a chosen-nonce signing request by S=(XAc)rS=(X\cdot A^c)^r. At a target group-hash entry it instead uses h=Bdh=B^d. To extract, it keeps this point fixed and forks the scalar hash, giving

(S(S)1)[d(cc)]1=Ba.\bigl(S\cdot(S')^{-1}\bigr)^{[d\cdot(c-c')]^{-1}}=B^a.

Unlike the preceding interactive extraction, both branches now use the same dd. A complete proof must arrange a suitable order of the two hash queries, handle a signing request at the target entry, and bound target selection and forking failure. If the adversary asks the scalar hash before the group hash, the simulator cannot silently assume the reverse order. The slides' group-hash embedding and this extraction identity are instructional components, not a replacement for those missing scheduling arguments.

Critical implementation distinction. The reduction knows rr because it sampled the random oracle internally. The adversary does not. Replacing the real group hash by bad(X,m)=genc(X,m)\mathcal{H}_{\mathrm{bad}}(X,m)=g^{\operatorname{enc}(X,m)} for a publicly computable scalar would let anyone compute S=(XAc)enc(X,m)S=(X\cdot A^c)^{\operatorname{enc}(X,m)}. This would forge responses directly. A proof's trapdoor representation must not become a public representation in the implementation.

10 / System Security IICompromised randomness: the same cancellation, different interfaces

The preceding derivation explains why leakage, setting and injection belong to one research line. They concern loss of control over ephemeral randomness. A reset can also supply a repeated ephemeral. It need not disclose that ephemeral or set it to a known value. The attack chapter in System Security I gives the scalar examples.

What the reduction must simulate

Suppose a training oracle accepts an adversarial nonce xx before computing the protocol response. It can model honest nonce generation followed by disclosure by sampling xx with the prescribed distribution and then returning it with the transcript. This comparison requires identical phases, permitted values and disclosure timing. It does not identify every leakage oracle with every setting oracle. Choosing public messages is a separate permission.

For ordinary Schnorr, a leaked or chosen nonce and one nonzero challenge expose a=(sx)c1a=(s-x)\cdot c^{-1}. Repetition permits two responses with the same xx; subtracting eliminates xx even if it is unknown. An abstract form, with known coefficients ui,viu_i,v_i, is

s1=u1x+v1a,s2=u2x+v2a.s_1=u_1\cdot x+v_1\cdot a,\qquad s_2=u_2\cdot x+v_2\cdot a.

Eliminate xx by multiplying and subtracting. Define D=u1v2u2v1D=u_1\cdot v_2-u_2\cdot v_1. If D0D\ne0 in the prime field, then

a=(u1s2u2s1)D1.a=(u_1\cdot s_2-u_2\cdot s_1)\cdot D^{-1}.

This is a rank condition, not a consequence of merely having two transcripts. For Schnorr, u1=u2=1u_1=u_2=1 and vi=civ_i=c_i, so distinct challenges give the needed rank. More unknown witnesses, as in a representation proof, require an appropriate extraction argument rather than silently reusing the one-key formula.

Cancellation after lifting into the exponent

Continue in the symmetric group setting of the preceding chapter. After removing the known nonzero hash masks d,dd,d', let the two accepting responses become

T1=Bx+ac,T2=Bx+ac.T_1=B^{x+a\cdot c},\qquad T_2=B^{x+a\cdot c'}.

Then T1T21=Ba(cc)T_1\cdot T_2^{-1}=B^{a\cdot(c-c')} and raising to (cc)1(c-c')^{-1} gives BaB^a, not aa. If the nonce is known, one response similarly gives (T1Bx)c1=Ba(T_1\cdot B^{-x})^{c^{-1}}=B^a for c0c\ne0. With B=gbB=g^b, the result is a CDH-type target. Pairings validate group responses; they do not turn group elements back into readable exponents.

In an ordinary simulated hash entry h=grh=g^r, the reduction answers a chosen-nonce query as S=(XAc)rS=(X\cdot A^c)^r. It knows rr, but not aa. At a target entry containing the hard instance, this method may no longer answer every query. The proof must handle that case, preserve oracle consistency and bound aborts. The published Salin dissertation, Sections 3.4.3–3.4.4 develops this simulation and cancellation pattern. Its symmetric and asymmetric challenge tuples must not be conflated.

Three checks before claiming security

  1. Interface: who chooses or learns which value, and at what phase? What does reset restore? An ephemeral seed, a derived scalar and a public commitment are not interchangeable.
  2. Algebra: are the responses scalars or group elements? What cancels, which denominator must be nonzero, and what type does extraction return?
  3. Probability: why can the simulator obtain the required accepting pair without forbidden access? Include target selection, oracle programming and failed forks. Physical reset and proof rewinding can share an identity without sharing an execution model.

This is the sense in which the publication catalogue uses one label, randomness leakage and setup. The label groups a methodology and threat family. A security guarantee remains the theorem for the individual construction and its stated model.

11 / System Security IIBLS and a straight-line extraction idea

BLS illustrates a different signature shape. In additive source notation take PG1P\in G_1, QG2Q\in G_2, secret aa, verification key A2=aQA_2=a\cdot Q, and a proper G1:{0,1}G1\H_{G_1}:\{0,1\}^*\to G_1. A signature is one point σ=aG1(m)\sigma=a\cdot\H_{G_1}(m). Verify

e(σ,Q)=e(G1(m),A2).e(\sigma,Q)=e(\H_{G_1}(m),A_2).

The signature point is in G1G_1, not GTG_T. Validation must include the specified encoding, subgroup and nonidentity conditions. Hashing to a known scalar times PP is not a substitute for the required hash-to-curve construction: that shortcut changes the problem exposed by signatures.

For a proof sketch with matched public multiples, explicitly assume the following co-CDH-style problem is hard: given (P,Q,aP,aQ,D)(P,Q,a\cdot P,a\cdot Q,D) with random DG1D\in G_1, compute aDa\cdot D. The reduction can answer ordinary hash queries with rPr\cdot P and sign them with r(aP)r\cdot(a\cdot P). At a guessed fresh-message target query it programs DD. An accepting forgery there is already aDa\cdot D, so no Schnorr-style witness extraction is needed. Guessing and signing-query aborts still create a reduction loss.

This deliberately states the challenge tuple rather than calling every pairing assumption “CDH”. Other BLS group settings and theorem formulations must be matched to their own assumptions. The scheme originates in Boneh, Lynn and Shacham; the PBC example illustrates the pairing equation. Basic verification alone does not make naive aggregation safe against rogue public keys.

Additive and multiplicative notation describe the same source-group operation

On an elliptic curve, write σ=aG1(m)\sigma=a\cdot\H_{G_1}(m) and A2=aQA_2=a\cdot Q. The lecture-board shorthand writes σ=G1(m)a\sigma=\H_{G_1}(m)^a and A2=g2aA_2=g_2^a. The latter does not mean exponentiating the coordinates of a point. It means repeated application of the source-group law, which the library calls scalar multiplication. The target group of the pairing remains naturally multiplicative in both notations.

Operation Additive source notation Multiplicative shorthand
Public key A2=aQA_2=a\cdot Q A2=g2aA_2=g_2^a
Signature σ=aG1(m)\sigma=a\cdot\H_{G_1}(m) σ=G1(m)a\sigma=\H_{G_1}(m)^a
Verify e(σ,Q)=e(G1(m),A2)e(\sigma,Q)=e(\H_{G_1}(m),A_2) e(σ,g2)=e(G1(m),A2)e(\sigma,g_2)=e(\H_{G_1}(m),A_2)
Pairing correctness e(aG1(m),Q)=e(G1(m),Q)ae(a\cdot\H_{G_1}(m),Q)=e(\H_{G_1}(m),Q)^a e(G1(m)a,g2)=e(G1(m),g2)ae(\H_{G_1}(m)^a,g_2)=e(\H_{G_1}(m),g_2)^a

Matched public keys in both source groups

For the extended profile used in the exercises, publish A1=aPA_1=a\cdot P as well as A2=aQA_2=a\cdot Q, using one secret scalar. Their consistency is checked by

e(A1,Q)=e(P,A2).e(A_1,Q)=e(P,A_2).

Indeed, if A1=a1PA_1=a_1\cdot P and A2=a2QA_2=a_2\cdot Q, equality implies e(P,Q)a1a2=1e(P,Q)^{a_1-a_2}=1. Nondegeneracy and prime order imply a1=a2(modq)a_1=a_2\pmod q. Validate membership and exclude the all-zero key as required. The check proves equality of the represented exponents, not that the submitter knows that exponent.

Ordinary BLS verification in this orientation needs A2A_2 only. Publishing both keys is an explicit profile choice and is useful for the concrete reduction tuple above. It is not a universal requirement that every BLS user possess two independent secret keys. The BLS exercises and WebAssembly demonstration show this distinction operationally.

Why public scalar encoding is a deliberately broken exercise

Replace the proper G1\H_{G_1} by the deliberately defective function bad(m)=μ(m)P\mathcal{H}_{\mathrm{bad}}(m)=\mu(m)\cdot P with publicly known μ(m)\mu(m). In the extended profile anyone computes σ=μ(m)A1\sigma=\mu(m)\cdot A_1, without a signing query. Even with only A2A_2 public, one signature at a nonzero μ(m0)\mu(m_0) gives aP=μ(m0)1σ0a\cdot P=\mu(m_0)^{-1}\cdot\sigma_0, enabling all further signatures. Correct BLS requires a specified hash-to-curve map whose output does not reveal such a scalar relation to the generator.

This does not mean the hashed point is an independent generator selected from nowhere: in a prime-order group any nonidentity point generates the group, but its discrete logarithm relative to PP is not publicly provided. Use an appropriate hash-to-curve suite and domain separation, not a programmer's ad hoc encoding. RFC 9380 defines that interface.

Complete the simple target-query argument

Fix an upper bound QQ on distinct hash-table entries, including entries created by signing and final verification. Choose JJ uniformly from {1,,Q}\{1,\ldots,Q\} before running the adversary. At position JJ, answer with the random challenge point DD; at all other positions answer with rPr\cdot P and retain rr. Each answer has the same uniform distribution in the idealised group-hash model, so the target position is hidden by the answers.

Condition on JJ being the final fresh-message forgery's position. That message was not signed, so the target signing abort never occurred. If the forgery verifies, injectivity of the pairing in G1G_1 gives σ=aD\sigma=a\cdot D. This elementary reduction has success ϵ/Q\epsilon/Q under these idealised distributions and query conventions. Extra rejection rules or a concrete hash-to-curve instantiation must be accounted for separately. This is a transparent baseline argument, not a claim to reproduce every tighter BLS theorem.

12 / System Security IIRSA-FDH and Goh–Jarecki: compare extraction paths

RSA full-domain hash

Let N=prN=p\cdot r be an RSA modulus for distinct primes p,rp,r, let ee be invertible modulo φ(N)\varphi(N), and let d=e1modφ(N)d=e^{-1}\bmod\varphi(N). Here ee is an RSA exponent, not the pairing map of the preceding chapters. The distinct name FFDHF_{\rm FDH} denotes the full-domain hash into the RSA group, not a scalar hash into Zq\mathbb Z_q. With FFDH:{0,1}ZNF_{\rm FDH}:\{0,1\}^*\to\mathbb Z_N^*, sign as σ=FFDH(m)dmodN\sigma=F_{\rm FDH}(m)^d\bmod N and check σe=FFDH(m)modN\sigma^e=F_{\rm FDH}(m)\bmod N.

Given an RSA inversion challenge YY, a reduction chooses one fresh hash-table position as its target. At ordinary positions it samples rm$ZNr_m\leftarrow_{\$}\mathbb Z_N^* and returns rmer_m^e, retaining rmr_m as a simulated signature. This is uniform because exponentiation by ee is a permutation. At the target it returns YY and cannot answer a signing request there. If a fresh-message forgery lands at that position, the forged signature is an RSA root of YY.

Count distinct table entries, including those created internally by signing and final verification. Choosing among a known upper bound of positions gives an inverse-polynomial target probability. Conditioned on targeting the final fresh message, it was not previously signed, so the target signing abort does not occur. This is a query-guessing reduction, not a use of the Schnorr forking equation. Full-domain hashing means the RSA group domain, not a short digest interpreted without the specified encoding.

Goh–Jarecki's equality-of-discrete-logs approach

In this chapter return to G=gG=\langle g\rangle, A=gaA=g^a. A message salt rr determines h=G(m,r)h=\H_G(m,r), and the signature contains Z=haZ=h^a together with a Fiat–Shamir proof that (g,A)(g,A) and (h,Z)(h,Z) use the same exponent. Choose xx, compute U=gxU=g^x, V=hxV=h^x, then

c=(g,h,A,Z,U,V),s=x+ac.c=\H(g,h,A,Z,U,V),\qquad s=x+a\cdot c.

The verifier reconstructs U=gsAcU=g^s\cdot A^{-c} and V=hsZcV=h^s\cdot Z^{-c} and recomputes cc. The original EDL signature encodes (Z,r,s,c)(Z,r,s,c). The salt is separate from the proof nonce. Use parameters from a selected security analysis, not a historical bit length copied without review.

The structural point is that a forgery already contains hah^a. If a target hash is embedded as h=Bgth=B\cdot g^t, the corresponding valid ZZ gives ZAt=BaZ\cdot A^{-t}=B^a. A complete reduction must justify simulation of signatures and proofs, validity of the relation, hash programming and its success bound. The original Goh–Jarecki paper supplies that analysis; the displayed division is its teaching-level extraction idea, not the whole tightness proof.

RSA's target row must be chosen before its future is known

A slide may say “choose one of the hash-table rows”. At the start, the future number and contents of those rows are unknown. Use a known upper bound QQ, choose a target index beforehand and create rows lazily. If fewer than QQ rows are used, the unused choices simply count as failed target guesses. Choosing the row after seeing the forgery would not describe the same online simulation.

Sample ordinary roots from ZN\mathbb Z_N^*, not from an undeclared set of integers. The map rmrmemodNr_m\mapsto r_m^e\bmod N is a permutation of this group, giving the exact uniform distribution used by the proof. Store the root and hash value together, so a hash query before a signing request and a signing request before a hash query remain consistent. A signing request at the challenge row aborts; filling it with a dummy root that fails verification would reveal the simulation.

The equality-of-discrete-logs proof behind EDL

An interactive version sends (U,V)=(gx,hx)(U,V)=(g^x,h^x), receives a random challenge cc and returns s=x+acs=x+a\cdot c. It proves that one exponent relates both AA to gg and ZZ to hh. Verification checks two equations:

gs=UAc,hs=VZc.g^s=U\cdot A^c,\qquad h^s=V\cdot Z^c.

To simulate a transcript for a prescribed challenge, sample ss and set U=gsAcU=g^s\cdot A^{-c} and V=hsZcV=h^s\cdot Z^{-c}. If the equality statement is true, this has the honest distribution by the same translation argument as Schnorr. From two accepting transcripts with the same (U,V)(U,V) and distinct challenges, extraction gives a scalar aa satisfying both public relations. The second check is essential: a proof only of A=gaA=g^a would not certify that the supplied ZZ equals hah^a.

The noninteractive proof hashes the complete equality statement and commitments. Its simulator programs that challenge only at an unoccupied input. The tight EDL signature analysis additionally uses the random message salt to arrange appropriate hash embeddings while answering signing queries. It is not the naive assertion that every hash query can be set to a CDH challenge and still be signed. Keep the proof of equality, the signing simulation and the final group-element extraction as three separate steps.

Comparison exercise. For Schnorr, RSA-FDH, BLS and EDL, write a two-column table: what the forgery contains, and what the hard-problem solver needs. Identify precisely where rewinding is needed and where an accepting output can already contain the hard value. Do not infer tightness from the absence of a final rewind alone.

13 / System Security IIGame hopping: ElGamal and hashed ElGamal

Let EiE_i be the event that an adversary outputs 1 in game ii. The triangle inequality gives

Pr[E0]Pr[Ek]i=0k1Pr[Ei]Pr[Ei+1].|\Pr[E_0]-\Pr[E_k]| \le \sum_{i=0}^{k-1}|\Pr[E_i]-\Pr[E_{i+1}]|.

Each hop needs a reason: exact equality of distributions, a statistical bound, or a computational reduction. If two coupled games are identical until a bad event, their output probabilities differ by at most the probability of that event under the coupling. This is a proof tool, not permission to change unrelated distributions. Shoup's sequences-of-games tutorial develops this method.

ElGamal under DDH

In the real game the challenge ciphertext is (gr,mbAr)(g^r,m_b\cdot A^r) for a hidden bit bb. Replace ArA^r by an independent uniform TGT\in G. A DDH distinguisher embeds (g,A,gr,T)(g,A,g^r,T), samples the challenge bit bb itself, and outputs one exactly when the adversary's guess bb' equals bb. It must test this success event, not simply return the guessed bit. In the final game, multiplication by mbm_b permutes GG, so mbTm_b\cdot T is uniform regardless of bb. This establishes the CPA argument with the appropriate advantage convention.

Hashed ElGamal and the decisive oracle query

For bit strings of length \ell, set C=(gr,mD(Ar))C=(g^r,m\oplus\mathcal D_\ell(A^r)) with D:G{0,1}\mathcal D_\ell:G\to\{0,1\}^{\ell}. Until the adversary queries the exact DH point, its mask is an independent random string. Thus distinguishing the message requires either querying that point or falling within the accounted simulation error.

A CDH reduction need not be able to recognise the correct query. It can record group queries and output one selected at random. If a decisive query occurs among at most QHQ_H queries, selection incurs a factor 1/QH1/Q_H. A DDH oracle would allow recognition and changes the assumption to a gap setting. Do not silently grant it to a plain CDH reduction.

Neither argument proves CCA2 security. The related-ciphertext attack on ordinary ElGamal and the malleability of an unauthenticated XOR payload remain relevant. The first course states the corresponding attack interfaces.

State the events, not only the game names

For ElGamal, give a DDH distinguisher the tuple (g,A,U,T)(g,A,U,T). It runs the encryption adversary with public key AA, obtains two group messages m0,m1m_0,m_1, samples bb and returns (U,mbT)(U,m_b\cdot T). It outputs one if the adversary guesses bb. When T=ArT=A^r and U=grU=g^r, this is the real game. When TT is independent uniform, the success probability is exactly 1/21/2 because multiplication by either message permutes the group.

Therefore the absolute difference of the distinguisher's output probabilities equals the encryption adversary's guessing bias. If a paper defines encryption advantage as twice that bias, a factor two appears when the same bound is expressed in that convention. It is a convention change, not an extra cryptographic attack.

No decryption oracle was answered by this distinguisher. Adding such an oracle would require decrypting under the unknown exponent of AA, which the DDH input does not supply. This is why the preceding proof is an IND-CPA proof. It does not justify the CCA1 claim that appears next to the historical warm-up example.

The hash-smoothing route in the original lecture

The hashed-ElGamal slides use a different route from the random-oracle query argument. First replace the DH mask point by a uniform TGT\in G using DDH. Next replace D(T)\mathcal D_\ell(T) by a uniform \ell-bit string. This second hop requires a separate smoothing or extraction condition on the hash family: its output on a uniform group element must be sufficiently close to uniform, with the public hash description included in the comparison.

If that distance is at most δH\delta_H, then the two hops bound the guessing bias by the DDH distinguishing advantage plus δH\delta_H. Collision resistance by itself does not establish smoothing. For example, prefixing a digest by a fixed zero can preserve collision resistance while making its output trivially distinguishable from a fully uniform string of the longer length.

One precise information-theoretic formulation uses an independent public seed selecting a universal hash family, with an output short enough relative to the input's entropy. Another formulation treats the hash as a random oracle and accounts for queries to the hidden point. These are different assumptions and proof paths. The original slide's “hash smoothing” must not be silently replaced by a generic claim that any hash output is random.

A full decisive-query experiment

In the random-oracle route, replace the challenge pad by a uniform string. All hash answers are sampled consistently and independently. Until the adversary queries the exact DH point, this game can be coupled with the real challenge distribution. Let AskDH\mathsf{AskDH} denote that query event. The difference of success probabilities is at most Pr[AskDH]\Pr[\mathsf{AskDH}] by the identical-until-bad argument.

A CDH solver given (g,A,U)(g,A,U) can generate the uniform-pad challenge without knowing the DH point. It records each group input to the hash oracle and returns a random one from a padded list of length QHQ_H. Whenever the decisive query occurred, selection succeeds with probability at least 1/QH1/Q_H. The solver need not recognise which query was correct. The argument relates the event in the coupled uniform-pad experiment to the first decisive query; it does not require computing the missing real pad in the simulator.

Exercise. Explain why replacing the random selection by “return the correct hash query” assumes an extra recognition capability. Then repeat the reasoning for a simulator with an explicit DDH oracle and identify the changed hardness assumption.

14 / System Security IIAnonymous proofs and ring signatures

For a ring L=(A1,,An)L=(A_1,\ldots,A_n), an OR proof establishes knowledge of at least one secret aja_j with Aj=gajA_j=g^{a_j} without revealing which one. Fix a canonical ordered ring and bind it to the challenge. Simulate branches iji\ne j by choosing ci,sic_i,s_i and setting Xi=gsiAiciX_i=g^{s_i}\cdot A_i^{-c_i}. For the real branch choose xjx_j and set Xj=gxjX_j=g^{x_j}.

Define c=(ringLmX1Xn)c=\H(\mathtt{ring}\|L\|m\|X_1\|\cdots\|X_n), set cj=cijcic_j=c-\sum_{i\ne j}c_i, and return sj=xj+ajcjs_j=x_j+a_j\cdot c_j. Verification reconstructs every XiX_i and checks

i=1nci=(ringLmX1Xn).\sum_{i=1}^{n}c_i =\H(\mathtt{ring}\|L\|m\|X_1\|\cdots\|X_n).

This is a pedagogical Fiat–Shamir OR composition of Schnorr protocols, not a claim that every ring paper uses this exact encoding. With two accepting forks on the same commitments and ring, a changed total challenge implies a changed branch challenge. For such a branch, ai=(sisi)(cici)1a_i=(s_i-s'_i)\cdot(c_i-c'_i)^{-1}. A ring-unforgeability theorem must still ensure that this branch supplies a useful uncorrupted target, with the required key-registration and signing-query rules.

Anonymity is a separate claim about the distribution of signatures for different eligible signers. It does not follow from unforgeability. Nor does an algebraic fork identify the signer of an ordinary publicly observed signature; the extractor has access to a special replay experiment. Compare Herranz and Sáez's ring-forking analysis, the cloud-course treatment, and the hierarchical-signature research demo.

Why the constructions must not be mixed

The OR construction uses a sum of branch challenges tied to one hash of all commitments. The Herranz–Sáez construction below uses one separate hash per commitment and one aggregate response. Their verification equations, signature sizes and fork conditions are different. An extraction argument for one cannot be pasted into a proof of the other by renaming the signature.

Ring signatures also differ from multisignatures: one ring member signs, whereas a multisignature normally attests to participation of all specified co-signers. A group-signature system may have an opening authority. The ordinary ring signature below has no such authority. None of these terms means that a public transcript identifies which member actually ran the signing algorithm.

15 / System Security IIHerranz–Sáez: the actual ring construction

This chapter follows Javier Herranz and Germán Sáez, Forking Lemmas in the Ring Signatures' Scenario, especially Sections 4.2–4.4 of the published research report. We rename the paper's secret xix_i to aia_i, its public key yiy_i to AiA_i, and its scalar response to zz, keeping the course's meanings consistent. The aggregate ring signature is denoted σ\sigma.

Fix a ring L=(A1,,An)L=(A_1,\ldots,A_n) of public keys Ai=gaiA_i=g^{a_i} in the same prime-order group. Keys are nonidentity, and the ring entries are distinct. The commitment restrictions require 1nq11\le n\le q-1, with realistic ring sizes much smaller than qq. Fix a message mm and a hash (m,R)Zq\H(m,R)\in\mathbb Z_q. For this historical fixed-ring scheme the hash input is the pair (m,R)(m,R); it is not the OR construction's hash of an entire commitment vector.

Signing with member j's secret

  1. For each iji\ne j, sample distinct nonzero scalars uiu_i uniformly without replacement, and compute Ri=guiR_i=g^{u_i} and ci=(m,Ri)c_i=\H(m,R_i).
  2. Sample u$Zqu\leftarrow_{\$}\mathbb Z_q and compute the remaining commitment
Rj=guijAici.R_j=g^u\cdot\prod_{i\ne j}A_i^{-c_i}.
  1. If Rj=1R_j=1 or it duplicates an existing RiR_i, repeat step 2. Keep the previously chosen commitments fixed.
  2. Set cj=(m,Rj)c_j=\H(m,R_j) and compute the scalar response
z=u+ijui+ajcj(modq).z=u+\sum_{i\ne j}u_i+a_j\cdot c_j\pmod q.
  1. Output σ=(R1,,Rn,z)\sigma=(R_1,\ldots,R_n,z). The challenge values are recoverable from the message and commitments; the paper also writes them explicitly in its generic signature tuple.

The special commitment is the adjustment that closes the verification equation. It uses other members' public keys, not their private keys. Only the final scalar computation uses the actual signer's secret. The position jj is not included as an output field.

Verification and correctness

Validate the parameters, ordered ring, message encoding, scalar response and group elements. Reject identity or duplicate commitments. Recompute every ci=(m,Ri)c_i=\H(m,R_i) and accept if

gz=i=1nRii=1nAici.g^z=\prod_{i=1}^{n}R_i\cdot\prod_{i=1}^{n}A_i^{c_i}.

Substitute the definition of RjR_j. For each iji\ne j, the inverse public-key factor in RjR_j cancels the matching factor in the verifier's product. What remains is

guijguiAjcj=gu+ijui+ajcj=gz.g^u\cdot\prod_{i\ne j}g^{u_i}\cdot A_j^{c_j} =g^{u+\sum_{i\ne j}u_i+a_j\cdot c_j}=g^z.

This proves correctness for every accepted signing attempt. It does not yet prove anonymity or prevent an outsider from creating a new valid tuple.

A two-member example with declared toy hash values

Use p=47,q=23,g=2p=47,q=23,g=2, with a1=7,A1=34a_1=7,A_1=34 and a2=5,A2=32a_2=5,A_2=32. Let member 2 sign. Choose u1=3u_1=3, so R1=8R_1=8, and suppose the fixed toy hash table returns (m,8)=4\H(m,8)=4. Choose u=9u=9. Then R2=29344=16(mod47)R_2=2^9\cdot34^{-4}=16\pmod{47}, which is neither the identity nor R1R_1. Suppose (m,16)=6\H(m,16)=6. The response is z=9+3+56=19(mod23)z=9+3+5\cdot6=19\pmod{23}.

The two sides of verification are 219=32^{19}=3 and 816344326=3(mod47)8\cdot16\cdot34^4\cdot32^6=3\pmod{47}. These fixed toy hash values support a readable arithmetic trace only. They are not a secure hash implementation or parameters for deployment.

Fixed-ring proof versus a variable-ring application

An application with variable rings must specify a canonical ring encoding, ring selection and key-registration rules. Binding a domain and the ordered ring to each hash input is a natural teaching extension, but it is a different byte-level scheme and needs a corresponding proof statement. We do not claim that the historical fixed-ring theorem automatically covers maliciously registered keys, arbitrary ring changes or adaptive corruption.

16 / System Security IIAnonymity: an exact distribution proof

Fix the public ring and message. Compare public transcript distributions for two eligible signers under the same specified sampling and rejection rules.
The anonymity experiment changes the hidden witness while keeping the public statement fixed.

Fix the public ring, message and hash function. Consider any valid signature with pairwise distinct nonidentity commitments. Let

Ω={(R1,,Rn):RiG{1}, RiRk for ik}.\Omega=\{(R_1,\ldots,R_n): R_i\in G\setminus\{1\},\ R_i\ne R_k\text{ for }i\ne k\}.

There are (q1)(q2)(qn)(q-1)\cdot(q-2)\cdots(q-n) ordered tuples in Ω\Omega. We will show that each possible signer gives each one exactly the same probability. This is a pointwise statement about distributions, not an argument that “all signatures look similar”.

First, sample the other n − 1 commitments

For signer jj, the other commitments are uniform ordered choices without replacement from q1q-1 nonidentity points. The probability of their particular values in the fixed target signature is

1(q1)(q2)(qn+1).\frac{1}{(q-1)\cdot(q-2)\cdots(q-n+1)}.

For n=1n=1, this empty product is one. The public hash values for those commitments are now fixed, regardless of whether the hash is computationally ideal. The anonymity calculation does not need a random-oracle assumption.

Then, account for rejection sampling correctly

For those fixed other commitments, the map uguijAiciu\mapsto g^u\cdot\prod_{i\ne j}A_i^{-c_i} is a bijection from Zq\mathbb Z_q to GG. Each trial for RjR_j is uniform on GG. The signing algorithm excludes exactly nn points: the identity and the n1n-1 existing commitments. Therefore the accepted RjR_j is uniform on the remaining qnq-n points.

Do not assign probability 1/q1/q to the accepted value. Summing over any number of rejected trials gives, for one allowed point,

t=0(n/q)t(1/q)=1qn.\sum_{t=0}^{\infty}(n/q)^t\cdot(1/q)=\frac{1}{q-n}.

The expected number of trials is q/(qn)q/(q-n). For a tiny ring in a cryptographically large group this is close to one. The restriction n<qn<q is essential for termination and for the probability calculation.

Finally, the scalar response cannot reveal the signer

For a fixed commitment tuple the hash values are fixed. The verification equation determines a unique zZqz\in\mathbb Z_q because exponentiation by gg is bijective. Thus no extra signer-dependent choice is left in the response. For every signer jj,

Pr[Signj(m)=σ]=1(q1)(q2)(qn).\Pr[\operatorname{Sign}_j(m)=\sigma] =\frac{1}{(q-1)\cdot(q-2)\cdots(q-n)}.

The right side is independent of jj. Hence any two signers induce identical distributions on the public signature. In the usual two-candidate challenge game, even an unbounded observer guesses the hidden signer bit with probability exactly 1/21/2. For a uniform prior over all nn members the posterior remains uniform. With a nonuniform prior, the signature does not magically erase external information; it leaves that prior unchanged.

Check the same signature under another signer

In the preceding toy example, the signature was (R1,R2,z)=(8,16,19)(R_1,R_2,z)=(8,16,19). Member 1 can also produce it: its ordinary other-branch nonce is u2=4u_2=4, and its closing scalar is u=10u=10. Then R1=210326=8R_1=2^{10}\cdot32^{-6}=8, and z=10+4+74=19(mod23)z=10+4+7\cdot4=19\pmod{23}. Each signer produces that same signature with probability 1/(2221)=1/4621/(22\cdot21)=1/462 under the specified sampler.

This explanatory reconstruction may use discrete logarithms because the toy example supplies them. The actual signing algorithm does not compute logarithms of other users' keys. A proof that a transcript could have arisen from any member is different from an algorithm that recovers another member's secret.

What this theorem does not hide

The claim is about the public transcript under the stated sampler. Timing, network addresses, browser logs, faulty randomness, an exposed signing state or a disclosed random tape can give additional evidence absent from that view. Even knowing all long-term keys does not change the pointwise transcript calculation, but knowing the actual ephemeral choices can. Correct verification by itself is never a test of anonymity.

Exercise. Enumerate the toy experiment exactly for both signers, including the conditional distribution after rejecting collisions. Compare counts for every accepted signature. Then bias the other-branch nonce distribution and determine whether the pointwise equality still holds. An experiment can catch a sampling error; the symbolic counting argument establishes the general property.

17 / System Security IIRing forking and the cost of multiple queries

For Herranz–Sáez, a useful fork must keep the message, ring and every RiR_i fixed. Exactly one challenge, say cjc_j, must change. Divide the two verification equations:

gzz=Ajcjcj,aj=(zz)(cjcj)1(modq).g^{z-z'}=A_j^{c_j-c'_j},\qquad a_j=(z-z')\cdot(c_j-c'_j)^{-1}\pmod q.

If two branch challenges change, the quotient generally contains two public-key powers and this one-variable extraction does not follow. If a commitment changes, it also fails to cancel. These are not cosmetic differences between forks.

Why the index pattern is larger than Q

The forger queries nn distinct inputs (m,Ri)(m,R_i). Associate a successful forgery with the ordered vector of their query indices (1,,n)(\ell_1,\ldots,\ell_n). There are at most

VQ,n=Q(Q1)(Qn+1)V_{Q,n}=Q\cdot(Q-1)\cdots(Q-n+1)

such vectors. The ring-forking argument groups successes by this entire pattern. It rewinds at the latest of those nn queries. Earlier signature challenges remain fixed; the latest one changes. Successful replay must return to the same index pattern. The common prefix fixes all the associated query inputs, so the commitment tuple really is the same.

This is why applying the ordinary QQ-indexed forking bound as if it already guaranteed the required ring fork would be unjustified. For example, Q=10,n=3Q=10,n=3 gives VQ,n=720V_{Q,n}=720, not 1010 and not the unordered-subset count 120120. Each commitment position is associated with its own public key, so order matters.

The historical estimates and their assumptions

Under the generic conditions in Herranz–Sáez, the no-message threshold is ϵ7VQ,n/h\epsilon\ge7V_{Q,n}/h, with challenge alphabet parameter h=2kh=2^k. The expected-time bound is 84480VQ,nT/ϵ84480\cdot V_{Q,n}\cdot T/\epsilon. This carries over the earlier schedule argument with query-index patterns in place of single indices.

For WW chosen-message signing queries and signing-simulation time TsT_s, the report states the threshold and bound

ϵ12VQ,n+6(Q+Wn)2h,\epsilon\ge\frac{12V_{Q,n}+6(Q+W\cdot n)^2}{h},
T144823VQ,n(T+WTs)ϵ.T'\le\frac{144823\cdot V_{Q,n}\cdot(T+W\cdot T_s)}{\epsilon}.

The collision accounting retains at least 7ϵ/127\epsilon/12. The multiplier is the rounded-up value of 8448012/784480\cdot12/7. The quadratic term controls oracle/simulation collisions; it is not part of the final modular inversion. The generic statement assumes high-entropy commitments, a suitable signing simulator and the stated distinctness conditions. For a hash uniform in Zq\mathbb Z_q, one can use h=2kqh=2^k\le q as a conservative bound on inverse challenge probabilities while checking those other conditions separately.

Scalability boundary. VQ,nV_{Q,n} can be enormous, and need not be polynomial when the ring size grows with the security parameter. The displayed historical reduction must not be called a tight, practical bound for arbitrary large rings. A useful parameter claim needs the actual ring-size regime, query bounds and a theorem applicable there. A threshold greater than one makes this sufficient-condition statement vacuous, not automatically false or an attack on the construction.

Signing simulation and where collisions enter

One instructive simulator first chooses the other commitments and their hash values, then chooses cj,zc_j,z and solves the verification equation for RjR_j:

Rj=gzijRi1i=1nAici.R_j=g^z\cdot\prod_{i\ne j}R_i^{-1}\cdot\prod_{i=1}^{n}A_i^{-c_i}.

It rejects identity/duplicate commitments and programs the as-yet-unanswered value (m,Rj)=cj\H(m,R_j)=c_j. If that input is already assigned, it must not overwrite the table. This gives the local algebra behind simulation; a global proof couples the distributions and counts all programming conflicts. The report's simulator additionally samples distinct challenge values and bounds the statistical difference from independent hash outputs. Distinct challenges are not a rule imposed by the real signing algorithm.

This distinction prevents a common mistake: adding a rejection rule to the actual signer merely because it was convenient in a simulator. The anonymity count above uses the real signer's commitment restrictions, not the simulator's auxiliary conditioning.

Embed a useful unknown in every possible extracted branch

In the report's fixed, honestly generated ring reduction, start with a DL challenge A=gaA=g^a and choose distinct nonzero multipliers αi\alpha_i. Publish Ai=AαiA_i=A^{\alpha_i}. When AA is a nonidentity generator, this produces uniformly distributed distinct nonidentity ring keys under the corresponding sampling convention. The reduction knows the multipliers, not their secret logarithms.

Whichever branch jj changes, the quotient of the two verification equations gives

a=(zz)αj1(cjcj)1(modq).a=(z-z')\cdot\alpha_j^{-1}\cdot(c_j-c'_j)^{-1}\pmod q.

This avoids an additional guess of which honest member supplies the extracted logarithm in that fixed-ring setup. It does not simulate an adversary that asks to corrupt arbitrary ring members: their secrets remain unknown. A stronger corruption or adversarial-key model requires another reduction, rather than a silent extension of this one.

18 / System Security IIAKE reductions and the meaning of state exposure

AKE proofs must follow multiple session instances, not just a single signature forgery. A session records its role, intended peer, sent and received messages, state, acceptance and derived key. A partnering relation says which instances belong to the same exchange. A freshness predicate excludes revealing the test key and specifies permitted combinations of static and ephemeral compromise.

The session-oracle interface

Write πUj\pi_U^j for session jj at party UU. A CK-style teaching experiment separates the following operations. Their precise admissibility rules belong to the selected definition; eCK and device-leakage refinements do not merely rename this interface.

Query Effect
Send(πUj,M)\operatorname{Send}(\pi_U^j,M) Delivers message MM and obtains the protocol's next message or acceptance result
SessionKeyReveal(πUj)\operatorname{SessionKeyReveal}(\pi_U^j) Returns a completed session key
StateReveal(πUj)\operatorname{StateReveal}(\pi_U^j) Returns the session state specified by the model, not automatically every long-term secret
Corrupt(U)\operatorname{Corrupt}(U) Exposes the party's state according to the corruption definition
Expire(πUj)\operatorname{Expire}(\pi_U^j) Models deletion of completed session state where the definition supports it
Test(πUj)\operatorname{Test}(\pi_U^j) Returns the real key or a same-length random value for an eligible fresh session

Matching sessions must agree on the appropriate roles, identities and transcript. A secure experiment also requires agreement of keys for honest matching sessions. Forward secrecy then depends on which later corruptions are permitted after completion and erasure. Declaring a session expired in a proof does not guarantee that an implementation erased every copy of its state.

SIGMA uses signatures and a MAC to bind the DH exchange to identities. A proof outline partitions failure events: a false authentication may yield a signature forgery; accepting an inconsistent identity binding may yield a MAC forgery; distinguishing a fresh honestly partnered key is related to the DH and key-derivation assumptions. The simulation must show that every signing or MAC request it uses is permitted. Merely declaring all primitives secure does not prove their composition. See the original SIGMA analysis.

Agreement is not secrecy

For honest matching sessions, substituting the two local computations should give equal keys. This is a correctness property of the protocol execution. In an adversarial network, proving that the accepted transcripts really match can require authentication assumptions. Key indistinguishability is yet another property: even if the endpoints agree, an adversary might also know their key.

Use an ordered session identifier containing roles, identities and the relevant authenticated transcript. A matching partner is not simply “another session with the same nonce”. A partner may not have completed yet when the local party accepts, depending on the protocol. State which completion and partnering conditions the test interface requires rather than copying one informal slide definition into every AKE model.

For secrecy, sample a hidden bit and return either the fresh completed session's real key or an independent key of the same length. Exclude revelation of that key and its matching partner's key. Specify what happens if a later query destroys freshness. Some lecture experiments place the test at the end; other models allow continued interaction subject to freshness. These are not interchangeable experiments.

19 / System Security IIThe lecture's modified SIGMA: construction and audit

This chapter develops the historical classroom protocol, not an unpublished construction. It is distinct from standard SIGMA and from NAXOS. Its purpose is to expose the relationship between long-term and ephemeral contributions, deniable authentication, and the precise reveal cases of a reduction.

Let the initiator have secret aa and public key A=gaA=g^a, and the responder secret bb and public key B=gbB=g^b. Fresh nonzero ephemeral scalars are x,yx,y. Their transmitted points are U=AxU=A^x and V=ByV=B^y. The common secret is

ZI=Vax=gabxy=Uby=ZR.Z_I=V^{a\cdot x}=g^{a\cdot b\cdot x\cdot y} =U^{b\cdot y}=Z_R.

The lecture uses two separately labelled PRF outputs under this shared group secret: k0=FZ(0)k_0=F_Z(0) for the application key and k1=FZ(1)k_1=F_Z(1) for identity MACs. Here FF denotes a pseudorandom-function family whose key domain must be defined for the encoded group secret. In a concrete system one specifies extraction, encoding and domain separation rather than passing an arbitrary point representation to an unspecified PRF.

The three messages

Write tt for the session identifier. Let SIGb\operatorname{SIG}_b be an ordinary responder signature, RSIGa,L\operatorname{RSIG}_{a,L} a ring signature for L=(A,B)L=(A,B), and MACk1\operatorname{MAC}_{k_1} a message authentication code. The lecture flow, with field boundaries made explicit, is:

IR:(t,U),RI:(t,V,IDR,τR,ηR),IR:(t,IDI,τI,ηI),\begin{aligned} I\to R &: (t,U),\\ R\to I &: (t,V,\mathrm{ID}_R,\tau_R,\eta_R),\\ I\to R &: (t,\mathrm{ID}_I,\tau_I,\eta_I), \end{aligned}

where

τR=SIGb(1,t,U,V),ηR=MACk1(1,t,IDR),τI=RSIGa,(A,B)(0,t,U,V),ηI=MACk1(0,t,IDI).\begin{aligned} \tau_R&=\operatorname{SIG}_b(1,t,U,V),\\ \eta_R&=\operatorname{MAC}_{k_1}(1,t,\mathrm{ID}_R),\\ \tau_I&=\operatorname{RSIG}_{a,(A,B)}(0,t,U,V),\\ \eta_I&=\operatorname{MAC}_{k_1}(0,t,\mathrm{ID}_I). \end{aligned}

The roles 00 and 11 prevent reflection of one party's authentication object as the other's. Identity-to-public-key bindings and the MAC checks must be validated before acceptance. The responder's ring must be the same ordered pair of authenticated keys that the initiator used. Nonidentity/group-membership checks apply to the received DH points.

The initiator's ring signature can also be produced by the responder, which explains the intended nontransferability of that authentication evidence to an outsider. The responder's ordinary signature remains publicly attributable. This asymmetry is intentional in the displayed three-message variant; it should not be described as making every part of the exchange equally deniable.

Which compromise combinations does the slide analyse?

After honest matching sessions have accepted, the historical refinement considers four maximal reveal patterns: (x,y)(x,y), (a,b)(a,b), (x,b)(x,b) and (a,y)(a,y). It excludes revealing both a,xa,x for the initiator or both b,yb,y for the responder. If both values of one party are known, exponentiating the other received point computes ZZ immediately.

This is a post-acceptance, matching-session analysis with additional authentication restrictions. It is not a claim of unrestricted eCK security. In particular, during an active exchange, compromise of a ring member's authentication key can enable KCI as explained in System Security I. The original lecture itself distinguishes the refinement from eCK.

Reconstruct the four DDH embeddings

Give the reduction a DDH tuple (g,D=gd,E=ge,T)(g,D=g^d,E=g^e,T) with unknown d,ed,e. It wants U=DU=D, V=EV=E and to use TT as the candidate ZZ. The following table shows the algebraic setup for each reveal pattern. All scalars chosen by the reduction are nonzero so the indicated inverses exist.

Values to reveal Values sampled and known Public setup and hidden factors
x,yx,y Sample x,yx,y A=Dx1A=D^{x^{-1}}, B=Ey1B=E^{y^{-1}}; hidden a=d/xa=d/x, b=e/yb=e/y
a,ba,b Sample a,ba,b A=gaA=g^a, B=gbB=g^b; hidden x=d/ax=d/a, y=e/by=e/b
x,bx,b Sample x,bx,b A=Dx1A=D^{x^{-1}}, B=gbB=g^b; hidden a=d/xa=d/x, y=e/by=e/b
a,ya,y Sample a,ya,y A=gaA=g^a, B=Ey1B=E^{y^{-1}}; hidden x=d/ax=d/a, b=e/yb=e/y

The hidden scalar expressions explain the distribution; the reduction does not compute them. In every row Ax=DA^x=D and By=EB^y=E, hence the real shared secret is gdeg^{d\cdot e}. If TT is random, the substituted key source is independent. This makes the algebra of each case explicit, while keeping the available operations honest.

The five-game sequence and its missing obligations

Let G0G_0 be the real-key test experiment for an eligible target session. In G1G_1, replace its shared secret by an independent group element through a DDH step. In G2G_2, replace the PRF outputs at the distinct labels by independent strings. In G3G_3, keep the MAC key as in that hybrid but make the test output independent of it. In G4G_4, reverse the appropriate PRF and DH replacements for the rest of the public transcript, leaving only the test key random.

If each hop has a valid simulator, the triangle inequality adds their distinguishing bounds. Two DDH hops and two PRF hops can then produce a schematic bound 2δDDH+2δPRF2\delta_{\rm DDH}+2\delta_{\rm PRF}, before authentication errors, target-session selection and reveal-pattern guessing are included. The symbols denote the actual distinguishers' advantages, not universal numbers attached to the primitives.

The DDH table alone does not finish this proof. In some rows the reduction lacks a long-term signature key. It must still generate the required ordinary or ring signatures with the correct distribution, answer other sessions, and preserve oracle consistency. A programmable-random-oracle signature simulator is one possible ingredient only for a scheme and model that justify it. It is not available merely because an arbitrary signature scheme is EUF-CMA secure.

Similarly, an adaptive adversary may decide which reveal pattern to request only after seeing messages. A reduction that selects a row in advance must justify this selection and its loss, or use a simulator that can answer every admissible continuation. Honest-key distributions, public certificates, multiple sessions and the timing of key reveals belong in that argument. These are explicit proof obligations rather than claims that the classroom sketch already provides a complete modern AKE theorem.

Authentication and agreement in the intended model

If an initiator accepts a new responder signature on a tuple the honest responder never signed, that event yields an ordinary signature forgery under the required uncompromised-key conditions. For the other direction, a fresh accepted ring signature can yield ring forgery only if the adversary lacks every allowed signing secret in that ring. A compromised verifier is a ring signer, so that argument cannot establish KCI resistance.

When the relevant authentication conditions ensure matching (t,U,V)(t,U,V) and the two parties use their honest local factors, the equality Vax=UbyV^{a\cdot x}=U^{b\cdot y} proves key agreement. It does not by itself prove secrecy under the reveal patterns. Keeping these statements separate makes the original lesson reusable without overstating its theorem.

20 / System Security IINAXOS and exposure-aware proof design

A seed is not the derived exponent

Here \H is the domain-separated scalar oracle denoted H1H_1 in NAXOS; KDF\mathsf{KDF} denotes its independent session-key oracle H2H_2, with the required bit-string output. Let Alice's static key be aa, Bob's be bb, with public keys A=gaA=g^a and B=gbB=g^b. Let rA,rBr_A,r_B be ephemeral seeds. Define x=(rA,a)x=\H(r_A,a) and y=(rB,b)y=\H(r_B,b), then exchange X=gxX=g^x and Y=gyY=g^y. With ordered identities included, the DH inputs agree:

KA=KDF(Ya,Bx,Yx,Alice,Bob),KB=KDF(Ay,Xb,Xy,Alice,Bob).\begin{aligned} K_A&=\mathsf{KDF}(Y^a,B^x,Y^x,\mathrm{Alice},\mathrm{Bob}),\\ K_B&=\mathsf{KDF}(A^y,X^b,X^y,\mathrm{Alice},\mathrm{Bob}). \end{aligned}

The first components are both gayg^{a\cdot y}, the second both gbxg^{b\cdot x}, and the third both gxyg^{x\cdot y}. The security model specifies exposure of the ephemeral seeds. Revealing xx itself, changing the derivation function, or learning a party's static key and its seed together may be outside the freshness conditions supporting the theorem. This is why “hashing the nonce makes it leakage-resistant” is not a sufficient claim. Consult LaMacchia, Lauter and Mityagin, Stronger Security of Authenticated Key Exchange.

Exercise. For each exposure pattern, list which of the three DH components the adversary can compute. Then state whether the session is fresh under the selected model. Do not conclude insecurity merely because an excluded experiment is trivially solvable, or claim protection for a reveal interface absent from the theorem.

Expand every shared component

Alice can compute YaY^a from her static key and Bob's received point, BxB^x from her derived exponent and Bob's public key, and YxY^x from that exponent and point. Bob computes the corresponding Ay,Xb,XyA^y,X^b,X^y. Equality follows term by term, not from a vague appeal to Diffie–Hellman. The identities must occur in the same agreed order, rather than each party placing its own name first.

Now suppose the model reveals Alice's seed rAr_A but not aa. The adversary cannot simply evaluate (rA,a)\H(r_A,a) because one input is missing. If it instead receives Alice's derived exponent xx, it can compute BxB^x and YxY^x immediately. The remaining component YaY^a may still be unavailable in a particular honest-partner case, but in an active attack the adversary may choose a peer point with known exponent. Analyse the complete session, not only a list of independent secrets.

The published NAXOS analysis splits exposure and partnering cases and uses precisely defined hash and reveal interfaces. A classroom implementation should record the seed and exponent as separate fields so tests cannot accidentally model the wrong reveal operation. It should also record which case the proof invokes. Erasing a seed in a model does not guarantee the runtime erased temporary exponent copies.

21 / System Security IIStorage soundness, extraction and private evaluation

Three cloud claims require three different arguments. Audit completeness says that an honest stored file passes. Retrievability says that sufficiently successful answers let an extractor recover the encoded file. Computation privacy says that an evaluator's view leaks only what the model permits. None is a substitute for another.

For the linear storage audit, let the unknown block vector be mZqN\mathbf m\in\mathbb Z_q^N. A valid scalar response has the form μj=vjm\mu_j=\mathbf v_j\cdot\mathbf m, where vj\mathbf v_j contains the challenge coefficients, with zero entries outside the selected indices. Stack responses into Vm=μV\cdot\mathbf m=\boldsymbol\mu. Recovery by linear algebra requires rank(V)=N\operatorname{rank}(V)=N. Repeating the same accepting query produces the same row and does not improve rank.

Repeated valid equations may have rank one. Recovering a two-block file needs rank two and authentic linear responses.
Acceptance is a local check. Extraction needs enough independent information about the complete encoded object.

This matrix argument assumes that accepted responses are the correct linear combinations. A security proof must first justify that fact against a malicious prover, or bound the probability of false acceptance using the construction's assumption. It must then establish that a sufficiently successful prover yields enough independent equations. Erasure decoding, if used, is a further explicit step. The multi-copy PDP attacks show what goes wrong when the accepted relation instead describes a smaller, lossy representation.

Privacy changes the interface again. If an unmasked public auditor can obtain a full-rank system of plaintext responses, the auditor can itself recover the blocks. A privacy-preserving audit therefore needs a different response profile and a proof compatible with extraction. “We mask the scalar” is incomplete unless verification and the extractor are both specified.

For homomorphic evaluation, separate the encryption security game from a claim about the server's answer. A server may return a valid encryption of the wrong result without distinguishing any encrypted input. Conversely, an honest correct result can reveal sensitive information if the output function permits it. Write down the function, authorised output and input/output bounds before selecting a primitive.

Proof checkpoint. For each statement, list the reduction's input, its oracle access, what it must simulate, and what its final output solves. A DL solver, a file extractor and a privacy simulator have different output types. Reusing the word “proof” does not make their compositions interchangeable.

22 / System Security IIProof laboratory

Submit an implementation, a mathematical argument and adversarial tests. Use the same variable meanings in all three. Every proof should explicitly separate setup, query simulation, extraction and probability accounting.

  1. Schnorr: prove transcript-distribution equality, implement a resettable prover and verify special soundness. Include rejection and equal-challenge branches.
  2. Okamoto: implement two-scalar responses, extract a representation, and recover the generator relation only when the extracted witness differs. Explain why the reduction can answer active training sessions.
  3. Fiat–Shamir: build a lazy oracle table and signing simulator. A repeated query must return the same answer. A forced programming collision must trigger the documented failure path.
  4. Pairings: implement BLS verification with typed G1G_1, G2G_2 and scalar values. Include malformed-input and wrong-message tests. Keep this separate from the symmetric leakage-response derivation.
  5. Two signature proofs: compare RSA-FDH's target-query embedding with Schnorr's forking reduction. For Goh–Jarecki identify why the group element in the forgery changes the extraction strategy.
  6. Encryption: write the ElGamal DDH hybrid and the hashed-ElGamal query-selection reduction. Give a complete bound with your query-count and advantage conventions.
  7. Anonymity: implement the Herranz–Sáez sampler on a small test ring and enumerate its output distribution for two different signers. Preserve rejection of duplicate/identity commitments. Separately implement the OR composition and explain why its verification and fork conditions differ.
  8. AKE: record sessions and reveal queries for SIGMA and NAXOS. Identify the exact freshness clause used in each claimed security case.

The MCL library, existing identification demos and Okamoto demo support implementation work. Use cryptographic randomness and properly validated group encodings for realistic tests. Toy arithmetic is appropriate for tracing equations, not for making security or performance claims about deployed systems.

Required evidence for a proof implementation

For each experiment, include an honest accepting run, each documented adversarial branch and the expected failure cases. Assert that repeated oracle queries return identical answers, restored prefixes stay identical and forked suffixes do not accidentally reuse stale state. An extractor must reject equal challenges, a changed commitment or an invalid transcript rather than print a meaningless scalar.

Give the exact distribution sampled by every random choice. For the ring exercise, a histogram based on a few signatures is not an anonymity proof. For the toy group, enumerate accepted tuples and their weights. Explain why the accepted closing commitment has probability 1/(qn)1/(q-n) and why failed signing attempts are not separate public signatures.

For real group operations, use the existing MCL/WebAssembly demonstrations and documented library functions. Keep a scalar, a G1G_1 point, a G2G_2 point and a GTG_T element as different types. Include a wrong-message BLS test and a mismatched-public-key test. None of these checks licenses replacing hash-to-curve by public scalar encoding.

23 / System Security IIProof clinic: common mistakes and repairs

“The adversary answered once, so a rewind gives a second answer.”

A successful first branch does not force a second success. Restore the correct state, define the accepting-challenge fraction and compute the joint event. For identification, this gives the square-minus-diagonal expression. For Fiat–Shamir, the selected query index adds another constraint. A rejection on the second branch is a failed extraction attempt, not evidence that special soundness is false.

“The simulator computes the unknown nonce from the response.”

It must not do so if that calculation requires the secret key in the challenge. For Schnorr simulation, sample the response and challenge, then compute the commitment from the public equation. The hidden nonce appears only in the distribution proof, where a bijection explains why the simulated transcript has the correct law.

“The ring signature is anonymous because every member can sign.”

Signing capability is insufficient. One member could use a visibly biased nonce distribution or put its index in the signature. Prove equality of output distributions for the specified sampler. The Herranz–Sáez count assigns the same probability to every fixed valid tuple for each candidate signer, including the rejection-sampling step.

“A forgery gives one ring member's key, so it solves the target problem.”

Only if the reduction connected that member to its challenge. The fixed-ring embedding puts a known nonzero multiple of the same unknown logarithm in every ring key. An adversarially registered or corrupted member changes this argument. An extractor returning a key the adversary already knew may be useless for the intended reduction.

“Every random oracle response is a fresh random value.”

Only the first response at an input is fresh. Repeated queries use the stored value. A signing simulator cannot change an answer that the adversary has already received. A rewind creates a different experiment branch with the same prefix, not a license to contradict an answer inside one branch.

“Anonymity and unforgeability use the same assumptions.”

Not necessarily. In the fixed-ring Herranz–Sáez transcript calculation, anonymity is information-theoretic and works for a fixed hash function. The unforgeability argument is computational, uses the random-oracle model and relies on a hard DL problem. Disclosing signing randomness changes the anonymity view and lies outside that transcript-only statement.

“The library supports pairings, so the symmetric proof is implemented.”

Check types. A Type-3 API pairs a G1G_1 point with a G2G_2 point. An old derivation that uses one source group in both positions cannot be copied literally. Decide which public multiples must be available in each source group, specify the challenge tuple, and verify that every simulator operation is still computable.

24 / System Security IIPublished references

The companion System Security I supplies the attack traces. Security in Cloud Computing develops applications to outsourced storage and private computation. These notes use course material and published literature only.