AN2492 Freescale Semiconductor / Motorola, AN2492 Datasheet - Page 25

no-image

AN2492

Manufacturer Part Number
AN2492
Description
MPC184 Descriptor Programmers Guide--PCI View
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
The descriptor header encodes the information required to select the DEU for Op_0, and the MDEU for
Op_1. The Op_0 mode data configured the DEU to operate in 3DES, CBC, decrypt mode. The Op_1 mode
data configured the MDEU to operate in HMAC-SHA-1 mode. Because all the data necessary to calculate
the HMAC in a single dynamic descriptor is available, initialize, and autopad are set, while continue is off.
The descriptor header also encodes the descriptor type 0010, which defines the input and output ordering
for ‘hmac_snoop_no_afeu.’ The HMAC key is loaded first, followed by the length and pointer to the data
over which the HMAC will be calculated. The 3DES key is loaded next, followed by the 3DES IV. The
number of bytes to be ciphered and starting address will be an offset of the number of bytes being HMAC’d.
The data to be decrypted and HMAC’d is only brought into the MPC184 a single time, with the DEU and
MDEU only reading the portion that matches the starting address and byte length in the length/pointer fields
corresponding to their data of interest.
Ciphertext is brought into the DEU input FIFO, with the MDEU in-snooping the portion of the data it has
been told to process. As the decryption continues, the plaintext fills the DEU output FIFO, and this data is
written back to system memory as needed. When the final byte of data to be HMAC’d has been processed
through the MDEU, the descriptor will cause the MDEU to write the HMAC to the indicated area in PCI
memory. The MPC184 will write the entire 20 bytes HMAC-SHA-1 to PCI memory, and the host will
compare the most significant 12 bytes of the HMAC generated by the MPC184 with the HMAC which was
received with the inbound packet. If the HMACs match, the packet integrity check passes.
The next descriptor pointer is optional, and if a next descriptor is indicated, that descriptor may be
completely unrelated to the operation performed by the descriptor shown in Table 19.
9.2 Dynamically Assigned 3DES-HMAC-SHA-1 Encrypt
Table 20 shows a dynamic descriptor example of an outbound IPSec ESP transform.
MOTOROLA
PTR_7
PTR_NEXT
Header
LEN_1
PTR_1
LEN_2
PTR_2
LEN_3
PTR_3
(Outbound IPSec ESP)
Field
Field
0010_3DES_CBC_HMAC_SHA-1_Decrypt (continued)
MPC184 Descriptor Programmer’s Guide— PCI View
Freescale Semiconductor, Inc.
0x2073_1C20
Table 19. Representative Descriptor DPD_Type
Table 20. Representative Descriptor DPD_Type
Value/Type
Value/Type
For More Information On This Product,
Pointer
0010_3DES_CBC_HMAC_SHA-1_Decrypt
Pointer
Pointer
Pointer
Pointer
Length
Length
Length
Go to: www.freescale.com
PCI address where HMAC is to be written
Pointer to next descriptor
DPD_Type 0010_3DES_CBC_HMAC_SHA-1 Encrypt
Number of bytes of HMAC key to be written to MDEU key register
PCI address of HMAC key
Number of bytes to be HMAC’d
PCI address of data to be HMAC’d
Number of bytes of key to be written to DEU key register (must be
16 or 24)
PCI address of key
Description
Description
Additional Examples
25

Related parts for AN2492