Hi!
I am not sure I see the point of this. Passwords like "aq!2wsde#" may seem like a mathematically sound
password, but look at your keyboard why it may be a common password.
I have met a lot of (from a user point) stupid arbitrary password requirements, which forces me to NOT use a password I can memorize, so I am forced to:
a) Use an existing password I use elsewhere
b) Write down the password somewhere.
Both are IMO worse than what the algorithm considers a "bad" password for some arbitrary reason (password may not have the same character twice in a password - WTF!)
So instead of trying to be clever, for my site, I have 2 requirements,
1) 8 Characters or more.
2) It must not be present in the "CrackStation's Password Cracking Dictionary":
https://crackstation.net/buy-crackstation-wordlist-password-cracking-dictionary.htmSince I store "bcrypt" passwords, I have adjusted the complexity of a password check to take approx 500ms (that equates to 11 iterations on my server). That means it would cost approx $500.000 to get a single 8 character password within a year, if you bought Amazon cloud computers to crack it. The only way to "cheat" this is if the password is in a password list, which is why I test each password against that.
So, unless the user chooses a password we *know* an attacker will try as one of the first attempts, we don't try to "outsmart" the user with a clever algorithm.
FYI, my passwords on website are all 8 characters generated from a has of the website site domain and a "master password", which means that all my passwords are unique for each website, which is much better than most people can claim. So I am very annoyed whenever a website tries to be "smart" about what is a good password.
Sorry about the rant - just wanted to give you some perspective :)
Regards,
Klaus