Score:1

Why is Masking used in CMAC?

cn flag

I am working on masking in CMAC.

If masking is not used, then what will be the behavior of CMAC?

Patriot avatar
cn flag
Please explain what you have done to answer the question.
Score:4
my flag

if masking is not used then what will be the behavior of CMAC.

Well, if you take out the masking from CMAC, you effectively have CBC-MAC, and that has known issues.

The most immediate one is that the mask is used to distinguish a message that's exactly a multiple of 16 bytes in length (with 0's at the end), and one which is slightly shorter. This can be handled by including a padding scheme, so I'll assume that.

However, even with that addition, there are issues; for example, if you know the $CBCMac_k(A)$, you know that's the same MAC as $MACMac_k(Pad(A) || A')$, where $Pad$ is the padding function used within CBCMac, and $A'$ is exactly the same as $A$, except the first block is xor'ed with $CBCMac_k(A) || IV$ (where $IV$ is the fixed IV that CBCMac uses); what this xor does is reset the internal state of the MAC back to the standard starting IV for CBCMac, and then you'll process the rest of the message exactly the same as for the original message.

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.