Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Say I'm trying to brute force the original plain text of an SHA256 hash, does knowing the RIPEMD160 hash of the same text help? In other words, does providing access to hash values of the same text generated by multiple algorithms decrease security?

share|improve this question

No, there is no security decrease in this case. While there could be some hypothetical constructions that might leak the preimage if two images are known, this is definitely not the case for existing hash functions, which are all quite different from each other.

An example of such a weak pair of hash functions could be two versions of MD5: one with 63 rounds, and another one with 64 rounds. Then the two hashes would reveal partial information about the preimage.

share|improve this answer

Theoretically, a hash function can be insecure and leak information about the plaintext. In this case knowing multiple hashes will let you make use of weaknesses in any of them. I agree with Dmitry Khovratovich that this isn't likely if you choose hash functions that are considered good, but it is a possibility.

More concretely, knowing multiple hash functions lets you use the fastest when searching for the plaintext using brute force or a dictionary attack. So, for example, if the attacker could calculate RIPEMD-160 twice as fast as SHA-256 on their hardware, they could search for a plaintext for which they know both hashes twice as fast as they could one for which they know only SHA-256.

The latter only really matters if you use the hash on short enough secret data that could be predicted, like short text messages.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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