Score:1

AES-CBC collision resistance of hash function

tn flag

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

Morrolan avatar
ng flag
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?
George avatar
tn flag
@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
Marc Ilunga avatar
tr flag
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?
fgrieu avatar
ng flag
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.
Maarten Bodewes avatar
in flag
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$.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.