iaik.security.cipher
Class IDEA

java.lang.Object
  |
  +--javax.crypto.CipherSpi
        |
        +--iaik.security.cipher.BufferedCipher
              |
              +--iaik.security.cipher.IDEA

public class IDEA
extends iaik.security.cipher.BufferedCipher

Extends the BufferedCipher class for adding a buffering mechanism to the underlying IDEA cipher.

The IDEA (International Data Encryption Algorithm) ranks as one of the best and most secure block ciphers that contemporary are public available. IDEA is used with PGP.

Like DES, IDEA operates on data blocks of 64 bits, but the key is 128 bit long. The given 64 bit data block is devided into four sub-blocks each 16 bits. IDEA goes over 8 rounds performing several XOR, addition modulo 216, and multiplication 216 + 1 operations on the sub-blocks and six 16bit sub-keys. A final output transformation combines the four resulting sub-blocks with four sub-keys to form the cipher text block.

Decryption uses the same proceeding, but reversing the slightly modified subkeys. (see "Applied Cryptography", Bruce Schneier, ISBN 0-471-59756-2).

This class only creates a BufferedCipher object for the IDEA cipher.


Applications shall use

Cipher.getInstance("IDEA", "IAIK");
 
for creating an IDEA object. They optionally may specifiy operation mode (ECB (default), CBC, PCBC, OFB, CFB) and padding scheme (NoPadding (default), or PKCS5Padding as described in the PKCS #5: Password-Based Encryption Standard).

When requesting this IDEA implementation without any mode specification (Cipher.getInstance("IDEA")), the IDEA algorithm is used in pure ECB (Electronic Code Book) mode encrypting plaintext blocks into ciphertext blocks independently from each other. The ECB mode is prone to codebook attacks and block replay. A codebook attack may be successfully when being able to read plain- and corresponding ciphertext blocks for a certain quantity of messages making it possible to generate a codebook for decrypting blocks of further messages without knowing the key. For being effective against codebook analyses and block replay (often messages contain common sub-parts making it possible to unnoticed replace these blocks) one can use the CBC mode makes the encryption of one block of plain data conditional on all previously encrypted data blocks.

Since ECB encrypts each single block independently, it enables random access to encrypted data blocks which may be preferable for database encrypting. Often ECB is used for key-encrypting.

See Also:
Cipher

Constructor Summary
IDEA()
          Creates an IDEA object by calling the BufferedCipher constructor for the IDEA cipher.
 
Methods inherited from class iaik.security.cipher.BufferedCipher
engineDoFinal, engineDoFinal, engineGetBlockSize, engineGetIV, engineGetOutputSize, engineGetParameters, engineInit, engineInit, engineInit, engineSetMode, engineSetPadding, engineUpdate, engineUpdate, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IDEA

public IDEA()
Creates an IDEA object by calling the BufferedCipher constructor for the IDEA cipher. This constructor only internally is used for initializing an IDEA Cipher. Applications should not call this constructor to get an IDEA Cipher; they should call one of the Cipher.getInstance factory methods instead.
See Also:
Cipher.getInstance(java.lang.String)