dsig-v2

Law #1 Lean 4 → dCBOR Coprocessors · Distributed Dark FBA

Verified ZK coprocessors.
Sealed batch clearing.

dsig-v2 runs pinned Lean descriptors for cryptography, automata and certificates. For sealed auctions, evaluate_role connects three processes over UnixRing with statistical cut-and-choose checks. A separate single-process active-MAC simulator, clear_ext5_fba, produces Farkas clearing certificates.

31,178 CU
256-order Solana SBF Dark FBA
1,014 B single-packet signed tx · 77 B state
8,942
Lean 4 theorems & lemmas
334 modules · 0 sorry · 400-bit WHIR QROM
304-bit
Ext5 reference simulator
Single process · batched active-MAC checks
353,608 B
Joint linked P-256 QROM WHIR opening
Default 400-bit QROM PairProof (ZKU1)
01 · Law #1 Assurance

Rust never authors the relation.

Hand-written circuit code drifts silently from paper proofs. In dsig-v2, constraint descriptors are authored and proved sound in Lean 4, emitted to canonical RFC 8949 dCBOR (.dsig.cbor), and pinned by TurboSHAKE256 digest. Rust checks the pin and interprets the descriptor—enforced by law1_ast_gate.rs and cross-language dsig-satkat mutation checks.

02 · Dark FBA Without Blind Trust

Sealed orders, mathematical clearing optimality.

The distributed engine shares orders across three processes and checks multiplications before opening the clearing. The Ext5 simulator holds every share and random tape in one process. Its MAC and sacrifice checks detect inconsistencies and report the failing phase. Solana SBF checks the resulting certificate against the revealed order book.

Interactive Cryptographic Explainer

Dark FBA Uniform Clearing & Farkas Optimality Check

Runs exact integer uniform-price clearing, complementary slackness, and adversarial MEV tamper rejection right in your browser—mirroring DarkFbaClearingCert::verify() and DarkFbaSound.lean.

Sealed Order Book (Revealed at Settlement)

Order Side Limit Tick Qty Settled Fill Status
    Honest Privacy Boundary — Post-Clear Book Revelation: Solana settlement reveals the plaintext orders, including unfilled orders, for verification. The 256-order single-packet settlement used 31,178 CU in LiteSVM. The standalone Ext5 simulation offers no process isolation for order contents.
    Shared Bit-Table Spine

    Coprocessor & Proof Architecture

    The workspace provers run on the CPU by default (dsig-whir --features vulkan provides optional GPU round-0 acceleration). The standalone dsig-spine library demonstrates shared bit-table openings, and dsig-vulkan exposes GPU kernels for differential tests and benchmarks.

    Verified Measurements

    Benchmarks & Formal Assurance

    Every number cites its exact commit, host, and measurement boundary. Unre-measured older runs are marked explicitly.

    Workload Config & Commit Latency / Compute Payload / Size Verification Ground Truth
    Ext5 simulator clear (N=64) EPYC --release · b559cd2 712.47 ms 468 B cert · 235 B op2 ix 27/27 tests · byte-exact SBF match
    Ext5 simulator clear (N=256) EPYC --release · b559cd2 1,023.09 ms 1,428 B cert · 811 B op2 ix LiteSVM SBF: 24,999 CU (op1) / 31,178 CU (op2, 1,014 B tx)
    AKIA NFA-Absence + XMSS Guardrail keygate broker · 71e03b1 16.51 ms median verify ~198 KiB KGR1 receipt Lean-pinned NFA descriptor + XMSS signature
    Lean 4 Proof Library lean/ + lean-real/ + lean-arklib/ 334 modules · 8,942 thms/lemmas 0 sorry DarkFbaSound.lean, JointP256Opening.lean, & WhirShipped.lean pinned via #guard_msgs
    Reproduce Locally

    Run in 3 Commands

    1. Benchmark single-process Ext5 Dark FBA + Farkas UNSAT lock (N = 16, 64, 256)
    cargo run --release -p dsig-dark-coord --example bench_dark_fba_ext5
    2. Execute adversarial Dark FBA tamper tests (custodian MAC tamper, MEV underfill, unbalanced fills)
    cargo test --release -p dsig-dark-coord dark_fba
    3. Enforce Law #1 lexical AST gate & cross-language Lean/Rust descriptor KATs
    cargo test --release -p dsig-piop --test law1_ast_gate && cargo test --release -p dsig-satkat --test sat_kat guardrail
    Explicit Threat Model · Verified Limits

    Honest Threat Model & Open Links

    What IS Proved & Verified

    • Dark FBA covers LP duality, the 2N+3 integer Farkas refutation, and algebraic checks for MAC and sacrifice failures.
    • Descriptor semantics: SHA-256 compression, AES-128-GCM tag/plaintext, P-256 ECDSA verify (incl. linked opening), ML-DSA-65 (2-block SampleInBall challenge), and agent receipt checks proved in Lean and byte-pinned into Rust.
    • Cross-language SAT KATs: The dsig-satkat fixtures compare Lean and Rust on honest and mutated witnesses, including an altered fifth slash-tag coordinate in the Ext5 guardrail.

    What Remains Open

    • Hiding verifier refinement. The ideal-oracle Lean bounds cover validated eval checks through SatEval. Relating the Rust verifier to that model remains open.
    • End-to-end ZK composition: Component bijections (sumcheck, BitZ masked round) exist, but no single composed simulator covers Merkle salts + Fiat–Shamir on a shipped prover.
    • Custodian setup & remaining Rust circuits: dsig-dark-coord assumes caller-authenticated pairwise channels for initial tape seeds (no DKG). Only Catena lowering (30/2,495 corpus) remains in OPEN_MOVES (notes/law1-inventory.md).
    Full Stack

    The 7-Repo Constellation