Given a cryptographic hash, $ \text{hash}(A || B || C) $, and the last block added to the hash, $ C $, can you determine $ \text{hash}(A || B) $?

In other words, can you roll back the last round of a hash function, given that you know the input to that round?

Assuming $ || $ means concatenation and the length of each $ A, B, C $ is the block size, so the hash function starts a new round with the start of $ C $.


1 Answer 1


Nope. As a trivial case, imagine if C were one bit long. If telling you the last bit of the input was enough to make it easy to invert the hash (or find a pre-image), then I could simply try both possibilities for the last bit, and that would provide a way to invert the hash without knowing anything. But of course that's impossible for a secure cryptographic hash.


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.