ocr_aes is the AES engine of OpenCrypto (block AE-1 of the architecture): the forward cipher of FIPS 197 on one
block per request, with the key of every request. Units_g iterative round units, each performing one round per
clock cycle, share the requests in round robin, so that the engine encrypts Units_g blocks in Nr clock cycles.
The GCM data path uses it for the keystream blocks, for CIPHK(J0) and for the hash subkey.
The engine shall accept a request (In_Key, In_Block, In_Tag) per clock cycle while In_Ready is set, and output the result with the tag of its request after exactly Nr + 1 clock cycles, in the order of the requests, with no back-pressure.
none (architecture D4, D6)
AE-IF-02
The reset shall end all blocks in the units within one clock cycle; no result of a block of before the reset shall be output.
The engine shall compute the cipher of FIPS 197 (AddRoundKey with round key 0, Nr - 1 rounds of SubBytes, ShiftRows, MixColumns and AddRoundKey, and a last round without MixColumns) with Nr = 10, 12 or 14 for the key length KeyBits_g of 128, 192 or 256 bits, on the input block and output block in the byte order of the standard.
The round keys shall be derived from the key of each request by the key expansion of FIPS 197 while the block passes the rounds; any key value shall be accepted and consecutive requests may carry different keys.
AES 5.2, 6.2
AE-FN-03
The key length and the number of units shall be generics; Units_g shall be 1 to Nr.
AES 6.3
AE-FN-04
The engine shall output the same blocks as the cipher of FIPS 197 for all inputs.
FIPS 197 6.4 allows any implementation that produces the outputs of the standard. The engine computes the round
keys from the key with every block (key expansion on the fly) instead of storing an expanded key: a round unit
carries the window of the last Nk words of the expansion together with the State.
The inverse cipher (FIPS 197 5.3) is not implemented: GCM uses the forward cipher for both directions (GCM 5.1,
7.2).