AES Calculator

The AES Calculator applet is used to encrypt or decrypt test data values using AES block cipher. It takes a 128-bit (32 hex digit) data value and a 128/192/256-bit (32/48/64 hex digit) key. It can optionally provide a trace of the calculations performed, with varying degrees of detail.

Using the AES Calculator

The AEScalc.html page is used to access the AES Calculator. To use the calculator fill in the Input Data value (being 32 hexadecimal digits) of plain or ciphertext, and the AES Key (being 32/48/64 hexadecimal digits), and press either the Encrypt or Decrypt button, as required. The resulting value will be displayed, along with the trace of the calculation, at the level of detail specified by the Trace Level radio buttons. If there is an error in the supplied values, an error message will be displayed in red.

An example AES test value (from FIPS-197) is:

Key:        000102030405060708090a0b0c0d0e0f
Plaintext:  00112233445566778899aabbccddeeff
Ciphertext: 69c4e0d86a7b0430d8cdb78070b4c55a

Encrypting the plaintext with the key should give the ciphertext, decrypting the ciphertext with the key should give the plaintext.

The Trace produced looks like (at level 2):


setKey(000102030405060708090a0b0c0d0e0f)
encryptAES(00112233445566778899aabbccddeeff)
  R0 (Key = 000102030405060708090a0b0c0d0e0f)	 = 00102030405060708090a0b0c0d0e0f0
  R1 (Key = d6aa74fdd2af72fadaa678f1d6ab76fe)	 = 89d810e8855ace682d1843d8cb128fe4
  R2 (Key = b692cf0b643dbdf1be9bc5006830b3fe)	 = 4915598f55e5d7a0daca94fa1f0a63f7
  R3 (Key = b6ff744ed2c2c9bf6c590cbf0469bf41)	 = fa636a2825b339c940668a3157244d17
  R4 (Key = 47f7f7bc95353e03f96c32bcfd058dfd)	 = 247240236966b3fa6ed2753288425b6c
  R5 (Key = 3caaa3e8a99f9deb50f3af57adf622aa)	 = c81677bc9b7ac93b25027992b0261996
  R6 (Key = 5e390f7df7a69296a7553dc10aa31f6b)	 = c62fe109f75eedc3cc79395d84f9cf5d
  R7 (Key = 14f9701ae35fe28c440adf4d4ea9c026)	 = d1876c0f79c4300ab45594add66ff41f
  R8 (Key = 47438735a41c65b9e016baf4aebf7ad2)	 = fde3bad205e5d0d73547964ef1fe37f1
  R9 (Key = 549932d1f08557681093ed9cbe2c974e)	 = bd6e7c3df2b5779e0b61216e8b10b689
  R10 (Key = 13111d7fe3944a17f307a78b4d2b30c5)	 = 69c4e0d86a7b0430d8cdb78070b4c55a
 = 69c4e0d86a7b0430d8cdb78070b4c55a

The provides details of:


Installing the AES Calculator on your own System

You can install the AES Calculator on your own system by uploading the following files, and saving them all in the same directory:

AEScalc.html (1kb)
the HTML file used to run the applet
AEScalc.jar (38kb)
the Java JAR file containing the code for the program, which is loaded by AEScalc.html.

Then open your local saved copy of AEScalc.html in your favorite (Java enabled) web browser. You may need to install a suitable Java v1.4 plugin for your browser - this is available from the J2SE Java distributions, which are included in the useful programs area for this course (CD only). You will need to copy/link the appropriate browser plugin file from the J2SE installation area to the plugin directory for your browser and restart it.

If you want to look under the hood, the sources are available in the jarfile. Copy it onto your system, extract files with "jar xvf AEScalc.jar", and look at the README file for more information. A Unix Makefile for building the sources using the Java SDK is included. The source code is written for clarity, ease of relation to the algorithm description, and ease of tracing intermediate values, not for efficiency! It is designed to be used to help students in my cryptography course better understand the operation of this cipher, as for example by doing my AES lab.


Authorship & Copyright

The AES Calculator applet was written by Lawrie Brown from ADFA, Canberra Australia. Lawrie's code is Copyright © 2005 by Lawrie Brown. Permission to reuse this code as desired is granted, provided due acknowledgement is given of the author and source of the original code.


[Back to Programs]
Lawrie Brown / 7 Jun 2005