A password and encryption toolkit
The problem
Build a small browser toolkit that measures password strength, stores passwords safely with a salt and a slow hash, and encrypts a note, explaining each step on screen.
Requirements
- Measure password entropy and warn about common patterns
- Hash passwords with a unique salt using the Web Crypto API
- Verify a login without ever storing the password
- Encrypt and decrypt a note with a key derived from the password
Technologies
- JavaScript
- Web Crypto API
- Local storage
Step by step
- Write the entropy meter and test it
- Add salted hashing and verification
- Derive a key from the password
- Encrypt and decrypt a note
- Explain each choice in plain words on the page
Expected result
A page that never stores a password in plain text and explains every security choice it makes.
How it is evaluated
- No password or key is ever stored or shown in plain text
- Two users with the same password get different stored hashes
- A wrong password fails clearly, without crashing
Ways to improve it
- Add a second factor with one-time codes
- Rate-limit failed logins
- Let the user export an encrypted backup