SHA-256 has the input message size < 264-bits. Block size is 512-bits, and it has a word size of 32-bits. The output is a 256-bit digest.
The compression function processes a 512-bit message block and a 256-bit intermediate hash value. There are two main components of this function: the compression function and a message schedule.
The algorithm works as follows, in eight steps:
- Preprocessing:
-
- Padding of the message is used to adjust the length of a block to 512-bits if it is smaller than the required block size of 512-bits.
- Parsing the message into message blocks, which ensures that the message and its padding is divided into equal blocks of 512-bits.
- Setting up the initial hash value, which consists of the eight 32-bit ...