Si4010 Keyfob AES DEMO
The fields other than AES part are not encoded. The AES encoded part of the RF packet contains the following
encoded fields:
Temperature
Battery Status
2 byte
1 byte
Since the plain part and the AES encrypted part both contains the Chip ID, the decoding process is verified by
comparing the Chip ID field between the two parts of the RF packet. If the decryption fails, a notification screen
appears describing the AES decryption failure.
4.4. AES Encoding
The AES encryption/decryption algorithm is a symmetric algorithm because the same key is used for encryption
and decryption. The AES128 encoding/decoding process has been done using the SiLabs AES128 library. A
session key for each packet is generated based on the sender Chip ID field and the constant key for the given
packet type. There are two kinds of RF packets the key fob can send: an Association packet or a Message packet.
There are different keys stored in the flash for each kind of packet. The receiver determines which key should be
used by the Association flag in the plain Status byte.
Association Key /
Message Key
Decoding of AES encrypted data basically consists of the same steps as encoding except that the final AES cipher
is replaced with inverse-ciphering. The receiver generates the same session key from the constant key and the
sender Chip ID, and, since the AES is a symmetric algorithm, it can decrypt the data if the session key is valid.
4
Table 2. AES Encoded Fields
Rolling Counter
Button State
4 byte
1 byte
Session Key
AES
Cipher
Array with
Chip ID
Figure 4. AES Encoding
Rev 0.2
PACap value
Chip ID
2 byte
4 byte
AES
Cipher
Data Array
Reserved (0x00)
2 byte
Encrypted Data
Need help?
Do you have a question about the Si4010 and is the answer not in the manual?
Questions and answers