CBC-MAC
From CRYPTUTOR
CBC MAC
(Cipher Block Chaining Message Authentication Code)
This construction uses block ciphers. Each individual box in the figure is a Psuedorandom Function that accepts a fixed length input. When these individual PRFs are hooked together as shown in the picture, the construction forms a CBC-MAC.
Note: Each E represents a PRF.
where mi is a block of the message to be encrypted.
k is a key.
Note, the input into the CBC-MAC is the
In CBC-MAC, each block of plain text is XORed with the previous ciphertext before being encrypted. This is convenient because it makes encrypted text dependent on the output of the blocks before it.
The initial block must be given an initialization vector, we usually take it to be 0n, where n is the fixed amount of text that each block can handle.
A CBC-MAC that accepts fixed length messages is secure. However, CBC-MAC is NOT secure for messages of a variable length. In fact, it can be shown that
multiples of this fixed length are not secure due to the fact it is possible to produce collisions.
References
http://www.cs.ucdavis.edu/research/tech-reports/1997/CSE-97-15.pdf

