A sophisticated command-line interface (CLI) tool for secure password hashing using the yescrypt algorithm.
__
___.__. ____ ______ ___________ ___.__._______/ |_ ___________
< | |/ __ \ / ___// ___\_ __ < | |\____ \ __\/ __ \_ __ \
\___ \ ___/ \___ \\ \___| | \/\___ || |_> > | \ ___/| | \/
/ ____|\___ >____ >\___ >__| / ____|| __/|__| \___ >__|
\/ \/ \/ \/ \/ |__| \/
This Python script implements a secure password hashing tool using the yescrypt algorithm, a memory-hard key derivation function that serves as the default password hashing scheme in modern Linux distributions including Debian 11+, Fedora 35+, and Ubuntu 22.04+.
Yescrypt is built on SHA-256, HMAC, and PBKDF2 approved primitives, making it NIST-compliant and suitable for high-security applications. The algorithm is designed to be memory-hard, requiring significant memory resources to compute hashes, which makes it highly resistant to GPU-based attacks and specialized hardware.
Key Features:
- 🔐 Secure yescrypt password hashing algorithm
- 🎨 Colorized command-line output
- ⚙️ Configurable security parameters (N, r, p, dkLen)
- 🧂 Custom or automatic salt generation
- ⏱️ Performance timing and memory usage reporting
- 🛡️ Memory-hard protection against brute-force attacks
- Python 3.6 or higher
- pip (Python package installer)
-
Clone the repository:
git clone https://github.com/pro-yash-jects/yescrypter.git cd yescrypter -
Install required Python packages:
pip install pyescrypt termcolor
Or install from requirements file if provided:
pip install -r requirements.txt
-
Make the script executable (Linux/macOS):
chmod +x main.py
- ✅ Windows
- ✅ macOS
- ✅ Linux
python3 main.py <word> [options]word- The password or plaintext string to hash
--salt- Custom salt as hexadecimal string (default: random 16 bytes)--n- CPU/memory cost parameter (default: 16384)--r- Block size parameter (default: 8)--p- Parallelism parameter (default: 1)--dklen- Derived key length in bytes (default: 64)
python3 main.py "mypassword123"Output:
[+] Input : mypassword123
[+] Salt (hex) : a1b2c3d4e5f67890abcdef1234567890
[+] Hash : 7d8e9f0a1b2c3d4e5f6789abcdef0123456789abcdef...
[i] Time taken : 0.1234 seconds
[i] Memory cost : ~16 MB (approx)
python3 main.py "sensitive_password" --n 65536 --r 16 --p 2 --dklen 128python3 main.py "testpassword" --salt "deadbeefcafebabe1234567890abcdef"python3 main.py --help| Parameter | Description | Default | Security Impact |
|---|---|---|---|
--n |
CPU/memory cost | 16384 | Higher = more secure, slower |
--r |
Block size | 8 | Affects memory usage pattern |
--p |
Parallelism | 1 | Multi-threading capability |
--dklen |
Output length | 64 bytes | Hash output size |
The approximate memory usage is calculated as: 128 * N * r / (1024 * 1024) MB
| N Value | r Value | Approx. Memory |
|---|---|---|
| 16384 | 8 | ~16 MB |
| 32768 | 8 | ~32 MB |
| 65536 | 16 | ~128 MB |
- Salt Management: Always use unique salts for each password in production
- Parameter Selection: Higher N values provide better security but require more resources
- Performance vs Security: Balance computation time with security requirements
- Memory-Hard Properties: The algorithm's memory requirements protect against specialized hardware attacks
This project is open source. Please check the repository for license details.
Contributions are welcome! Please feel free to submit a Pull Request.
If you encounter any issues or have questions, please open an issue on the GitHub repository.