Re: MAC / MIC / MD for short messages



Hi,

thanks for your answer :)

Avoid MAC'ing small messages. It's inefficient and wastes space. Even
if you did say HMAC-SHA1-32 on 2 byte payloads you are using 200% of
the packet space to store the MAC tag.

I'd use larger packets, or if delivery is guaranteed use a MAC over
several packets. That way you may decode X packets but you will
eventually pick up on the error.

Well, yes the problem is the messages are only very short and only sent
from time to time. So they have to be short and each packet has to be
authenticated by itself. I can't wait for further packets until I know
that the first packet maybe failed authentication...
That's why I was asking if it's ok to use for a 5 Byte packet a MAC of
only e.g. 24 bit instead of 128 bit - or if this is an extremely
security problem.

What cipher you pick depends on your platform. If you're on an 8051
... well give up. They're useless.
The microcontroller will be a 16-bit chip. I hope AES should be working
with it, is it?

Would you favour CMAC to an HMAC-MD5? Could you please tell me why?

Regards, Michael

.



Relevant Pages