Sha256Crypt / Sha512Crypt are designed based on ideas of BCrypt but use SHA instead of Blowfish because of political requirements.

The Sha*Crypt algorithms have the advantage that they are used in /etc/shadow on all common Linux distribution.

Do the Sha*Crypt algorithms have the same properties concerning memory use which slows BCrypt down on graphic cards?


1 Answer 1


From the answer you linked to:

For SHA-1 or SHA-256, computation entirely consists in 32-bit operations on a handful of registers, so a password cracker will run without doing any memory access at all, and full parallelism is easily achieved (I did it on my GeForce 9800 GTX+, and I got about 98% of the theoretical maximum speed with a straightforward unrolled SHA-1 implementation).

What that tells us is that it is fairly easy to get big performance gains on SHA-256 (which also implicates SHA-512) using a GPU. The question then is, does ShaCrypt do anything special to slow GPU's down?

Looking through the example source code you liked to, it doesn't look like it. What I was looking for was a large (a few kilobytes) data structure that would be constantly accessed and modified. That doesn't exist from what I could see. Sure, there are data dependencies, which would slow down a single password calculation, but nothing to prevent parallelization of multiple passwords.

On an interesting note, there are JtR patches which would give you ShaCrypt GPU capabilties in John the Ripper. I was unable to find performance numbers, however.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.