Okay, I know it might seem this has already been beaten to death but, hear me out. I am including a fairly good password strength algorithm for my app for users on sign-up. This one, which I've copied (with minor adjustments). I also want to give a ROUGH metric in addition to the strength tester. I want to calculate and communicate users' password entropy by cost to crack in the same way 1Password has here. I think this can communicate well to users in a way that is real to them.
Here is a common problem which leads to my question, password entropy. I will give users a switch to flip, whether the password is human-created or machine random. Now machine random has its own set of entropy calculation issues such as whether it is a totally random sequence, is it a symbol-separated word sequence chosen from a 307,111 word list, etc, etc. I've got that covered. The trouble is some human passwords seem stronger than machine crypto random:
Issue with standard password entropy calc methods:
1Password machine random - rmrgKDAyeY = 57.37 bits entropy
Human created non-random - isAwtheSUN = 57.37 bits entropy
Obviously, this would not be a good estimation...
I tried using log(pow(2500, 4))/log(2) => 4 words
, 2500 possible combinations based on people using easier-to-remember words, as a percentage of the average human vocabulary of about 20,000 and this gave a resulting entropy of 45.15. This seems pretty reasonable. But I need to hear from the pros and looking for other ideas.
What metrics could be used to calculate human-created passwords so the result is much less secure looking than machine randoms?
Keeping in mind I'm after entropy only so to give users a cost-to-crack estimate. I know nobody but us cares about entropy.
beach mommy tray zen
(about 50 bits of entropy) as "weak", while it has roughly the same strength as 8 random ascii characters (including punctuation). – marcelm Oct 09 '22 at 09:31beach mommy tray zen
having a low score.beach-mommy-tray-zen
gives a very high score. @Gregory - I agree very much, this is why strength calculator needs new internals and why I want mine to be really good – RobbB Oct 09 '22 at 17:59beach mommy tray zen
andbeach-mommy-tray-zen
are completely equivalent from a security perspective. – marcelm Oct 09 '22 at 19:48vFjIbHvWsI
is "good" whilehyxgvdmehwvxj
is supposedly "very weak". – AndreKR Oct 10 '22 at 15:4619450706
an eight-digit random number generated using a cryptographic-quality RNG (very high entropy), or is it my birthday (very low entropy)? What's the entropy if it's the date of an event of personal significance? Historical significance? On the other hand, does your threat model consider targeted attacks? A birthday may have very low entropy w.r.t. a targeted attack while being equivalent to ~5-6 genuinely random digits for an untargeted attack. – Matthew Oct 10 '22 at 17:05beach mommy tray zen
andcorrect horse battery staple
. That requires real-world knowledge, and therefore is time-dependent. – MSalters Oct 11 '22 at 12:11