Documentation

CslibFrontier.Crypto.Protocols.Signature.OneMore

Random-target and one-more certification games #

The interface of Signature.Scheme also describes a many-to-one trapdoor preimage sampler: the message is the target, the signature is a preimage, and verification checks its image. Using this interface imposes neither injectivity nor EUF-CMA security.

targetExperiment samples a target independently of a secret preimage. multiTargetExperiment publishes an indexed target vector and asks for one valid preimage. oneMoreExperiment gives the same vector and a chosen-target signing oracle, and asks for budget + 1 valid answers at distinct indices, after at most budget oracle calls. Every call is logged, including repeated queries; queries need not be among the targets. Programs exceeding the budget lose. The target sampler is explicit: PoMFRIT uses independent uniform targets, while other samplers define different games. Target values may collide.

These are finite classical program experiments, not assertions of hardness or polynomial time. The source VOLE-IHAT reduction additionally requires proof extraction and random-oracle programming; those composition obligations are tracked in issue #7068.

Main definitions #

Main results #

References #

A candidate preimage for one of N published target slots.

  • index : Fin N

    The challenged slot, rather than a target value chosen by the attacker.

  • preimage : Sig

    The proposed certificate or preimage.

def Cslib.Crypto.Signature.targetExperiment {PK SK M Sig : Type} (S : Scheme PK SK M Sig) (target : PK → ProbComp M) (A : PK → M → ProbComp Sig) :

Invert an independently sampled target; any verifying answer wins.

def Cslib.Crypto.Signature.multiTargetExperiment {PK SK M Sig : Type} {N : ℕ} (S : Scheme PK SK M Sig) (targets : PK → ProbComp (Fin N → M)) (A : PK → (Fin N → M) → ProbComp (PreimageClaim N Sig)) :

Solve one slot of an explicitly sampled target vector, without a signing oracle.

def Cslib.Crypto.Signature.oneMoreAccept {PK SK M Sig : Type} {N : ℕ} (S : Scheme PK SK M Sig) (pk : PK) (targets : Fin N → M) (budget : ℕ) (claims : List (PreimageClaim N Sig)) (log : List (M × Sig)) :

The fixed-budget one-more test. Calls count with multiplicity; only output indices must be distinct. In particular, the test does not impose freshness relative to oracle queries.

def Cslib.Crypto.Signature.oneMoreExperiment {PK SK M Sig : Type} {N : ℕ} (S : Scheme PK SK M Sig) (targets : PK → ProbComp (Fin N → M)) (budget : ℕ) (A : PK → (Fin N → M) → ProbOracleComp (fun (x : M) => Sig) (List (PreimageClaim N Sig))) :

The fixed-budget one-more game. Its signer answers arbitrary targets using the supplied algorithm, whose distribution is retained exactly. Excess-query executions lose.

theorem Cslib.Crypto.Signature.oneMoreAccept_implies_budget_lt {PK SK M Sig : Type} {N : ℕ} {S : Scheme PK SK M Sig} {pk : PK} {targets : Fin N → M} {budget : ℕ} {claims : List (PreimageClaim N Sig)} {log : List (M × Sig)} (h : oneMoreAccept S pk targets budget claims log = true) :
budget < N

Winning requires at least budget + 1 different slots. The game is impossible when N ≤ budget, independently of the signer or attacker.

def Cslib.Crypto.Signature.liftMultiTarget {PK M Sig : Type} {N : ℕ} (A : PK → (Fin N → M) → ProbComp (PreimageClaim N Sig)) (pk : PK) (ys : Fin N → M) :
ProbOracleComp (fun (x : M) => Sig) (List (PreimageClaim N Sig))

Regard a one-target solution as a singleton output in the zero-query one-more game.

theorem Cslib.Crypto.Signature.liftMultiTarget_queryBounded {PK M Sig : Type} {N : ℕ} (A : PK → (Fin N → M) → ProbComp (PreimageClaim N Sig)) (pk : PK) (ys : Fin N → M) :

This embedding makes no signing query, regardless of the attacker's private randomness.

theorem Cslib.Crypto.Signature.oneMore_liftMultiTarget {PK SK M Sig : Type} {N : ℕ} (S : Scheme PK SK M Sig) (targets : PK → ProbComp (Fin N → M)) (A : PK → (Fin N → M) → ProbComp (PreimageClaim N Sig)) :

The zero-query one-more game includes the ordinary multiple-target game with no loss.

theorem Cslib.Crypto.Signature.multiTarget_singleton {PK SK M Sig : Type} (S : Scheme PK SK M Sig) (target : PK → ProbComp M) (A : PK → M → ProbComp Sig) :
(multiTargetExperiment S (fun (pk : PK) => (fun (y : M) (x : Fin 1) => y) <$> target pk) fun (pk : PK) (ys : Fin 1 → M) => (fun (s : Sig) => { index := 0, preimage := s }) <$> A pk (ys 0)) = targetExperiment S target A

A single slot is the ordinary independently sampled target experiment.

A concrete collision strategy #

def Cslib.Crypto.Signature.signingCorrectnessExperiment {PK SK M Sig : Type} (S : Scheme PK SK M Sig) (target : PK → ProbComp M) :

Measure the signer's validation rate on an explicitly sampled target. Unlike Scheme.Correct, this experiment retains invalid answers and explicit failures encoded in the signature type.

def Cslib.Crypto.Signature.collisionAttack {PK M Sig : Type} :
PK → (targets : Fin 2 → M) → ProbOracleComp (fun (x : M) => Sig) (List (PreimageClaim 2 Sig))

Make one signing query for the first target and use its answer for both slots.

theorem Cslib.Crypto.Signature.collisionAttack_queryBounded {PK M Sig : Type} (pk : PK) (targets : Fin 2 → M) :

The collision strategy makes at most one signing call on every path.

theorem Cslib.Crypto.Signature.eval_oneMore_collisionAttack {PK SK M Sig : Type} [DecidableEq M] (S : Scheme PK SK M Sig) (hfunctional : ∀ (pk : PK) (y z : M) (s : Sig), S.verify pk y s = true → S.verify pk z s = true → y = z) (targets : PK → ProbComp (Fin 2 → M)) :
ProbComp.eval (oneMoreExperiment S targets 1 collisionAttack) = (do let keys ← S.keyGen let ys ← targets keys.1 let s ← S.sign keys.2 (ys 0) pure (decide (ys 0 = ys 1) && S.verify keys.1 (ys 0) s)).eval

For a verifier assigning at most one target to each answer, the one-query collision attack succeeds exactly when the two targets agree and the oracle's answer verifies. In particular, no perfect-correctness premise excludes degenerate UOV keys or inversion failures.

theorem Cslib.Crypto.Signature.succProbability_collisionAttack_of_uniform {PK SK M Sig : Type} [Fintype M] [Nonempty M] (S : Scheme PK SK M Sig) (hfunctional : ∀ (pk : PK) (y z : M) (s : Sig), S.verify pk y s = true → S.verify pk z s = true → y = z) (targets : PK → ProbComp (Fin 2 → M)) (htargets : ∀ (pk : PK), (targets pk).eval = Probability.PMF.uniformOfFintype (Fin 2 → M)) :

On any two-slot target sampler whose law is uniform on Fin 2 → M, the collision strategy succeeds with the signer's validation probability divided by card M.

theorem Cslib.Crypto.Signature.succProbability_collisionAttack_uniform {PK SK M Sig : Type} [Fintype M] [Nonempty M] (S : Scheme PK SK M Sig) (hfunctional : ∀ (pk : PK) (y z : M) (s : Sig), S.verify pk y s = true → S.verify pk z s = true → y = z) :

On two independent uniform targets ProbComp.uniform (Fin 2 → M), the collision strategy succeeds with the signer's validation probability divided by card M. For UOV targets M = Fin m → F, the collision factor is |F|⁻ᵐ; the separate validation factor retains failed preimage derivations.