8201, 8202, 8203, 8204 Acceleration Processor Data Sheet, DS-0157-05
Page 78
Exar Confidential
In small packet mode, the host software must write the AAD into the command structure.
The AAD length must be padded so that it is aligned on an 8-byte boundary. For example,
if AAD_Size is equal to 57, the AAD field in the command structure would be 64 bytes
(padded with 7 bytes of zeroes).
Because the IV and AAD are not protected by a CRC, the 820x will transmit the IV and AAD
to the host destination buffer. The host software can then determine whether the IV or AAD
have been corrupted.
3.1.3.4
Key Format
For Encryption and Hash related operations, the host software must write the encryption
key to the 820x. The key must be located in the first source buffer and may have one of
the five formats described in this section.
For all key formats described in this section, reserved fields and the CRC verified “Key +
reserved fields” should be filled with zeroes when written by the host software.
The 820x will automatically verify the key CRC when reading the key, and report a “key
CRC error” to the host if the CRC verification failed. Although the key is CRC protected, the
820x will still write the key to the host destination buffer if the DIR bit in the
Desc_cmd_base descriptor is set to one.
Key Format 1: AES, 3DES
If the Encryption Engine and Hash Engine are both enabled and Hash_OP[3:0] is set to a
Slice Hash, File Hash or Slice + File Hash operation, the Hash Engine will calculate the hash
values without a key and the Encryption Engine will encrypt the data with a key. If the
Encryption Engine is disabled, AES commands will not require a key. This format for these
operations only includes the encryption key and requires 72 bytes.
If the Encryption engine and Hash engine are both enabled, and Hash_OP[3:0] is set to
GMAC or AES-GCM-MAC, the Encryption engine and Hash engine will use the same AES key
to separately calculate the cipher text and authentication value. This format for these
operations only includes the AES key and requires 72 bytes.
The key format shown in
Figure 3-14 is used for AES and 3DES operations.