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 86/86
C.3.4
Data telegram with 4 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
:
10 FF DA 03 6A 04 00 00 10 12 34 56 78 2C 9E 10 95
The last four bytes of this payload (
2C 9E 10 95
) are the sender-provided signature which
has to be authenticated. The variable input parameters are therefore the following:
Parameter
In this example
Source Address
B8:19:00:00:15:E2 (little endian of E2:15:00:00:19:B8)
Input Data
10:FF:DA:03:6A:04:00:00:10:12:34:56:78
Input Length
00:0D
Sequence Counter
6A:04:00:00
Security Key
3D:DA:31:AD:44:76:7A:E3:CE:56:DC:E2:B3:CE:2A:BB
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
B819000015E26A040000000000
A0
01B819000015E26A0400000000000000
B0
49B819000015E26A0400000000000000
B1
000D10FFDA036A040000101234567800
The execution sequence would then be as follows:
X_1
=
AES128(B0,
Key)
X_1 = AES128(49B819000015E26A0400000000000000, 3DDA31AD44767AE3CE56DCE2B3CE2ABB)
X_1 = 434FA5855B8A8A8AE99BF1CB114A51B7
X_1A
=
XOR(X_1,
B_1)
X_1A = XOR(434FA5855B8A8A8AE99BF1CB114A51B7, 000D10FFDA036A040000101234567800)
X_1A = 4342B57A8189E08EE99BE1D9251C29B7
X_2 = AES128(X1A, Key)
X_2 = AES128(4342B57A8189E08EE99BE1D9251C29B7, 3DDA31AD44767AE3CE56DCE2B3CE2ABB)
X_2
=
12C78B85A4ECB6F34DAFF7651DB8E386
S_0
=
AES128(A0,
Key)
S_0 = AES128(01B819000015E2630400000000000000, 3DDA31AD44767AE3CE56DCE2B3CE2ABB)
S_0 = 3E599B103F33447E6B46EEC4A042D0BC
T_0
=
XOR(X_2,
S_0)
T_0 = XOR(12c78b85a4ecb6f34daff7651db8e386, 3e599b103f33447e6b46eec4a042d0bc)
T_0 = 2C9E10959BDFF28D26E919A1BDFA333A
The calculated signature is formed by the first four bytes of
T_0
, i.e. it is
2C 9E 10 95
.