6 ms·
I did a bit of looking into bcrypt-ruby after hearing about it here. It sounds good, I like the idea of the "cost" attribute. However, I note that Coda Hale ap
by jonny_noog 18y ago
I did a bit of looking into bcrypt-ruby after hearing about it here. It sounds good, I like the idea of the "cost" attribute.
However, I note that Coda Hale appears to have no interest in supporting his bcrypt-ruby gem for Windows. On his blog he says essentially that he doesn't use Windows and hence has no motivation to put any time into getting a pre-compiled bcrypt-ruby to work on Windows.
I can totally understand where he's coming from and as I do all my dev work on Debian Linux, it's not a problem for me personally. But my partner is a Windows user and it would be a problem for him.
The closest I have found to instructions on getting bcrypt-ruby compiled on Windows are from the bcrypt-ruby README:
You‘ll need a working compiler. (Win32 folks should use Cygwin or um, something else.)
So does this mean that my partner would then have to use the Cygwin environment for all his dev work from this point on?
And a random comment from Coda Hale's blog:
bcrypt seems to work with the Windows One-Click-Installer too. It was easy to compile it with MinGW (I just had to define the missing types u_int8_t, u_int16_t, and u_int32_t). All your tests pass. So you might consider to offer a precompiled version for us Windows users.
I am not a C programmer (getting more experience with a compiled language is on my todo list, just no time as yet) nor am I a security expert. My past experience with compiling stuff basically extends to typing "make" and "make install". I don't really understand what "I just had to define the missing types u_int8_t, u_int16_t, and u_int32_t" means.
So as much as I would like to try and incorporate bcrypt-ruby into my current Rails project, I can't really justify this added overhead of getting it to work on my partners Windows dev box with near zero support.
If anyone has more info, that would be great. But otherwise, I will - for now - be sticking with salted SHA256.
- binarylogic 18y agoI 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.
- jonny_noog 18y agoI 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.
- tptacek 18y agoThe 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.
- jonny_noog 18y agoJust 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.