Expand description
A Rust port of niceware
Sections of documentation have been copied from the original project.
Important: generate_passphrase
is slightly different than original!
This library generates random-yet-memorable passwords. Each word provides 16 bits of entropy, so a useful password requires at least 3 words.
The transformation from bytes to passphrase is reversible.
Because the wordlist is of exactly size 2^16, niceware is also useful for convert cryptographic keys and other sequences of random bytes into human-readable phrases. With niceware, a 128-bit key is equivalent to an 8-word phrase.
Similar to the source, heed this warning:
WARNING: The wordlist has not been rigorously checked for offensive words. Use at your own risk.
§Examples
// Creates 128-bit passphrase which is considered cryptographically secure.
println!("Passphrase: {}", niceware::generate_passphrase(8).unwrap().join(" "));
Enums§
Functions§
- bytes_
to_ passphrase - Create word-based passphrase from given bytes.
- generate_
passphrase - Convenience funtion to generate a passphrase using OS RNG
- passphrase_
to_ bytes - Decode words into bytes