summaryrefslogtreecommitdiff
path: root/noncore/comm/keypebble/d3des.c
Unidiff
Diffstat (limited to 'noncore/comm/keypebble/d3des.c') (more/less context) (show whitespace changes)
-rw-r--r--noncore/comm/keypebble/d3des.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/noncore/comm/keypebble/d3des.c b/noncore/comm/keypebble/d3des.c
index b0f065e..7f50da4 100644
--- a/noncore/comm/keypebble/d3des.c
+++ b/noncore/comm/keypebble/d3des.c
@@ -24,31 +24,24 @@
24 * Copyright (c) 1988,1989,1990,1991,1992 by Richard Outerbridge. 24 * Copyright (c) 1988,1989,1990,1991,1992 by Richard Outerbridge.
25 * (GEnie : OUTER; CIS : [71755,204]) Graven Imagery, 1992. 25 * (GEnie : OUTER; CIS : [71755,204]) Graven Imagery, 1992.
26 */ 26 */
27 27
28#include "d3des.h" 28#include "d3des.h"
29 29
30static void scrunch(unsigned char *, unsigned long *); 30static void scrunch(unsigned char *, unsigned long *);
31static void unscrun(unsigned long *, unsigned char *); 31static void unscrun(unsigned long *, unsigned char *);
32static void desfunc(unsigned long *, unsigned long *); 32static void desfunc(unsigned long *, unsigned long *);
33static void cookey(unsigned long *); 33static void cookey(unsigned long *);
34 34
35static unsigned long KnL[32] = { 0L }; 35static unsigned long KnL[32] = { 0L };
36static unsigned long KnR[32] = { 0L };
37static unsigned long Kn3[32] = { 0L };
38static unsigned char Df_Key[24] = {
39 0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef,
40 0xfe,0xdc,0xba,0x98,0x76,0x54,0x32,0x10,
41 0x89,0xab,0xcd,0xef,0x01,0x23,0x45,0x67 };
42
43 static unsigned short bytebit[8]= { 36 static unsigned short bytebit[8]= {
44 01, 02, 04, 010, 020, 040, 0100, 0200 }; 37 01, 02, 04, 010, 020, 040, 0100, 0200 };
45 38
46static unsigned long bigbyte[24] = { 39static unsigned long bigbyte[24] = {
47 0x800000L, 0x400000L, 0x200000L,0x100000L, 40 0x800000L, 0x400000L, 0x200000L,0x100000L,
48 0x80000L, 0x40000L, 0x20000L,0x10000L, 41 0x80000L, 0x40000L, 0x20000L,0x10000L,
49 0x8000L, 0x4000L, 0x2000L,0x1000L, 42 0x8000L, 0x4000L, 0x2000L,0x1000L,
50 0x800L, 0x400L, 0x200L, 0x100L, 43 0x800L, 0x400L, 0x200L, 0x100L,
51 0x80L, 0x40L, 0x20L, 0x10L, 44 0x80L, 0x40L, 0x20L, 0x10L,
52 0x8L, 0x4L, 0x2L, 0x1L}; 45 0x8L, 0x4L, 0x2L, 0x1L};
53 46
54/* Use the key schedule specified in the Standard (ANSI X3.92-1981). */ 47/* Use the key schedule specified in the Standard (ANSI X3.92-1981). */