To be clear, I have access to $H(S)$ and as many $H(S||K)$ as I want. Every string $K$ is known. Can I use the extra information to my advantage and try to deduce $S$, without requiring bruteforce? Or do you still have to bruteforce but try less combinations since you have more information?


1 Answer 1


Assuming the hash is strong, you will not be able to find a preimage any more easily when you know multiple hashes (whether they use the same function or another). In fact, with some hashes you will be able to derive $H(S||K)$ from just $H(S)$ and $K$ (known as the length extension attack), so it can't give you more information.

Unless the hash is broken, the only way to find $S$ in either case is to guess, hash and compare.

However, if your hash was short enough to have collisions, you could need multiple hash values to verify a guess. As an extreme example, consider the first byte truncation of a strong hash. Any guess you make will match it one 256th the time. In that case, knowing more hashes would allow you to verify your guess with higher confidence.


Your Answer

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

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