Skip to content

A zero-dependency Rust library (and CLI example) that secures a Web3 wallet’s 12–24-word secret phrase behind a short, memorable password. It derives a 256-bit 🔑 with Argon2id, encrypts using AES-256-GCM🔐, and outputs a single Base64URL blob containing the salt, nonce, and authenticated ciphertext. No unsafe code, fully documented, and tested🦀

License

Notifications You must be signed in to change notification settings

sumit03guha/encryptor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

encryptor

Crates.io Docs.rs License

Encrypt a Web3 wallet secret phrase with an easy-to-remember password and store only the resulting ciphertext string.

  • KDF Argon2id — password → 256-bit key
  • AEAD AES-256-GCM — key + nonce → authenticated ciphertext
  • Blob [salt | nonce | ciphertext] Base64URL-encoded (no padding)
use encryptor::{encrypt, decrypt};

let phrase = "satoshi doll mercy …";      // wallet seed phrase
let pass   = "Fr33dom-2025!";             // memorable password

let blob = encrypt(phrase, pass)?;        // store this string
assert_eq!(phrase, decrypt(&blob, pass)?);

Threat model

✅ Protects against ❌ Does not protect against
Lost / stolen disk or backup Very weak or leaked passwords
Curious cloud operator Attackers who can key-log or phish your pass

Security disclaimer: No formal audit yet. Use at your own risk.


API overview

  • [encrypt] – passphrase → ciphertext string
  • [decrypt] – ciphertext string → original secret phrase
  • [CryptoError] – unified error enum

About

A zero-dependency Rust library (and CLI example) that secures a Web3 wallet’s 12–24-word secret phrase behind a short, memorable password. It derives a 256-bit 🔑 with Argon2id, encrypts using AES-256-GCM🔐, and outputs a single Base64URL blob containing the salt, nonce, and authenticated ciphertext. No unsafe code, fully documented, and tested🦀

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages