1

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 $.

Zaz
  • 155
  • 4

1 Answers1

1

With standard cryptographic hashes (e.g., SHA1, SHA2, etc.), no, you cannot.

While it is possible to design a hash function that has this property, it would violate standard security properties that are normally assumed from a cryptographic hash function. For instance, it violates the assumptions made in the random oracle model of hash functions. As such, it would normally be viewed as a weakness in a cryptographic hash functions. Since standard cryptographic hash functions don't have this weakness, it would probably be viewed as undesirable for most purposes.

See also https://crypto.stackexchange.com/q/879/351, https://blog.cryptographyengineering.com/2011/09/29/what-is-random-oracle-model-and-why-3/, for explanation of what the random oracle model is.

D.W.
  • 167,959
  • 22
  • 232
  • 500