Implementation on FPGA - 2023.2 English

Vitis Libraries

Release Date
2023-12-20
Version
2023.2 English

The internal structure of SHA-3 algorithms can be shown as the figures below:

Structure of SHA-3 algorithms Structure of SHAKE algorithms

As we can see from the figures, hash calculation in both SHA-3 and SHAKE is much different from SHA-1 and SHA-2. Since the internal state array is updated iteratively (by the input message) and used in the next permutation, it cannot be partitioned into block generation part and digest part.

Both the digest parts of SHA-3 and SHAKE pad or split the input message into fixed sized blocks (1600-bit for each), and XOR it to the state array of the last iteration.

The message word size is 64-bit for both SHA-3 and SHAKE, and each block has a different number of message words according to the specific suffix of the algorithm which is selected. The number can be defined as:

\[NumMsgWord = \frac{200 - \frac{Suffix}{4}}{8}\]

Loop-carried dependency is enforced by the algorithm, and thus the digest part cannot reach II=1.