USER MANUAL
STM 550 / EMSI
–
ENOCEAN MULTISENSOR FOR IOT APPLICATIONS
© 2020 EnOcean | www.enocean.com F-710-017, V1.0
STM 550 / EMSI User Manual | v1.3 | September 2020 | Page 36/97
6.1.2
Telegram authentication
The goal of telegram authentication is to prevent unauthorized senders to transmit apparently
valid commands causing the receiver to perform unauthorized actions.
Telegram authentication works by creating a
message signature
(often called
Cipher-based
Message Authentication Code
or C
MAC
in short) based on the content of the telegram and
the secret key.
Essentially, the telegram data is transformed via a defined algorithm using the secret key
into a unique, fixed size signature. STM 550 by default uses a signature length of 32 bit to
authenticate each message.
For an optimal signature algorithm, the likelihood of two different messages creating the
same message signature is inversely proportional to the signature size, so for a 32 bit signa-
ture the likelihood would be approximately one in 4 billion.
For message authentication purposes, the message signature (CMAC) is typically appended
to the message itself and transmitted together with it.
When the receiver receives such a message, it will itself calculate the CMAC based on the
secret key and the content of the received message. The receiver then compares the CMAC
it calculated with the CMAC it received as part of the message.
If both CMAC are the same, then the receiver can establish two important facts:
1.
The message originates from an owner of the secret key
2.
The content of the message has not been modified
Figure 23 below illustrates the content authorization via a CMAC signature.
Figure 23
–
Telegram authentication
Signature
Calculation
Input Data
Secret Key
Signature
Data
Signature
Data
Signature
Calculation
Secret Key
Compare
OK