News for hackers. Stuff that matters.
Re:France outlaws hashed passwords... by michael_dorfman on Thursday April 07, 2011 @04:10AM (#2418656)
That's a pretty bad misreading of the situation. There's nothing in the law, as far as I know, outlawing hashed passwords-- just that the passwords need to be able to be handed over to the proper authorities upon request. A hashed password should work just fine, as long as law enforcement can use that to gain access to the system.

In short: there's plenty of reasons to be against this law without constructing new outrages.

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

Re:France outlaws hashed passwords... by EwanToo on Thursday April 07, 2011 @04:24AM (#2418702)
I agree this law doesn't seem to outlaw hashed passwords, it simply means that you need to store 2 copies of the password - one hashed, and one in plain text.

It's totally legal to store the hashed value with your live database as normal to provide authentication, and store the plain text version in a write only file on a separate system to try and give some additional level of security. This isn't a great solution, but it does provide hashed passwords for regular work, and plain text for when the police ask for it.

It's obviously a pretty stupid law, but to say it "outlaws" hashed passwords is just nonsense.

Re:France outlaws hashed passwords... by IDisposableHero on Thursday April 07, 2011 @05:02AM (#2418790)
I agree this law doesn't seem to outlaw hashed passwords, it simply means that you need to store 2 copies of the password - one hashed, and one in plain text.

You are splitting hairs. It outlaws passwords where only the (salted) hash and not the plaintext is stored, which is the whole point of what's commonly known as "hashed passwords".

store the hashed value with your live database ... and store the plain text version in ... a separate system

Call that seperate system "the moneypot". I'm tempted to suggest that people just try that and see how that works out for them, given the inevitablity of failures of security and vigilance. But for the sake of the rest of us, let's not.

Re:France outlaws hashed passwords... by EwanToo on Thursday April 07, 2011 @05:31AM (#2418855)
I didn't say it was a smart law, but I'm also not splitting hairs.

If someone has that level of control over your system to access a write only file on a separate secured system, make a copy and extract it somewhere else, they probably also have enough access to insert a piece of code into your authentication system to dump all the plaintext passwords to a separate file as people login over time.

The message remains the same for all users regardless of this law - Don't reuse passwords, you can't trust their security.

Re:France outlaws hashed passwords... by IDisposableHero on Thursday April 07, 2011 @06:00AM (#2418914)
I'll be more specific about failures of security and vigilance: "separate secured system" aren't always as seperate and secured as they should be. Assume that all computers can connect to the internet these days unless specifically configured otherwise, and data gets copied, and copies get left lying around. e.g. the classic "left the laptop on a train" http://www.independent.co.uk/news/uk/politics/exclusive-new-... / "cd got lost in the mail" problem.
Re:France outlaws hashed passwords... by JonnieCache on Thursday April 07, 2011 @06:40AM (#2418982)
Ultimately, if two systems need to exchange data in any way, even in one direction only, they cannot truly be described as separate.
Re:France outlaws hashed passwords... by IDisposableHero on Thursday April 07, 2011 @09:06AM (#2419294)
I'm also not splitting hairs.

of course you aren't. We know this because you say you aren't. What you are is making a nuanced distinction between what you mean when you say "stores hashed passwords" and what is commonly meant by that.

Re:France outlaws hashed passwords... by JoachimSchipper on Thursday April 07, 2011 @04:13AM (#2418668)
Are you really sure that hashed passwords are not outlawed? They're pretty specific about handing over passwords instead of having, for instance, a "police-only" password that gives access to every account.
Re:France outlaws hashed passwords... by ernesth on Thursday April 07, 2011 @06:14AM (#2418942)
Directly from the law, «Les données mentionnées aux 3° et 4° ne doivent être conservées que dans la mesure où les personnes les collectent habituellement.»

The password (as well as full name, postal address, pseudonym, phone number) only needs to be kept if it is collected. So you must keep the password (and be able to give it upon request) only in the case you already store it.

Re:France outlaws hashed passwords... by yannickmahe on Thursday April 07, 2011 @04:31AM (#2418727)
Couldn't you, in theory, keep hashed passwords, but in case of a request comply by saying: "Ok, we will give you the passwords, but our passwords recovery process will take over X years while we brute force it" ?
Re:France outlaws hashed passwords... by fizx on Thursday April 07, 2011 @04:59AM (#2418785)
In general, the law frowns upon the sort of pedantic cleverness geeks love.
Re:France outlaws hashed passwords... by wladimir on Thursday April 07, 2011 @05:22AM (#2418832)
Isn't being a lawyer basically about "pedantic cleverness"? Regarding the details of the law, of course, instead of technical details. But I've always found law extrememly pedantic.

Writing laws and contracts, in a way, seems like trying to make secure software. One has to define everything, and evaluate all possible "attack angles".

Re:France outlaws hashed passwords... by JonnieCache on Thursday April 07, 2011 @05:09AM (#2418802)
As usual munroe has been here before: http://xkcd.com/538/

XKCD really is the geek equivalent of quoting scripture. Lessons for living.

Re:France outlaws hashed passwords... by gokhan on Thursday April 07, 2011 @04:20AM (#2418686)
How will they be able to login with the hash without modifying the application? If that's the case, they'll also be able modify (or force to author to modify) the system to login without the password, so it's irrelevant to request the password.
Re:France outlaws hashed passwords... by cmontgomeryb on Thursday April 07, 2011 @04:20AM (#2418687)
But law enforcement _wouldn't_ be able to use the hashed password to gain access to the system, would they? Otherwise there would be no advantage to hashing over storing plaintext. Am I misunderstanding you?