IDEA Calculator

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

Using the IDEA Calculator

The IDEAcalc.html page is used to access the IDEA Calculator. To use the calculator fill in the Input Data value (being 16 hexadecimal digits), and the IDEA Key (being 32 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 te Trace Level radio buttons. If there is an error in the supplied values, an error message will be displayed in red.

An example random IDEA test value is:

Key:        006400c8012c019001f4025802bc0320
Plaintext:  05320a6414c819fa
Ciphertext: 65be87e7a2538aed

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):

  Round 1	X = 0532 0a64 14c8 19fa ; SK = 0064 00c8 012c 0190 01f4 0258 
  Round 2	X = 0746 1534 0c68 913c ; SK = 02bc 0320 9002 5803 2003 e804 
  Round 3	X = f1b7 8e88 78e2 4170 ; SK = b005 7806 4000 c801 0640 07d0 
  Round 4	X = ec90 b610 aa33 22ec ; SK = 0960 0af0 0c80 0190 0320 04b0 
  Round 5	X = e262 e986 4690 171a ; SK = a012 c015 e019 0003 2006 4009 
  Round 6	X = f0d8 4b29 743f 98ea ; SK = 600c 800f 2bc0 3200 0640 0c80 
  Round 7	X = 22a1 529b fe1f a304 ; SK = 12c0 1900 1f40 2580 000c 8019 
  Round 8	X = a151 f439 81d9 1462 ; SK = 0025 8032 003e 804b 0057 8064 
  Output	X = ecda 3ce7 3e53 a60c ; SK = 3200 4b00 6400 7d00 0000 0000 
  = 65be87e7a2538aed

The provides details of:

Installing the IDEA Calculator on your own System

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

the HTML file used to run the applet
the Java JAR file containing the code for the program, which is loaded by IDEAcalc.html.

Then open your local saved copy of IDEAcalc.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 IDEAcalc.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 IDEA lab.

Authorship & Copyright

The IDEA 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