USER MANUAL
ESRPB / EDRPB - EASYFIT BLUETOOTH® SINGLE / DOUBLE ROCKER PAD
© 2018 EnOcean | www.enocean.com
F-710-017, V1.0
ESRPB / EDRPB User Manual | v1.3 | Jan 2018 | Page 68/68
B.6.4
Data telegram with 4 byte optional data
For this example, we consider the following telegram payload received from a PTM 215B
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
B819000015E2 (little endian representation of E215000019B8)
Input Data
10FFDA036A0400001012345678
Input Length
0x000D
Sequence Counter
6A040000
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
B819000015E26A040000000000
A0
01B819000015E26A0400000000000000
B0
49B819000015E26A0400000000000000
B1
000D10FFDA036A040000101234567800
We can now calculate the signature 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(4344b57a8189e08ee99be1d9251c29b7, 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
.