A machine-readable storage medium, comprising executable instructions that, when executed by an apparatus comprising a processor and a memory, perform an encryption and decryption process to convert a plaintext to a ciphertext using an encryption key, the process comprising:
- a byte substitution operation that uses a substitution table,
- a row shifting operation that shifts rows of a state array by different offsets,
- a column mixing operation that mixes column data of the state array, and
- a round key adding operation that adds a round key to a current state matrix of each round of a round function, wherein:
- the byte substitution operation is performed in the same step as the row shifting operation,
- the plaintext is transformed into the current state matrix and a resultant state matrix as intermediate values during intermediate operations of the encryption and decryption process, and
- the row shifting operation comprises performing a cyclic shift on received elements of a state matrix, and transmitting the shifted elements to the memory for storage as a new state matrix.