A secure passphrase generator using the EFF's large wordlist for creating memorable, cryptographically strong passphrases.
- Secure randomness: Uses
/dev/urandomfor cryptographically secure random number generation - High entropy: 4-word passphrases provide ~51 bits of entropy
- EFF wordlist: Uses carefully curated 7,776-word list optimized for memorability and security
- Fallback support: Automatically uses system dictionary if EFF wordlist download fails
- Smart selection: Generates 10x the requested passphrases (or 100 for single requests) and randomly selects from the pool
- Flexible options: Customize number of passphrases and words per passphrase
- Clone this repository:
git clone https://github.com/yourusername/passphrase.git
cd passphrase- Make the script executable:
chmod +x generate_passphrases.sh- Run the script:
./generate_passphrases.sh./generate_passphrases.sh [-n num_passphrases] [-w words_per_passphrase] [-h]-n NUM: Number of passphrases to output (default: 1)-w NUM: Number of words per passphrase (default: 4)-h: Show help message
Generate a single passphrase with 4 words (generates 100 candidates, picks 1):
./generate_passphrases.shGenerate 5 passphrases with 4 words each (generates 50 candidates, picks 5):
./generate_passphrases.sh -n 5Generate a single passphrase with 6 words for extra security:
./generate_passphrases.sh -w 6Generate 3 passphrases with 5 words each:
./generate_passphrases.sh -n 3 -w 5Generating 1 passphrase(s) with 4 words each:
Word list size: 7776 words
Entropy per passphrase: ~51.7 bits
(Generating 100 candidates and selecting 1 randomly)
1. cosmic-hedgehog-envelope-atlas
- Entropy: A 4-word passphrase from the EFF wordlist provides approximately 51.7 bits of entropy, which would take centuries to crack with current technology
- Randomness: The script uses
/dev/urandomfor cryptographically secure random number generation - Word selection: Generates 10x the requested number of passphrases (minimum 100) and randomly selects to ensure high-quality randomness
- No predictable patterns: Each word is selected independently with true randomness
- 4 words: Good for most online accounts (~51 bits entropy)
- 5 words: Better for sensitive accounts (~64 bits entropy)
- 6 words: Recommended for encryption keys (~77 bits entropy)
- 7+ words: Maximum security for critical systems (~90+ bits entropy)
- Bash shell
/dev/urandom(standard on Linux/macOS/Unix)curlorwget(for downloading the wordlist)bc(for entropy calculation)
- Downloads and caches the EFF large wordlist (7,776 words)
- If download fails, creates a fallback wordlist from
/usr/share/dict/words - Generates 10x the requested number of passphrases (or 100 for single requests)
- Randomly selects the requested number from the generated pool
- Words are joined with hyphens for easy reading and typing
MIT License - Feel free to use and modify as needed.
- Wordlist: Electronic Frontier Foundation (EFF)
- Inspired by the Diceware passphrase system