00001 /* 00002 * This is D3DES (V5.09) by Richard Outerbridge with the double and 00003 * triple-length support removed for use in VNC. 00004 * 00005 * These changes are: 00006 * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. 00007 * 00008 * This software is distributed in the hope that it will be useful, 00009 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00011 */ 00012 00013 /* d3des.h - 00014 * 00015 * Headers and defines for d3des.c 00016 * Graven Imagery, 1992. 00017 * 00018 * Copyright (c) 1988,1989,1990,1991,1992 by Richard Outerbridge 00019 * (GEnie : OUTER; CIS : [71755,204]) 00020 */ 00021 00022 #define EN0 0 /* MODE == encrypt */ 00023 #define DE1 1 /* MODE == decrypt */ 00024 00025 extern void deskey(unsigned char *, int); 00026 /* hexkey[8] MODE 00027 * Sets the internal key register according to the hexadecimal 00028 * key contained in the 8 bytes of hexkey, according to the DES, 00029 * for encryption or decryption according to MODE. 00030 */ 00031 00032 extern void usekey(unsigned long *); 00033 /* cookedkey[32] 00034 * Loads the internal key register with the data in cookedkey. 00035 */ 00036 00037 extern void cpkey(unsigned long *); 00038 /* cookedkey[32] 00039 * Copies the contents of the internal key register into the storage 00040 * located at &cookedkey[0]. 00041 */ 00042 00043 extern void des(unsigned char *, unsigned char *); 00044 /* from[8] to[8] 00045 * Encrypts/Decrypts (according to the key currently loaded in the 00046 * internal key register) one block of eight bytes at address 'from' 00047 * into the block at address 'to'. They can be the same. 00048 */ 00049 00050 /* d3des.h V5.09 rwo 9208.04 15:06 Graven Imagery 00051 ********************************************************************/