root / d3des.h @ 0fead125
History | View | Annotate | Download (1.6 kB)
1 | 6fd27407 | ths | /*
|
---|---|---|---|
2 | 6fd27407 | ths | * This is D3DES (V5.09) by Richard Outerbridge with the double and
|
3 | 6fd27407 | ths | * triple-length support removed for use in VNC.
|
4 | 6fd27407 | ths | *
|
5 | 6fd27407 | ths | * These changes are:
|
6 | 6fd27407 | ths | * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved.
|
7 | 6fd27407 | ths | *
|
8 | 6fd27407 | ths | * This software is distributed in the hope that it will be useful,
|
9 | 6fd27407 | ths | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10 | 6fd27407 | ths | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
11 | 6fd27407 | ths | */
|
12 | 6fd27407 | ths | |
13 | 6fd27407 | ths | /* d3des.h -
|
14 | 6fd27407 | ths | *
|
15 | 6fd27407 | ths | * Headers and defines for d3des.c
|
16 | 6fd27407 | ths | * Graven Imagery, 1992.
|
17 | 6fd27407 | ths | *
|
18 | 6fd27407 | ths | * Copyright (c) 1988,1989,1990,1991,1992 by Richard Outerbridge
|
19 | 6fd27407 | ths | * (GEnie : OUTER; CIS : [71755,204])
|
20 | 6fd27407 | ths | */
|
21 | 6fd27407 | ths | |
22 | 6fd27407 | ths | #define EN0 0 /* MODE == encrypt */ |
23 | 6fd27407 | ths | #define DE1 1 /* MODE == decrypt */ |
24 | 6fd27407 | ths | |
25 | 6fd27407 | ths | extern void deskey(unsigned char *, int); |
26 | 6fd27407 | ths | /* hexkey[8] MODE
|
27 | 6fd27407 | ths | * Sets the internal key register according to the hexadecimal
|
28 | 6fd27407 | ths | * key contained in the 8 bytes of hexkey, according to the DES,
|
29 | 6fd27407 | ths | * for encryption or decryption according to MODE.
|
30 | 6fd27407 | ths | */
|
31 | 6fd27407 | ths | |
32 | 6fd27407 | ths | extern void usekey(unsigned long *); |
33 | 6fd27407 | ths | /* cookedkey[32]
|
34 | 6fd27407 | ths | * Loads the internal key register with the data in cookedkey.
|
35 | 6fd27407 | ths | */
|
36 | 6fd27407 | ths | |
37 | 6fd27407 | ths | extern void cpkey(unsigned long *); |
38 | 6fd27407 | ths | /* cookedkey[32]
|
39 | 6fd27407 | ths | * Copies the contents of the internal key register into the storage
|
40 | 6fd27407 | ths | * located at &cookedkey[0].
|
41 | 6fd27407 | ths | */
|
42 | 6fd27407 | ths | |
43 | 6fd27407 | ths | extern void des(unsigned char *, unsigned char *); |
44 | 6fd27407 | ths | /* from[8] to[8]
|
45 | 6fd27407 | ths | * Encrypts/Decrypts (according to the key currently loaded in the
|
46 | 6fd27407 | ths | * internal key register) one block of eight bytes at address 'from'
|
47 | 6fd27407 | ths | * into the block at address 'to'. They can be the same.
|
48 | 6fd27407 | ths | */
|
49 | 6fd27407 | ths | |
50 | 6fd27407 | ths | /* d3des.h V5.09 rwo 9208.04 15:06 Graven Imagery
|
51 | 6fd27407 | ths | ********************************************************************/ |