I am encrypting a volume with TrueCrypt. I have decided to use AES as the encryption algorithm, seeing as it is the government standard.

But which hash algorithm is better (more secure)? RIPEMD-160 or SHA-512 or Whirlpool?

I am using Mac.

  • I believe that SHA-512 is the most secure, as the government uses that, the latter is my personal opinion.
    – Mythrillic
    Jan 28, 2012 at 9:21

3 Answers 3


Both SHA-512 and Whirlpool are 512 bit hashes, while RIPEMD-160 is 160 bits. TrueCrypt uses these hashes with PBKDF2 to derive keys. When creating file volumes, Truecrypt uses 1,000 rounds for both SHA-512 and Whirlpool, but 2,000 rounds for RIPEMD-160. I have some software called TCHead that decrypts TrueCrypt headers. It's very simple and straight-forward and demonstrates how and where these hashes are used.

To answer your question, in my opinion, either SHA-512 or Whirlpool would be fine. I would use either and not worry about that too much. Hope this helps.


I question why the NIST committee recognized Serpent as having superior security and still went with Rijndael and Sha-256/512 for use as AES. I wonder when security is the prime issue why the committee didn't pick it with the excuse that it wasn't fast enough. Serpent scored the Highest in security. True, Rijndael was faster but whatever was chosen would have had hardware compatibility baked into the CPU as AES is. I use Serpent and Whirlpool which the latter is approximately the same as SHA-512. On SSD's the speed difference is less then 5% in the 3 desktops with different Intel chips i5/i7 Haswell, Ivy Bridge and Skylake and Laptop Intel i7. To the best of my knowledge there are known backdoors in Serpent/Whirlpool combo and that makes that my decision easy.


I think there three ways to look at this issue.

If you are using it to keep private personal things that are not of an illegal nature and your main concern is say someone stealing your computer and rifling through it to steal your identity, etc. then almost any relatively modern HASH function will do as the adversary is of limited resources and likely skill. This would include smaller business rivals. Of course, AES is fine as well.

Second If you are concerned about larger corporate adversaries with large IT and tech knowhow or most state/government actors then you want to choose what is both accepted by common orthodox advice: that is SHA-256 or SHA-512. SHA-512 causes a small performance penalty, so, there isn't much of a reason not to use it and the US government uses it (and AES) for up to top secret. As long as your encrypt key is securely generated and at least 14 characters and the HASH function is seeded sufficiently randomly it is computationally infeasible to brute force the solution (there are websites that roughly calculate the time to brute force it). Both SHA and AES have been extensively studied and so far no known weakness of them is known that would be cheaper than a brute force attack.

Lastly, if you are in the paranoid/peace of mind/the spooks of the world are out to get you class then do not use anything that the US government says is fine for the very reason that they have a long and dishonourable history of fackery in that regard (see wikipedia for instances where the US government handed out encryption to allies that they could already break among other dirty tricks). They don't use it for above top secret which suggests that they have concerns about its vulnerability in the future (or perhaps currently) for some reason. I would then suggest Serpent for encryption (since it was rated higher in security than the AES finalist) or perhaps Camellia which runs the fastest among non hardware accelerated algorithms. Twofish isn't far off of Serpent in speed, is also open source, and also arguably is more secure than AES. In terms of HASH functions, use RIPEMD-160 (Whirlpool is no longer offered as an option on Veracrypt) again because it is not US government and its open source. If you're REALLY concerned, use a cascade scheme. But as far as HASH functions go, RIPEMD-160 is what you need at this level.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .