1 recommended settings for mdeu mode register, 2 dynamically assigned mdeu, Recommended settings for mdeu mode register -78 – Freescale Semiconductor MCF5480 User Manual
Page 680: Dynamically assigned mdeu -78

MCF548x Reference Manual, Rev. 3
22-78
Freescale Semiconductor
The MDEU implements hardware accelerated hashing of data using MD5, SHA-160, or SHA-256.
Because it supports several different hashing algorithms, there are four representative descriptor formats
supporting more different actual descriptors. The only variation between the actual descriptors are the
values used for the header fields.
22.14.3.1 Recommended Settings for MDEU Mode Register
The most common task that is likely to be executed by means of the MDEU is HMAC generation. HMACs
are used to provide message integrity within a number of security protocols, including IPSec and
shows the recommended MDEU mode register settings for using a single dynamic
descriptor or a chain of descriptors when the MDEU is statically assigned.
22.14.3.2 Dynamically Assigned MDEU
shows the descriptor format used for a dynamically assigned MDEU. The context is loaded
into the MDEU, input data is fetched and hashed, then the output data and context are written to memory.
Note that the result of a hash is also the context. Because all of 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 0001, which defines the input and output ordering
for “common_nonsnoop_no_afeu.” This is the descriptor type used for most operations which do not
require a secondary EU. Following some null pointers, the context (optional) and the key is loaded (for
HMAC mode), followed by the length and pointer to the data over which the HMAC will be calculated.
The data is brought into the MDEU input FIFO, and when the final byte of data to be hashed has been
processed through the MDEU, the descriptor will cause the MDEU to write the hash to the indicated area
in system memory. The SEC will write the results (16, 20, or 32 bits) to memory. Depending on whether
the packet is inbound or outbound, the host will either insert the most significant bytes (the exact number
of bytes used depends on the security protocol) of the HMAC generated by the SEC into the packet header
2
PD
Pad. If set, configures the MDEU to automatically pad partial message blocks.
0 Do not autopad
1 Perform automatic message padding whenever an incomplete message block is
detected.
1–0
ALG
Algorithm selection. Determines the algorithm to be used for operations.
00 SHA-160 algorithm (full name for SHA-1)
01 SHA-256 algorithm
10 MD5 algorithm
11 Reserved
Table 22-66. Recommended MDEU Mode Register Settings
Descriptor Type
Continue
Initialize
HMAC
Pad
Dynamic Descriptor
No
Yes
Yes
Yes
First Static Descriptor
Yes
Yes
Yes
No
Middle Static Descriptor
Yes
No
No
No
Final Static Descriptor
No
No
Yes
Yes
Table 22-65. MDEU Mode Option Field Descriptions (Continued)
Bits
Name
Description