# AES-CBC collision resistance of hash function [closed]

I'm very new to cryptography and am having some issues with the following question

A hash function H encrypts an n-block message m = (m1, m2 ... mn) in CBC mode:
- Block size is 128 bits
- Hash result is the last ciphertext
- IV is arbitrary 1 block long
- Encryption key is arbitrary number -> 128, 192 or 256 bits
- IV and Key are public


I need to find out if this function is collision resistant

• If it is I need to provide proof
• If it's not I need to provide a pair of collisions m and m' s.t -> H(m) = H(m')

Also discussing cases where block size varies over n=1,2,3

Any help would be greatly appreciated, thanks

• Take a look at a figure showing how the CBC mode of operation works in the encryption direction. Try to answer the following: If you change a single bit of the message, in which way will this affect a) what comes out of AES for that block, b) what goes in to AES in the next block, and c) the final block of ciphertext (= the hash value). Can you use this knowledge to find two messages which collide? Nov 21, 2022 at 10:51
• @Morrolan thanks for your comment. I can already understand that for one block there will be no collisions and for anything >1 block there's a chance for collisions. Just having some issues actually proving that this is the case Nov 21, 2022 at 11:04
• What is the origin of this question? There are a number of somewhat unrelated topics bundled together (e.g.: encryption and collision resistance). Another question is how does decryption work then? Nov 21, 2022 at 11:12
• Hint: how can you find the (unique, as you comment) 1-block message that has a given hash? Slightly adapt that technique to find several more-than-one block messages with a given hash.
– fgrieu
Nov 21, 2022 at 11:30
• Try this with a two block message just containing zero bits to make your life easier, then create another two block message that collides. Remember that XOR is associative, you can rearrange any formula, i.e. $P_1 \oplus C_0 = I_1$ means that $P_1 = \cdots$. Nov 21, 2022 at 11:44