                IDEA cryptosystem DLL by Andrew Brown 1994
                ------------------------------------------

Description
-----------
The IDEA cipher operates on 64 bit (8 byte) blocks, using a 128 bit (16
byte) key. IDEA has found itself famous through its inclusion in the
well-known PGP package. The following is from the introduction to chapter 3
of the thesis that presented the cipher.

The block cipher IDEA (for Internation Data Encryption Algorithm) is based
on the new design concept of "mixing operations from different algebraic
groups". The required "confusion" was achieved by successively using three
"incompatible" group operations on pairs of 16-bit subblocks and the cipher
structure was chosen to provide the necessary "diffusion". The cipher
structure was further chosen to facilitate both hardware and software
implementations. The IDEA cipher is an improved version of PES and was
developed to increase security against differential cryptanalysis.


Patent
------
IDEA is registered as the international patent  WO  91/18459 "Device for
Converting a Digital Block and the Use thereof". For commercial use of
IDEA, one should contact

     ASCOM TECH AG
     Freiburgstrasse 370
     CH-3018 Bern, Switzerland


Using IDEA.DLL 
--------------
For Borland C++ IDE projects, add IDEA.LIB to your project. Makefile based
projects need to add IDEA.LIB to the linker stage.

Include IDEA.H in any of your project files that need to call the IDEA
cipher routines.

Ensure IDEA.DLL is either in somewhere in your PATH environment variable, or
in your Windows SYSTEM directory.


                                   API
                                   ---
                                   
VOID FAR PASCAL ExpandUserKey(LPWORD userKey,LPWORD key)

userKey FAR pointer to 16 byte IDEA key
key     FAR pointer to 104 byte buffer that is to hold the expanded key

        This function expands the 128 bit IDEA key to its internal 832 bit
        form. All other API functions require this 832 bit key, so you must
        call ExpandUserKey before anything else. You'll probably need to
        typecast your arguments to LPWORD to shut your compiler up.

VOID FAR PASCAL InvertIdeaKey(LPWORD key,LPWORD invKey)

key     FAR pointer to full 832 bit encryption key
invKey  FAR pointer to an 832 bit buffer to receive the decryption key

        InvertIdeaKey takes the 832 bit encryption key given to you by
        ExpandUserKey and gives you an 832 bit decryption key.

VOID FAR PASCAL Idea(LPWORD dataIn,LPWORD dataOut,LPWORD key)

dataIn  FAR pointer to an 8 byte buffer to encrypt/decrypt
dataOut FAR pointer to an 8 byte buffer to receive the results of the
        encryption/decryption
key     FAR pointer to the full 832 bit encryption/decryption key

        This is the core encrypt/decrypt function. Encryption is acheived
        by using the key derived from ExpandUser key. Decryption is
        acheived by using the key given to you by InvertIdeaKey


Comments
--------
The DLL was compiled with Borland C++ v3.1 with optimizations set to
`fastest', using the 286 instruction set option. If you want a performance
increase, compile with the 386 instruction set.


Have fun,

Andy

+---------------------------+----------------------------------------------+
| Andy <asb@cs.nott.ac.uk>  | PGP key fingerprint: EC 80 9C 96 54 63 CC 97 |
|    finger for PGP key     |                    : FF 7D C5 69 0B 55 23 63 |
+---------------------------+----------------------------------------------+
