← Back to portfolio

🔐 Cryptography

Password
Generator

Generates strong passwords, encrypts them with an AES key stored on an external drive (USB, drive...), and saves them in a secure local vault.

Python
Cryptography
EEPROM / Drive
pwgen.py | Python 3.11
~/pwgen $ python pwgen.py --length 32 --symbols --save
🔑 Searching for the key on the external drive...
✓ AES-256 key loaded from /media/usb/key.bin
Generating password (high entropy)...
🔒 K#9mP$vL2xQr@NtYw8&bZdE!cFjAuH5s
✓ Password generated : 32 characters
AES-256-CBC encryption in progress...
✓ Saved to vault.enc (entry #14)
User: yoann.lahaxe
Password entropy 192 bits - Very strong
Encryption diagram
💾
External drive
key.bin
+
🎲
Generator
os.urandom()
🔐
Encryption
AES-256-CBC
📦
Local vault
vault.enc

Description

This Python project generates cryptographically secure passwords using os.urandom() as the entropy source. The AES-256 encryption key is deliberately stored on an external drive (USB key or drive), meaning the encrypted vault is unusable without the physical drive.


Passwords are encrypted with AES-256-CBC before being written to a local vault file (or to a drive), associated with a service and username.

Features