                 MDC Cryptosystem DLL by Andy Brown 1994
                 ---------------------------------------


Description
-----------
This is a method for turning a hash function, here MD5, into a fast
secret-key encryption. Based on a suggestion by Phil Karn in sci.crypt, 13
Feb 1992. See also his comments from sci.crypt, 23 Mar 1992. The method is
a variant of that described in Zheng, Matsumoto and Imai, Crypto 89. See
also, "A New Class of Cryptosystems Based on Interconnection Networks" by
michaelp@terpsichore.informatic.rwth-aachen.de

The cipher operates on 256 bit (32 byte) blocks, using a 768 bit (96 byte)
key. The only restriction is that the two 48 byte halves of the key should
not be the same.


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

Include MDC.H in any of your project files that need to call the MDC
encryption routines.

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


                                   API
                                   ---

VOID FAR PASCAL mdc_encrypt(LPBYTE in,LPBYTE out,LPBYTE key)

in      FAR pointer to a 32 byte block to be encrypted
out     FAR pointer to a 32 byte block to receive the ciphertext
key     FAR pointer to a 96 byte key

        This is the basic encryption function that encrypts the plaintext
        in `in' and leaves the ciphertext in `out'
        
VOID FAR PASCAL mdc_decrypt(LPBYTE in,LPBYTE out,LPBYTE key)

in      FAR pointer to 32 bytes of ciphertext to decrypt
out     FAR pointer to a 32 byte buffer to receive the plaintext
key     FAR pointer to a 96 byte key

        This is the inverse of mdc_encrypt. The ciphertext in `in' is
        decrypted, and the plaintext left in `out'
        

Comments
--------
The DLL was compiled with Borland C++ v3.1 with optimizations set to
`fastest', using the 286 instruction set option. You can probably get quite
a speed increase using the 386 instruction set. I managed to get 42Kbyte/s
out of this DLL, this is probably an order of magnitude below what is
possible with further performance tuning.


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 |
+---------------------------+----------------------------------------------+
