Documentation

CslibFrontier.Crypto.Protocols.UOV.Attacks

Rescaling attacks against homogeneous preimage games #

rescaleAttack makes one oracle call and scales the answer. For a homogeneous quadratic public map P, its two instantiations distinguish security notions that must not be confused:

structuredTarget F G w r = (F r + w, G r) makes the semantic message separate from its opening. The blocks may be arbitrary functions: only their values at zero matter here, so the same interface covers both homogeneous and inhomogeneous quadratic blocks. A nonzero tail at zero blocks this specific fixed-opening rescaling (rescale_ne_zeroOpening_of_tail_ne_zero); it is not a security theorem for the corrected construction.

The attack programs and their exact probabilities are original game-level results. The rescaling results require correct oracle answers only on the single query made, and do not implement a UOV signer. The raw zero-target forgery does not query the oracle or require its correctness. Their query certificates bound external calls, not running time. Classical-ROM hash-and-sign composition for abstract trapdoor preimage systems (including UOV.idealRawScheme) is supplied in Cslib.Crypto.UOV.HashAndSign, while the concrete round-3 UOV signer, concrete Keccak-p[800, 12], and runtime PPT certificates remain tracked in #4987 and #7068.

Main definitions #

Main results #

References #

def Cslib.Crypto.UOV.rescaleAttack {K X Query : Type} [Field K] [AddCommGroup X] [Module K X] (a : K) (query : Query) :
ProbOracleComp (fun (x : Query) => X) X

Ask the supplied oracle query once, and multiply its answer by a. The query is explicit so the same program serves raw and structured preimage games.

theorem Cslib.Crypto.UOV.rescaleAttack_queryBound {K X Query : Type} [Field K] [AddCommGroup X] [Module K X] (a : K) (query : Query) :

The rescaling attack uses at most one external oracle call, independently of its reply.

theorem Cslib.Crypto.UOV.rescaleAttack_freshTarget {K X : Type} [Field K] [AddCommGroup X] [Module K X] {Y : Type} [AddCommGroup Y] [Module K Y] [DecidableEq Y] (P : QuadraticMap K X Y) (a : K) (y : Y) (ha : a ≠ 0) (hsquare : a * a ≠ 1) (hy : y ≠ 0) (oracle : Y → ProbComp X) (hanswer : ∀ answer ∈ (oracle ((a * a)⁻¹ • y)).eval.support, P answer = (a * a)⁻¹ • y) :
PMF.map (fun (result : X × List (Y × X)) => decide (P result.1 = y ∧ y ∉ List.map Prod.fst result.2 ∧ result.2.length = 1)) ((rescaleAttack a ((a * a)⁻¹ • y)).runLog oracle).eval = PMF.pure true

For a nonzero target, one correct answer at the inverse-squared target gives a valid preimage of an unqueried target with probability one. This is an attack on that freshness game, not on the fixed-budget one-more game that asks for more challenge preimages than queries.

def Cslib.Crypto.UOV.structuredTarget {Message Tail Opening : Type} [AddCommGroup Message] (front : Opening → Message) (tail : Opening → Tail) (message : Message) (opening : Opening) :
Message × Tail

The ACT-MQ target: the semantic message is added to the first block of the opening map, while the second block binds the opening. This expression also permits constant terms.

theorem Cslib.Crypto.UOV.rescaleAttack_zeroOpening {K X : Type} [Field K] [AddCommGroup X] [Module K X] {Message Tail Opening : Type} [AddCommGroup Message] [Module K Message] [AddCommGroup Tail] [Module K Tail] [Zero Opening] [DecidableEq Message] [DecidableEq Tail] (P : QuadraticMap K X (Message × Tail)) (front : Opening → Message) (tail : Opening → Tail) (hfront : front 0 = 0) (htail : tail 0 = 0) (a : K) (hsquare : a * a ≠ 1) (message : Message) (hmessage : message ≠ 0) (oracle : Message × Opening → ProbComp X) (hanswer : ∀ answer ∈ (oracle (message, 0)).eval.support, P answer = structuredTarget front tail message 0) :
PMF.map (fun (result : X × List ((Message × Opening) × X)) => decide (P result.1 = structuredTarget front tail ((a * a) • message) 0 ∧ (a * a) • message ∉ List.map (fun (x : (Message × Opening) × X) => match x with | ((msg, snd), snd_1) => msg) result.2 ∧ result.2.length = 1)) ((rescaleAttack a (message, 0)).runLog oracle).eval = PMF.pure true

When both blocks vanish at zero, the one-call rescaling program certifies a fresh semantic message with probability one. Freshness ignores the opening. This abstract vector statement does not assert that scalar multiplication preserves an application's message-format predicate.

theorem Cslib.Crypto.UOV.verify_scale_of_quadratic {K X : Type} [Field K] [AddCommGroup X] [Module K X] {Message Tail Opening : Type} [AddCommGroup Message] [Module K Message] [AddCommGroup Tail] [Module K Tail] [Zero Opening] {PK SK : Type} [DecidableEq Message] [DecidableEq Tail] (pubMap : PK → QuadraticMap K X (Message × Tail)) (S : Signature.Scheme PK SK (Message × Tail) X) (hver : ∀ (pk : PK) (target : Message × Tail) (s : X), S.verify pk target s = decide ((pubMap pk) s = target)) (F : Opening → Message) (G : Opening → Tail) (hF : F 0 = 0) (hG : G 0 = 0) {pk : PK} {μ : Message} {s : X} (hs : S.verify pk (structuredTarget F G μ 0) s = true) (a : K) :
S.verify pk (structuredTarget F G ((a * a) • μ) 0) (a • s) = true

Scaling a valid raw preimage under a homogeneous quadratic map when F 0 = 0 and G 0 = 0 yields a valid preimage for (a * a) • μ at opening 0.

theorem Cslib.Crypto.UOV.verify_scale_option_of_quadratic {K X : Type} [Field K] [AddCommGroup X] [Module K X] {Message Tail Opening : Type} [AddCommGroup Message] [Module K Message] [AddCommGroup Tail] [Module K Tail] [Zero Opening] {PK SK : Type} [DecidableEq Message] [DecidableEq Tail] (pubMap : PK → QuadraticMap K X (Message × Tail)) (S : Signature.Scheme PK SK (Message × Tail) (Option X)) (hver : ∀ (pk : PK) (target : Message × Tail) (opt : Option X), S.verify pk target opt = match opt with | none => false | some s => decide ((pubMap pk) s = target)) (F : Opening → Message) (G : Opening → Tail) (hF : F 0 = 0) (hG : G 0 = 0) {pk : PK} {μ : Message} {opt : Option X} (hopt : S.verify pk (structuredTarget F G μ 0) opt = true) (a : K) :
S.verify pk (structuredTarget F G ((a * a) • μ) 0) (Option.map (fun (x : X) => a • x) opt) = true

Optional-preimage (Option X) scaling helper matching the verifier shape of UOV.idealRawScheme: scaling with Option.map (a • ·) preserves validity under a homogeneous quadratic verifier when F 0 = 0 and G 0 = 0.

theorem Cslib.Crypto.UOV.rescale_ne_zeroOpening_of_tail_ne_zero {K X : Type} [Field K] [AddCommGroup X] [Module K X] {Message Tail Opening : Type} [AddCommGroup Message] [Module K Message] [AddCommGroup Tail] [Module K Tail] [Zero Opening] (P : QuadraticMap K X (Message × Tail)) (front : Opening → Message) (tail : Opening → Tail) (htail : tail 0 ≠ 0) (a : K) (hsquare : a * a ≠ 1) {answer : X} {message : Message} (hanswer : P answer = structuredTarget front tail message 0) (message' : Message) :
P (a • answer) ≠ structuredTarget front tail message' 0

A nonzero tail at zero blocks this fixed-opening rescaling: no semantic message can make the scaled preimage verify at opening zero when the squared scalar is not one. This rules out only the specified attack, not other openings or other attacks.

Raw certification is not a signature security assumption #

def Cslib.Crypto.UOV.rawZeroForger {F : Type} [Field F] {v o : ℕ} :
MultivariateQuadraticMap F (Fin (v + o)) (Fin o) → ProbOracleComp (fun (x : Fin o → F) => Option (Fin (v + o) → F)) ((Fin o → F) × Option (Fin (v + o) → F))

The all-zero preimage certifies target zero under every homogeneous UOV public map. This attacker is relevant to raw target EUF-CMA, whose output target is adversary-chosen.

The raw zero-target forgery makes no oracle call.

theorem Cslib.Crypto.UOV.eval_rawZeroForger {F : Type} [Field F] [Fintype F] [DecidableEq F] {v o : ℕ} (derive : IdealKeyMaterial F v o → (Fin o → F) → ProbComp (Option (Fin (v + o) → F))) :

Raw-target EUF-CMA succeeds with probability one even if the oracle always fails. Consequently the generic target-forgery/binding partition alone cannot justify ACT-MQ security; its structured-message game and the random-target one-more game remain separate problems.