AES cipher internals in Excel
Here I present the internal computations of the Advanced Encryption Standard cipher in a Microsoft Excel spreadsheet (also available for LibreOffice / Apache OpenOffice). AES encryption for all 3 key lengths (128, 192, 256 bits) are supported, and decryption for 128 bits is also supported. The spreadsheet shows the bytes in each round (10/12/14 rounds) and each step (SubBytes, ShiftRows, MixColumns, AddRoundKey, key schedule) of the cipher algorithm.
When you modify the input values, the intermediate steps and output will be recomputed automatically. The purpose of this spreadsheet is twofold – to demonstrate that Excel’s math functions are powerful enough to implement a real cipher, and to provide a debugging tool for anyone making their own AES implementation (because you can compare and see which intermediate step went wrong).
Only the two 4×4 squares with blue background are for user input; they are labelled “Plaintext” and “Key”. The other cells should not be modified. Keep in mind that AES is serialized in columns – bytes go down the leftmost column, then the next column to the right, and so on.
The calculations are implemented using ordinary spreadsheet functions, without using VBA or macros. The key mathematicals functions I used are VLOOKUP, BITXOR, DEC2HEX, and HEX2DEC. Curiously older versions of Excel doesn’t have BITXOR, so the OpenDocument version was easier to implement. There is a separate worksheet to store the long and unsightly lookup tables such as the Sbox.
Download
The AES cipher internals spreadsheet is available in multiple formats, all with the same content and formatting:
 Microsoft Excel binary file format: aescipherinternals.xls

Works in basically all versions of Microsoft Excel.
 Microsoft Office Open XML Workbook: aescipherinternals.xlsx

Preferred format for Microsoft Excel 2007 and above.
 OpenDocument Spreadsheet: aescipherinternals.ods

Preferred format for the opensource office suites LibreOffice and Apache OpenOffice.
Compatibility notes
XLS file: In LibreOffice / Apache OpenOffice, the formulas should work properly but the style/formatting may be slightly incorrect. Tested working in LibreOffice 3.6.0.4, 4.0.0.3, 4.4.3.2 and OpenOffice.org 3.2.0.
XLSX file: In OpenOffice.org/LibreOffice, the formulas should work properly but the style/formatting may be slightly incorrect. Tested working in LibreOffice 4.0.0.3, 4.4.3.2 and OpenOffice.org 3.2.0. Tested broken in LibreOffice 3.6.0.4.
ODS file: Tested working in LibreOffice 3.6.0.4, 4.0.0.3, 4.4.3.2 and Microsoft Excel 2016. Tested broken in OpenOffice.org 3.2.0, Microsoft Excel 2010.
More info
 Wikipedia: Advanced Encryption Standard
 YouTube: AES Rijndael Cipher
 Rijndael Flash Animation (Adobe Flash)