Documentation

CslibFrontier.Crypto.Computational.SIS.MR07Reduction.IncGDD

Strict-PPT Amplified IncGDD Reduction from ℓ₂-SIS #

This module implements and analyzes the finite-parameter strict probabilistic polynomial-time (IsPPTOn) reduction from the Incremental Guaranteed Distance Decoding (IncGDD) problem to ℓ₂-SIS, providing the finite-parameter algorithmic step toward [MicciancioRegev2007] Theorem 5.9 (see tracking issue #6861 for the asymptotic worst-case hardness endpoints).

Main definitions #

Main results #

1. Parameter Family, Input Structure & Euclidean Conversion Helpers #

Efficiency predicate for a SIS parameter family P used by the MR07 strict-PPT reduction: n, m, β computable in unary and q in binary (encNat).

Input to the strict-PPT amplified IncGDD reduction (finite step toward [MicciancioRegev2007] Theorem 5.9). basisB and basisS are row-major IntTables whose columns are the lattice basis vectors (MR07.intCol).

  • secParam : ℕ

    Security parameter (encoded in unary).

  • Row-major integer basis of the outer lattice L(B).

  • Row-major integer basis of the sublattice L(S) ⊆ L(B).

  • target : List ℚ

    Rational target vector t ∈ ℚ^n.

  • rSq : ℚ

    Exact rational squared radius r² > 0.

  • trials : ℕ

    Unary number of independent singleIncGDDCall amplification trials.

  • tail : ℕ

    Unary tail-cutoff multiplier passed to sampleGridGaussian.

  • prec : ℕ

    Unary dyadic acceptance-coin precision passed to sampleGridGaussian.

  • maxTrials : ℕ

    Unary rejection-trial cap passed to sampleGridGaussian.

  • extraBits : ℕ

    Unary extra random bits for modular guess and quotient samplers.

Instances For
    theorem Cslib.Crypto.SIS.MR07.IncGDDInput.enc_trials_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → IncGDDInput} :
    theorem Cslib.Crypto.SIS.MR07.IncGDDInput.enc_tail_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → IncGDDInput} :
    Turing.MultiTapeTM.ComputableInSpace g✝ encIn✝ enc S✝ → Turing.MultiTapeTM.ComputableInSpace (fun (c : γ✝) => (g✝ c).tail) encIn✝ Turing.MultiTapeTM.encUnary S✝
    theorem Cslib.Crypto.SIS.MR07.IncGDDInput.enc_mk_inO {γ : Type} {encIn : γ ↪ List Bool} {x0 T0 S0 : γ → ℕ} {x1 : γ → RowTable ℤ} {T1 S1 : γ → ℕ} {x2 : γ → RowTable ℤ} {T2 S2 : γ → ℕ} {x3 : γ → List ℚ} {T3 S3 : γ → ℕ} {x4 : γ → ℚ} {T4 S4 x5 T5 S5 x6 T6 S6 x7 T7 S7 x8 T8 S8 x9 T9 S9 : γ → ℕ} (h0 : Turing.MultiTapeTM.ComputableInO x0 encIn Turing.MultiTapeTM.encUnary T0 S0) (h1 : Turing.MultiTapeTM.ComputableInO x1 encIn LinearAlgebra.IntTable.enc T1 S1) (h2 : Turing.MultiTapeTM.ComputableInO x2 encIn LinearAlgebra.IntTable.enc T2 S2) (h3 : Turing.MultiTapeTM.ComputableInO x3 encIn (Turing.MultiTapeTM.encList Turing.MultiTapeTM.encRat) T3 S3) (h4 : Turing.MultiTapeTM.ComputableInO x4 encIn Turing.MultiTapeTM.encRat T4 S4) (h5 : Turing.MultiTapeTM.ComputableInO x5 encIn Turing.MultiTapeTM.encUnary T5 S5) (h6 : Turing.MultiTapeTM.ComputableInO x6 encIn Turing.MultiTapeTM.encUnary T6 S6) (h7 : Turing.MultiTapeTM.ComputableInO x7 encIn Turing.MultiTapeTM.encUnary T7 S7) (h8 : Turing.MultiTapeTM.ComputableInO x8 encIn Turing.MultiTapeTM.encUnary T8 S8) (h9 : Turing.MultiTapeTM.ComputableInO x9 encIn Turing.MultiTapeTM.encUnary T9 S9) :
    Turing.MultiTapeTM.ComputableInO (fun (x : γ) => { secParam := x0 x, basisB := x1 x, basisS := x2 x, target := x3 x, rSq := x4 x, trials := x5 x, tail := x6 x, prec := x7 x, maxTrials := x8 x, extraBits := x9 x }) encIn enc (fun (x : γ) => T0 x + (T1 x + (T2 x + (T3 x + (T4 x + (T5 x + (T6 x + (T7 x + (T8 x + T9 x))))))))) fun (x : γ) => S0 x + (S1 x + (S2 x + (S3 x + (S4 x + (S5 x + (S6 x + (S7 x + (S8 x + S9 x))))))))
    theorem Cslib.Crypto.SIS.MR07.IncGDDInput.enc_prec_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → IncGDDInput} :
    Turing.MultiTapeTM.ComputableInSpace g✝ encIn✝ enc S✝ → Turing.MultiTapeTM.ComputableInSpace (fun (c : γ✝) => (g✝ c).prec) encIn✝ Turing.MultiTapeTM.encUnary S✝
    theorem Cslib.Crypto.SIS.MR07.IncGDDInput.enc_secParam_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → IncGDDInput} :
    theorem Cslib.Crypto.SIS.MR07.IncGDDInput.enc_extraBits_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → IncGDDInput} :
    theorem Cslib.Crypto.SIS.MR07.IncGDDInput.enc_basisS_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → IncGDDInput} :
    theorem Cslib.Crypto.SIS.MR07.IncGDDInput.enc_mk_budget {γ : Type} {encIn : γ ↪ List Bool} {budget x0 : γ → ℕ} {x1 x2 : γ → RowTable ℤ} {x3 : γ → List ℚ} {x4 : γ → ℚ} {x5 x6 x7 x8 x9 : γ → ℕ} (h0 : Turing.MultiTapeTM.ComputableInSpace x0 encIn Turing.MultiTapeTM.encUnary budget) (h1 : Turing.MultiTapeTM.ComputableInSpace x1 encIn LinearAlgebra.IntTable.enc budget) (h2 : Turing.MultiTapeTM.ComputableInSpace x2 encIn LinearAlgebra.IntTable.enc budget) (h3 : Turing.MultiTapeTM.ComputableInSpace x3 encIn (Turing.MultiTapeTM.encList Turing.MultiTapeTM.encRat) budget) (h4 : Turing.MultiTapeTM.ComputableInSpace x4 encIn Turing.MultiTapeTM.encRat budget) (h5 : Turing.MultiTapeTM.ComputableInSpace x5 encIn Turing.MultiTapeTM.encUnary budget) (h6 : Turing.MultiTapeTM.ComputableInSpace x6 encIn Turing.MultiTapeTM.encUnary budget) (h7 : Turing.MultiTapeTM.ComputableInSpace x7 encIn Turing.MultiTapeTM.encUnary budget) (h8 : Turing.MultiTapeTM.ComputableInSpace x8 encIn Turing.MultiTapeTM.encUnary budget) (h9 : Turing.MultiTapeTM.ComputableInSpace x9 encIn Turing.MultiTapeTM.encUnary budget) :
    Turing.MultiTapeTM.ComputableInSpace (fun (x : γ) => { secParam := x0 x, basisB := x1 x, basisS := x2 x, target := x3 x, rSq := x4 x, trials := x5 x, tail := x6 x, prec := x7 x, maxTrials := x8 x, extraBits := x9 x }) encIn enc budget
    theorem Cslib.Crypto.SIS.MR07.IncGDDInput.enc_basisB_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → IncGDDInput} :
    theorem Cslib.Crypto.SIS.MR07.IncGDDInput.enc_target_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → IncGDDInput} :
    theorem Cslib.Crypto.SIS.MR07.IncGDDInput.enc_rSq_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → IncGDDInput} :
    Turing.MultiTapeTM.ComputableInSpace g✝ encIn✝ enc S✝ → Turing.MultiTapeTM.ComputableInSpace (fun (c : γ✝) => (g✝ c).rSq) encIn✝ Turing.MultiTapeTM.encRat S✝
    theorem Cslib.Crypto.SIS.MR07.IncGDDInput.enc_maxTrials_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → IncGDDInput} :
    theorem Cslib.Crypto.SIS.MR07.IncGDDInput.enc_mk_deg :
    Turing.MultiTapeTM.ComputableInDegree (fun (p : ℕ × RowTable ℤ × RowTable ℤ × List ℚ × ℚ × ℕ × ℕ × ℕ × ℕ × ℕ) => { secParam := p.1, basisB := p.2.1, basisS := p.2.2.1, target := p.2.2.2.1, rSq := p.2.2.2.2.1, trials := p.2.2.2.2.2.1, tail := p.2.2.2.2.2.2.1, prec := p.2.2.2.2.2.2.2.1, maxTrials := p.2.2.2.2.2.2.2.2.1, extraBits := p.2.2.2.2.2.2.2.2.2 }) encFields enc 1 1

    Convert a list of integers to EuclideanSpace ℝ (Fin n) (zero-padded).

    Convert a list of rationals to EuclideanSpace ℝ (Fin n) (zero-padded).

    noncomputable def Cslib.Crypto.SIS.MR07.mr07SingleCallErr (n m tail prec maxTrials extraBits : ℕ) (ε : ℝ) :

    Explicit 5-term CloseTo discrepancy budget for one singleIncGDDCall (two modular guesses j ∈ Fin m and idx ∈ Fin β, m columns × n coordinates of sampleGridGaussian, and m columns of sampleQuotientModS).

    2. Integer-Lattice Geometry & Dual-Mass Bridges (PR 2.3 ↔ PR 2.5) #

    theorem Cslib.Crypto.SIS.MR07.intLattice_coord_eq_floor {n : ℕ} (B : Matrix (Fin n) (Fin n) ℤ) {y : EuclideanSpace ℝ (Fin n)} (hy : y ∈ intLattice B) (i : Fin n) :
    ↑⌊y.ofLp i⌋ = y.ofLp i

    Every vector in an integer lattice intLattice B has integer coordinates, so Int.floor is lossless on it.

    theorem Cslib.Crypto.SIS.MR07.one_le_q_mul_s_of_dualMass {n q : ℕ} (hn : 1 ≤ n) (hq : 1 ≤ q) (B : Matrix (Fin n) (Fin n) ℤ) (hB : B.det ≠ 0) {s ε : ℝ} (hs : 0 < s) (hε : ε ≤ 1 / 2) (hdual : ZLattice.gaussianMass (LinearMap.BilinForm.dualSubmodule (innerₗ (EuclideanSpace ℝ (Fin n))) (intLattice B)) (2 / s) 0 - 1 ≤ ε) :
    1 ≤ ↑q * s

    Any full-rank integer lattice intLattice B satisfies ℤ^n ⊆ (intLattice B)*, so gaussianMass (intLattice B)* (2 / s) 0 - 1 ≤ ε ≤ 1 / 2 forces 1 ≤ s, and hence 1 ≤ q * s for every q ≥ 1.

    Dual-mass bridge connecting MR07Core's 2 / s hypothesis on (intLattice B)* to MR07Samplers's 1 / (q * s) hypothesis on intLatticeReal*.

    3. Shared Linear-Algebra, SIS-Solver, and Combining Helpers #

    4. Single Strict-PPT IncGDD Call (singleIncGDDCall) #

    Single strict-PPT IncGDD call realizing MR07Core.idealIncGDDStep via MR07Samplers's sampleGridGaussian and sampleQuotientModS, sampleModNat, ratSolve, and F.

    5. Exact Algebraic & Sampler-List Bridges #

    Coordinatewise specs of gridPairToLists and sublatticeQuotToList #

    6. Unconditional Support & 4-Stage CloseTo Bridge for singleIncGDDCall #

    theorem Cslib.Crypto.SIS.MR07.mem_support_singleIncGDDCall_mem_intLattice (P : SISParams) (F : P.Solver) (inp : IncGDDInput) (B S : Matrix (Fin (P.n inp.secParam)) (Fin (P.n inp.secParam)) ℤ) (hB : B.det ≠ 0) (hS : S.det ≠ 0) (hSB : intLattice S ≤ intLattice B) (hB_eq : inp.basisB = RowTable.ofMatrix B) (hS_eq : inp.basisS = RowTable.ofMatrix S) {v : List ℤ} (hv : v ∈ (singleIncGDDCall P F inp).eval.support) :

    Unconditional lattice membership on 100% of the support of singleIncGDDCall (even when the SIS solver F fails or returns arbitrary vectors).

    theorem Cslib.Crypto.SIS.MR07.closeTo_eval_singleIncGDDCall_idealIncGDDStep (P : SISParams) (F : P.Solver) (inp : IncGDDInput) (hn : 1 ≤ P.n inp.secParam) (hm : 1 ≤ P.m inp.secParam) (hβ : 1 ≤ P.β inp.secParam) (hrSq : 0 < inp.rSq) (htail : 1 ≤ inp.tail) (hprec : 8 * (2 * inp.tail + 6) ≤ 2 ^ inp.prec) (B S : Matrix (Fin (P.n inp.secParam)) (Fin (P.n inp.secParam)) ℤ) (hB : B.det ≠ 0) (hS : S.det ≠ 0) (hSB : intLattice S ≤ intLattice B) (hB_eq : inp.basisB = RowTable.ofMatrix B) (hS_eq : inp.basisS = RowTable.ofMatrix S) {ε : ℝ} (hε0 : 0 ≤ ε) (hε_half : ε ≤ 1 / 2) (hdual : ZLattice.gaussianMass (LinearMap.BilinForm.dualSubmodule (innerₗ (EuclideanSpace ℝ (Fin (P.n inp.secParam)))) (intLattice B)) (2 / (2 * √↑inp.rSq / (↑(P.β inp.secParam) * √↑(P.n inp.secParam)))) 0 - 1 ≤ ε) :
    let κ := inp.secParam; let n := P.n κ; have m := P.m κ; let β := P.β κ; let r := √↑inp.rSq; have hβR := ⋯; have hr := ⋯; Probability.CloseTo (PMF.map (listToEuclidean n) (singleIncGDDCall P F inp).eval) (idealIncGDDStep B S hB (↑β) r hβR hr (ratListToEuclidean n inp.target) (F κ)) (ENNReal.ofReal (mr07SingleCallErr n m inp.tail inp.prec inp.maxTrials inp.extraBits ε))

    Full 4-stage CloseTo bridge from concrete singleIncGDDCall to MR07Core.idealIncGDDStep, discharging both 1 ≤ q * s and the 1-D dual-mass bound automatically from hdual.

    7. Denominator-Cleared Minimizer & Amplified mr07IncGDDReduction #

    Amplified strict-PPT IncGDD reduction: runs inp.trials independent calls to singleIncGDDCall P F inp via OracleComp.replicate and outputs the closest lattice vector to inp.target.

    Strict-PPT efficiency certificate for mr07IncGDDReduction (finite step toward [MicciancioRegev2007] Theorem 5.9).

    theorem Cslib.Crypto.SIS.MR07.mem_support_mr07IncGDDReduction_mem_intLattice (P : SISParams) (F : P.Solver) (inp : IncGDDInput) (B S : Matrix (Fin (P.n inp.secParam)) (Fin (P.n inp.secParam)) ℤ) (hB : B.det ≠ 0) (hS : S.det ≠ 0) (hSB : intLattice S ≤ intLattice B) (hB_eq : inp.basisB = RowTable.ofMatrix B) (hS_eq : inp.basisS = RowTable.ofMatrix S) {v : List ℤ} (hv : v ∈ (mr07IncGDDReduction P F inp).eval.support) :

    Unconditional lattice membership on 100% of the support of mr07IncGDDReduction.

    theorem Cslib.Crypto.SIS.MR07.mr07IncGDDReduction_succProb_ge (P : SISParams) (F : P.Solver) (inp : IncGDDInput) (hn : 1 ≤ P.n inp.secParam) (hm : 1 ≤ P.m inp.secParam) (hβ : 1 ≤ P.β inp.secParam) (hrSq : 0 < inp.rSq) (htail : 1 ≤ inp.tail) (hprec : 8 * (2 * inp.tail + 6) ≤ 2 ^ inp.prec) (B S : Matrix (Fin (P.n inp.secParam)) (Fin (P.n inp.secParam)) ℤ) (hB : B.det ≠ 0) (hS : S.det ≠ 0) (hSB : intLattice S ≤ intLattice B) (hB_eq : inp.basisB = RowTable.ofMatrix B) (hS_eq : inp.basisS = RowTable.ofMatrix S) {g ε pSingle : ℝ} (hg : 0 < g) (hε0 : 0 ≤ ε) (hε : ε ≤ 1 / (400 * max 1 √↑(P.m inp.secParam))) (hq : g * ↑(P.n inp.secParam) * √↑(P.m inp.secParam) * ↑(P.β inp.secParam) ≤ ↑(P.q inp.secParam)) (hdual : ZLattice.gaussianMass (LinearMap.BilinForm.dualSubmodule (innerₗ (EuclideanSpace ℝ (Fin (P.n inp.secParam)))) (intLattice B)) (2 / (2 * √↑inp.rSq / (↑(P.β inp.secParam) * √↑(P.n inp.secParam)))) 0 - 1 ≤ ε) (hp_le : pSingle ≤ 1 / 3 * (↑(sisEll2Advantage (P.q inp.secParam) (↑(P.β inp.secParam)) (F inp.secParam)) / (2 * ↑(P.β inp.secParam) * ↑(P.m inp.secParam)) - ↑(P.m inp.secParam) * ε / (2 * (1 - ε))) - mr07SingleCallErr (P.n inp.secParam) (P.m inp.secParam) inp.tail inp.prec inp.maxTrials inp.extraBits ε) :
    let κ := inp.secParam; let n := P.n κ; have r := √↑inp.rSq; have t := ratListToEuclidean n inp.target; ((mr07IncGDDReduction P F inp).eval.toOuterMeasure {v : List ℤ | ¬(v.length = n ∧ IncGDD.IsSolution g (intLattice B) (intColCast B S hB) t r (listToEuclidean n v))}).toReal ≤ (1 - pSingle) ^ inp.trials

    Finite-parameter amplified IncGDD failure bound (step toward [MicciancioRegev2007] Theorem 5.9, §5.2, pp. 22–24): combining closeTo_eval_singleIncGDDCall_idealIncGDDStep, MR07Core.incGDD_succProb_of_closeTo_idealIncGDDStep, and independent amplification via OracleComp.replicate.