... WHERE user.password = hash(input)
to ... WHERE user.password = hash(input) OR user.password = input
Or was your point that this would eliminate the benefits of using an adaptive hash like bcrypt to slow down brute forcing? ... WHERE user.password = hash(input)
to ... WHERE user.password = hash(input) OR user.password = input
Or was your point that this would eliminate the benefits of using an adaptive hash like bcrypt to slow down brute forcing?Also if you wanted to make it secure you could restrict hash passwords to work only from certain IP addresses so you either have to be using a company internal machine or say the IP addresses from a police station.
He was referring to my rebuttal, which was initially downvoted for some reason.
... WHERE user.hashed_password = hash(input) OR user.hashed_password = input
So the user can provide their password which gets hashed and compared to the stored hash, OR the hash can be given to law enforcement if required and can be used in place of the real password.This solves the problem of passwords being stored in plaintext (indeed a problem with frequent password reuse) while apparently getting around this silly French law.
Sure if the database is compromised anyone will be able to login to anyone's account, but the database is compromised so who cares?
WHERE user.password = hash(input) OR hash(user.password + skeleton_key) = input
If the police want to log into a user's account without their password, they combine the hash of their password with the skeleton key, hash that, and submit it as the password.Of course, now you have to keep skeleton_key a secret. Presumably you wouldn't store it in the same database as the password hashes, so losing the database wouldn't immediately grant access to everyone's account.
I'm not claiming this is particularly secure. In fact, it's kind of the opposite: it's intentionally adding a back door to your authentication system. But at least it's a door rather than a gaping hole :)