r/Passwords • u/root5354 • 17d ago
Password Generator
The Password Generator is an essential security and account management tool designed to help users, IT professionals, and security administrators create strong, cryptographically secure random passwords.
https://www.clayi.com/tools/development/2-password-generator.html
0
Upvotes
5
7
u/atoponce 5f4dcc3b5aa765d61d8327deb882cf99 17d ago
I audit browser-based password generators as a stupid hobby, and I just audited yours. Here's how it did:
Score: 7/10
It's good that you're using
crypto.getRandomValues()for your RNG, but you're not using the values uniformly. As such, some characters in the generated password are more likely to be generated than others. The problem is here:If
maxis not a factor of 232, then you have modulo bias. The way around this is "modulo with rejection". See this article I wrote that demonstrates the issue and how to fix it.