GD32W51x User Manual
954
28.
Hash Acceleration Unit (HAU)
28.1.
Overview
The hash acceleration unit is used for information security. The secure hash algorithm (SHA-
1, SHA-224, SHA-256), the message-digest algorithm (MD5) and the keyed-hash message
authentication code (HMAC) algorithm are supported for various applications. The digest will
be computed and the length is 160/224/256/128 bits for a message up to (2
64
- 1) bits
computed by SHA-1, SHA-224, SHA-256 and MD5 algorithms respectively. In HMAC
algorithm, SHA-1, SHA-224, SHA-256 or MD5 will be called twice as hash functions and
authenticating messages can be produced.
The HAU is fully compliant implementation of the following standards:
Federal Information Processing Standards Publication 180-2 (FIPS PUB 180-2)
Secure Hash Standard specifications (SHA-1, SHA-224, SHA-256)
Internet Engineering Task Force Request for Comments number 1321 (IETF RFC
1321) specifications (MD5)
28.2.
Characteristics
32-bit AHB slave peripheral
High performance of computation of hash algorithms
Little-endian data representation
Multiple data types are supported, including no swapping, half-word swapping, byte
swapping, and bit swapping with 32-bit data words
Automatic data padding to fill the 512-bit message block for digest computation
DMA transfer is supported
Hash/HMAC process suspended mode
28.3.
HAU data type
The hash acceleration unit receives data words of 32 bits at a time, while they are processed
in 512-bits blocks. For each input word, according to the data type, the data could be
bit/byte/half-word/no swapped before they are transferred into the hash acc eleration core.
The same swapping operation should be also performed on the core output data before they
are collected. Note the least-significant data always occupies the lowest address location no
matter which data type is configured, because the system memory is little-endian. However,
the computation of SHA-1, SHA-224 and SHA-256 are big-endian.
Figure 28-1. DATAM No swapping and Half-word swapping