John the Ripper Cracks Slow Hashes On GPU
solardiz writes "A new community-enhanced version of John the Ripper adds support for GPUs via CUDA and OpenCL, currently focusing on slow-to-compute hashes and ciphers such as Fedora's and Ubuntu's sha512crypt, OpenBSD's bcrypt, encrypted RAR archives, WiFi WPA-PSK. A 5x speedup over AMD FX-8120 CPU per-chip is achieved for sha512crypt on NVIDIA GTX 570, whereas bcrypt barely reaches the CPU's speed on an AMD Radeon HD 7970 (a high-end GPU). This result reaffirms that bcrypt is a better current choice than sha512crypt (let alone sha256crypt) for operating systems, applications, and websites to move to, unless they already use one of these 'slow' hashes and until a newer/future password hashing method such as one based on the sequential memory-hard functions concept is ready to move to. The same John the Ripper release also happens to add support for cracking of many additional and diverse hash types ranging from IBM RACF's as used on mainframes to Russian GOST and to Drupal 7's as used on popular websites — just to give a few examples — as well as support for Mac OS X keychains, KeePass and Password Safe databases, Office 2007/2010 and ODF documents, Firefox/Thunderbird/SeaMonkey master passwords, more RAR archive kinds, WPA-PSK, VNC and SIP authentication, and it makes greater use of AMD Bulldozer's XOP extensions."
Time to change the combination on my luggage!
I find it kind of odd that all of the analyses linked to in this article go on about SHA512-Crypt, BCrypt, SCrypt, etc, and the slideshow even talks about "Key Derivation Functions"... yet there doesn't seem to be any mention or comparision of PBKDF2-HMAC-SHA512 as a valid password-hashing key derivation function, despite it's widespread use, and that it's one of the core architectural components used in the design of SCrypt.
Sure, John the Ripper will crack dictionary passwords and passwords used by idiots (e.g. spaceballs12345), but it will not crack an 90+ bit random password (e.g. a 16-digit mixed-case alphanumeric is 95 bits, and it's really not that hard to memorize).
Lesson of the day: Use STRONG passwords. Everywhere.
But hashcat still does it faster.
If you really need to store password hashes securely, just store the SRP verifier:
s = salt
p = password
H() = a hash function, e.g., SHA-256, PBKDF2, etc.
x = H(s,p)
v = g^x
Store v and s. Anyone you can get at x by breaking Diffie-Hellman will make quite a news splash (but still won't get your password because of the hashing).
http://en.wikipedia.org/wiki/Secure_Remote_Password_protocol
The real issue isn't so much the hashing algorithm used than it is the bloggers.
An adaptive algorithm (one that can be made to go slower by tuning the number of cycles) such as bcrypt, and as opposed to sha, is arguably much better.
In the end, however, the real problem is the huge number of self-proclaimed experts with an opinion ranging from wrong to hopelessly wrong -- and a very big mouth. It wouldn't matter much if they were at least partially right (apart from the facts that, yes, do hash, and yes, do salt), but computer security is one of those fields where nearly no one actually understands what they're talking about. Don't believe me? Have the next security experts you meet explain encryption to you for a few good laughs.
I like to compare this to PHP/MySQL. The MySQL module has been deprecated in favor of MySQLi for so long I dare not even think about it. Yet, pretty much every tutorial/answer out there uses the mysql_*() set of functions including, of all places, Stack Overflow. So here we are, with newbie coders learning from horrific examples, and then viewing spaghetti code bases like WordPress as best practice. And then they write their own PHP/MySQL tutorial on their own blog, and the 5 years later some newbie reads it, perpetuating the vicious circle. The next step is the same PHP/MySQL newbie wanting to secure his app, learning from poor examples and advices, and propagating them in the exact same way.
Anyway, the "use sha to hash passwords" BS and the inane salting strategies that invariably accompany them are here to stay for a long time, because the Internet has a very, very, very, very long memory.
If the cracking software uses the GPU to brute force the hashes, why not compute and compare hashes using the GPU too? level the playing field out.
I'd be grateful for some insight about it looks / works.
Ibid.
Yet again, we see the conflation of an algorithm based on a number of rounds of a cryptographic function (Bcrypt, Scrypt, PBKDF2) with the cryptographic function itself (Blowfish, SHA-1, SHA-512).
Bcrypt is a number of Blowfish rounds.
PBKDF2 is a number of HMAC rounds.
Comparing N rounds of Bcrypt against 1 round of SHA-512 is an entirely invalid and almost pointless* argument. Now, determining how many rounds of Bcrypt is equivalent to N rounds of PBKDF2-HMAC-SHA-512 on a given platform would be valuable.
*I acknowledge that some developers would use only one round of a hash to store passwords... on the other hand, they might also pass Bcrypt a minimum number of rounds, too.
The real news is that JtR is adding GPU cracking functionality that has been the domain of software like Elcomsoft's products (many hashes), Pyrit (WPA(2)-PSK), Hashcat (many hashes), and a few others. If JtR provides a more extensible framework, and I believe it does, this will allow for more competition, more new ideas, and more algorithms to be able to be tested against GPU cracking, which will allow all of us to try to increase our security.
Close to the wake of the LinkedIn password leak, this is particularly good timing - password security is still on people's minds.
bcrypt rules. Algorithm design wins against brute force.
Democracy Now! - uncensored, anti-establishment news