The first public production Jasmin ECDSA verifies secp256k1 in 16.13 µs and P-256 in 29.09 µs — faster than libsecp256k1 v0.8.0 and OpenSSL 3.6.5 on both x86-64 and ARM64.
One dual-curve engine across x86-64 (1.09× k1, 1.31× P-256) and ARM64 (1.03× k1, 1.13× P-256) on a 192 KiB verify table against 1 MiB, decompressing 33-byte SEC 1 keys on every call. Guarded mlocked signing (768 B workspace, 0 stack alloca, 22 KiB vs 86 KiB comb) runs within 0.59 µs of libsecp256k1 on x86-64 (12.99 vs 12.40 µs), backed by 11 assurance stages and a 231,718 B zero-GC Wasm signer signing in 0.28–0.44 ms on a real iPhone 16 Pro Max.
1. First production secp256k1 and P-256 ECDSA on Jasmin v2026.09.0
Upstream Formosa repos (formosa-25519, formosa-libjade, libjbn) cover Curve25519, ML-KEM/ML-DSA and generic prime-field templates, with no published upstream secp256k1 or NIST P-256 ECDSA library. Silverfire compiles 4×64 ADX/BMI2 (MULX/ADCX/ADOX) ECDSA kernels on Linux x86-64 with -stack-zero loopSCT, passing 30/30jasmin-ct --doit --sct checks and 26/26 field plus P-256 RCB jasmin-checksafety slices.
Linux ARMv8-A pairs single-TU C11 __uint128_t and runtime PSTATE.DIT readback with stock ARMv8-A Jasmin leaves. On ARM64, Clang 23 lowered branchless neg_mask into a secret-dependent branch; a value barrier and fail-closed disassembly gate close it (0 leaks across 114/114 CT symbols per host, 4/4 dual-host dudect receipts max |t| = 4.284).
3. Hardened 231,718 B zero-GC linear-memory Wasm signer
Managed GC heaps cannot wipe freed buffers on demand, so libs/crypto_ecdsa fails closed on wasm-gc, wasm and js. Browser signing runs in a dedicated fixed 4 MiB linear-memory .wasm module (231,718 B, SHA-256 f487f959, worker bundle 9555b74d): constant-time 384-bit 6×64 comb with 128-bit scalar blinding, complete RCB Alg 8/9, SafeGCD30, 0 divisions, 0memory.grow ops, and a COOP/COEP (Y/Y) standby worker with byte-bound WeakMap provenance and realm-captured crypto.subtle.
After every sign, an unrolled BigUint64Array scan verifies all 4 MiB read back zero (OR = 0, tail 0x40). Across 6 BrowserStack targets (90/90 locally oracle-verified), kernel signing runs 0.20–0.26 ms on macOS Safari, 0.28–0.44 ms on a real iPhone 16 Pro Max, and 0.39–0.52 ms on a real Galaxy S24. CIP-49 spans 0.24–0.80 ms kernel, 9.5–21.9 ms warm E2E, and 16.6–48.9 ms cold E2E; browser P-256 uses WebCrypto with Wasm framing.
Watch how two prime fields, y² = x³ + 7, nine 29-bit limbs, Jacobian slices, GLV splitting, and a four-stream Straus ladder drive portable pure-MoonBit verification (55.50 µs in wasm-gc) and anchor the 16.13 µs native Jasmin engine.
Why algebra makes the right skeleton for cryptographic software
Cryptographic libraries rarely fail because a programmer mistyped one curve formula. They fail at the seams. A nonce gets reused across two messages, or a base-field coordinate gets reduced modulo the scalar order in the wrong place. A malleable high-S signature slips past a consensus rule, an unvalidated point enters projective arithmetic, or a signing routine releases output before its custody journal commits. Testing catches individual instances of these failures. Algebra eliminates whole classes of them before any arithmetic runs.
An algebraic structure is a carrier set with operations and the equations those operations obey: a prime field 𝔽p, an elliptic-curve group E(𝔽p), a quotient by a two-element group, a substructural monoidal category of single-use resources. MoonBit has algebraic data types: struct products, enum coproducts and opaque wrapper types. With them, those structures stop being comments in a specification and become the load-bearing skeleton of the code.
Every optimization plugs into that fixed frame, from 9×29-bit portable limb arithmetic, SafeGCD30 and Solinas folding to verified 4×64 native kernels, Montgomery reduction, GLV endomorphism splits and 24-worker dispatch. Speed changes the representation inside a module. The algebraic interfaces and the commuting laws between modules stay the same. The five bones below each have a live diagram, compiled from MoonBit and drawn in your browser, and each one has an executable test in libs/crypto_ecdsa/algebraic_skeleton_test.mbt that runs against the production secp256k1 and P-256 code on native, wasm, wasm-gc and js.
The skeleton, drawn live
Loading the compiled MoonBit diagram engine.
All nine diagrams, including Schnorr, BLS12-381 and the Conway ledger, are in the Category Studio. The gallery holds them as 2× images in both themes.
Bone 1
Distinct prime fields as separate opaque types
ECDSA works over two prime fields at once. Point coordinates live in the base field 𝔽p. Private keys, nonces and the signature components (r, s) live in the scalar field 𝔽n. Because p ≠ n, lifting a residue modulo p and reducing it modulo n is a map of sets and never a group homomorphism. On the small curve E(𝔽79) of order 67, adding 78 and 1 in 𝔽79 gives 0, which maps to 0; mapping first gives 11 + 1 = 12.
Raw 32-byte arrays invite exactly this confusion. Silverfire gives each field its own opaque type (FpSecp256k1, FnSecp256k1, FpP256, FnP256), so the one non-additive crossing appears at a single explicit boundary and the compiler rejects every accidental mix of coordinates and scalars.
Bone 2
Curve points as an equalizer, projective arithmetic as a commuting square
Valid finite affine points form an equalizer: Eaff(𝔽p) is the subset of 𝔽p × 𝔽p on which the two maps (x, y) ↦ y² and (x, y) ↦ x³ + ax + b agree, and adding the point at infinity gives the group E(𝔽p). The opaque AffinePointSecp256k1 and AffinePointP256 constructors check the curve equation once at the boundary, and both curves have cofactor one under their pinned parameters, so every finite point on the curve lies in the prime-order group.
Fast signing cannot afford an inversion at every addition, so execution moves to projective coordinates. The contract between the fast engine and the textbook group is one commuting square: projecting after an RCB addition equals adding after projecting, π ∘ RCB_add = (+) ∘ (π × π). Over any field of characteristic not 2 with no two-torsion, Lean 4.35.0 proves unconditional RCB completeness for a = 0 and a = −3 with (0, 0, 0) excluded and instantiates the real secp256k1 and P-256 primes and curves in spec/ecdsa_algebra_proofs.lean. Separately, the kernel-checked natural-number lemma secp256k1_fe9_mul_no_u64_overflow bounds one nine-term schoolbook accumulator below 264 for limbs below 230.
Bone 3
Products and coproducts for fail-closed verification
A product A × B carries two projections and a unique mediating map. A coproduct A + B carries two injections and forces every consumer to handle every case. In MoonBit a struct is a product and an enum is a coproduct.
A signature is a product of two nonzero scalars. Core verification returns a typed coproduct (EcdsaVerifyOutcome with the five reasons of EcdsaRejectReason) separating acceptance from exact rejection causes, and ProfileVerifyResult keeps its outcome private so no caller can forge a valid result with an error code. A MoonBit match enforces exhaustive handling on all four targets, while the five foreign bindings receive stable result codes.
Bone 4
Signature malleability as a split quotient
If (r, s) satisfies the verification equation, so does (r, n − s). The two-element group C2 acts freely on valid signatures by swapping s and n − s. Malleability bugs appear when one subsystem treats the raw pair as unique and another accepts its twin.
Algebra names the fix. Form the quotient Q = X / C2 with projection q, and choose the section j that picks min(s, n − s). The laws q ∘ j = id and j ∘ q = normalize_low_s turn low-S canonicalization from a bit trick into an invariant shared by Wycheproof, BIP-62 and Cardano CIP-49.
Bone 5
Custody and side effects as a substructural monoidal category
Algebra also governs resources and the order of effects. Reusing one nonce k across digests z1 and z2 gives away the private key at once: d ≡ (s2z1 − s1z2) · (r(s1 − s2))−1 (mod n).
The signing pipeline lives in a substructural monoidal category. Private keys and nonces travel on linear wires that have no copy map, and public transcripts stay freely copyable. Ordered effect rails serialize nonce reservation, native signing, self-verification against the stored public key, the custody journal write and release. A diagram that copies k or drops a curve tag fails the categorical validator before anything runs.
The evidence wall
What the algebraic skeleton does not prove
Commuting squares, equalizers, quotient sections and linear wires guarantee structural and mathematical soundness. They do not prove the hardness assumptions (ECDLP, SHA-256 collision resistance, HMAC-SHA256 as a PRF), silence timing channels in the processor or guard process memory across fork().
Silverfire pairs the skeleton with a layered verification stack. Lean 4 and moon prove discharge exact bitvector and modular identities. Jasmin v2026.09.0 CT and safety verification, CBMC 6.11.0 + Bitwuzla 0.11.0 over unmodified C11 sources, LLVM-IR relational proofs checked by Z3 and cvc5, the 3-lane check_ct_asm.sh gate, and live objdump disassembly on two architectures rule out secret-dependent branches and division instructions. Tribble runs continuous multi-runtime differential fuzzing, dual-host dudect measures real timing on hardware idle and under load, guard pages and MADV_DONTFORK protect native secrets, and verify-only workers carry no secret state. Algebra gives the cryptography its bones; proofs about the implementation and physical isolation give it its armor.
These receipts test fixed, warmed single-core ECDSA workloads on two hosts: a 24-core Intel Core Ultra 9 290HX Plus and a 20-core ARM64 host. Both hosts ran Clang 23.1.3, MoonBit v1.0.0-rc1+3c0520448, libsecp256k1 v0.8.0 and OpenSSL 3.6.5, agreeing on the 9-engine self-check checksum 1305428567. Bold marks the lower median in every pair, including all guarded-sign rows where references finish first.
192 KiB Silverfire verify table vs 1 MiB libsecp256k1 v0.8.0 (window 15); Silverfire also decompresses 33-byte SEC 1 keys per call.
Single-core medians (µs/op, lower is better). Ratio = reference µs ÷ Silverfire µs; above 1.00×, Silverfire is faster. Bold marks the lower median in every pair.
Workload
x86-64 Jasmin / ref (µs)
x86-64 Ratio
ARM64 hybrid / ref (µs)
ARM64 Ratio
Reference
secp256k1 verify
16.13 / 17.65
1.09×
18.09 / 18.60
1.03×
libsecp256k1 v0.8.0
P-256 verify
29.09 / 37.98
1.31×
33.84 / 38.10
1.13×
OpenSSL 3.6.5
secp256k1 guarded sign*
12.99 / 12.40
0.95×
19.24 / 14.19
0.74×
libsecp256k1 v0.8.0
P-256 guarded sign
15.73 / 14.81
0.94×
21.54 / 14.72
0.68×
OpenSSL 3.6.5
Run. Medians of 25 warmed sequential batch means, one fixed key and digest per row. 24-core Intel Core Ultra 9 290HX Plus and a 20-core ARM64 host. Clang 23.1.3, libsecp256k1 v0.8.0 at its defaults (window 15, 1 MiB verify table, 86 KiB signing table), OpenSSL 3.6.5 through EVP. Batch-mean dispersion does not measure per-request tail latency.
Verify. All three check strict DER on every call. Silverfire also decompresses a 33-byte SEC 1 key on every call on a 192 KiB verify table. libsecp256k1 reuses one parsed key and a prepared context. OpenSSL imports the key before timing.
Sign. 32-byte digest in, RFC 6979 nonces. libsecp256k1 runs with a randomized context. Silverfire’s native 22 KiB comb runs in a 768 B mlocked arena (0 stack alloca) without scalar blinding (128-bit scalar blinding is scoped to the 384-bit linear-memory Wasm comb). Guarded sign trails references on both hosts. Durable custody is measured separately below: 71.99 and 89.40 µs on x86-64, 103.81 and 121.30 µs on ARM64.
Limits. On the full Wycheproof v1 suites (464/464 Bitcoin, 484/484 P-256 strict agreement), libsecp256k1 (3.18 / 3.22 ms vs 4.66 / 5.08 ms) and OpenSSL (7.64 / 7.69 ms vs 9.47 / 10.99 ms) finish first on both hosts (valid-only subsets: Silverfire 2.69 / 2.90 ms vs 2.87 / 2.92 ms k1, 5.30 / 5.83 ms vs 6.61 / 6.63 ms P-256). AWS-LC, BoringSSL, AVX-512 IFMA multi-buffer and GPU batch engines are outside this harness.
Custody cost anatomy: guarded kernel vs durable custody
No reference bar. The receipts hold no stock-library custody timing. Second segment adds CRYPTO-Q4 stored-Q post-sign self-verification, O(1) authenticated binary wal.v3 append, and immediate durable external rollback anchor sync.Full dual-host telemetry: nine engines, Wycheproof v1 parity, JSON receipts
Median latency per operation across all nine engines (Final RC, HEAD=c4ebcfd)
Operation
Host
native
wasm-gc
wasm
js
libsecp256k1 0.8.0
OpenSSL 3.6.5
libgcrypt 1.12.4
Nettle 4.0
node:crypto
secp256k1 verify
x86-64
16.13 µs
55.50 µs
62.79 µs
2,640.35 µs
17.65 µs
157.95 µs
366.36 µs
—
159.58 µs
secp256k1 verify
ARM64
18.09 µs
63.06 µs
77.43 µs
1,903.72 µs
18.60 µs
158.53 µs
461.48 µs
—
156.28 µs
secp256k1 guarded sign*
x86-64
12.99 µs
—
—
—
12.40 µs
164.71 µs
225.57 µs
—
172.25 µs
secp256k1 guarded sign*
ARM64
19.24 µs
—
—
—
14.19 µs
172.43 µs
283.26 µs
—
191.99 µs
secp256k1 durable custody
x86-64
71.99 µs
—
—
—
—
—
—
—
—
secp256k1 durable custody
ARM64
103.81 µs
—
—
—
—
—
—
—
—
P-256 verify
x86-64
29.09 µs
109.27 µs
115.50 µs
6,069.00 µs
—
37.98 µs
318.28 µs
90.64 µs
39.21 µs
P-256 verify
ARM64
33.84 µs
130.17 µs
144.01 µs
4,481.12 µs
—
38.10 µs
387.14 µs
126.56 µs
39.93 µs
P-256 guarded sign
x86-64
15.73 µs
—
—
—
—
14.81 µs
196.86 µs
26.27 µs
15.10 µs
P-256 guarded sign
ARM64
21.54 µs
—
—
—
—
14.72 µs
243.13 µs
31.11 µs
14.80 µs
P-256 durable custody
x86-64
89.40 µs
—
—
—
—
—
—
—
—
P-256 durable custody
ARM64
121.30 µs
—
—
—
—
—
—
—
—
BIP-340 Schnorr verify
x86-64 / ARM64
16.58 / 18.71 µs
—
—
—
—
—
—
—
—
SHA-256, 32 B
x86-64 / ARM64
0.04 / 0.05 µs
0.12 / 0.14 µs
0.13 / 0.16 µs
0.15 / 0.16 µs
—
0.04 / 0.05 µs
0.04 / 0.04 µs
0.03 / 0.04 µs
0.42 / 0.59 µs
SHA-256, 1 KiB
x86-64 / ARM64
0.24 / 0.54 µs
2.11 / 2.39 µs
2.15 / 2.36 µs
2.58 / 2.72 µs
—
0.24 / 0.45 µs
0.23 / 0.43 µs
0.22 / 0.42 µs
0.62 / 0.98 µs
HMAC-SHA256, 32 B
x86-64 / ARM64
0.11 / 0.16 µs
0.48 / 0.55 µs
0.52 / 0.59 µs
0.59 / 0.64 µs
—
0.23 / 0.30 µs
0.08 / 0.08 µs
0.11 / 0.13 µs
0.97 / 1.33 µs
Wycheproof v1 strict parity suites (median ms, lower is better)
Corpus
Silverfire (x86-64 / ARM64)
libsecp256k1 0.8.0
OpenSSL 3.6.5
Strict agreement
secp256k1 valid (162)
2.69 / 2.90 ms
2.87 / 2.92 ms
24.94 / 25.01 ms
162/162 strict
secp256k1 full Bitcoin (464)
4.66 / 5.08 ms
3.18 / 3.22 ms
27.97 / 28.16 ms
464/464 (OpenSSL 462/464)
P-256 valid (174)
5.30 / 5.83 ms
—
6.61 / 6.63 ms
174/174 strict
P-256 full (484)
9.47 / 10.99 ms
—
7.64 / 7.69 ms
484/484 on all 4 targets
Signing in libs/crypto_ecdsa on wasm-gc, wasm and js fails closed with ForbiddenCapability via target_ecdsa_capability, so those cells are empty. Cross-engine self-check checksum: 1305428567. Table footprints: 192 KiB verify table vs 1 MiB (libsecp256k1 window 15); 22 KiB signing comb vs 86 KiB.
Silverfire separates each target’s implementation and evidence tier explicitly in openspec/changes/selune-jasmin-silverfire/ (35 EARS requirements JASMIN-SF-001–035, 38 Lean 4 theorems in spec/JasminSilverfireProofAudit.lean) and docs/jasmin-crypto/ (6 primary-source dossiers, 109-node typed ontology). Eight of nine generated .s files cross-compile bit-identically across hosts, while p256_point_pub.s carries a documented host-pinned exception under JasminSf002; libs/crypto_jasmin/gen/JASMIN-MANIFEST.json verifies 44/44 SHA-256 digests (9 .s artifacts + 31 C11 sources + 4 precomputed tables), and nm-check / check-elf confirm 0 secret symbols in verify-only objects and non-executable GNU_STACK RW.
Linux x86-64 (Jasmin L2)
Stock Jasmin v2026.09.0 ADX/BMI2 (MULX/ADCX/ADOX) 4×64 field and point kernels compiled with -stack-zero loopSCT, verified by jasmin-ct --arch=x86-64 --doit --sct (30/30) and jasmin-checksafety across 4 field files (26 slices) plus P-256 RCB sub-slices (full composite point files exceed single-pass checker limits). Capped at L2 until a kernel-checked functional proof binds the exact code_pin.
wasm, wasm-gc, js and the portable fallback run 100% pure portable MoonBit (SafeGCD30 20×30 steps, Global-Z / Co-Z coordinates, lazy w=12 tables), bit-identical to native on every test vector (CAG-30).
NonUpgradableEvidence · upgradable = false
Hardware DOIT / DIT boundary (JasminSf023)
Software constant-time checks and runtime PSTATE.DIT toggling cannot prove silicon-level microarchitectural timing invariance. Assumption A4 (hardware ARM PSTATE.DIT and x86 DOITM, plus speculative and physical channels) remains permanently open in openspec/changes/selune-jasmin-silverfire/obligations.mars.
NonUpgradableEvidence · upgradable = false
Unlinked Coq CT preservation (JasminSf024)
Stock Jasmin v2026.09.0 proves its Coq compiler passes with 0 Admitted ITrees, but end-to-end Coq constant-time preservation is not linked to the exact compiled assembly code_pin; native Jasmin kernels therefore remain at L2 and are never promoted to L3.
Safe multicore throughput
No raw fork(), no C threads touching MoonBit’s reference-counted heap and no SharedArrayBuffer. Native selune_mcw workers start from a separate verify-only binary over AF_UNIX sockets with the 32-byte SFMT-v1 frame. nm -a confirms 0 secret, signing, comb, vault or DIT symbols in selune_mcw.exe on both hosts (1,571 x86-64 / 1,476 ARM64 defined symbols). All eleven canonical cross-architecture digests—including table_digestaa6136bd—are bit-identical between ARM64 and x86-64 for every worker count from 1 to 24 (parity_all_w = true).
24 workers x86-64 (8.91× grouped / 8.02× distinct) with fresh 128-bit OS CSPRNG weights and exact deterministic serial fallback on any invalid chunk. ARM64 16 workers: 1,239,709/s grouped (7.26×) and 645,445/s distinct (7.84×).
Full multicore scaling table across all worker counts (W=1..24)
Batch throughput by worker count (native chunked selune_mcw & zero-SharedArrayBufferwasm-gc)
dudect under load 28/28 shipped CT primitives pass on both hosts under 16-worker saturation: ARM64 |t| ≤ 4.284 (29,760,512 sigs @ 285,352/s) & x86-64 |t| ≤ 3.430 (17,196,032 sigs @ 338,998/s), 0 parity failures and 0 orphaned workers
Zero CT leaks 0 leaks across 114 ARM64 CT symbols (26,333 insns) and 114 x86-64 CT symbols (44,392 insns) on the shipped CT binary, plus 3-lane check_ct_asm.sh (gcc, clang, LLVM-IR)
Isolationposix_spawn + exec, MADV_DONTFORK, 0 secret symbols in selune_mcw.exe on both architectures
Constant time: 4×28 dudect strip plot on both architectures
All RFC 6979 and BIP-340 nonce paths enforce the SF-01 fixed-window schedule (FIXED_EXTRA_ROUNDS=4, supported-curve allowlist, non-inlined mbcrypto_rfc6979_select_candidate_ct, permanent Warden guard WD-CAG-006) and store guarded HMAC-SHA-256’s message schedule inside the 768 Bmlocked sf_sign_workspace_t (0alloca [64 x i32] in Clang -O2 -emit-llvm IR). All 4/4 dual-host dudect receipts (canonical 46-file CT source digest bf99c7a7) admit all 28 shipped CT primitives idle and under 16-worker saturation while catching both deliberately leaky positive controls at |t| = 89–2,105.
20,000 samples per workload (95th-percentile cropped). Max |t|: ARM64 idle 3.194, ARM64 16w sat 4.284, x86-64 idle 3.607, x86-64 16w sat 3.430. Both deliberately leaky controls (vartime inversion on secret k and secret-bit branch) trigger across every run at |t| = 89–2,105.Full 31-workload dual-host dudect table (28 shipped CT primitives + clean baseline + 2 leaky controls)
Welch |t| across all 31 dual-host dudect workloads (threshold |t| < 4.5; positive controls > 10)
On ARMv8-A, the C11 secret kernels toggle PSTATE.DIT around secret execution with live readback enforcement when HWCAP_DIT is present, while the idle host process starts at PSTATE.DIT=0; silicon timing guarantees (A4: ARM PSTATE.DIT and x86 DOITM) remain permanently open NonUpgradableEvidence (JasminSf023). Because no compiler guarantees zeroization of a managed heap, signing in libs/crypto_ecdsa fails closed on wasm, wasm-gc and js; browser custody uses the separate opt-in linear-memory Wasm engine below.
Wasm signer on six BrowserStack targets · 90/90 outputs verified locally · 231,718 B
For single-user browser custody without a signing server, libs/crypto_wasm_signer/ and bindings/wasm-signer/ compile to a fixed 64-page (4 MiB) unshared linear-memory module (crypto_wasm_signer.wasm, 231,718 B, SHA-256 f487f9590a2e9937, 0 inspect_wasm_artifact violations). Each attempt runs inside a COOP/COEP (Y/Y) standby zero-secret worker fetched once from immutable hashed bundle /v/9555b74d3dbec5e3/src/signing_worker.mjs (HTML no-store), enforcing worker-owned byte-bound WeakMap provenance, realm-captured crypto.subtle, dual-slot OPFS A/B WAL with synchronous flush(), post-sign self-verification, and full 4 MiB BigUint64Array OR-reduction zero readback (OR = 0, tail control 0x40). Local Linux Chromium 159.0.8154.6 passes 6/6 Playwright E2E and 16/16 Node conformance checks.
0.20–0.26 ms macOS Safari · 0.28–0.44 ms real iPhone 16 Pro Max · 0.39–0.52 ms real Galaxy S24 (secp256k1 kernel span across StrictDER / P1363 / CIP-49 / BIP-340)
CIP-49 span across all 6 targets: 0.24–0.80 ms kernel, 9.5–21.9 ms standby-warm E2E (9.2–21.9 ms across both E2E profiles), 16.6–48.9 ms cold E2E, and 18.7–100.3 ms persistent OPFS WAL. 4 MiB wipe readback: 0 residue on all 6/6 targets.
BrowserStack 6/6 Desktop & Real Mobile Phone Matrix (Final RC, worker bundle 9555b74d, 90/90 locally oracle-verified, StrictTopLevelSigner COI Y/Y)
Device
BIP-340 p50
CIP-49 p50
P1363 / DER p50
P-256 p50
4 MiB Wipe p50
One-Shot E2E Warm / Cold (CIP-49; BIP-340 Warm)
OPFS A/B WAL P-256
macOS Safari 27.0
0.26 ms (3,846/s)
0.24 ms (4,167/s)
0.20 / 0.20 ms (5,000/s)
0.22 ms
6.46 ms
15.7 / 19.4 ms; 15.3 ms
27.4 ms
Real iPhone 16 Pro Max (iOS 27 Safari)
0.44 ms (2,273/s)
0.34 ms (2,941/s)
0.28 / 0.28 ms (3,571/s)
0.28 ms
8.60 ms
21.9 / 28.4 ms; 21.9 ms
32.6 ms
Real Samsung Galaxy S24 (Android Chrome)
0.52 ms (1,942/s)
0.51 ms (1,961/s)
0.47 / 0.39 ms (2,564/s)
0.30 ms
2.39 ms
13.6 / 48.9 ms; 14.2 ms
100.3 ms
Windows 11 Chrome 158
0.52 ms (1,923/s)
0.56 ms (1,802/s)
0.51 / 0.48 ms (2,083/s)
0.36 ms
0.58 ms
13.0 / 44.8 ms; 12.5 ms
83.1 ms
Windows 11 Edge 158
0.52 ms (1,923/s)
0.57 ms (1,754/s)
0.53 / 0.47 ms (2,128/s)
0.37 ms
0.59 ms
10.8 / 31.0 ms; 13.2 ms
55.8 ms
macOS Firefox 161
0.58 ms (1,724/s)
0.80 ms (1,250/s)
0.80 / 0.82 ms (1,220/s)
0.76 ms
0.18 ms
9.5 / 16.6 ms; 9.2 ms
18.7 ms
Browser P-256 uses WebCrypto with Wasm framing. Browser JIT and OS memory zeroization are permanently open host boundaries (WasmSign030/047/048/049, upgradable = false).
1-Fetch Worker Caching Every device fetched immutable worker bundle 9555b74d exactly once (200:10, 304:0) across 40+ worker spawns while HTML stayed no-store
Wipe & Scoped Timing 6/6 verified 4 MiB OR == 0 and tail tamper control (0x40 at byte 4,194,303); scoped Wasm timing |t| = 1.017 vs leaky 15.4933 (promotesToConstantTimeProof = false)
Safari & iOS WebKit operational notes
Verified WebKit behavior
macOS Safari 27.0 and real iPhone 16 Pro Max (iOS 27 Safari) do not expose window.originAgentCluster, yet both achieve StrictTopLevelSigner with live document and worker crossOriginIsolated === true, 1-fetch immutable caching, WebCrypto P-256 IDB reload, and synchronous OPFS flush(). WebKit JSC runs the 4 MiB BigUint64Array wipe pass in 6.46–8.60 ms (vs 0.18–2.39 ms on V8/Gecko due to BigInt boxing) and requires CA-trusted HTTPS for isSecureContext.
NonUpgradableEvidence · upgradable = false
Four permanently open browser trust boundaries
Pinned in openspec/changes/selune-wasm-signing/obligations.mars: WasmSign030 (host OS, browser binary, WebCrypto, authenticator hardware, RNG and served assets sit outside algebraic proof scope); WasmSign047/WasmSign051 (crossOriginIsolated does not prove OS process isolation or exclude speculative/JIT leaks, and scoped Wasm timing never equates browser signing to native GuardedSecretVault CT); WasmSign048 (all-zero readback covers observed linear memory only, not engine copies, JIT spills, swap or dumps); WasmSign049 (OPFS A/B WAL cannot detect whole-origin-store snapshot rollback).
Five languages, one frozen ABI
The shared library libsilverfire.so.1 exports exactly 18 symbols under the version node SILVERFIRE_1.0 and links nothing but the C library and the loader, so the calling process carries no MoonBit runtime. Each binding checks the C struct layout at start-up and refuses to run on a mismatch. Before a pool spawns its workers, the library pins the SHA-256 of the worker binary.
The header is ffi/c/include/silverfire.h. It builds clean with gcc and clang at -std=c11 -Wall -Wextra -Werror -Wpedantic. 7,312 assertions pass under the standard build and under ASan, UBSan and LSan; 7,349 pass under TSan with eight concurrent threads; 36 more cover worker reaping after faults.
The header bindings/cpp/silverfire.hpp needs no library build and wraps the context and the worker pool in move-only RAII types. 6,262 assertions pass against the release worker in static, shared and sanitizer builds.
assert(sf::Context::check_abi_layout() == sf::Status::Ok);
auto ctx = sf::Context::open(worker_bin_path);
auto pool = sf::MtPool::open(ctx, /*workers=*/16, /*chunk_size=*/16);
auto outcome = ctx.ecdsa_verify_cip49(pk33, msg32, sig64);
The Rust crates live in bindings/rust/: a #![no_std]silverfire-sys crate with no dependencies and a safe silverfire crate whose Context and MtPool are Send + Sync. The strict lint cargo clippy -- -D warnings passes.
silverfire::verify_abi_layout()?;
let ctx = silverfire::Context::open(&silverfire::ContextConfig::new(worker_bin)?)?;
let outcome = ctx.ecdsa_verify_cip49(&pk33, &msg32, &sig64)?;
let pool = ctx.open_mt_pool(silverfire::MtPoolLimits::default())?;
The package @silverfire/crypto lives in bindings/ts/. It is ESM with zero dependencies, no SharedArrayBuffer, and no custody-signing capability in the browser build. 9 of 9 conformance suites pass and tsc --strict is clean.
The package silverfire-cardano lives in bindings/haskell/. It calls the library with ccall safe under the threaded runtime (+RTS -N), with exact Storable layouts and the Plutus V3 CIP-49 three-way outcome. 44 of 44 layout, offset and constant checks match the C header.
verifyAbiLayout >>= either throwIO pure
withContext (defaultContextConfig workerBin) $ \ctx -> do
outcome <- verifyEcdsaCip49 ctx pk33 msg32 sig64 -- Cip49Valid | Cip49InvalidSignature | Cip49MalformedInput
pure outcome
Assurance without theater
A green badge hides where software verification ends. Every row in Silverfire’s 7/7 MARS 1.0 ledgers holds one non-upgradable tier: tests stay L0, Quint stays L1, and Jasmin DOIT/SCT, CBMC/Bitwuzla and LLVM-IR SMT stay L2. Only zero-sorry Lean 4 kernel proofs reach L3. Native Jasmin x86-64 and hybrid ARMv8-A kernels stay capped at L2 until kernel-checked functional equivalence proofs bind their exact code_pins.
Software proofs cannot verify silicon or browser hosts, so those rows stay permanently open (NonUpgradableEvidence, upgradable = false). JasminSf023 leaves hardware A4 timing assumptions (ARM PSTATE.DIT, x86 DOITM) open, and JasminSf024 leaves unlinked Coq CT preservation open. WasmSign030/047/048/049 leave browser and OS binaries, WebCrypto, JIT/speculative isolation, non-linear memory copies and whole-origin OPFS snapshot rollback open. Linked-ELF BINSEC/Rel (JasminSf018), cross-host parity for host-pinned p256_point_pub.s (JasminSf002; 8/9.s files match) and full-loop jasmin-checksafety hold 0 release credit in v0.3.1 and remain roadmap items, coming soon.
Lean 4.35.0 (L3). The proof audit checks 215 declarations selected by ProofAudit.lean (145 Silverfire declarations independently audited in spec/EcdsaProofAudit.lean: 73 in EcdsaAlgebra covering unconditional RCB completeness with (0, 0, 0) excluded and real secp256k1 and P-256 instantiations, 44 in SilverfireFieldBV, and 28 in WasmSigningAlgebra) plus 38 audited theorems in spec/JasminSilverfireProofAudit.lean, all with zero sorry and only the standard axioms propext, Classical.choice and Quot.sound. No positive proof uses the native bv_decide trust axiom.
Solver proofs (moon prove). Dual-prelude moon prove discharges 48 crypto goals in proofs/crypto, 15 in-place production kernel goals in libs/crypto_proof_kernels, 16 linear-memory Wasm signer kernel goals in libs/crypto_wasm_signer/prove_kernels, and 14 Conway kernel goals under both the default and the machine-integer prelude.
Bounded model checking (CBMC 6.11.0 + Bitwuzla 0.11.0, L2)../bin/selune formal cbmc directly #includes unmodified production C11 TCB sources (mbcrypto.c, silverfire_client.c, sfmt_pool.c) with --unwinding-assertions, proving 2,536/2,536 properties (0 unwinding failures) and refuting its 1-bit negative control mutant (exit 10). Separately, libs/crypto_jasmin/csrc/cbmc_harness_* proves 11,753/11,753 ARMv8-A field and point properties via cbmc --bitwuzla (14,289/14,289 total).
Protocol model checking (Quint, L1). Bounded Quint checks kill 32/32 live single-fault mutants across 16 ECDSA custody mutants, 8 multicore mutants and 8 browser Wasm custody mutants, with zero ghost flags, plus two adversarial POSIX/FFI glue models (spec/CustodyWalAnchor.qnt, 5/5 tests; spec/VaultSplitFfiProtocol.qnt, 4/4 tests) proving 2,000-trace positive safety while refuting rollback-lag, unverified-truncation, and split-FFI key-extraction controls.
Continuous differential fuzzing (Tribble, L0)../bin/selune tribble runs 5/5 targets across libFuzzer + ASan/UBSan + OpenSSL differential oracles (c_mbcrypto_stateful, c_mbcrypto_rfc6979, c_sfmt_wire), a pure-MoonBit codec bijection oracle (mbt_crypto_codec), and the pinned production .wasm ABI oracle (wasm_signer_abi), with llvm-cov coverage, 3/3 fail-closed negative controls (NC-1..NC-3), and 2,797,493 executions with 0 crashes.
Jasmin v2026.09.0 & 3-lane CT gate (L2).libs/crypto_jasmin/ verifies 8/9 bit-identical cross-compiled .s files (with a documented host-pinned exception for p256_point_pub.s under JasminSf002), 44/44 JASMIN-MANIFEST.json SHA-256 pins, jasmin-ct --doit --sct and field/sub-slice jasmin-checksafety on x86-64, stock ARMv8-A Jasmin leaves + verify_arm64_ct_asm.sh (JasminSf018 open), 3-lane check_ct_asm.sh (gcc, clang, LLVM-IR br i1), and live objdump on the shipped CT binary across 114 ARM64 / 114 x86-64 CT symbols (0 leaks). Hardware A4 (JasminSf023) and unlinked Coq CT preservation (JasminSf024) stay permanently open NonUpgradableEvidence.
Formal bridge. The checked-in release-manifest.json pins the SHA-256 of all 25 fixture targets (14 positive, 6 negative controls refuted, 5 probes), the exact theorem types of the 4 Lean kernel proofs, and 5 production_sources (fe9.mbt, mont.mbt, verify.mbt, sign.mbt, mbcrypto.c). ./bin/selune formal verify --manifest ... --replay passes 16/16 checks with 20 obligations replayed; LLVM-IR proofs (Z3 + cvc5) stay at L2, Lean kernel proofs reach L3.
MARS 1.0 & Warden release gate. Seven active MARS 1.0 ledgers hold 533 obligation rows with 606/606 verified code_pin and receipt pins (0 diagnostics, 0 stale sources under mars check --fresh; live witness and drop controls under mars audit --fresh). ./bin/selune warden gate passes with 0 CRITICAL, 0 HIGH, 36/36 CAG gates (including WD-CAG-006, WD-API-001, WD-ERR-001, and WD-ARENA-001), 31/31 receipts, and 4/4 mirrors.
Custody & release gate.GuardedSecretVault::open_native_strict() seals keys and signing workspaces inside the guarded C11 arena with O(1) authenticated binary wal.v3 journaling, immediate durable external rollback anchoring, and mandatory CRYPTO-Q4 stored-Q self-verify; browser signing runs in an isolated fixed 4 MiB linear-memory Wasm worker. No review can waive a failing machine gate.
The 36 cryptographic hard gates
The checklist crypto-hard-gate-checklist.json (3e5b2d6f…) defines CAG-01 to CAG-36 across eight domains, each with its requirement, primary sources, evidence paths and attack prompts. The Warden checks on every tick that all 36 gates are present and well formed. Gates that carry a disclosed boundary or hardening note are marked.
Selûne v0.3.1 ships BIP-340 Schnorr signing and batch verification (libs/crypto_ecdsa/schnorr.mbt and silverfire_mt randomized GLV MSM), secp256k1ecrecover (libs/crypto_ecdsa/ecrecover.mbt), and the pure-MoonBit Cardano UPLC CEK machine (libs/cardano_cek/). The v0.4.0 Cardano ledger requirements set 60 EARS requirements across six milestones for a fully conformant ledger. BLS12-381 pairings for CIP-381 with multi-scalar multiplication for CIP-133, BLAKE2b and Keccak-256, the Praos ECVRF, and Sum6 and Sum7 key-evolving signatures—each held to the same 36 gates, formal bridge and five bindings—are roadmap items, coming soon.