2 * This is D3DES (V5.09) by Richard Outerbridge with the double and
3 * triple-length support removed for use in VNC.
6 * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved.
8 * This software is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 /* D3DES (V5.09) - d3des.h
15 * Headers and defines for d3des.c
16 * Graven Imagery, 1992.
18 * A portable, public domain, version of the Data Encryption Standard.
20 * Written with Symantec's THINK (Lightspeed) C by Richard Outerbridge.
21 * Thanks to: Dan Hoey for his excellent Initial and Inverse permutation
22 * code; Jim Gillogly & Phil Karn for the DES key schedule code; Dennis
23 * Ferguson, Eric Young and Dana How for comparing notes; and Ray Lau,
24 * for humouring me on.
26 * Copyright (c) 1988,1989,1990,1991,1992 by Richard Outerbridge.
27 * (GEnie : OUTER; CIS : [71755,204]) Graven Imagery, 1992.
30 #define EN0 0 /* MODE == encrypt */
31 #define DE1 1 /* MODE == decrypt */
33 extern void deskey(unsigned char *, int);
35 * Sets the internal key register according to the hexadecimal
36 * key contained in the 8 bytes of hexkey, according to the DES,
37 * for encryption or decryption according to MODE.
40 extern void usekey(unsigned long *);
42 * Loads the internal key register with the data in cookedkey.
45 extern void cpkey(unsigned long *);
47 * Copies the contents of the internal key register into the storage
48 * located at &cookedkey[0].
51 extern void des(unsigned char *, unsigned char *);
53 * Encrypts/Decrypts (according to the key currently loaded in the
54 * internal key register) one block of eight bytes at address 'from'
55 * into the block at address 'to'. They can be the same.
58 /* d3des.h V5.09 rwo 9208.04 15:06 Graven Imagery
59 ********************************************************************/