KY (AES Encryption Key)

This command applies to the XTC RF Module.

Sets the 256-bit Advanced Encryption Standard (AES) key for encrypting or decrypting data. Once set, you cannot read the key out of the device by any means. The firmware encrypts the entire payload of the packet using the key and computes the CRC across the ciphertext. When you enable encryption, each packet carries an additional 16 bytes to convey the random cipher-block chaining (CBC) Initialization Vector (IV) to the receiver(s). Set 256-bit key (64 hex digits) on multiple devices for encrypted RF communication. Set to 0 to disable encryption. Reading the parameter returns a 0 (encryption disabled) or 1 (enabled). The key cannot be read for security reasons.

A device with the wrong key (or no key) receives encrypted data, but the data driven out the serial port is meaningless. Likewise, a device with a key receives unencrypted data sent from a device without a key, but the output is meaningless. Because it uses CBC mode, repetitive data appears differently in different transmissions due to the randomly-generated IV.

Note For international (non-U.S.) variants of XTC devices, the encryption key is 128-bit AES. The command operates the same except the key length is 16 bytes rather than 32 bytes. This pertains to part numbers ending with 128, no matter which firmware version is loaded. This also pertains to the Australia version of firmware 22xx.

Binary command

0x43 (67d)

Command type

Security

Parameter range

0 - (64 hex digits all set to 'F')

Default

0 (disabled)

Bytes returned

2