Page
26
of
60
©
2019 Radiocrafts AS
MBUS User Manual (ver 2.01)
MBUS USER MANUAL
For ELL encryption the module will automatically add or check the Payload CRC if the ENCRYPT_FLAG or
DECRYPT_FLAG parameters are set with &0x02.
6.5 Transport Layer Encryption
Transport Layer Encryption can be used for all messages types with short or long header. It can not be used for
messages with «no header». Security modes 4 and 5 are supported.
If both Link Layer encryption and Transport Layer Encryption is defined
– LinkLayer encryption will be used.
The TPL encryption uses block mode (AES-128-CBC) and need padding to 16 byte blocks. The Configuration
Word must set encryption mode 0x04 or 0x05. If encryption mode is set to 0x00 the message will not be encrypted
even if flags are set. When using 0x05, the application must add the two encryption verification bytes (0x2F) after
the header. The Initialization Vector for the encryption is extracted from the long header (for CI-fields 0x5B, 0x60,
0x64, 0x6C, 0x6D, 0x72, 0x7C, 0x7E, 0x80 and 0x8B). For the short header (CI-field fields 0x5A, 0x61, 0x65,
0x7A, 0x7D, 0x7F and 0x8A) the Initialization Vector is partly from the link layer header (destination address) and
the short application header.
The Access Counter byte in the application header is used by the encryption, and the counter must be incremented
in order to avoid repetitive messages. When using the mailbox template the counter is automatically incremented
by the module (see description of two level buffering).
6.6 Mailbox pre-encryption
The ‘E’ command can be used to encrypt a message in the Mailbox before it is sent. This is done to save time and
needs to be done in T2-mode if the message to be sent back via the mailbox is more than one block.