Re:Gmail password first character is case insensitive on mob...
by morsch on Saturday October 09, 2021 @06:46AM
(#28808673)
Or just normalize the password by making the first character either lower- or uppercase both when checking and setting it.
[ Parent
| on HN ]
Re:Gmail password first character is case insensitive on mob...
by Raed667 on Saturday October 09, 2021 @06:54AM
(#28808711)
It would be more complicated to do this once you stored millions of passwords.
So now you have to create 2 flows, those before the new policy and those that were set after the normalization.
Re:Gmail password first character is case insensitive on mob...
by weird-eye-issue on Saturday October 09, 2021 @07:04AM
(#28808770)
If your storing millions of passwords surely a version field and an if statement is not going to be a huge concern
Re:Gmail password first character is case insensitive on mob...
by Raed667 on Saturday October 09, 2021 @07:05AM
(#28808778)
It is definitely more complicated than changing the case and running the hash again
Re:Gmail password first character is case insensitive on mob...
by weird-eye-issue on Saturday October 09, 2021 @07:20AM
(#28808870)
is_password_valid = hash_password(normalize_password_case(password) if version == 1 else password) == hashed_password
Re:Gmail password first character is case insensitive on mob...
by pixl97 on Saturday October 09, 2021 @07:25AM
(#28808895)
Are we doing this client side or server side?
If you're actually using a 'strong enough' hash to prevent easy cracking if your hashed password database is leaked then you're doubling the server load which can be quite substantial in some cases.
Re:Gmail password first character is case insensitive on mob...
by weird-eye-issue on Saturday October 09, 2021 @07:43AM
(#28809019)
It's only being hashed once...
And obviously this is server side
Re:Gmail password first character is case insensitive on mob...
by markenqualitaet on Saturday October 09, 2021 @07:19AM
(#28808859)
Why?
Re:Gmail password first character is case insensitive on mob...
by pawelmurias on Saturday October 09, 2021 @07:44AM
(#28809027)
Because you are changing the daabase schema to introduce a stupid version field to store "normalized" passwords rather then just doing the check twice on mobile platforms.
Re:Gmail password first character is case insensitive on mob...
by weird-eye-issue on Saturday October 09, 2021 @08:00AM
(#28809093)
Hashing takes a lot of CPU time. And btw you don't even need to change the database schema. You could encode the version in the password field itself. Django does this and it works great
Re:Gmail password first character is case insensitive on mob...
by pawelmurias on Saturday October 09, 2021 @10:41AM
(#28810280)
The database would contain existing passwords without normalization.
You also you have to hold the unnormalized password.
Super silly to do that to save a few processor cycles on login.
Re:Gmail password first character is case insensitive on mob...
by weird-eye-issue on Saturday October 09, 2021 @11:21AM
(#28810615)
It's amazing how much misinformation is in this thread. You should do further reading on password hashing and rethink whether you really have to store two different passwords...
Re:Gmail password first character is case insensitive on mob...
by kaba0 on Saturday October 09, 2021 @09:24AM
(#28809651)
Hashing one or two 10 char strings takes basically no time on even old mobile hardware.
Re:Gmail password first character is case insensitive on mob...
by spookthesunset on Saturday October 09, 2021 @11:17AM
(#28810588)
Good password hash algorithms specifically are designed to take a while. They add latency to the subsequent page load when you click “submit”.
Re:Gmail password first character is case insensitive on mob...
by weird-eye-issue on Saturday October 09, 2021 @09:59AM
(#28809894)
Not if you are using algorithms specifically designed to take a lot of CPU time, which is a best practice
https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpubli...
Re:Gmail password first character is case insensitive on mob...
by Closi on Saturday October 09, 2021 @07:36AM
(#28808981)
Sounds like the requirement might be for the case insensitivity of the first character to only be for some platforms (eg mobile devices where autocapitalisation might have happened).
In that case this solution would have the disadvantage that it wouldn’t be platform specific.