Template / Encrypt Protocol Frame

This command encrypts the last generated bytes of the destination data. The number of concerned bytes is specified in Len and has to be either the count of bytes or 0xFF, in which case all bytes from the last Mark Command to the end are encrypted.

The used Cryptoalgorithm is TripleDES. The Cryptomode specifies the used cryptomode. If the number of bytes to encrypt is not a multiple of 8, the missing bytes will be filled with 0 at the end.

The Key Key specifies a valueid within the subkey where the template is stored. This value contains a 16byte Key, that shall be used for encryption.

The Key should be > 0x80 to ensure security (values < 0x80 can be read out)

Properties

Format

Name Type/Size Description
Len Integer (8 bits) -
CryptoMode Enumeration (8 bits) These keywords can be used for the Encrypt command to specify a cryptomode.
Values:
  • Ecb (0x00)
    Use ECB mode (https://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Electronic_codebook_.28ECB.29) for encryption.
  • Cbc (0x01)
    Use CBC mode (http://en.wikipedia.org/wiki/Cipher_block_chaining) for encryption. This mode is recommended due to higher security.
Key Integer (8 bits) -