|
|
1.1 root 1: /*
2: * $Source: /mit/kerberos/src/lib/des/RCS/des_internal.h,v $
3: * $Author: jtkohl $
4: * $Header: des_internal.h,v 4.1 88/11/15 11:09:05 jtkohl Exp $
5: *
6: * Copyright 1987, 1988 by the Massachusetts Institute of Technology.
7: *
8: * For copying and distribution information, please see the file
9: * <mit-copyright.h>.
10: *
11: * Private include file for the Data Encryption Standard library.
12: */
13:
14: /* only do the whole thing once */
15: #ifndef DES_INTERNAL_DEFS
16: #define DES_INTERNAL_DEFS
17:
18: #include "conf.h"
19:
20: /*
21: * number of iterations of the inner
22: * loop of the DES algorithm. The
23: * standard is 16, but in case that is
24: * too slow, we might do less. Of
25: * course, less also means less
26: * security.
27: */
28: #define AUTH_DES_ITER 16
29:
30: #ifdef BITS32
31: /* these are for 32 bit machines */
32:
33: typedef struct {
34: unsigned b0:6;
35: unsigned b1:6;
36: unsigned b2:6;
37: unsigned b3:6;
38: unsigned b4:6;
39: unsigned b5:2;
40: } sbox_in_a;
41:
42: typedef struct {
43: unsigned b5:4;
44: unsigned b6:6;
45: unsigned b7:6;
46: } sbox_in_b;
47:
48: typedef struct {
49: unsigned b0:4;
50: unsigned b1:4;
51: unsigned b2:4;
52: unsigned b3:4;
53: unsigned b4:4;
54: unsigned b5:4;
55: unsigned b6:4;
56: unsigned b7:4;
57: } sbox_out;
58:
59: #else BITS32
60: /* for sixteen bit machines */
61:
62: typedef struct {
63: unsigned b0:6;
64: unsigned b1:6;
65: unsigned b2:4;
66: } sbox_in_16_a;
67:
68: typedef struct {
69: unsigned b2:2;
70: unsigned b3:6;
71: unsigned b4:6;
72: unsigned b5:2;
73: } sbox_in_16_b;
74:
75: typedef struct {
76: unsigned b5:4;
77: unsigned b6:6;
78: unsigned b7:6;
79: } sbox_in_16_c;
80:
81: typedef struct {
82: unsigned b0:4;
83: unsigned b1:4;
84: unsigned b2:4;
85: unsigned b3:4;
86: unsigned b4:4;
87: unsigned b5:4;
88: unsigned b6:4;
89: unsigned b7:4;
90: } sbox_out;
91: #endif BITS32
92:
93:
94: #endif DES_INTERNAL_DEFS
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.