The internal structure of BLAKE2B algorithm is shown as the figure below:
As you can see from the figure, the BLAKE2B hash calculation can be partitioned into two parts.
- The generateBlock module pads the input message and the optional input key into fixed sized blocks, and informs the digest part that how many blocks do we have in this message. The message word size is 64-bit for BLAKE2B, 32-bit for BLAKE2S, and each block has a size of 16 message words.
- The digest part iteratively computes the hash values. Loop-carried dependency is enforced by the algorithm, and thus this part cannot reach II=1.
As these two parts can work independently, they are designed into parallel dataflow process, connected by streams (FIFOs).