dalek-ed25519-verified/verification
mrwulf c85704c0c4 THE SIGNATURE APEX: the EdDSA verification equation, proven and audited
`Proofs/SigApexSpec.lean`:
- `verify_loop_full` — the extracted 32-byte comparison loop returns exactly
  the byte-equality of the two arrays (induction; axiom cone = exactly
  [propext, Classical.choice, Quot.sound]).
- `verify_accepts_iff` — THE APEX: for a signature that parses, the
  extracted RustCrypto verifier accepts IFF the recomputed compressed point
      compress( [s]·B − [k]·A )
  equals the signature's R byte-for-byte. The recomputation is grounded in
  the PROVEN curve model (every curve and scalar call is a certified
  definition); k is whatever scalar the SHA-512 oracle produces — the
  honest EdDSA acceptance criterion with the hash opaque.

Boundary hygiene forced by the audit itself:
- The public vartime_double_scalar_mul_basepoint dispatch pulled the AVX2
  vector-backend axiom into the apex cone. Fixed at the build level:
  extract.sh pins RUSTFLAGS --cfg curve25519_dalek_backend="serial", so the
  SIMD arm compiles out; BackendKind has only Serial and
  get_selected_backend becomes a real definition (ok Serial).
- subtle.Choice.unwrap_u8 upgraded from axiom to the documented model
  definition (Choice := U8; unwrap_u8 = self.0) — it sits on the verify
  path via compress → is_negative.
- CurveSig modules added to GEN_MODULES (stale-olean incoherence otherwise).

check.sh grows Phase 3b: the apex certificate's axiom cone must equal
EXACTLY
  [propext, Classical.choice, Quot.sound,
   ed25519.Signature, sha2.Sha512,
   sha512_new, sha512_update, sha512_finalize_bytes,
   ed25519.Signature.to_bytes, signature.error.Error, Error.new]
— the SHA-512 hash oracle plus the opaque wire-format types. NO curve
axioms, NO scalar axioms, NO backend axioms, enforced on every button press.

Full check.sh green: 16 standard certificates + the apex audit.

Phase 2 (the point-level equation [s]B − [k]A = decompress R, needing
to_bytes canonicity and decompress) remains deferred and documented.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 19:45:55 +02:00
..
gen THE SIGNATURE APEX: the EdDSA verification equation, proven and audited 2026-07-04 19:45:55 +02:00
Proofs THE SIGNATURE APEX: the EdDSA verification equation, proven and audited 2026-07-04 19:45:55 +02:00
.apex-LS0V.lean THE SIGNATURE APEX: the EdDSA verification equation, proven and audited 2026-07-04 19:45:55 +02:00
check-scalar.sh Merge scalar into CurveField; integrate the verify glue against the model 2026-07-04 18:13:58 +02:00
check.sh THE SIGNATURE APEX: the EdDSA verification equation, proven and audited 2026-07-04 19:45:55 +02:00
CurveField.llbc THE SIGNATURE APEX: the EdDSA verification equation, proven and audited 2026-07-04 19:45:55 +02:00
CurveScalar.llbc Hash-to-scalar PROVEN: from_bytes_wide_spec - Scalar::from_hash's reduction is exact mod l 2026-07-04 10:31:32 +02:00
extract-scalar.sh Signature layer, first bricks: canonicity closure + hash-to-scalar foundation 2026-07-03 23:18:29 +02:00
extract.sh THE SIGNATURE APEX: the EdDSA verification equation, proven and audited 2026-07-04 19:45:55 +02:00
lean-guard re-budget scalar caps post-optimization; guard 3b (headroom clamp) 2026-07-03 17:51:14 +02:00