![EnOcean B6221-K516 User Manual Download Page 113](http://html1.mh-extra.com/html/enocean/b6221-k516/b6221-k516_user-manual_2413678113.webp)
USER MANUAL
STM 550B / EMSIB - EASYFIT MULTISENSOR FOR IOT APPLICATIONS (2.4 GHZ BLE)
© 2020 EnOcean | www.enocean.com
F-710-017, V1.0
STM 550B / EMSIB User Manual | v1.3 | June 2020 | Page 113 / 115
B.5
Execution example
At the time of writing, a suitable online AES calculator could be found here:
Likewise, a suitable online XOR calculator could be found here:
We can now calculate the signature using a sequence of AES128 and XOR operations as
shown in Figure 76 as follows:
X_1 = AES128(B0, Key)
X_1 = AES128(490000017700E5FB2700000000000000, 4DB34DB3070EFC6713FE39E13CF3C939)
X_1 = F900DE65FE42BA0949F4D53B63DF8CA1
X_1A = XOR(X_1, B_1)
X_1A = XOR(F900DE65FE42BA0949F4D53B63DF8CA1, 00191CFFDA03FB2700000268458D0140)
X_1A = F919C29A2441412E49F4D75326528DE1
X_2 = AES128(X_1A, Key)
X_2 = AES128(F919C29A2441412E49F4D75326528DE1, 4DB34DB3070EFC6713FE39E13CF3C939 )
X_2 = 779D55AA355662EF2512B818FF01E9E1
X_2A = XOR(X_2, B_2)
X_2A = XOR(779D55AA355662EF2512B818FF01E9E1, 420906578AF791E65E23010000000000)
X_2A = 359453FDBFA1F3097B31B918FF01E9E1
X_3 = AES128(X_2A, Key)
X_3 = AES128(359453FDBFA1F3097B31B918FF01E9E1, 4DB34DB3070EFC6713FE39E13CF3C939)
X_3 = 88C57785525A2DF4EEFDA39DAEAA08EA
S_0 = AES128(A0, Key)
S_0 = AES128(010000017700E5FB2700000000000000, 4DB34DB3070EFC6713FE39E13CF3C939)
S_0 = 87C4205662899442400842515B704DED
T_0 = XOR(X_3, S_0)
T_0 = XOR(88C57785525A2DF4EEFDA39DAEAA08EA, 87C4205662899442400842515B704DED)
T_0 = 0F0157D330D3B9B6AEF5E1CCF5DA4507
The calculated signature is formed by the first four bytes of
T_0
, i.e. it is
0F0157D3
.
The calculated signature matches the signature that was transmitted as part of the data
telegram payload (see chapter 5.5).
This proves that the telegram originates from a sender that possesses the same security key
and the telegram content has not been modified.