Local-first cryptography for humans and teams
Audited, dependency-light building blocks for mnemonics, envelope encryption, Shamir secret sharing and
team secret management — plus the dcrypt CLI. Everything runs locally; the only code here that opens a
socket is dcrypt account, which talks to the Constructive endpoint you name.
| Package | npm | Source | Description |
|---|---|---|---|
| @decryption/core | GitHub | Versioned envelope format — Argon2id + XChaCha20-Poly1305 | |
| @decryption/cosmology-compat | GitHub | Byte-compatible reader for the cosmology CLI encryption scheme | |
| @decryption/shamir | GitHub | Shamir secret sharing with authenticated, versioned shares | |
| @decryption/wallet | GitHub | BIP39/BIP32 wallets and offline address derivation | |
| @decryption/keys | GitHub | X25519 identities, recipient strings, on-disk keyring | |
| @decryption/secrets | GitHub | Team secrets file format, rekeying and .env export |
|
| @decryption/accounts | GitHub | Constructive accounts and API keys, held in the local vault | |
| @decryption/webauthn | GitHub | A software WebAuthn authenticator: passkeys kept in the vault | |
| @decryption/cli | GitHub | The dcrypt command-line interface |
Upstream @noble/* and @scure/* are ESM-only, which breaks require() in Jest and CJS tooling. These
forks vendor the unmodified sources and publish dual CJS+ESM builds.
| Package | Fork of | Description |
|---|---|---|
| @decryption/hashes | @noble/hashes 2.2.0 |
SHA-2/3, BLAKE, HMAC, HKDF, PBKDF2, scrypt, Argon2 |
| @decryption/ciphers | @noble/ciphers 2.2.0 |
AES-GCM, ChaCha20-Poly1305, XChaCha20-Poly1305 |
| @decryption/curves | @noble/curves 2.2.0 |
secp256k1, ed25519, x25519 |
| @decryption/base | @scure/base 2.2.0 |
bech32, base64, base58, hex |
| @decryption/bip39 | @scure/bip39 2.2.0 |
BIP39 mnemonics and wordlists |
| @decryption/bip32 | @scure/bip32 2.2.0 |
BIP32 HD derivation |
npm install -g @decryption/cli
dcrypt wallet create --words 24 # generate a BIP39 mnemonic
dcrypt encrypt --in secret.txt # Argon2id + XChaCha20-Poly1305 envelope
dcrypt shamir split --shares 5 --threshold 3
dcrypt secrets init && dcrypt secrets set DATABASE_URL
dcrypt secrets run -- pnpm dev # inject secrets without writing a .env
dcrypt account signin me@example.com --endpoint https://auth.example.com/graphql
dcrypt account key create ci --expires-days 30 # secret lands in the vault, not a .env- Argon2id for passphrase KDF, with calibrated parameters recorded in the envelope header.
- XChaCha20-Poly1305 AEAD — every ciphertext is authenticated; a wrong passphrase raises rather than returning an empty string.
- Team secrets use X25519 per-recipient wrapping (age/sops-shaped), so adding or removing a teammate never requires resharing a passphrase. Shamir is reserved for break-glass recovery.
- Private keys are never written to disk unencrypted.
dcrypt accountis the one command that uses the network: session tokens and API-key secrets it receives go straight into the encrypted vault.