Original Implementation - 2023.2 English

Vitis Libraries

Release Date
2023-12-20
Version
2023.2 English

AES-128/192/256 encryption consist of 5 part: KeyExpansion, SubBytes, ShiftRows, MixColumns and AddRoundKey.

KeyExpansion generates 11/13/15 round keys from original cipher key and they maps to 2-D array as states do.

AES encryption first does XOR add to input plain data blocks with first roundkey. Then AES-128/192/256 encryption performs 10/12/14 round of processing with the left round keys, each at a time. Each round sequentially does SubBytes, ShiftRows, MixColumns and AddRoundKey.

original flow

During SubBytes, each bytes of states is transformed by looking up table S-box using their value as address.

subbytes

During ShiftRows, last 3 rows of states are cyclically shifted over different number of bytes based on row number.

shiftrows

During MixColumns, perform operation on each column of states. Basically it use matrix multiplication to transform each column of states. Transform matrix is fixed and calculation treats each bytes as polynomials with coefficients in GF(2^8), modulo x^4 + 1.

mixcolumns

During AddRoundKey, states are XOR with roundkey of this round.

addroundkey