The testbench calls the functions of the package directly. Expected values are the examples of FIPS 197 (Appendix A,
B and C, the multiplication examples of section 4.2), blocks of the AES of pycryptodome, the results S of GHASH of the
test cases of the GCM specification (computed with pycryptodome) and a bit-serial implementation of Algorithm 1 of
GCM 6.3 in the testbench.
The functions of ocr_pkg; vector files ecb.txt (FIPS 197 examples, zero and all-ones keys, 46 random blocks per key length) and gcm_spec.txt (test cases of the GCM specification with 96-bit IVs of all key lengths)
S({53}) = {ed}, S({00}) = {63}, S({ff}) = {16}; the 256 outputs are a permutation
PK-AES-02
test_gf8 (TC-PK-02)
{57} · {02}, {04}, {08}, {10} and {57} · {13} = {fe} of FIPS 197 4.2.1; Rcon[1], [8], [9], [10]
PK-AES-01, PK-AES-06
test_round (TC-PK-03)
Round 1 of FIPS 197 Appendix B: SubBytes, ShiftRows, MixColumns, AddRoundKey, and the last round without MixColumns
PK-AES-02, PK-AES-03, PK-AES-04, PK-AES-05
test_key_expansion (TC-PK-04)
All words of the key expansion examples of FIPS 197 Appendix A.1 to A.3 that the text of the standard lists (128, 192 and 256 bits), produced with aesKeyFirst and aesKeyStep as the round units use them
PK-AES-06
test_cipher (TC-PK-05)
The cipher composed of aesRound and the key expansion against FIPS 197 Appendix B and C and 150 blocks of pycryptodome for all key lengths