I have released the first version of Silverfire on Selune! @moonbitlang can now prototype multicore friendly, highly portable cryptographic algorithms and cryptocurrency…
Original source excerpt
I have released the first version of Silverfire on Selune! @moonbitlang can now prototype multicore friendly, highly portable cryptographic algorithms and cryptocurrency components! https://t.co/J7K…
I have released the first version of Silverfire on Selune! @moonbitlang can now prototype multicore friendly, highly portable cryptographic algorithms and cryptocurrency components! https://t.co/J7KfV2RYt4 I've implemented ECDSA and the Cardano Ledger as test cases. Benchmarks attached. Silverfire is the cryptographic library inside Selûne. It is written in portable MoonBit and compiles from one source tree to native binaries, wasm-gc, wasm and JavaScript. Field elements, curve points, transcripts, capabilities and custody states are algebraic data types checked by the MoonBit compiler, and the same source produces both the executable cryptography and its category-theoretic diagrams. At the base is a portable arithmetic and encoding core. Prime and scalar fields for secp256k1 and NIST P-256 use constant-time Fe9 and Montgomery representations, with branchless conditional selection, constant-time modular inversion and low-S scalar normalization. The shipped crypto symbols contain no hardware division instructions on ARM64 or x86_64. Complete projective Renes–Costello–Batina group laws remove point-addition edge cases, GLV endomorphism decomposition accelerates secp256k1 verification, and strict SEC 1 decoding rejects infinity and hybrid encodings before any arithmetic runs. The wire layer is pure MoonBit: SHA-256, HMAC-SHA256, strict BIP-66 DER, IEEE P1363, domain-separated transcripts, and a Plutus V3 CIP-49 verifier that distinguishes valid signatures, invalid signatures and malformed inputs. ECDSA on secp256k1 and P-256 is the first complete signature scheme. Verification behaves identically on every compilation target and passes the Wycheproof vectors for both curves. Signing exists only on native targets; the wasm, wasm-gc and JavaScript builds reject it at compile time. On native hosts, private keys and nonces never touch the MoonBit heap. They live in a C11 guarded arena with PROT_NONE guard pages, MADV_DONTFORK, MADV_DONTDUMP, mlock, fork-safe teardown, volatile zeroization and RFC 6979 nonce derivation. The vault type, GuardedSecretVault, keeps its fields private and has a single public constructor, open_native_strict(), which checks live kernel policy flags before allowing any key operation. Every signing operation writes to a crash-safe POSIX file journal through the sealed DurableJournalSink trait. The journal refuses in-memory sinks, binds
AI context is not available for this statement. The original source can be read independently.