dorado
Threefish, built from scratch.
The tweakable block cipher at the heart of the Skein hash function, all three sizes, with a small and honest tool stack on top: counter mode, an authenticated streaming password container, and a Skein hashing tool. One cipher and one file format, implemented nine ways: Rust, Go, C, C++, Zig, Java, Python, Haskell, and TypeScript (which also runs in your browser). Each reimplements the primitives from scratch; the shipping TypeScript CLIs and the browser demo run the verified Rust cipher compiled to WASM.
Three tools, one cipher
The project is the cipher plus a few tools that read one shared file format. The command-line tool and the hasher are ported across languages; the desktop app is the one Rust-only frontend.
dorado encrypt / decrypt
The cipher tool: encrypt and decrypt files or stdin, with a password-derived authenticated container or a caller-supplied raw key. Both paths authenticate by default (raw mode's bare CTR remains an explicit opt-out). The command-line interface is ported to eight languages plus the in-browser demo, all reading the same files.
Rust · Go · C · C++ · Zig · Python · Haskell · TypeScript · browser
gyotaku hashing
A standalone Skein-512 hashing tool, like sha256sum but Skein. Kept separate from the cipher tools so a hash needs no key stack. Named for the Japanese art of fish-printing: a fingerprint of a file.
Rust · Go · C · C++ · Zig · Python · Haskell · TypeScript · browser
dorado-gui · gyotaku-gui desktop apps
Both tools in a native window, built with iced and sharing one look: a password encrypt/decrypt app and a Skein-512 hashing app. Key derivation and hashing run off the UI thread. The desktop frontends are Rust-only.
Rust
Try it in your browser
Both tools, entirely client-side, over the verified Rust core compiled to WebAssembly. Nothing leaves your browser.
Encrypt and decrypt
Encrypt a message to a password container and decrypt it back. The
container is the same one the CLIs read, so this output decrypts with
dorado decrypt and vice versa.
Hash
Skein-512 hash a message at a chosen output length, the
gyotaku tool in the browser. The digest matches
gyotaku for the same input.
How it works
Each layer is a thin step above the one below. The cipher is the foundation; everything else is standard machinery wrapped around it.
Threefish 256 · 512 · 1024
The tweakable ARX block cipher at the core of Skein, all three sizes, encrypt and decrypt, following the Skein 1.3 spec. No S-boxes, no lookup tables.
CTR mode
Turns the block cipher into any-length encryption. The same routine encrypts and decrypts; the counter is public.
Key derivation
Argon2id, scrypt, or PBKDF2-HMAC-SHA256, with cost parameters stored in the header and bounded on decrypt to refuse a hostile file.
MAC menu 3 choices
Authentication via Skein-512 (default), HMAC-SHA256, or keyed BLAKE3. Skein-512 and keyed BLAKE3 are from scratch in every implementation; HMAC-SHA256 comes from each ecosystem's standard library (Haskell and C++ build it from scratch too). All produce 32-byte tags and are bound into the header.
How we know it works
Confidence comes from several independent checks. None of this is a security claim; it is evidence that the code matches the specifications it targets.
- Known-answer tests against official Threefish vectors for each block size.
- Differential testing against the RustCrypto crates: Threefish, and the from-scratch Skein-512 and BLAKE3, over many random inputs.
- Construction tests for round-trips, wrong passwords, tampering, truncation, and every MAC.
- Fuzzing and
#![forbid(unsafe_code)]across every crate, with a fuzz target over the decrypt parser.
One cipher, nine implementations
Dorado is written nine ways: Rust (the reference), Go, C, C++, Zig, Java (a library only), Python, Haskell, and a TypeScript port that runs both in Node and in your browser. All reimplement the same primitives from scratch, share the same on-disk format, and are byte-for-byte cross-compatible, so a file made by one opens in the others. What differs is what each runtime allows; the two TypeScript rows are the same code, only the runtime changes, and as the table shows, the TypeScript rows ship the Rust cipher compiled to WASM (the pure-TS cipher backs the test suite).
| Implementation | Role / frontends | Cipher engine | Key derivation | Streaming | Secret memory |
|---|---|---|---|---|---|
| Rust | Reference; CLIs + 2 GUIs | native | argon2 / scrypt / pbkdf2 crates | Yes | zeroize wipe; CLI and dorado-gui mlock password |
| Go | Port; CLIs | native | x/crypto + stdlib | Yes | wipes keys; mlocks password (off-heap) |
| C | Port; CLIs | native | libargon2 + OpenSSL | Yes | wipes keys; mlocks password |
| C++ | Port; CLIs | native | OpenSSL EVP_KDF | Yes | wipes keys; mlocks password |
| Zig | Port; CLIs | native | Zig stdlib (no deps) | Yes | wipes keys; mlocks password |
| Java | Port; SDK only | native | Bouncy Castle | Yes | caller-managed |
| Python | Port; CLIs | native | argon2-cffi + hashlib | Yes | caller-managed |
| Haskell | Port; CLIs | native | crypton | Yes | caller-managed |
| TypeScript · Node | Port; CLIs | WASM (Rust core) | hash-wasm | No (in-memory) | locked off-heap buffers (fail-closed; --insecure-memory opts out) |
| TypeScript · Browser | In-page demo | WASM (Rust core) | hash-wasm | No (in-memory) | none (demo) |
Axes left out above: the cipher primitives build bare-metal (no OS, no
allocator) in Rust, C, and Zig; only Rust documents a full constant-time
discipline; and memory safety is why Rust leads overall, since it alone
prevents the use-after-free and overrun bugs that can leak a secret at
compile time (C and Zig match the wipe-and-lock mechanism itself; Go
approximates it with an off-heap mlock'd buffer, though its wipe is a
convention, not a language guarantee). Full breakdown in docs/implementations.md.
Build and run
The reference build is the Rust workspace in rust/, streaming
in constant memory. The Go and TypeScript ports build the same
dorado and gyotaku commands over the same files
(see the comparison above).
cd rust
cargo build --release --workspace
# password-encrypt a file (authenticated)
target/release/dorado encrypt --password --in notes.txt --out notes.txt.mahi
# Skein-hash a file
target/release/gyotaku notes.txt