Hacker News new | ask | show | jobs
by binarylogic 6438 days ago
I am the creator of this plugin.

Who cares about the name. I wanted something unique that would get people's attention and return unique content when searching. I also thought it was funny. People need to lighten up a little bit if the name bothers them. It's not like I put the name "authgasm" in helpers that you have to use all over your application. It sits in your plugin dir, that's all.

Anyways, regarding encryption. You can encrypt the password any way you want. Use bcrypt-ruby if you want. It would take no time at all to set up. Checkout the acts_as_authentic documentation. You can provide your own "crypto provider" and have it do whatever you want.

Lastly, I don't use Sha256 straight up. I add in salt. So reverse lookups are out of the question. Your last option is brute force. There is no encryption / hashing algorithm that is safe from brute force. Granted some might slow it down more than others, all that is doing is setting up more hurdles to jump, not 100% secure.

But I really like bcrypt, I'll look into it and maybe switch it to the default crypto provider. But, I really think for anything that is not being used in the NSA, Sha256 + salt would work just fine.

2 comments

"Salt" does nothing to address the primary way passwords have been cracked for the past 20 years, which is with incremental password crackers like Crack, L0phtcrack, and John the Ripper. Your comment about "anything not being used by the NSA" is silly, and misses the point entirely. Most Rails app users will entrust those apps with horribly bad passwords; bcrypt protects those passwords, and "salted SHA256" doesn't.

If you don't understand the problem you're trying to solve with this plugin, why are you promoting it?

My comment about "anything not being used by the NSA" is not silly, it's true. Hell the NSA developed the Sha functions. I am not one to take security lightly, and salted Sha256 is not taking security lightly. I am not sure what kind of apps you write, but for 99% of the apps in the world, salted Sha256 is plenty secure. If it was as big of a problem as you said it would be highly discouraged, which it is not. The leading authentication solution in rails uses Sha1. Regardless, if you are extra paranoid, you can use any type of encryption you want with authgasm. So the argument is moot. Lastly, authgasm is not about promoting sha256, its about a style of authentication in rails. The method of encryption is just an option, which is what the crypto_provider option is all about. If you don't understand the subject which you are discussing, why are you discussing it?

I actually looked into bycrypt and it's great. But it would be silly of me to use a linux only encryption solution in a library available to the ruby public.

It really doesn't sound like you've read any of the other comments in this thread.
No, no, no - just because the NSA developed it does not mean it is the right solution for this problem. Read the comment above explaining fast versus slow hashing.
I agree on all points. I like the name of your plugin(s).

The main issue I have with bcrypt-ruby as I said is that there is basically no Windows support for it that I can find. I know that most of us who develop with Ruby/Rails use a Mac or Linux/Unix but there are some, like my business partner, who still use Windows as their development environment. For a Rails plugin or Ruby gem, I think it would be really nice if at least some effort was made to keep it more easily cross-platform compatible for those of us who are not C coders.

But, I really think for anything that is not being used in the NSA, Sha256 + salt would work just fine.

As I said, I'm no security expert, but the reading I have done would lead me to agree with you. It's all about degrees of security with the trade-off always being more security means less convenience for someone, be it the developer or the end user. I've weighed the security/convenience issue for me at this point in time, and I'm sticking with salted SHA256.

The trade-off is indeed the security of your users versus the convenience of your developers.

That said, I don't so much care whether you store your passwords with a demonstrably inferior scheme like Authgasm's default or the 1-line-delta variant of it that resolves its biggest problem. It's fine to be ignorant about this stuff; it's not going to make you 1 extra dollar to do it right.

Just don't be militant about your ignorance.

Just for the record, I'm not using Authgasm, not because I have any problem with it, I just chose to write the login stuff for my current project myself for various reasons I won't go into and had done so long before I came across this post.

I don't think I'm being militant about anything... Just carrying on what was a reasonably pleasant and honest conversation. Yes, part of my decision was to do with that my partner is a Window's user and I can't do anything about this at the moment. But the other part of the calculation that you overlook is that my current project is not one that requires over the top, secret squirrel encryption on stored passwords. This consideration came into it as well.

You sound bitter, man. Maybe you should take a nap and stop being so militant yourself.

Why do you think your application doesn't require "over the top" encryption on stored passwords? Who are your users?
So what, I'm meant to reply with something like "Um, my users are people..." and then you say something like "Well people pick shit passwords..." and so on.

Did the SHA eat your babies or something? :P

Seriously though, probably "over the top" was not a good choice of term. In a perfect world, I agree with the unspoken point you're trying to lead me into, which seems to be that all applications should never compromise on their security regardless of convenience or who their users are etc. But surely you must agree that in the real world this isn't always viable. I don't have unlimited time at my disposal.

If my current situation allowed it, I would use bcrypt based solely on the fact that OpenBSD recommend it.

However, my current situation does not allow this. Therefore, I have made a pragmatic decision that will enable me to continue moving towards my goal. I'm not going to apologize to you or anyone else for this.

I appreciate that you are passionate about what I assume is your chosen field of expertise, but perhaps in the future you could try talking to people more so than down to them. You might just find it yields friendlier results.

No, you've totally missed my point. I wanted to know, do you not have real users? Can arbitrary people not sign up for your application? Does it have a closed user base? Is it an enterprise product? Because, then, maybe password storage isn't an issue for you.

Otherwise, your users aren't simply giving you "shit passwords". They're giving you their bank password. Normal people do not make up 16 different passwords for all their web applications. If you take passwords from normal people on the Internet, and you ever get popular, you will come into possession of a large database of Bank of America credentials.

So yes, maybe you ought to consider being careful with them.