Score:0

Given the CBC-MAC for a message M and the key K, How could I forge a new message M' so that it has the same CBC-Mac as M

rs flag

Im looking to learn about forging CBC-Macs.

Given the CBC-Mac for a Message M and the Key used to encrypt the message K.

Can I create a new message M' which would have the same CBC-MAC?

Original Unknown Message: M

CBC-Mac of Original Unknown Message: X

Key used in CBC Block cipher: K

New message with CBC-Mac = X: M'

Gilles 'SO- stop being evil' avatar
cn flag
Does this answer your question? [Insecurity of CBC-MAC](https://crypto.stackexchange.com/questions/35454/insecurity-of-cbc-mac)
Score:1
my flag

Can I create a new message M' which would have the same CBC-MAC?

Sure can.

On the other hand, you're learning, and I believe you learn better by figuring out it yourself, and so I'll just give a hint.

Suppose you selected an arbitrary string $A$ (which is a multiple of the block size in length), and an arbitrary string $B$; how could you find string $X$ (which is one block size in length) such that $CBC-MAC_k(A || X || B ) = Target$?

Hint: with CBC mode, you can compute things in the reverse direction - if you know the state after $i$ blocks, and you know the key and the previous message block, you can compute the state after $i-1$ blocks...

Tom Scott avatar
rs flag
Hey Poncho, Thanks for the help. Unfortunatly Im still a bit puzzled. So far I have figured out that I can get Cipher Text N - 2 XORed with Plain text N-1 by decrypting the MAC. Can you help me any further
poncho avatar
my flag
@TomScott: so, how can you get ciphertext $N-2$ for a message that you selected?
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.