A Python tool that evaluates password strength by calculating entropy and generates secure passwords using either random characters or BIP39 word lists.
- Password Strength Analysis: Calculates entropy in bits to determine password strength
- Entropy-based Security: Recommends passwords with at least 128 bits of entropy
- Dual Password Generation Methods:
- Random character passwords (letters, numbers, special characters)
- BIP39 word-based passwords with added complexity
- Smart Character Set Detection: Analyzes which character types are used in your password
The tool calculates password entropy based on:
- Character set size (lowercase, uppercase, digits, special characters)
- Password length
- Formula:
entropy = length × log₂(character_set_size)
- Uses full ASCII character set (letters, numbers, punctuation)
- Minimum length of 16 characters
- Completely random generation for maximum entropy
- Uses the BIP39 wordlist (2048 words)
- Randomly capitalizes 1-2 letters per word
- Joins words with random special characters
- Inserts 2-4 random digits at random positions
- Example:
aBandon#7fiRe|2gHost&Ocean9
- Python 3.6+
bip39-words.txtfile (included in repository)
python main.pyFollow the prompts:
- Enter your password to check its strength
- If entropy is below 128 bits, choose to generate:
rfor random character passwordwfor word-based password
- Strong: ≥ 128 bits of entropy
- Recommended minimum: 16 characters for random passwords
- Word-based: 4 words with modifications provide good memorability and security
main.py- Main program filebip39-words.txt- BIP39 wordlist (2048 words)README.md- This file
Welcome to the Password Strength Meter!
A strong password should have at least 128 bits of entropy.
let's check your password strength.
Enter your password: password123
The entropy of the password is: 57.00 bits
Your password is too weak. Let's make a new one.
Generate a random password (r) or a words-based password (w)? w
Your new password: 7meTal&Rocket#9sUn|