
GD32F20x User Manual
217
11.
Hash Acceleration Unit (HAU)
11.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 (264 - 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)
11.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
11.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 acceleration 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.
Summary of Contents for GD32F20 Series
Page 191: ...GD32F20x User Manual 191 Bits Fields Descriptions 31 0 TRNDATA 31 0 32 Bit Random data ...
Page 290: ...GD32F20x User Manual 290 conversion is ongoing ...
Page 325: ...GD32F20x User Manual 325 15 0 ALRM 15 0 RTC alarm value low ...
Page 385: ...GD32F20x User Manual 385 ...
Page 523: ...GD32F20x User Manual 523 clears AERR bit by writing 0 to it ...