Simple entropy password validator.
Project description
Enpass is a simple password entropy strength validator
This project can be used to validate a password strength. Designed to be lightweight with the following benefits:
- No external API calls
- No large data sets
- Focused entirely on raw entropy values
- More flexible (doesn't require uppercase, numbers, special characters)
Installation
pip install enpass
Quick Start
calc_entropy
calculates the entropy of a password in bits.
Entropy equation = log2(B^L)
B = Base; L = Length
import enpass as ep
password = 'P@SSW0RD!'
#Calculates the entropy of a password in bits.
entropy = ep.calc_entopy(password)
validate
checks if the password's entropy meets the specified minimum requirement.
Passwords should ideally be > 60. Great Passwords should be between 70-90.
min_entropy = 60.0
# Checks if the password's entropy meets the specified minimum requirement.
validate = ep.validate(entropy, min_entropy)
estimate_bruteforce_time
assumes that cracking time scales linearly with the number of possible combinations.
While this might hold for straightforward brute-force attacks, more sophisticated attacks, such as dictionary attacks or those exploiting weaknesses in password hashing algorithms, may have different time complexities.
guesses_per_second = 100_000_000
# Estimates the amount of time required to brute-force a password
time_brute_estimate = ep.estimate_bruteforce_time(entropy, guesses_per_second)
Roadmap
- Entropy Calculator
- Brute-Force Estimate
- Scoring
- Feedback
- Throttling/Hashing Brute-Force Estimate
- Character Sequences
Contributing
Contributions are welcome!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.