ELI5: Explain Like I'm 5

CBC-MAC

CBC-MAC stands for "Cipher Block Chaining Message Authentication Code". It's like having a secret code that you use to make sure nobody changes the message without you knowing.

Imagine you want to send a secret message to your friend, but you're scared that someone might change the message along the way, like changing the word "yes" to "no". To prevent that from happening, you decide to use CBC-MAC.

First, you cut your message into blocks of letters, let's say blocks of 4 letters each. Then, you take the first block and put it through a secret code machine that scrambles it up. This first scrambled block is the "initialization vector" or IV.

After that, you take the second block of the message and combine it with the first scrambled block using a secret formula, like adding or multiplying them together. This creates a new scrambled block, which you then combine with the third block, and so on until you've gone through all of the blocks in your message.

The final scrambled block is your message's authentication code. You send this code along with the original message to your friend. When your friend gets the message, they'll put the same secret formula to work, starting with the IV, and generate a new authentication code from your message.

If the authentication code they generate is the same as the one you sent, then your friend knows that nobody changed the message during the journey. If the authentication code is different, your friend knows that the message was tampered with, and they should be careful before reading it.

In summary, CBC-MAC is a way to make sure that a message hasn't been changed during transmission by creating an authentication code that can detect tampering, using a secret formula and an initialization vector to scramble blocks of data in the message.