A CLI passphrase generator that builds a passphrase by simulating dice throws and using them to pick components of that passphrase from the Diceware™ wordlist.
The resulting passphrases are cryptographically strong, but easier to remember than regular random-character passwords.
Sample output:
Your passphrase is: ping-paper-edwin-boil-gator-spooky
Copied to clipboard! ✅
This is a small project mostly for me to learn Rust. However, if you find it useful, you can install it using the steps below.
git clone [email protected]:anna-hope/password-generator.git
cd passsword-generator
cargo install --path .
Some websites require your password to include digits, special characters, or a mix of lowercase and capital letters. You can generate a passphrase that satisfies all of those requirements like this (assuming you've installed the program as described above):
password_generator -s digit -a -c
However, the resulting password will likely be much harder to remember, for example Mv7Town1Ohmic6Sis0'1Kt3^3"6Spurn
.
You can see all the available options by running
password_generator --help
The Diceware FAQ provides a lot of good background information about the algorithm and logic behind this program. I would recommend reading it if you're interested in more information about security, entropy, adequate password length for different scenarios, and more.
That's true.
This program simulates dice throws by using the StdRng in Rust's rand crate, which uses a cryptographically secure algorithm to generate random numbers. The resulting passphrases generated by this program should be strong enough for most applications.
However, if you want to have more certainty in your generated passphrase, please do use physical dice and follow the Diceware instructions manually.