One of the simplest is to prepend the length of
the message before applying the CBC-MAC construction.
And this looks like the following.
So now to authenticate a message m1 through ml, where l can be anything.
What the sender will do is to encode the value l as a single block.
So represent l using m bits padding to the left if necessary with zeros.
And then just run the basic CBC-MAC construction on the encoded message,
as it were, l, m1, m2 up to ml.
And it turns out, as we said, that this will work and
this will give us a Q on MAC which can handle messages of any block length l.
So the sender can now authenticate.
Arbitrary length messages the receiver can safely accept.
Arbitrary length messages if it,
too prepends the length L, before applying CBC-MAC and checking the result.