Cipher
Cipher encrypts files so that only the people you choose can open them. The open core,
cipher-core, is a single Go module that holds the .mdstn container format, the crypto, the
local key store, the mdstn-cipher CLI, a Go SDK and an MCP server for AI assistants. It runs
entirely on your machine: keys live in an embedded SQLite database, and no server is needed to
encrypt or decrypt.
This documentation describes cipher-core v0.5.1. Licensed under BSL 1.1, which converts to
Apache 2.0 three years after each release.
What it does
- Encrypts any file into one
.mdstncontainer format: streaming AES-256-GCM with a header MAC that commits every recipient to the same plaintext. - Three ways to encrypt: with a file password (Argon2id), to your own key, or to one or more recipients’ X25519 public keys.
- Keys you can recover: every key comes from a 24-word recovery phrase and is wrapped at rest with your key passphrase.
- Encrypt for anyone by email through CKD, the Cipher Key Directory, with no manual key exchange. Keys are pinned on first use, and hosted-directory answers are signature-checked.
- Safe file handling: a failed decryption leaves no file behind, and no command replaces a file you didn’t name.
- Scriptable: works without a terminal,
--jsonoutput, and distinct exit codes for tampering, wrong recipient and wrong password. - MCP server so AI assistants can encrypt, decrypt and look up keys, but never create or delete them.
Encrypt and decrypt your first file.
Homebrew, go install, release archives or the container image.
Create, back up, export and recover keys.
Publish your key and encrypt for anyone by email.
Use Cipher from Claude and other MCP clients.
Encrypt and manage keys from Go with pkg/cipher.
The .mdstn container, exit codes and limits.
Every command and flag.
Security reports
Don’t open a GitHub issue for a security problem. Email security@madstone.io with “cipher-core security” in the subject. The security policy lists what is in scope and how disclosure works.