Documentation

CslibFrontier.Crypto.Protocols.UOV.Games

Ideal UOV keys and raw preimage certification #

The ideal UOV problem samples o homogeneous oil-and-vinegar quadratic polynomials in v + o variables and an independent uniform invertible linear change of input variables. Here the first v coordinates are vinegar coordinates and the last o are oil coordinates. A full coefficient table is sampled uniformly, and only entries i ≤ j with i < v contribute to the central map. Thus each allowed quadratic monomial has an independent uniform coefficient, while no oil-oil monomial occurs. Unused entries are retained as secret randomness irrelevant to the public map. The public map is P = Q ∘ T, with T the hiding equivalence. This is the ideal key distribution of [UOV2026, Appendix A, Definition 2, p. 49], not its seed-expanded implementation key generation.

idealRawScheme packages these keys and equality verification in the shared Signature.Scheme interface. Its total finite preimage derivation program returns an optional preimage: none records failure and always rejects, while some s is checked by P s = target. Failure probability is retained without conditioning. This matters even for ideal keys, whose support includes zero maps. The program is an explicit parameter: the construction asserts neither that it succeeds nor that it has UOV's source signing distribution or unbounded retry behavior. Implementing and verifying that algorithm remains issue #4987, with the algebraic precursor in #5219.

For the ordinary UOV experiment, pass this scheme and the independent sampler fun _ => ProbComp.uniform (Fin o → F) to Signature.targetExperiment. For the multiple-target and one-more variants, pass fun _ => ProbComp.uniform (Fin N → Fin o → F) to Signature.multiTargetExperiment or Signature.oneMoreExperiment. The latter samples all targets independently and retains the exact supplied preimage-oracle distribution. The ordinary experiment never invokes that oracle; ordinary preimage answers embed using some. Target sampling is not the image of a sampled preimage. These are exact finite classical programs; finite enumeration here carries no efficiency certificate, asymptotic hardness assertion, or quantum random-oracle claim.

Main definitions #

Main results #

References #

structure Cslib.Crypto.UOV.IdealKeyMaterial (F : Type) [Field F] (v o : ℕ) :

Ideal OV coefficient randomness together with an independently sampled input hiding map. Only upper-triangular entries having a vinegar row contribute to the polynomial map.

  • coefficients : Fin o → Matrix (Fin (v + o)) (Fin (v + o)) F

    Uniform independent coefficients; inactive entries are ignored by centralMap.

  • inputEquiv : (Fin (v + o) → F) ≃ₗ[F] Fin (v + o) → F

    The invertible map from public input coordinates to central input coordinates.

def Cslib.Crypto.UOV.centralMap {F : Type} [Field F] (v o : ℕ) (A : Fin o → Matrix (Fin (v + o)) (Fin (v + o)) F) :

The homogeneous OV map with one independent coefficient for every allowed monomial. Upper-triangular indexing counts each monomial once, including in characteristic two.

def Cslib.Crypto.UOV.oilSubspace (F : Type) [Field F] (v o : ℕ) :
Submodule F (Fin (v + o) → F)

Vectors whose vinegar coordinates vanish; the remaining coordinates are the oil variables.

theorem Cslib.Crypto.UOV.centralMap_vanishesOn {F : Type} [Field F] {v o : ℕ} (A : Fin o → Matrix (Fin (v + o)) (Fin (v + o)) F) :

Every monomial contains a vinegar variable, so the entire central oil subspace maps to zero.

The public UOV map, with hiding orientation P = Q ∘ T.

Input hiding transports the central oil subspace by the inverse image of the hiding map.

noncomputable def Cslib.Crypto.UOV.idealKeyGen (F : Type) [Field F] [Fintype F] [DecidableEq F] (v o : ℕ) :

Exact ideal key generation: independent uniform coefficient entries and uniform invertible input hiding. Enumerating all linear equivalences is a finite model, not an efficiency claim.

noncomputable def Cslib.Crypto.UOV.idealRawScheme {F : Type} [Field F] {v o : ℕ} [Fintype F] [DecidableEq F] (derivePreimage : IdealKeyMaterial F v o → (Fin o → F) → ProbComp (Option (Fin (v + o) → F))) :
Signature.Scheme (MultivariateQuadraticMap F (Fin (v + o)) (Fin o)) (IdealKeyMaterial F v o) (Fin o → F) (Option (Fin (v + o) → F))

Ideal UOV keys and the caller's exact finite preimage derivation program, with explicit failure. none rejects; some s verifies by equality. Failure probability is not conditioned away. This definition does not claim signer correctness or instantiate the source signer.