5.2.2 Substitute Bytes

This step uses the precalculated S-box lookup table to substitute the bytes in the State. This step is also implemented in a 16-step loop like the previous section.

Figure 5-4. Substituting the Bytes of the Current State