A compression function takes two inputs and produces one output whose size matches one input. In plain terms, it turns more represented data into less. section 2.5.1
Within SHA-2, the function works as part of a larger sequence:
- A Davies–Meyer construction builds the function from a block cipher. section 2.5.1
- Merkle–Damgård first pads a message and cuts it into fixed-size blocks. section 2.5.1
- It then applies the compression function repeatedly, feeding each previous output into the next call. section 2.5.1
Figure 2.7 A compression function takes two different inputs of size X and Y (here both 16 bytes) and returns an output of size either X or Y.
A size diagram makes the input-to-output reduction concrete before the construction details become more involved. section 2.5.1

