Live data from Hacker News

Ask HN: Which login method do you use?

news.ycombinator.com

41–50 of 58 posts

Re: Ask HN: Which login method do you use?

#41
post #39
post #29

Earlier quoted context omitted.

If the password is hashed well, with stretched SHA1/SHA256 or (better yet) bcrypt, then yes: breaking the hash would involve a significant advance in cryptography.

hm? I'm trying to say that once you have the hash, you can run a dictionary attack against it without any advances in anything. I can use whatever procedure the server uses to verify logins, and just try passwords. You can make the dictionary attack more expensive by using an expensive hash like bcrypt, but that's going to slow down your app, too. (http auth re-authenticates every page load.) so really, you can't mak…

You're not thinking this through. In no well-designed web application is password checking in the 80/20 hotspot of performance. In fact, if it's within a light year of mattering to performance, you've done something horribly wrong.

The point of adaptive hashing is that doubling the cost of the hash on the serverside adds negligable overall cost, but doubling the cost of the hash on the attacker's side doubles their cost. This is not a complicated tradeoff.

Re: Ask HN: Which login method do you use?

#42
post #41
post #39

Earlier quoted context omitted.

hm? I'm trying to say that once you have the hash, you can run a dictionary attack against it without any advances in anything. I can use whatever procedure the server uses to verify logins, and just try passwords. You can make the dictionary attack more expensive by using an expensive hash like bcrypt, but that's going to slow down your app, too. (http auth re-authenticates every page load.) so really, you can't mak…

You're not thinking this through. In no well-designed web application is password checking in the 80/20 hotspot of performance. In fact, if it's within a light year of mattering to performance, you've done something horribly wrong. The point of adaptive hashing is that doubling the cost of the hash on the serverside adds negligable overall cost, but doubling the cost of the hash on the attacker's side doubles their c…

hmm? http basic auth checks your password on every request. you can do auth other ways, (but you need to be very careful.) but that's how http basic auth works.

the attacker can check one word from her dictionary in the same amount of time it takes you to authenticate one user for one page.

if you make that check take longer than 50ms, it will start slowing down your webapp.

at 50ms, an attacker can check 40,000 words in around half an hour.

you can double that to 100ms, but at that point you are starting to slow down page loads, and it's still only taking the attacker an hour to run through that dictionary.

Re: Ask HN: Which login method do you use?

#43
post #42
post #41

Earlier quoted context omitted.

You're not thinking this through. In no well-designed web application is password checking in the 80/20 hotspot of performance. In fact, if it's within a light year of mattering to performance, you've done something horribly wrong. The point of adaptive hashing is that doubling the cost of the hash on the serverside adds negligable overall cost, but doubling the cost of the hash on the attacker's side doubles their c…

hmm? http basic auth checks your password on every request. you can do auth other ways, (but you need to be very careful.) but that's how http basic auth works. the attacker can check one word from her dictionary in the same amount of time it takes you to authenticate one user for one page. if you make that check take longer than 50ms, it will start slowing down your webapp. at 50ms, an attacker can check 40,000 word…

Don't use basic auth, lsc.

[Edit] I regret even conceding this point. Even if you use basic auth, the tradeoff here is not complicated.

Re: Ask HN: Which login method do you use?

#44
post #43
post #42

Earlier quoted context omitted.

hmm? http basic auth checks your password on every request. you can do auth other ways, (but you need to be very careful.) but that's how http basic auth works. the attacker can check one word from her dictionary in the same amount of time it takes you to authenticate one user for one page. if you make that check take longer than 50ms, it will start slowing down your webapp. at 50ms, an attacker can check 40,000 word…

Don't use basic auth, lsc. [Edit] I regret even conceding this point. Even if you use basic auth, the tradeoff here is not complicated.

[deleted]

Re: Ask HN: Which login method do you use?

#45
post #43
post #42

Earlier quoted context omitted.

hmm? http basic auth checks your password on every request. you can do auth other ways, (but you need to be very careful.) but that's how http basic auth works. the attacker can check one word from her dictionary in the same amount of time it takes you to authenticate one user for one page. if you make that check take longer than 50ms, it will start slowing down your webapp. at 50ms, an attacker can check 40,000 word…

Don't use basic auth, lsc. [Edit] I regret even conceding this point. Even if you use basic auth, the tradeoff here is not complicated.

the bigger point is that there is a limit to how slow you can make the password checking process. Ok, so let us assume you securely authenticate once per session. How long can that authentication take? I suppose you can put up a little clock... make it take a second and we are talking 11 hours per password, which is starting to get significant... but my point is that the small search space provided by user chosen passwords means that if you make the hash function slow enough to stop an attacker, you are moving into time spaces that users will notice.

Re: Ask HN: Which login method do you use?

#47
post #42
post #41

Earlier quoted context omitted.

You're not thinking this through. In no well-designed web application is password checking in the 80/20 hotspot of performance. In fact, if it's within a light year of mattering to performance, you've done something horribly wrong. The point of adaptive hashing is that doubling the cost of the hash on the serverside adds negligable overall cost, but doubling the cost of the hash on the attacker's side doubles their c…

hmm? http basic auth checks your password on every request. you can do auth other ways, (but you need to be very careful.) but that's how http basic auth works. the attacker can check one word from her dictionary in the same amount of time it takes you to authenticate one user for one page. if you make that check take longer than 50ms, it will start slowing down your webapp. at 50ms, an attacker can check 40,000 word…

On average, the attacker will have to search half of the hash space to find a given password. So, your 40,000 searches is way too small as long as you require more than 2 character passwords. If you assume lowercase + uppercase + numbers for the passwords, and require at least 6 characters, you get

(26 + 26 + 10) ^ 6 = 56,800,235,584 combinations

searching half of that would be about 28 billion combinations. At 50ms each, that would take 388,888 hours, or 44.36 years.

Re: Ask HN: Which login method do you use?

#48
post #9

OpenID, if applicable.

Comment from the user end: I am not the greatest fan of OpenID (try talking your grandma through getting one) but I agree that as long as you don't have a site where the user might have a real need for unique authentication information (eg. bank account), you should really consider something like clickpass.

I always try new sites if I can get in with existing authentication - and I don't always if I need to register. So it depends how much you care about uptake.

Re: Ask HN: Which login method do you use?

#49
post #47
post #42

Earlier quoted context omitted.

hmm? http basic auth checks your password on every request. you can do auth other ways, (but you need to be very careful.) but that's how http basic auth works. the attacker can check one word from her dictionary in the same amount of time it takes you to authenticate one user for one page. if you make that check take longer than 50ms, it will start slowing down your webapp. at 50ms, an attacker can check 40,000 word…

On average, the attacker will have to search half of the hash space to find a given password. So, your 40,000 searches is way too small as long as you require more than 2 character passwords. If you assume lowercase + uppercase + numbers for the passwords, and require at least 6 characters, you get (26 + 26 + 10) ^ 6 = 56,800,235,584 combinations searching half of that would be about 28 billion combinations. At 50ms…

if passwords are randomly generated, I agree with you completely, and everything I've said is crazy talk.

But most passwords are not randomly generated. Most passwords are dictionary words, or two dictionary words. You don't need to search the hash space; you only need to search the password space, and if everyone uses the name of their dog, well, that's not a very large space.

http://www.schneier.com/blog/archives/2006/12/realworld_pass...

Re: Ask HN: Which login method do you use?

#50
post #15

Earlier quoted context omitted.

Rainbow Table is unavoidable. Block those IPs which have more than certain times of failed password. And, people usually cannot access to those hashed passwords.

Three sentences, three fallacies. (1) Not only are rainbow tables avoidable, but they've been trivially avoidable since Unix crypt(3) was invented in the '70s. The only way you can become susceptable to them is if you make the mistake of designing your own scheme. So don't do that. (2) There's a reason that no mainstream consumer application actually does this: as soon as you lock a normal user out of their account f…

"(2) There's a reason that no mainstream consumer application actually does this: as soon as you lock a normal user out of their account for an hour, you probably lose the user forever."

I don't know, it seems to work pretty well for Microsoft

Post reply on HN