Question is a follow-up to this one. The question was about accelerating SHA1. I am writing an application, where I do have a choice of hash algorithm, as long as it's a strong one. I want to be able to use the one which could be CPU-accelerated on consumer grade AMD and/or Intel processors. Which one should I take?

  • 2
    $\begingroup$ No consumer CPU supports a hardware accelerated hash instruction, however Intel Haswell CPUs have AVX and BMI instructions, and can hit 0.6GB/s for SHA-512 (the obvious choice for security) or 1GB/s for SHA-1 $\endgroup$ May 1 '14 at 5:02
  • 1
    $\begingroup$ BLAKE2b is about as close as you can get to a modern hashing algorithm that's CPU-accelerated. $\endgroup$ May 1 '14 at 6:26
  • 4
    $\begingroup$ Are you hashing many short messages, or few long ones? In the latter case you must use a tree hash to have any hope of parallelization. $\endgroup$ May 1 '14 at 10:48
  • $\begingroup$ @RichieFrame Almost no consumer CPU supports hardware accelerated hash instruction, as the VIA Eden processors do. They are however not known particularly for speed, so the mileage may vary. $\endgroup$
    – Maarten Bodewes
    Jun 28 '15 at 13:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.