A transmitting device (100) generates a message (102). The message has a
message length (104) and comprises message data (106). A key input (108)
is identified, and a message authentication key (112) is derived based on
the key input and the message length. Based on the message authentication
key and the message data, a message authentication code (118) is derived,
which is used to authenticate the message.