# Significance of IV in Merkle-Damgård construction

Is Merkle-Damgård essentially encrypting the IV with the given message? I may be wrong but this is how I understand Merkle-Damgård:

There is a message of an arbitrary length, which is broken up into blocks before it can be encrypted; the blocks can be padded if necessary. Then a fixed IV is used and the first block of the message is run through a compression function using something like AES (possibly derived from a block cipher) with the IV. The output is then taken as the IV for the next round. In the end, the resulting output is the same size as the IV.

What is my error in understanding?

• there really isnt much error at all that is essentially correct Oct 16, 2016 at 3:30
• crypto.stackexchange.com/questions/11615 Oct 16, 2016 at 3:31
• A block cipher in Merkle-Damgård could go really wrong. Also, you have to have some twist in Merkle-Damgård for some block to get a security proof.
– K.G.
Oct 16, 2016 at 19:00

broken up into blocks before it can be (hashed)... Then a fixed IV is used...

In practice, you may not even know the entire message before beginning hashing. So this is incorrect. You divide into blocks as more of the message becomes available.

before it can be encrypted

You are not encrypting. You are hashing.

the blocks can be padded if necessary