3

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?

Hendrik Brummermann
  • 1,154
  • 1
  • 9
  • 26

1 Answers1

2

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.

mikeazo
  • 38,563
  • 8
  • 112
  • 180