Documentation

CslibFrontier.Crypto.Computational.Lattice.MR07Shorten

Finite lattice basis shortening step for GIVP from IncGDD #

This module formalizes the finite geometric shortening step, exact executable rational orthogonal target construction, Hadamard potential-drop iteration bound, and deterministic oracle-loop soundness underlying [MR07a], Lemma 5.10 (December 27, 2005 author's copy, §5.3, p. 24).

Given a full-rank family S of n = rank L linearly independent vectors in a lattice L, either S already solves GIVP^φ_{8γ} (‖S‖ ≤ 8γ φ(L)), or (L, S, ‖S‖ / 8) is a valid instance of IncGDD^φ_{γ, 8} (isSolution_givp_or_isValidInstance_incGDD). Selecting a longest vector S i* (‖S i*‖ = ‖S‖) and a target t orthogonal to {S j : j ≠ i*} with (1/2) ‖S‖ ≤ ‖t‖ ≤ (9/16) ‖S‖, any IncGDD^φ_{γ, 8} solution u ∈ L (‖u - t‖ ≤ (1/4) ‖S‖) preserves linear independence, never increases ‖S‖, and shrinks sqNormProd S = ∏ j, ‖S j‖² by at least (13/16)² (shortenStep_of_incGDD).

When L has integral inner products (∀ x ∈ L, ∀ y ∈ L, ∃ z : ℤ, ⟪x, y⟫ = z, as discharged for integer-span lattices by Cslib.Algorithms.LatticeReduction.exists_int_inner_of_mem_span), Hadamard's inequality via Cslib.Algorithms.LatticeReduction.one_le_gramPrefixDet bounds sqNormProd S ≥ 1, so any chain of shortening steps starting from ‖S₀ i‖² ≤ B has length strictly less than shortenRoundBound n B = 2 * n * (Nat.log 2 B + 1) (shortenSteps_lt_bound). For rational families S : Fin (m + 1) → Fin (m + 1) → ℚ, ratOrthoTarget computes a valid rational target without square roots using Cslib.LinearAlgebra.ratKernelBasis and Nat.sqrt (ratOrthoTarget_spec).

Both a halting round-indexed oracle loop (shortenLoop, shortenLoop_isSolution_givp) and an unconditional fixed-iteration guarded step (shortenGuardedStep, shortenGuardedStep_invariants, shortenGuardedStep_of_incGDD, shortenGuardedIter_isSolution_givp) are provided for downstream randomized PPT reductions. This module proves the finite deterministic/guarded shortening steps only; probabilistic amplification, strict-PPT accounting, and the asymptotic GIVP/SIVP to SIS reduction are separate work.

Main definitions #

Main results #

References #

1. Abstract Euclidean One-Round Shortening Geometry #

noncomputable def Cslib.Crypto.MR07Shorten.sqNormProd {E : Type u_1} [NormedAddCommGroup E] {n : ℕ} (S : Fin n → E) :

Product of squared Euclidean norms of a family of vectors, used as the shortening potential.

The squared-norm product is nonnegative.

theorem Cslib.Crypto.MR07Shorten.sqNormProd_le_pow {E : Type u_1} [NormedAddCommGroup E] {n : ℕ} {S : Fin n → E} {B : ℝ} (hB : ∀ (i : Fin n), ‖S i‖ ^ 2 ≤ B) :

If every vector has squared norm at most B, then sqNormProd S ≤ B ^ n.

theorem Cslib.Crypto.MR07Shorten.shortenStep_norm_le {E : Type u_1} [NormedAddCommGroup E] {n : ℕ} {S : Fin n → E} {t u : E} (ht_hi : ‖t‖ ≤ 9 / 16 * ‖S‖) (hu_dist : ‖u - t‖ ≤ 1 / 4 * ‖S‖) :
‖u‖ ≤ 13 / 16 * ‖S‖

The replacement vector u has norm at most (13 / 16) * ‖S‖.

theorem Cslib.Crypto.MR07Shorten.shortenStep_pi_norm_le {E : Type u_1} [NormedAddCommGroup E] {n : ℕ} {S : Fin n → E} {i : Fin n} {t u : E} (ht_hi : ‖t‖ ≤ 9 / 16 * ‖S‖) (hu_dist : ‖u - t‖ ≤ 1 / 4 * ‖S‖) :

Monotone norm invariant: replacing S i by u never increases ‖S‖.

theorem Cslib.Crypto.MR07Shorten.shortenStep_sqNormProd_le {E : Type u_1} [NormedAddCommGroup E] {n : ℕ} {S : Fin n → E} {i : Fin n} {t u : E} (hi : ‖S i‖ = ‖S‖) (ht_hi : ‖t‖ ≤ 9 / 16 * ‖S‖) (hu_dist : ‖u - t‖ ≤ 1 / 4 * ‖S‖) :
sqNormProd (Function.update S i u) ≤ (13 / 16) ^ 2 * sqNormProd S

Strict potential drop: replacing a longest vector S i (‖S i‖ = ‖S‖) multiplies sqNormProd S by at most (13 / 16) ^ 2.

theorem Cslib.Crypto.MR07Shorten.isSolution_givp_or_isValidInstance_incGDD {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] (φ : Submodule ℤ E → ℝ) (γ : ℝ) (L : Submodule ℤ E) (S : Fin (Module.finrank ℤ ↥L) → E) (hS_li : LinearIndependent ℝ S) (hS_mem : ∀ (j : Fin (Module.finrank ℤ ↥L)), S j ∈ L) :
GIVP.IsSolution φ (8 * γ) L S ∨ IncGDD.IsValidInstance φ γ L S (‖S‖ / 8)

Dichotomy: a full-rank family S in L either already solves GIVP^φ_{8γ} or forms a valid IncGDD^φ_{γ, 8} instance at radius r = ‖S‖ / 8.

theorem Cslib.Crypto.MR07Shorten.shortenStep_linearIndependent {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace ℝ E] {n : ℕ} {S : Fin n → E} (hS : LinearIndependent ℝ S) {i : Fin n} {t u : E} (ht_orth : ∀ (j : Fin n), j ≠ i → inner ℝ t (S j) = 0) (ht_lo : 1 / 2 * ‖S‖ ≤ ‖t‖) (hu_dist : ‖u - t‖ ≤ 1 / 4 * ‖S‖) :

Replacing the longest vector S i* by any vector u within (1 / 4) * ‖S‖ of a target t orthogonal to {S j : j ≠ i*} of norm ‖t‖ ≥ (1 / 2) * ‖S‖ preserves linear independence.

theorem Cslib.Crypto.MR07Shorten.shortenStep_of_incGDD {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace ℝ E] {L : Submodule ℤ E} {S : Fin (Module.finrank ℤ ↥L) → E} (hS_li : LinearIndependent ℝ S) (hS_mem : ∀ (j : Fin (Module.finrank ℤ ↥L)), S j ∈ L) {i : Fin (Module.finrank ℤ ↥L)} (hi : ‖S i‖ = ‖S‖) {t u : E} (ht_orth : ∀ (j : Fin (Module.finrank ℤ ↥L)), j ≠ i → inner ℝ t (S j) = 0) (ht_lo : 1 / 2 * ‖S‖ ≤ ‖t‖) (ht_hi : ‖t‖ ≤ 9 / 16 * ‖S‖) (hu : IncGDD.IsSolution 8 L S t (‖S‖ / 8) u) :

Bridge from IncGDD.IsSolution 8 L S t (‖S‖ / 8) u to the one-round shortening invariants.

2. Hadamard Potential Lower Bound & Finite Iteration Bound #

Hadamard lower bound for linearly independent families with integral Gram matrix, proved via Cslib.Algorithms.LatticeReduction.one_le_gramPrefixDet.

Explicit polynomial iteration cap 2 * n * (Nat.log 2 B + 1) on shortening rounds.

theorem Cslib.Crypto.MR07Shorten.shortenSteps_lt_bound {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace ℝ E] {n B k : ℕ} (hn : 0 < n) {seq : ℕ → Fin n → E} (hB : ∀ (i : Fin n), ‖seq 0 i‖ ^ 2 ≤ ↑B) (hstep : ∀ j < k, sqNormProd (seq (j + 1)) ≤ (13 / 16) ^ 2 * sqNormProd (seq j)) (hli : LinearIndependent ℝ (seq k)) (hGram : Algorithms.LatticeReduction.HasIntegralGram (seq k)) :

Pure ℕ-exponent potential-drop bound: a chain of shortening steps starting from S₀ with ∀ i, ‖S₀ i‖ ^ 2 ≤ B has length strictly less than shortenRoundBound n B whenever 0 < n.

3. Exact Executable Rational Orthogonal Target (BareissElimination.ratKernelBasis) #

Squared Euclidean norm of a rational vector v : Fin n → ℚ.

noncomputable def Cslib.Crypto.MR07Shorten.toEuclidean {n : ℕ} (v : Fin n → ℚ) :

Embedding of Fin n → ℚ into EuclideanSpace ℝ (Fin n).

Casting sqNormRat v to ℝ equals ‖toEuclidean v‖ ^ 2.

theorem Cslib.Crypto.MR07Shorten.sqNormRat_pos_of_ne_zero {n : ℕ} {v : Fin n → ℚ} (hv : v ≠ 0) :

Every nonzero rational vector has strictly positive sqNormRat.

def Cslib.Crypto.MR07Shorten.maxSqNormIndex {m : ℕ} (S : Fin (m + 1) → Fin (m + 1) → ℚ) :
Fin (m + 1)

Computable exact rational index maximizing squared Euclidean norm among S : Fin (m + 1) → Fin (m + 1) → ℚ.

theorem Cslib.Crypto.MR07Shorten.sqNormRat_le_maxSqNormIndex {m : ℕ} (S : Fin (m + 1) → Fin (m + 1) → ℚ) (j : Fin (m + 1)) :

Every vector in S has squared norm at most that of S (maxSqNormIndex S).

theorem Cslib.Crypto.MR07Shorten.norm_maxSqNormIndex_eq_pi_norm {m : ℕ} (S : Fin (m + 1) → Fin (m + 1) → ℚ) :
‖toEuclidean (S (maxSqNormIndex S))‖ = ‖fun (j : Fin (m + 1)) => toEuclidean (S j)‖

The vector selected by maxSqNormIndex S attains the Pi supremum norm ‖S‖.

Irrational-free rational scaling factor ρ = (Nat.sqrt (64 * p * d) + 1) / (16 * d) where p / d = sqS / sqV, unconditionally satisfying (1 / 4) * (sqS / sqV) < ρ ^ 2 ≤ (9 / 16) ^ 2 * (sqS / sqV).

theorem Cslib.Crypto.MR07Shorten.ratOrthoScale_sq_bounds {sqS sqV : ℚ} (hS : 0 < sqS) (hV : 0 < sqV) :
1 / 4 * (sqS / sqV) < ratOrthoScale sqS sqV ^ 2 ∧ ratOrthoScale sqS sqV ^ 2 ≤ (9 / 16) ^ 2 * (sqS / sqV)

Exact rational sandwich on (ratOrthoScale sqS sqV) ^ 2 for positive rational squared norms.

def Cslib.Crypto.MR07Shorten.omitRowTable {m : ℕ} (S : Fin (m + 1) → Fin (m + 1) → ℚ) (i : Fin (m + 1)) :

m × (m + 1) RatTable whose rows are {S j : j ≠ i} ordered by i.succAbove.

theorem Cslib.Crypto.MR07Shorten.omitRowTable_toMatrix_apply {m : ℕ} (S : Fin (m + 1) → Fin (m + 1) → ℚ) (i : Fin (m + 1)) (a : Fin m) (k : Fin (m + 1)) :

Entry evaluation of omitRowTable S i.

def Cslib.Crypto.MR07Shorten.ratOrthoTarget {m : ℕ} (S : Fin (m + 1) → Fin (m + 1) → ℚ) :
Fin (m + 1) → ℚ

Executable rational orthogonal target t = ρ • v ∈ ℚ^{m+1} computed via ratKernelBasis on omitRowTable S (maxSqNormIndex S) and scaled by ratOrthoScale.

theorem Cslib.Crypto.MR07Shorten.ratOrthoTarget_spec {m : ℕ} (S : Fin (m + 1) → Fin (m + 1) → ℚ) (hS : LinearIndependent ℝ fun (j : Fin (m + 1)) => toEuclidean (S j)) :
(∀ (j : Fin (m + 1)), j ≠ maxSqNormIndex S → inner ℝ (toEuclidean (ratOrthoTarget S)) (toEuclidean (S j)) = 0) ∧ 1 / 2 * ‖fun (j : Fin (m + 1)) => toEuclidean (S j)‖ < ‖toEuclidean (ratOrthoTarget S)‖ ∧ ‖toEuclidean (ratOrthoTarget S)‖ ≤ 9 / 16 * ‖fun (j : Fin (m + 1)) => toEuclidean (S j)‖

Specification of ratOrthoTarget: for any linearly independent rational family S : Fin (m + 1) → Fin (m + 1) → ℚ, t := toEuclidean (ratOrthoTarget S) is orthogonal to every S j with j ≠ maxSqNormIndex S and satisfies (1 / 2) * ‖S‖ < ‖t‖ ≤ (9 / 16) * ‖S‖.

4. Finite Deterministic Oracle-Loop & Guarded-Step Reductions (MR07 Lemma 5.10) #

Predicate that stepTarget S = (i*, t) supplies a valid orthogonal shortening target for any linearly independent family S in L.

noncomputable def Cslib.Crypto.MR07Shorten.shortenLoopFrom {E : Type u_1} [NormedAddCommGroup E] (L : Submodule ℤ E) (stepTarget : (Fin (Module.finrank ℤ ↥L) → E) → Fin (Module.finrank ℤ ↥L) × E) (oracles : ℕ → (Fin (Module.finrank ℤ ↥L) → E) → E → ℝ → Option E) :
ℕ → ℕ → (Fin (Module.finrank ℤ ↥L) → E) → Fin (Module.finrank ℤ ↥L) → E

Finite shortening loop starting at round index r with fuel rounds remaining. At round r, queries oracles r on the current family S, target (stepTarget S).2, and radius ‖S‖ / 8; if the returned candidate u lies in L and satisfies ‖u - t‖ ≤ (1 / 4) * ‖S‖, replaces S i by u and advances to round r + 1; otherwise halts and returns S.

Passing round-indexed oracles : ℕ → ... supports both deterministic single-oracle loops (fun _ => oracle) and randomized independent-round reductions (where round r depends only on the state reached after rounds 0, …, r - 1 and fresh randomness at round r).

@[reducible, inline]
noncomputable abbrev Cslib.Crypto.MR07Shorten.shortenLoop {E : Type u_1} [NormedAddCommGroup E] (L : Submodule ℤ E) (stepTarget : (Fin (Module.finrank ℤ ↥L) → E) → Fin (Module.finrank ℤ ↥L) × E) (oracles : ℕ → (Fin (Module.finrank ℤ ↥L) → E) → E → ℝ → Option E) (fuel : ℕ) (S : Fin (Module.finrank ℤ ↥L) → E) :
Fin (Module.finrank ℤ ↥L) → E

Finite shortening loop starting from round 0 for at most fuel rounds.

theorem Cslib.Crypto.MR07Shorten.shortenLoop_isSolution_givp {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace ℝ E] (φ : Submodule ℤ E → ℝ) (γ : ℝ) (L : Submodule ℤ E) (stepTarget : (Fin (Module.finrank ℤ ↥L) → E) → Fin (Module.finrank ℤ ↥L) × E) (oracles : ℕ → (Fin (Module.finrank ℤ ↥L) → E) → E → ℝ → Option E) (hTarget : ValidTargetOracle L stepTarget) (hL_gram : ∀ x ∈ L, ∀ y ∈ L, ∃ (z : ℤ), inner ℝ x y = ↑z) (B : ℕ) (S₀ : Fin (Module.finrank ℤ ↥L) → E) (hS₀_li : LinearIndependent ℝ S₀) (hS₀_mem : ∀ (j : Fin (Module.finrank ℤ ↥L)), S₀ j ∈ L) (hB : ∀ (j : Fin (Module.finrank ℤ ↥L)), ‖S₀ j‖ ^ 2 ≤ ↑B) (hOracle : ∀ k < shortenRoundBound (Module.finrank ℤ ↥L) B, have Sk := shortenLoop L stepTarget oracles k S₀; IncGDD.IsValidInstance φ γ L Sk (‖Sk‖ / 8) → ∃ (u : E), oracles k Sk (stepTarget Sk).2 (‖Sk‖ / 8) = some u ∧ IncGDD.IsSolution 8 L Sk (stepTarget Sk).2 (‖Sk‖ / 8) u) :
have S_out := shortenLoop L stepTarget oracles (shortenRoundBound (Module.finrank ℤ ↥L) B) S₀; GIVP.IsSolution φ (8 * γ) L S_out ∧ ‖S_out‖ ≤ ‖S₀‖

Finite round-by-round soundness of the MR07 Lemma 5.10 shortening loop: starting from a full-rank family S₀ in a lattice L with integral inner products (∀ x ∈ L, ∀ y ∈ L, ∃ z : ℤ, ⟪x, y⟫ = z) and ∀ j, ‖S₀ j‖ ^ 2 ≤ B, if for every round k < shortenRoundBound (finrank ℤ L) B the k-th oracle succeeds on the visited state S_k := shortenLoop ... k S₀ whenever S_k is a valid IncGDD^φ_{γ, 8} instance, then shortenLoop outputs a GIVP^φ_{8γ} solution S_out with ‖S_out‖ ≤ ‖S₀‖.

Quantifying hOracle solely over the single visited state S_k at each round k supports union-bounding per-round failure probability directly across independent coin tapes.

noncomputable def Cslib.Crypto.MR07Shorten.shortenGuardedStep {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace ℝ E] (L : Submodule ℤ E) (S : Fin (Module.finrank ℤ ↥L) → E) (i : Fin (Module.finrank ℤ ↥L)) (u : E) :
Fin (Module.finrank ℤ ↥L) → E

Unconditional guarded shortening step for fixed-iteration loops (IsPPTOn.iterateWith_spec): replaces S i by u when u ∈ L, ‖u‖ < ‖S i‖, and Function.update S i u is linearly independent, and otherwise leaves S unchanged.

theorem Cslib.Crypto.MR07Shorten.shortenGuardedStep_invariants {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace ℝ E] {L : Submodule ℤ E} {S : Fin (Module.finrank ℤ ↥L) → E} (hS_li : LinearIndependent ℝ S) (hS_mem : ∀ (j : Fin (Module.finrank ℤ ↥L)), S j ∈ L) (i : Fin (Module.finrank ℤ ↥L)) (u : E) :
have S' := shortenGuardedStep L S i u; LinearIndependent ℝ S' ∧ (∀ (j : Fin (Module.finrank ℤ ↥L)), S' j ∈ L) ∧ ‖S'‖ ≤ ‖S‖

Unconditional support invariants of shortenGuardedStep: holds for every candidate u : E.

theorem Cslib.Crypto.MR07Shorten.shortenGuardedStep_of_incGDD {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace ℝ E] {L : Submodule ℤ E} {S : Fin (Module.finrank ℤ ↥L) → E} (hS_li : LinearIndependent ℝ S) {i : Fin (Module.finrank ℤ ↥L)} (hi : ‖S i‖ = ‖S‖) {t u : E} (ht_orth : ∀ (j : Fin (Module.finrank ℤ ↥L)), j ≠ i → inner ℝ t (S j) = 0) (ht_lo : 1 / 2 * ‖S‖ ≤ ‖t‖) (ht_hi : ‖t‖ ≤ 9 / 16 * ‖S‖) (hu : IncGDD.IsSolution 8 L S t (‖S‖ / 8) u) :

On every valid IncGDD shortening candidate, shortenGuardedStep accepts and contracts sqNormProd by at most (13 / 16) ^ 2.

theorem Cslib.Crypto.MR07Shorten.shortenGuardedIter_isSolution_givp {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace ℝ E] (φ : Submodule ℤ E → ℝ) (γ : ℝ) (L : Submodule ℤ E) (stepTarget : (Fin (Module.finrank ℤ ↥L) → E) → Fin (Module.finrank ℤ ↥L) × E) (hTarget : ValidTargetOracle L stepTarget) (hL_gram : ∀ x ∈ L, ∀ y ∈ L, ∃ (z : ℤ), inner ℝ x y = ↑z) (B : ℕ) (seq : ℕ → Fin (Module.finrank ℤ ↥L) → E) (cand : ℕ → E) (hS₀_li : LinearIndependent ℝ (seq 0)) (hS₀_mem : ∀ (j : Fin (Module.finrank ℤ ↥L)), seq 0 j ∈ L) (hB : ∀ (j : Fin (Module.finrank ℤ ↥L)), ‖seq 0 j‖ ^ 2 ≤ ↑B) (hstep : ∀ k < shortenRoundBound (Module.finrank ℤ ↥L) B, seq (k + 1) = shortenGuardedStep L (seq k) (stepTarget (seq k)).1 (cand k)) (hGood : ∀ k < shortenRoundBound (Module.finrank ℤ ↥L) B, IncGDD.IsValidInstance φ γ L (seq k) (‖seq k‖ / 8) → IncGDD.IsSolution 8 L (seq k) (stepTarget (seq k)).2 (‖seq k‖ / 8) (cand k)) :
have K := shortenRoundBound (Module.finrank ℤ ↥L) B; GIVP.IsSolution φ (8 * γ) L (seq K) ∧ ‖seq K‖ ≤ ‖seq 0‖

Fixed-iteration guarded-loop soundness (tailored for IsPPTOn.iterateWith_spec): any sequence seq stepping by shortenGuardedStep from S₀ preserves LinearIndependent, membership in L, and ‖seq k‖ ≤ ‖S₀‖ unconditionally at every step, and reaches a GIVP^φ_{8γ} solution by step K = shortenRoundBound (finrank ℤ L) B whenever every valid IncGDD round k < K receives an IncGDD.IsSolution.