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 84/86
C.3.2
Data telegram with 1 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
:
0D FF DA 03 62 04 00 00 10 12 B9 FE AC C1
The last four bytes of this payload (
B9 FE AC C1
) 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
0DFFDA03620400001012
Input Length
0x000A
Sequence Counter
62040000
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
B819000015E262040000000000
A0
01B819000015E2620400000000000000
B0
49B819000015E2620400000000000000
B1
000A0DFFDA0362040000101200000000
The execution sequence would then be as follows:
X_1
=
AES128(B0,
Key)
X_1 = AES128(49B819000015E2620400000000000000, 3DDA31AD44767AE3CE56DCE2B3CE2ABB)
X_1 = dc8d685f968e795b23f4370b3091f33f
X_1A
=
XOR(X_1,
B_1)
X_1A = XOR(dc8d685f968e795b23f4370b3091f33f, 000A0DFFDA0362040000101200000000)
X_1A = dc8765a04c8d1b5f23f427193091f33f
X_2 = AES128(X1A, Key)
X_2 = AES128(dc8765a04c8d1b5f23f427193091f33f, 3DDA31AD44767AE3CE56DCE2B3CE2ABB)
X_2
=
231be2ff54ca62fb38d32eaaaf1b447d
S_0
=
AES128(A0,
Key)
S_0 = AES128(01B819000015E2620400000000000000, 3DDA31AD44767AE3CE56DCE2B3CE2ABB)
S_0 = 9ae54e3e95de9f91a0c279537bc25b00
T_0
=
XOR(X_2,
S_0)
T_0 = XOR(231be2ff54ca62fb38d32eaaaf1b447d, 9ae54e3e95de9f91a0c279537bc25b00)
T_0 = b9feacc1c114fd6a981157f9d4d91f7d
The calculated signature is formed by the first four bytes of
T_0
, i.e. it is
B9 FE AC C1
.