USER MANUAL
PTM 216B – BLUETOOTH
®
PUSHBUTTON TRANSMITTER MODULE
© 2022 EnOcean | www.enocean.com
F-710-017, V1.0
PTM 216B User Manual | v1.0 | February 2022 | Page 85/86
C.3.3
Data telegram with 2 byte optional data
For this example, we consider the following telegram payload received from a PTM 216B
with the source address
E215000019B8
and security key
3DDA31AD44767AE3CE56DCE2B3CE2ABB
:
0E FF DA 03 63 04 00 00 11 12 34 52 E0 51 16
The last four bytes of this payload (
52 E0 51 16
) are the sender-provided signature which
has to be authenticated. The variable input parameters are therefore the following:
Parameter
In this example
Source Address
B819000015E2 (little endian representation of E215000019B8)
Input Data
0EFFDA0363040000111234
Input Length
0x000B
Sequence Counter
63040000
Security Key
3DDA31AD44767AE3CE56DCE2B3CE2ABB
Based on variable input data and constant internal algorithm parameters, we can now de-
rive the following variable internal parameters:
Parameter
In this example
Nonce
B819000015E263040000000000
A0
01B819000015E2630400000000000000
B0
49B819000015E2630400000000000000
B1
000B0EFFDA0363040000111234000000
The execution sequence would then be as follows:
X_1
=
AES128(B0,
Key)
X_1 = AES128(49B819000015E2630400000000000000, 3DDA31AD44767AE3CE56DCE2B3CE2ABB)
X_1 = ab5ec24beabc9ddeeb73751c7734cc64
X_1A
=
XOR(X_1,
B_1)
X_1A = XOR(ab5ec24beabc9ddeeb73751c7734cc64, 000B0EFFDA0363040000111234000000)
X_1A = ab55ccb430bffedaeb73640e4334cc64
X_2 = AES128(X1A, Key)
X_2 = AES128(ab55ccb430bffedaeb73640e4334cc64, 3DDA31AD44767AE3CE56DCE2B3CE2ABB)
X_2
=
d33e96d7a105c4e8543207f9e75e6cfe
S_0
=
AES128(A0,
Key)
S_0 = AES128(01B819000015E2630400000000000000, 3DDA31AD44767AE3CE56DCE2B3CE2ABB)
S_0 = 81dec7c16915c6647d92b0668f65e9c9
T_0
=
XOR(X_2,
S_0)
T_0 = XOR(d33e96d7a105c4e8543207f9e75e6cfe, 81dec7c16915c6647d92b0668f65e9c9)
T_0 = 52e05116c810028c29a0b79f683b8537
The calculated signature is formed by the first four bytes of
T_0
, i.e. it is
52 E0 51 16
.