SDKs
Native deniable encryption for your language. Same algorithm, same security, no HTTP dependency.
Node.js / TypeScript
The reference implementation. Zero runtime dependencies. 8KB.
# install
$ npm install deny-sh
# usage
import { encrypt, decrypt, generateDeniableControl } from 'deny-sh';
const ct = encrypt(plaintext, { password1, password2, controlData });
const msg = decrypt(ct.ciphertext, { password1, password2, controlData });
const fake = generateDeniableControl(ct.ciphertext, password1, password2, fakePlaintext);
Python
pycryptodome for AES, stdlib hashlib for scrypt. Algorithm-compatible with the TypeScript SDK. 59 tests.
# install
$ pip install deny-sh
# usage
from deny_sh import encrypt, decrypt, generate_deniable_control
ct, control = encrypt(b"seed phrase", "pw1", "pw2")
msg = decrypt(ct, "pw1", "pw2", control)
fake_ctrl = generate_deniable_control(ct, "pw1", "pw2", b"decoy seed")
Go
golang.org/x/crypto for scrypt, stdlib crypto/aes for AES-CTR. Algorithm-compatible with the TypeScript and Python SDKs. 25 tests.
# install
$ go get github.com/deny-sh-crypto/deny-go
# usage
import denysh "github.com/deny-sh-crypto/deny-go"
ct, ctrl, _ := denysh.Encrypt([]byte("seed phrase"), "pw1", "pw2", nil)
msg, _ := denysh.Decrypt(ct, "pw1", "pw2", ctrl)
fakeCtrl, _ := denysh.GenerateDeniableControl(ct, "pw1", "pw2", []byte("decoy seed"))
Rust
aes, ctr, scrypt, and sha2 crates. No unsafe code. Algorithm-compatible with the TypeScript SDK. 29 tests.
# install (Cargo.toml)
[dependencies]
deny-sh = "0.1"
# usage
use deny_sh::{encrypt, decrypt, generate_deniable_control};
let (ct, ctrl) = encrypt(b"seed phrase", "pw1", "pw2", None).unwrap();
let msg = decrypt(&ct, "pw1", "pw2", &ctrl).unwrap();
let fake_ctrl = generate_deniable_control(&ct, "pw1", "pw2", b"decoy seed").unwrap();
Algorithm parity
All SDKs implement the same algorithm. A file encrypted with the Python SDK can be decrypted with Go or Rust. The ciphertext format is identical: salt(32) + iv(16) + AES-256-CTR(scrypt-derived key, plaintext XOR control_data).
Every SDK is AGPL-3.0. Commercial licenses available for proprietary use.