Re:An HN style social news site written in Ruby/Sinatra/Redi...
by michaelfairley on Thursday October 20, 2011 @06:58PM
(#3137495)
Why pass up an incredibly well testsed tool that will hands down be more secure than anything you can write on your own?
[ Parent
| on HN ]
Re:An HN style social news site written in Ruby/Sinatra/Redi...
by daeken on Thursday October 20, 2011 @07:00PM
(#3137509)
It's very much up for debate how much bcrypt, scrypt, and friends buy you over iterated HMACs like PBKDF2, which can be implemented in just a few lines of code. While I'd recommend the use of bcrypt or scrypt for most purposes, I personally have no qualms recommending something like PBKDF2 with a large number of iterations -- it's pretty damn sound. Iterated SHA1 isn't much worse than any of them, but there are a couple optimizations you can make while brute-forcing them, which you can't make with iterated HMACs, so I'd recommend going with that route.
Re:An HN style social news site written in Ruby/Sinatra/Redi...
by antirez on Thursday October 20, 2011 @07:31PM
(#3137621)
daeken thanks for your knowledge. We should follow your example of understanding how things works instead of repeating "use bcrypt".
Re:An HN style social news site written in Ruby/Sinatra/Redi...
by tptacek on Friday October 21, 2011 @12:58AM
(#3138495)
I agree, but we could do worse than to have "bcrypt" be the lay developer's default answer. All that is is annoying, whereas "secret salt construction using Whirlpool as the hash" or- whatever- craziness is actually dangerous.
Your code is neat. I don't care what hash you use. I'm just saying.
Re:An HN style social news site written in Ruby/Sinatra/Redi...
by michaelfairley on Thursday October 20, 2011 @08:33PM
(#3137774)
If iterated SHA1 and bcrypt are (all other things equal) equally secure, but you're more likely to mess up while implementing your own iterated SHA1, then bcrypt is more secure.