Seed Keeper Core
Seed Keeper Core is a small Rust library for deriving and encrypting keys and seeds.
Uses Argon2, AES Key Encryption Keys,
- Derive a key from username & password (salt & passphrase).
- Generate a random seed that zeroizes memory by default.
- Encrypt the seed with the key, and decrypt.
Roundtrip Usage
use ; // the main purpose of this library
use ; // re-exports to use the derived key
use ; // utils to encrypt and decrypt the seed
use ; // utils to generate a random seed
// Generate a secure random seed of 32 bytes:
let seed: Seed = rand_seed;
assert_eq!;
// Derive key material from a username (salt) and password:
let password = "some random words that you made up, for sure!".to_string;
let salt = b"some@email.com"; // Salt should be unique per password
let key = derive_key.unwrap;
assert_eq!;
// Protect your new seed by encrypting it with the password and salt key:
let encrypted = encrypt;
let decrypted = decrypt;
assert_eq!;