dropbox / zxcvbn

Low-Budget Password Strength Estimation
https://www.usenix.org/conference/usenixsecurity16/technical-sessions/presentation/wheeler
MIT License
15.12k stars 943 forks source link

Add greater time spans in display, Add 1e12 guess metric #228

Open dylan-thinnes opened 6 years ago

dylan-thinnes commented 6 years ago

Add larger time spans

The textual feedback (result.crack_times_display) on times stops at centuries. Considering Moore's law and assuming guessing speed progresses proportionally, a century long password today will take 3 years in a decade and 35 days in two decades.

In that vein, I added millennium (1000 years) its associated pluralization. If a password exceeds 1000 millennia in guessing time (a million years), then the returned value is ">1000 millennia". This draws a better distinction between currently-strong passwords and forever-strong passwords.

Add 1e12 guesses

Leaving guess counts at 1e10 seems a little optimistic, considering we know of organizations with the ability to guess a trillion or more times a second (the README says as much) and home-made rigs have long since broken 330GH using Hashcat. As such, I added 1e12 guesses to the result for more enthusiastic password security.

Why should this matter?

Note that if the two points made above are combined (exponential growth in guessing power and underestimation of guessing power), the following conclusions can be made:

Concerns about scope

I understand if this seems unnecessary to the scope of the project.
This change is very small. If it's deemed unnecessary to merge it, I'm fine with keeping it that way.

Testing

This code makes no changes to the way zxcvbn works, it only adds to the textual output. As such, npm test passes all 1027 tests.

CLAassistant commented 2 years ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.