mooncrypt
MoonBit · cryptography

Cryptography,
one package
per algorithm.

AES, SHA-2, BLAKE3, Ed25519, X25519, RSA, and the legacy ciphers that are still in use. Every package implements one of six traits, so a program links what it calls and nothing else.

4 targets
6 traits
11 families
FIPS · RFC · SP 800
Fig. 1 Rotor, 26 contacts. Scroll to turn it. index A
01

The tape

live · this browser
mooncrypt · digest
compiled to JavaScript 01 rows

Every keystroke goes through the library compiled to JavaScript. Characters that differ from the previous digest are marked: type one letter and the whole line changes, which is the avalanche the design asks for.

4build targets
6traits
11families
1algorithm per package
03

What it refuses

fail closed
Key agreement

A point off the curve

A share that is not on the curve, or one of low order, is rejected before any arithmetic touches it. There is no switch to turn the check off.

shared(peer) // raises Broken
Authenticated encryption

A tag that does not match

open raises instead of returning a short plaintext, so a caller cannot mistake a forgery for a message.

open(nonce~, cipher~)
Block ciphers

A block of the wrong length

Sixteen bytes or nothing. The trait cannot raise, so a short block stops the program rather than reading past the buffer.

encrypt(block) // 16 bytes