Skip to content

Selûne v0.3.0 — "Silverfire"

Choose a tag to compare

@CharlesHoskinson CharlesHoskinson released this 01 Dec 13:27
· 132 commits to master since this release

Silverfire, the constant-time, safe-multicore cryptographic building library of Selûne

Selûne v0.3.0 — “Silverfire”

Selûne v0.3.0 ships Silverfire, a cryptographic building library written in portable MoonBit. It verifies secp256k1 signatures 2.06× faster than OpenSSL 3.6.5, runs the same code in the browser without shared memory, keeps private keys in a sealed native vault and ties every layer to an algebraic law that the MoonBit compiler enforces. ECDSA on secp256k1 and P-256 is its first signature scheme, and the Cardano Conway ledger is its first consumer.

See it live: Silverfire · ECDSA Lab · Category Studio · Diagram gallery · Cardano Lab

Speed on two architectures

On a 24-core Intel Core Ultra 9 290HX Plus, Silverfire verifies a secp256k1 signature in 76.95 µs against 158.56 µs for OpenSSL 3.6.5. Compiled to wasm-gc, the same verify takes 76.56 µs. With 24 worker processes the native engine verifies 120,772 signatures per second, and the browser engine reaches 119,359 per second with no SharedArrayBuffer. On a 16-worker ARMv9 machine the numbers are 83,710 native and 99,372 in wasm-gc. The Cardano Conway ledger checks a 4,000-transaction block at 8,883 transactions per second on x86_64 (21.60× serial) and 3,658 on ARMv9 (10.71×). Every canonical digest is bit-identical between ARM64 and x86_64 at every worker count.

Silverfire passes all 464 Wycheproof secp256k1 Bitcoin vectors in 15.99 ms, where OpenSSL takes 28.15 ms and accepts two high-S and BER cases. It passes all 484 P-256 vectors on all four targets.

Constant time, measured idle and under load

The dudect harness admits the hardened binary idle, with a largest |t| of 3.253, and while 16 workers verify 239,616 live signatures at 60,524 per second, with a largest |t| of 1.851. The deliberately leaky control scores 2,182.67 and 1,809.97. The shipped binaries contain no udiv or sdiv in any of 279 ARM64 crypto and vault symbols, and no div or idiv in any of 181 x86_64 crypto symbols.

A sealed custody vault

Private keys and nonces live in a guarded C11 arena with PROT_NONE guard pages, MADV_DONTFORK, MADV_DONTDUMP and mlock. The vault type GuardedSecretVault has one public constructor, open_native_strict(), and the journal sink is a sealed trait that refuses an in-memory journal. Signing exists only on native; wasm, wasm-gc and js reject it at compile time.

Five language bindings

The shared library libsilverfire.so.1 exports 18 symbols under SILVERFIRE_1.0 and carries no MoonBit runtime into the caller. It ships with C11 (7,312 assertions under ASan, UBSan and LSan, 7,349 under TSan), header-only C++20 RAII, #![no_std] Rust, the zero-dependency TypeScript package @silverfire/crypto and ccall safe Haskell bindings with the Plutus V3 CIP-49 outcome.

Proofs tied to the code

Lean 4.35.0 checks 114 theorems with no sorry and only the standard axioms. The moon prove checker discharges 30 crypto and 14 Conway kernel goals under both preludes, and the Quint custody and multicore models kill all 17 single-fault mutants. The formal bridge in libs/formal_bridge pins the SHA-256 of all 25 proof targets and the exact type of each Lean kernel theorem in a checked-in release manifest, and ./bin/selune formal verify --manifest … --replay re-executes the Lean proofs. Four MARS 1.0 ledgers with 332 rows pass mars1 check --fresh with no stale source. The release meets the 36-gate checklist CAG-01 to CAG-36. A deterministic recheck of every gate receipt closes the bounded-audit protocol in Accepted(deferred_ids).

The rest of the platform

Warden (./bin/selune warden) is a read-only process auditor that starts with each session and checks Python policy, attribution hygiene, MARS pin freshness, proof drift, ABI parity, host disk safety and the 36 cryptographic gates every five minutes. The warden gate command blocks a release on any critical or high finding.

Dreamscape v0.3.0 accepts --state-dir anywhere on the command line and folds finished cells into its knowledge graph atomically, including automatically after agentic commit.

Cardano Conway gains docs/CARDANO-LEDGER-V040-REQUIREMENTS.md: 60 EARS requirements across six milestones for a fully conformant ledger, with BIP-340 Schnorr, BLS12-381, BLAKE2b, Keccak-256, the Praos VRF and key-evolving signatures added to Silverfire. That ledger is a roadmap item, coming soon.

Skills: halmos, crypto-assurance, warden and humanizer ship in skills/ for any agent CLI.

The full story, from the algebraic skeleton to the receipts, is in the README.