News for hackers. Stuff that matters.
Re:France outlaws hashed passwords... by JonnieCache on Thursday April 07, 2011 @04:15AM (#2418676)
You cannot gain access to a system with the hashed passwords, unless you modified the system to accept them. In that case you could just modify the system to not require a password at all. In fact, that is in a sense what you would be doing anyway.

It does outlaw hashed passwords in practice.

EDIT: as others have pointed out, you could simply store the plaintext passwords in another file with greater security, and have hashed ones in the DB. An even better option would be simply to get the hell out of france.

Or, start a consulting business in france to help people comply with this, and rake it in.

Re:France outlaws hashed passwords... by praptak on Thursday April 07, 2011 @04:30AM (#2418719)
It strongly depends on the wording of the law and on the usual million things that affects how laws are interpreted. Maybe just providing a freshly generated password that gives access to the account in question is enough to satisfy this law?
Re:France outlaws hashed passwords... by tlrobinson on Thursday April 07, 2011 @05:14AM (#2418815)
Couldn't you simply change the app to accept the password hashed or unhashed? e.x. change

    ... 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?
Re:France outlaws hashed passwords... by JonnieCache on Thursday April 07, 2011 @05:19AM (#2418824)
Yes, but this would mean you were storing the unhashed passwords in the DB. When your DB is compromised, everyone's password is exposed, likely along with their email. In this world of frequent password reuse, that is pretty much game over.
Re:France outlaws hashed passwords... by profquail on Thursday April 07, 2011 @09:54AM (#2419439)
In the example above, the ".password" field is the hashed password. I think 'tlrobinson' was trying to point out that sites only have to keep plaintext passwords if that's what they're given. If, when you first signed up for a site that uses tlrobinson's technique, you provided the hash of your password (instead of your password itself), then the site would never have access to the plaintext (but you'd be able to use the plaintext to log on at a later date since the SQL query checks the ".password" field against hash(input).)
Re:France outlaws hashed passwords... by tlrobinson on Thursday April 07, 2011 @11:18AM (#2419786)
Yes, close, but not exactly what I meant. The password would still be provided in plaintext upon registration, but the application would immediately hash and store it. Then the user can login with their password, which gets hashed and compared to the hashed password in the database. Alternatively the hash can be handed over if required and also used as the password since we also compare the unhashed input to the hashed stored password.
Re:France outlaws hashed passwords... by tlrobinson on Thursday April 07, 2011 @11:11AM (#2419752)
No, you misunderstood. My example was poor, the password in the database is hashed:

    ... 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?

Re:France outlaws hashed passwords... by verysimple on Thursday April 07, 2011 @06:01AM (#2418916)
I don't know why your answer was downvoted, you are spot on.
Re:France outlaws hashed passwords... by mattmanser on Thursday April 07, 2011 @06:19AM (#2418954)
No he's absolutely not, there's a massive difference between having someone's password that's been reused on X number of sites and having a hashed version of a password that's only valid on one site.

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.

Re:France outlaws hashed passwords... by JonnieCache on Thursday April 07, 2011 @06:37AM (#2418975)
>No he's absolutely not

He was referring to my rebuttal, which was initially downvoted for some reason.

Re:France outlaws hashed passwords... by kwantam on Thursday April 07, 2011 @11:16AM (#2419776)
You could do this without allowing the hashes to act as passwords directly by establishing a "skeleton key" approach:

    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 :)