risc0-ed25519-verified/verification/Proofs
mrwulf 62f0dc087b NAF encoder proven end-to-end + the phase-1 double-scalar-mul apex
The complete non_adjacent_form(5) verification (four stages):
- `Proofs/DsmNafLoadSpec.lean` (generated) — the LE byte-to-word load.
- `Proofs/DsmNafMath.lean` — the digit loop's arithmetic core: window-read
  lemmas (single/cross-word), the exact ZZ invariant steps (Nat.mod_mul
  telescope), the carry-kill argument from V < 2^253, and the exit theorem.
- `Proofs/DsmNafLoopSpec.lean` — the w=5 digit loop by induction on the
  remaining-bits measure: per-step 64-bit window read (4-way word split),
  digit write via hcast/wrapping_sub (exact value window - 32*carry',
  oddness, |d| < 16), invariant carried through even/odd steps.
- `Proofs/DsmNafSpec.lean` — the public spec: both entry masserts
  DISCHARGED; the digits satisfy the NAF conditions and
      sum naf[k]*2^k = V   EXACTLY (integers, no modular slack)
  for any scalar whose LE byte value V is below 2^253.

And the campaign's brick 4, `Proofs/DsmMulSpec.lean`:
- `run_basepoint` — the transpiled ED25519_BASEPOINT_POINT is the standard
  base point: valid extended coordinates (X*Y = Z*T) and the curve equation,
  kernel-checked via denominator-free 121666-scaled witnesses. Includes the
  generic witness lemmas fp_mul_eq_of_witness / onCurve_of_witness.
- `vartime_double_base_mul_spec` — THE PHASE-1 COMPUTATIONAL SPEC of
  vartime_double_base::mul: for canonical scalars and a valid on-curve A,
  the result is valid, on-curve, and denotes
      dsmFold (naf a) (naf b) (edPt A) edBasePt edId 256
  with both digit arrays proven exact NAF encodings. Phase 2 (group
  semantics [a]A + [b]B) requires Edwards associativity — deferred and
  documented; nothing assumes it.

Also: removed a vestigial pre-re-extraction axiom stub
(backend.serial.scalar_mul.vartime_double_base.mul) from FunsExternal —
a root-level leftover that shadowed the real namespaced definition during
name resolution in proof files. Never referenced by any certificate (the
#print-axioms audit guards against that); deleted for hygiene.

CERTS += naf_load_spec, naf_exit, naf_digit_loop_spec,
non_adjacent_form_spec, run_basepoint, vartime_double_base_mul_spec —
each audited to exactly [propext, Classical.choice, Quot.sound].
Full check.sh green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 16:52:08 +02:00
..
AddSpec.lean field layer: proofs pass, fieldImplementation axiom-clean 2026-07-02 14:38:52 +02:00
ConstSpecs.lean field layer: proofs pass, fieldImplementation axiom-clean 2026-07-02 14:38:52 +02:00
Denote.lean field layer: proofs pass, fieldImplementation axiom-clean 2026-07-02 14:38:52 +02:00
DsmLoopSpec.lean Double-scalar-mul proof campaign, bricks 1-3: table, digit step, loop 2026-07-04 15:07:57 +02:00
DsmMulSpec.lean NAF encoder proven end-to-end + the phase-1 double-scalar-mul apex 2026-07-04 16:52:08 +02:00
DsmNafLoadSpec.lean NAF encoder proven end-to-end + the phase-1 double-scalar-mul apex 2026-07-04 16:52:08 +02:00
DsmNafLoopSpec.lean NAF encoder proven end-to-end + the phase-1 double-scalar-mul apex 2026-07-04 16:52:08 +02:00
DsmNafMath.lean NAF encoder proven end-to-end + the phase-1 double-scalar-mul apex 2026-07-04 16:52:08 +02:00
DsmNafSpec.lean NAF encoder proven end-to-end + the phase-1 double-scalar-mul apex 2026-07-04 16:52:08 +02:00
DsmStepSpec.lean Double-scalar-mul proof campaign, bricks 1-3: table, digit step, loop 2026-07-04 15:07:57 +02:00
DsmTableSpec.lean Double-scalar-mul proof campaign, bricks 1-3: table, digit step, loop 2026-07-04 15:07:57 +02:00
EdAddAffNiels.lean lean-guard: disable core dumps (no more apport popups on capped aborts) 2026-07-02 16:23:30 +02:00
EdAddProjNiels.lean lean-guard: disable core dumps (no more apport popups on capped aborts) 2026-07-02 16:23:30 +02:00
EdConvert.lean lean-guard: disable core dumps (no more apport popups on capped aborts) 2026-07-02 16:23:30 +02:00
EdCurve.lean lean-guard: disable core dumps (no more apport popups on capped aborts) 2026-07-02 16:23:30 +02:00
EdDenote.lean lean-guard: disable core dumps (no more apport popups on capped aborts) 2026-07-02 16:23:30 +02:00
EdDouble.lean lean-guard: disable core dumps (no more apport popups on capped aborts) 2026-07-02 16:23:30 +02:00
EdMain.lean lean-guard: disable core dumps (no more apport popups on capped aborts) 2026-07-02 16:23:30 +02:00
FeQ.lean field layer: proofs pass, fieldImplementation axiom-clean 2026-07-02 14:38:52 +02:00
Field.lean field layer: proofs pass, fieldImplementation axiom-clean 2026-07-02 14:38:52 +02:00
FieldMain.lean field layer: proofs pass, fieldImplementation axiom-clean 2026-07-02 14:38:52 +02:00
InvertSpec.lean field layer: proofs pass, fieldImplementation axiom-clean 2026-07-02 14:38:52 +02:00
MulSpec.lean field layer: proofs pass, fieldImplementation axiom-clean 2026-07-02 14:38:52 +02:00
P25519.lean field layer: proofs pass, fieldImplementation axiom-clean 2026-07-02 14:38:52 +02:00
ReduceSpec.lean field layer: proofs pass, fieldImplementation axiom-clean 2026-07-02 14:38:52 +02:00
ScalarAddSpec.lean Signature layer, first bricks: canonicity closure + hash-to-scalar foundation 2026-07-03 23:18:32 +02:00
ScalarBytesSpec.lean Hash-to-scalar PROVEN: from_bytes_wide_spec - Scalar::from_hash's reduction is exact mod l 2026-07-04 11:00:50 +02:00
ScalarDenote.lean Add scalar-layer foundation (Scalar52 arithmetic mod ℓ) 2026-07-02 21:24:39 +02:00
ScalarFromBytesSpec.lean Hash-to-scalar PROVEN: from_bytes_wide_spec - Scalar::from_hash's reduction is exact mod l 2026-07-04 11:00:50 +02:00
ScalarFullMulSpec.lean Signature layer, first bricks: canonicity closure + hash-to-scalar foundation 2026-07-03 23:18:32 +02:00
ScalarLoop.lean scalar layer: add+sub fully proven mod l against THIS fork's v4 extraction 2026-07-03 18:45:16 +02:00
ScalarMain.lean Signature layer, first bricks: canonicity closure + hash-to-scalar foundation 2026-07-03 23:18:32 +02:00
ScalarMontSpec.lean Signature layer, first bricks: canonicity closure + hash-to-scalar foundation 2026-07-03 23:18:32 +02:00
ScalarMulSpec.lean Scalar layer complete: Montgomery reduction + full mul ported, scalarImplementation aggregate 2026-07-03 21:46:39 +02:00
ScalarReduceSpec.lean Signature layer, first bricks: canonicity closure + hash-to-scalar foundation 2026-07-03 23:18:32 +02:00
ScalarSubSpec.lean Signature layer, first bricks: canonicity closure + hash-to-scalar foundation 2026-07-03 23:18:32 +02:00
ScalarUnpackSpec.lean Hash-to-scalar PROVEN: from_bytes_wide_spec - Scalar::from_hash's reduction is exact mod l 2026-07-04 11:00:50 +02:00
ScalarWideSpec.lean Signature layer, first bricks: canonicity closure + hash-to-scalar foundation 2026-07-03 23:18:32 +02:00
Square2Spec.lean field layer: proofs pass, fieldImplementation axiom-clean 2026-07-02 14:38:52 +02:00
SquareSpec.lean field layer: proofs pass, fieldImplementation axiom-clean 2026-07-02 14:38:52 +02:00
SubNegSpec.lean field layer: proofs pass, fieldImplementation axiom-clean 2026-07-02 14:38:52 +02:00