Looking up the FIPS 197 document, I tried to code the way the S-box is generated, matrix multiplication over the finite fields. However, I failed to make the function yield