Irwin Yoon's ECE575 Project - IDEA Algorithm
Title: Implementation of IDEA (International Data Encryption Algorithm) in C++
Members: Irwin Yoon
ECE 575 - Cryptography, Winter 2003
Abstract
The International Data Encryption Algorithm (or IDEA) is considered as one of the most secure block ciphers available today. This algorithm is regarded by many to be more secure than 3DES. IDEA is used in PGP (Pretty good Privacy).
IDEA is also available for ciphering when communicating with ssh.
IDEA is very similar to 3DES in that it has several "rounds" which it goes through to encipher and decipher text. Here are some of IDEA's main features
- Operates on 64-bit blocks (8 bytes) which is divided into 4- 16 bit blocks
- 128-bit key is used to produce keys scheduling for encryption and decyrption
- A total of 8 rounds. Each round has 14 arithmetic steps which operate on 16 bit subblcoks involving:
- XOR
- add modulo 2^16
- multiply modulo 2^16+1
- some swapping of sub-blocks
- uses 6 16-bit subkeys for encryption/decryption
I have implemented the IDEA algorithm in C++. I had originally wanted to use Java, but Java has limited support for "unsigned short" which I use to hold the 16-bit blocks. This program implements the main core of the IDEA algorithm, as well as outputting information such as key scheduling sequence, and round by round results. The program is also flexible in that it allows users to select a key for themselves and also enter text in varying lengths (multiple blocks)
My C++ Program
- Program Overview and Source Code
- Look at header of source code for description and usage
- Source (about 700 lines of code) Idea.cpp
- Executable (sunos), runs on flop.engr Idea.flop.exe
- Program Results
- Round by Round Encryption and Decryption Keys: result1
- Round by Round Plaintext encryption (8 character message): result2
- Round by Round Plaintext encryption (32 character message): result3
- Round by Round Ciphertext decryption (8 character message): result4
- Round by Round Ciphertext decryption (32 character message): result5
- Verification: Encrypts plaintext, then decrypts ciphertext (no intermediate results). Verifies correctness of program: result6
- Verification: Same as above except 32 character message result7
- Comments
- Programming for this is very tricky due to outputting in hex, doing modular multiplicaton, finding inverses and so on. Also, the shifting of bits is tricky.
- Coding may be a little sloppy in some places, and I could probably spend more time making it efficient .