5 ms·
> If your password is incorrect, it checks again with the case swapped to account for caps lock being on. I love this idea, going to add this to future project
by EthicalSimilar 3y ago
> If your password is incorrect, it checks again with the case swapped to account for caps lock being on.
I love this idea, going to add this to future projects.
- sroussey 3y agoThis is a terrible idea! It means that the passwords have far less entropy. It means the uppercase you password when generating a hash. Good lord.
- Trrrrappp 3y agoA user can only have one password. How does entropy come into play ?
- rezonant 3y agoEntropy here is referring to how random the user's password is, and thus how difficult it will be to guess it. For example, a four character password which can be comprised only of lowercase a-z has much lower entropy than a four character password which can have A-Z and a-z (and the case is significant). Obligatory XKCD: https://xkcd.com/936/ https://xkcd.com/936/
- Trrrrappp 3y agoI may be misunderstanding it. But they are switching the case, not turning it lowercase. So trying both AbCd and aBcD, because that's what you'd type if caps lock was on.
- nekasrbenda 3y agoyOUaREwRONG1!
- bheadmaster 3y agoTechnically, one bit less, which is insignificant for strong passwords. And for weak passwords... Well, it's not like that one extra bit would have made a difference.
- anymouse123456 3y agoJust came here to say, please don't do this to your users, or your business. Also, can someone please tell me that Facebook doesn't really do this?
- jerbear4328 3y agoFacebook does do this, and it's perfectly fine: https://security.stackexchange.com/a/214815 https://security.stackexchange.com/a/214815 It exchanges a few bits of entropy for a much smoother user experience, and it doesn't actually aid an attacker much (they could just try the permutations themselves)
- anymouse123456 3y agoThanks for the link. That's helpful info.
- rezonant 3y agoWhoa, let's not all freak out here (for this post and sibling posts). While I don't think I would personally do this, it only removes 1 bit of entropy because the case is swapped, and it only does that when checking the password. This does not imply they uppercase/lowercase the password prior to hashing at all, nor that foobar123 will work when the hashed password is FooBar123. Rather that fOObAR123 can be transformed by swapping case to FooBar123 and then checked against the hash. Don't forget that the shift key makes things lowercase when Caps Lock is turned on.
- ryan-c 3y agoIt doesn't remove even a single bit of entropy. For an offline attack, where you have to attack Facebook's bespoke "password onion"[1], you would still have to compute both hashes. There is approximately zero impact on cracking strategy. There may be an argument to be made that Facebook would have otherwise used a larger work factor had they not had to do double the work for wrong passwords, but the common case is the password being correct, so I doubt this was a significant consideration in the parameter selection. Even for the online case, I really don't think it affects security in a nontrivial way. 1. https://bristolcrypto.blogspot.com/2015/01/password-hashing-according-to-facebook.html https://bristolcrypto.blogspot.com/2015/01/password-hashing-...
- rezonant 3y agoI agree, for offline attacks there is no impact. Very interesting article. What is up with $\$$cur there btw? In PHP that would be a gnarly indirection-- even if it's something in FB's codebase, why keep it on the slide like that?
- marcinzm 3y agoNo...they literally have the password you just entered. In plain text. They can change the case of that and compare against the DB hash twice. The entropy for someone trying to brute force the hashes directly is identical.
- jerbear4328 3y agoNo, you don't ignore the case, you swap it and try again. This could be implemented as a browser extension: - User types pA$$WORD1 and clicks Sign In - Frontend sends that to the server - Server responds "incorrect" - Frontend tries again with Pa$$word1 - Server responds "correct" and user is logged in
- DaSHacka 3y agoSo now every wrong password is using 2 attempts? You either have to double the number of failed attempts before a lockout or deal with users getting locked out much quicker. Thus causing more frustration than if you'd done nothing at all to address the capslock issue (that they're going to have to notice and fix anyway at some point, when they inevitably need to type again)
- jerbear4328 3y agoWell, in Facebook's case, it's more than double (it appears to be 3 or 4 at most), and it is done smartly (the reverse caps try is only performed if you typed in your password with capslock turned on), and with a proper system to throttle attempts before locking an account, it seems reasonable to me. See https://security.stackexchange.com/a/214815 https://security.stackexchange.com/a/214815 and its sources.
- lhamil64 3y ago> It means the uppercase you password when generating a hash. Good lord. No it doesn't. Say your password is "Abc1". When you sign up, they would hash "Abc1". Then when you login, say you type "aBC1". The site would first hash "aBC1" and find that it is incorrect. Then it would invert the case to "Abc1" and try again, and it would work. It's basically just automating a second attempt. In fact, I wonder if it even counts as a second failed attempt if both failed. If someone were able to make brute force attempts on the website, it would still end up evaluating the passwords the same number of times as if the inverted case wasn't checked (the attacker would just need to invert it themselves) and in fact would likely slow down the attack because they are forced into checking inverterted case passwords. But that's moot anyway because the website limits login attempts. And if the database leaked, it's not stored any differently than if they didn't invert the case. Of course I'm making assumptions about the implementation (I didn't know they did this until this comment) and it could be done poorly but I would hope a company as big as meta/Facebook put at least this amount of thought into it.
- sroussey 3y agoOk, but I thought the implication was that it didn’t do retries but just uppercased passwords. This makes more sense, and obviously a better idea.
- deleted 3y ago[deleted]
- pimlottc 3y agoDon't forget about internationalization. Not all language have uppercase and lowercase characters [0], and tbh I'm not sure what effect (if any) caps lock has for these. And rules for converting case can sometimes be tricky. 0: https://en.wikipedia.org/wiki/Letter_case#Bicameral_script https://en.wikipedia.org/wiki/Letter_case#Bicameral_script
- robinson7d 3y agoBut it’s not core functionality, it’s just a convenience. Making it more convenient for everybody equally is an admirable goal, but should a trivial change that makes life a bit easier for many people be scrapped just because making it easier for everyone else is difficult? Specifically here where the experience doesn’t significantly regress for anyone.
- pimlottc 3y agoI never said it should be scrapped... just that it needs to be considered and tested.