39 0200, 0100, 040, 020, 010, 04, 02, 01
44 0x800000UL, 0x400000UL, 0x200000UL, 0x100000UL,
45 0x80000UL, 0x40000UL, 0x20000UL, 0x10000UL,
46 0x8000UL, 0x4000UL, 0x2000UL, 0x1000UL,
47 0x800UL, 0x400UL, 0x200UL, 0x100UL,
48 0x80UL, 0x40UL, 0x20UL, 0x10UL,
49 0x8UL, 0x4UL, 0x2UL, 0x1L
54static const unsigned char pc1[56] = {
55 56, 48, 40, 32, 24, 16, 8, 0, 57, 49, 41, 33, 25, 17,
56 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35,
57 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21,
58 13, 5, 60, 52, 44, 36, 28, 20, 12, 4, 27, 19, 11, 3
61static const unsigned char totrot[16] = {
68static const unsigned char pc2[48] = {
69 13, 16, 10, 23, 0, 4, 2, 27, 14, 5, 20, 9,
70 22, 18, 11, 3, 25, 7, 15, 6, 26, 19, 12, 1,
71 40, 51, 30, 36, 46, 54, 29, 39, 50, 44, 32, 47,
72 43, 48, 38, 55, 33, 52, 45, 41, 49, 35, 28, 31
78 0x01010400UL, 0x00000000UL, 0x00010000UL, 0x01010404UL,
79 0x01010004UL, 0x00010404UL, 0x00000004UL, 0x00010000UL,
80 0x00000400UL, 0x01010400UL, 0x01010404UL, 0x00000400UL,
81 0x01000404UL, 0x01010004UL, 0x01000000UL, 0x00000004UL,
82 0x00000404UL, 0x01000400UL, 0x01000400UL, 0x00010400UL,
83 0x00010400UL, 0x01010000UL, 0x01010000UL, 0x01000404UL,
84 0x00010004UL, 0x01000004UL, 0x01000004UL, 0x00010004UL,
85 0x00000000UL, 0x00000404UL, 0x00010404UL, 0x01000000UL,
86 0x00010000UL, 0x01010404UL, 0x00000004UL, 0x01010000UL,
87 0x01010400UL, 0x01000000UL, 0x01000000UL, 0x00000400UL,
88 0x01010004UL, 0x00010000UL, 0x00010400UL, 0x01000004UL,
89 0x00000400UL, 0x00000004UL, 0x01000404UL, 0x00010404UL,
90 0x01010404UL, 0x00010004UL, 0x01010000UL, 0x01000404UL,
91 0x01000004UL, 0x00000404UL, 0x00010404UL, 0x01010400UL,
92 0x00000404UL, 0x01000400UL, 0x01000400UL, 0x00000000UL,
93 0x00010004UL, 0x00010400UL, 0x00000000UL, 0x01010004UL
98 0x80108020UL, 0x80008000UL, 0x00008000UL, 0x00108020UL,
99 0x00100000UL, 0x00000020UL, 0x80100020UL, 0x80008020UL,
100 0x80000020UL, 0x80108020UL, 0x80108000UL, 0x80000000UL,
101 0x80008000UL, 0x00100000UL, 0x00000020UL, 0x80100020UL,
102 0x00108000UL, 0x00100020UL, 0x80008020UL, 0x00000000UL,
103 0x80000000UL, 0x00008000UL, 0x00108020UL, 0x80100000UL,
104 0x00100020UL, 0x80000020UL, 0x00000000UL, 0x00108000UL,
105 0x00008020UL, 0x80108000UL, 0x80100000UL, 0x00008020UL,
106 0x00000000UL, 0x00108020UL, 0x80100020UL, 0x00100000UL,
107 0x80008020UL, 0x80100000UL, 0x80108000UL, 0x00008000UL,
108 0x80100000UL, 0x80008000UL, 0x00000020UL, 0x80108020UL,
109 0x00108020UL, 0x00000020UL, 0x00008000UL, 0x80000000UL,
110 0x00008020UL, 0x80108000UL, 0x00100000UL, 0x80000020UL,
111 0x00100020UL, 0x80008020UL, 0x80000020UL, 0x00100020UL,
112 0x00108000UL, 0x00000000UL, 0x80008000UL, 0x00008020UL,
113 0x80000000UL, 0x80100020UL, 0x80108020UL, 0x00108000UL
118 0x00000208UL, 0x08020200UL, 0x00000000UL, 0x08020008UL,
119 0x08000200UL, 0x00000000UL, 0x00020208UL, 0x08000200UL,
120 0x00020008UL, 0x08000008UL, 0x08000008UL, 0x00020000UL,
121 0x08020208UL, 0x00020008UL, 0x08020000UL, 0x00000208UL,
122 0x08000000UL, 0x00000008UL, 0x08020200UL, 0x00000200UL,
123 0x00020200UL, 0x08020000UL, 0x08020008UL, 0x00020208UL,
124 0x08000208UL, 0x00020200UL, 0x00020000UL, 0x08000208UL,
125 0x00000008UL, 0x08020208UL, 0x00000200UL, 0x08000000UL,
126 0x08020200UL, 0x08000000UL, 0x00020008UL, 0x00000208UL,
127 0x00020000UL, 0x08020200UL, 0x08000200UL, 0x00000000UL,
128 0x00000200UL, 0x00020008UL, 0x08020208UL, 0x08000200UL,
129 0x08000008UL, 0x00000200UL, 0x00000000UL, 0x08020008UL,
130 0x08000208UL, 0x00020000UL, 0x08000000UL, 0x08020208UL,
131 0x00000008UL, 0x00020208UL, 0x00020200UL, 0x08000008UL,
132 0x08020000UL, 0x08000208UL, 0x00000208UL, 0x08020000UL,
133 0x00020208UL, 0x00000008UL, 0x08020008UL, 0x00020200UL
138 0x00802001UL, 0x00002081UL, 0x00002081UL, 0x00000080UL,
139 0x00802080UL, 0x00800081UL, 0x00800001UL, 0x00002001UL,
140 0x00000000UL, 0x00802000UL, 0x00802000UL, 0x00802081UL,
141 0x00000081UL, 0x00000000UL, 0x00800080UL, 0x00800001UL,
142 0x00000001UL, 0x00002000UL, 0x00800000UL, 0x00802001UL,
143 0x00000080UL, 0x00800000UL, 0x00002001UL, 0x00002080UL,
144 0x00800081UL, 0x00000001UL, 0x00002080UL, 0x00800080UL,
145 0x00002000UL, 0x00802080UL, 0x00802081UL, 0x00000081UL,
146 0x00800080UL, 0x00800001UL, 0x00802000UL, 0x00802081UL,
147 0x00000081UL, 0x00000000UL, 0x00000000UL, 0x00802000UL,
148 0x00002080UL, 0x00800080UL, 0x00800081UL, 0x00000001UL,
149 0x00802001UL, 0x00002081UL, 0x00002081UL, 0x00000080UL,
150 0x00802081UL, 0x00000081UL, 0x00000001UL, 0x00002000UL,
151 0x00800001UL, 0x00002001UL, 0x00802080UL, 0x00800081UL,
152 0x00002001UL, 0x00002080UL, 0x00800000UL, 0x00802001UL,
153 0x00000080UL, 0x00800000UL, 0x00002000UL, 0x00802080UL
158 0x00000100UL, 0x02080100UL, 0x02080000UL, 0x42000100UL,
159 0x00080000UL, 0x00000100UL, 0x40000000UL, 0x02080000UL,
160 0x40080100UL, 0x00080000UL, 0x02000100UL, 0x40080100UL,
161 0x42000100UL, 0x42080000UL, 0x00080100UL, 0x40000000UL,
162 0x02000000UL, 0x40080000UL, 0x40080000UL, 0x00000000UL,
163 0x40000100UL, 0x42080100UL, 0x42080100UL, 0x02000100UL,
164 0x42080000UL, 0x40000100UL, 0x00000000UL, 0x42000000UL,
165 0x02080100UL, 0x02000000UL, 0x42000000UL, 0x00080100UL,
166 0x00080000UL, 0x42000100UL, 0x00000100UL, 0x02000000UL,
167 0x40000000UL, 0x02080000UL, 0x42000100UL, 0x40080100UL,
168 0x02000100UL, 0x40000000UL, 0x42080000UL, 0x02080100UL,
169 0x40080100UL, 0x00000100UL, 0x02000000UL, 0x42080000UL,
170 0x42080100UL, 0x00080100UL, 0x42000000UL, 0x42080100UL,
171 0x02080000UL, 0x00000000UL, 0x40080000UL, 0x42000000UL,
172 0x00080100UL, 0x02000100UL, 0x40000100UL, 0x00080000UL,
173 0x00000000UL, 0x40080000UL, 0x02080100UL, 0x40000100UL
178 0x20000010UL, 0x20400000UL, 0x00004000UL, 0x20404010UL,
179 0x20400000UL, 0x00000010UL, 0x20404010UL, 0x00400000UL,
180 0x20004000UL, 0x00404010UL, 0x00400000UL, 0x20000010UL,
181 0x00400010UL, 0x20004000UL, 0x20000000UL, 0x00004010UL,
182 0x00000000UL, 0x00400010UL, 0x20004010UL, 0x00004000UL,
183 0x00404000UL, 0x20004010UL, 0x00000010UL, 0x20400010UL,
184 0x20400010UL, 0x00000000UL, 0x00404010UL, 0x20404000UL,
185 0x00004010UL, 0x00404000UL, 0x20404000UL, 0x20000000UL,
186 0x20004000UL, 0x00000010UL, 0x20400010UL, 0x00404000UL,
187 0x20404010UL, 0x00400000UL, 0x00004010UL, 0x20000010UL,
188 0x00400000UL, 0x20004000UL, 0x20000000UL, 0x00004010UL,
189 0x20000010UL, 0x20404010UL, 0x00404000UL, 0x20400000UL,
190 0x00404010UL, 0x20404000UL, 0x00000000UL, 0x20400010UL,
191 0x00000010UL, 0x00004000UL, 0x20400000UL, 0x00404010UL,
192 0x00004000UL, 0x00400010UL, 0x20004010UL, 0x00000000UL,
193 0x20404000UL, 0x20000000UL, 0x00400010UL, 0x20004010UL
198 0x00200000UL, 0x04200002UL, 0x04000802UL, 0x00000000UL,
199 0x00000800UL, 0x04000802UL, 0x00200802UL, 0x04200800UL,
200 0x04200802UL, 0x00200000UL, 0x00000000UL, 0x04000002UL,
201 0x00000002UL, 0x04000000UL, 0x04200002UL, 0x00000802UL,
202 0x04000800UL, 0x00200802UL, 0x00200002UL, 0x04000800UL,
203 0x04000002UL, 0x04200000UL, 0x04200800UL, 0x00200002UL,
204 0x04200000UL, 0x00000800UL, 0x00000802UL, 0x04200802UL,
205 0x00200800UL, 0x00000002UL, 0x04000000UL, 0x00200800UL,
206 0x04000000UL, 0x00200800UL, 0x00200000UL, 0x04000802UL,
207 0x04000802UL, 0x04200002UL, 0x04200002UL, 0x00000002UL,
208 0x00200002UL, 0x04000000UL, 0x04000800UL, 0x00200000UL,
209 0x04200800UL, 0x00000802UL, 0x00200802UL, 0x04200800UL,
210 0x00000802UL, 0x04000002UL, 0x04200802UL, 0x04200000UL,
211 0x00200800UL, 0x00000000UL, 0x00000002UL, 0x04200802UL,
212 0x00000000UL, 0x00200802UL, 0x04200000UL, 0x00000800UL,
213 0x04000002UL, 0x04000800UL, 0x00000800UL, 0x00200002UL
218 0x10001040UL, 0x00001000UL, 0x00040000UL, 0x10041040UL,
219 0x10000000UL, 0x10001040UL, 0x00000040UL, 0x10000000UL,
220 0x00040040UL, 0x10040000UL, 0x10041040UL, 0x00041000UL,
221 0x10041000UL, 0x00041040UL, 0x00001000UL, 0x00000040UL,
222 0x10040000UL, 0x10000040UL, 0x10001000UL, 0x00001040UL,
223 0x00041000UL, 0x00040040UL, 0x10040040UL, 0x10041000UL,
224 0x00001040UL, 0x00000000UL, 0x00000000UL, 0x10040040UL,
225 0x10000040UL, 0x10001000UL, 0x00041040UL, 0x00040000UL,
226 0x00041040UL, 0x00040000UL, 0x10041000UL, 0x00001000UL,
227 0x00000040UL, 0x10040040UL, 0x00001000UL, 0x00041040UL,
228 0x10001000UL, 0x00000040UL, 0x10000040UL, 0x10040000UL,
229 0x10040040UL, 0x10000000UL, 0x00040000UL, 0x10001040UL,
230 0x00000000UL, 0x10041040UL, 0x00040040UL, 0x10000040UL,
231 0x10040000UL, 0x10001000UL, 0x10001040UL, 0x00000000UL,
232 0x10041040UL, 0x00041000UL, 0x00041000UL, 0x00001040UL,
233 0x00001040UL, 0x00040040UL, 0x10000000UL, 0x10041000UL
1288 unsigned char pc1m[56], pcr[56];
1290 for (
j=0;
j < 56;
j++) {
1296 for (
i=0;
i < 16;
i++) {
1304 for (
j=0;
j < 28;
j++) {
1309 pcr[
j] = pc1m[
l - 28];
1312 for (;
j < 56;
j++) {
1317 pcr[
j] = pc1m[
l - 28];
1320 for (
j=0;
j < 24;
j++) {
1321 if ((
int)pcr[(
int)
pc2[
j]] != 0) {
1324 if ((
int)pcr[(
int)
pc2[
j+24]] != 0) {
1341 for(
i=0;
i < 16;
i++, raw1++)
1344 *cook = (*raw0 & 0x00fc0000L) << 6;
1345 *cook |= (*raw0 & 0x00000fc0L) << 10;
1346 *cook |= (*raw1 & 0x00fc0000L) >> 10;
1347 *cook++ |= (*raw1 & 0x00000fc0L) >> 6;
1348 *cook = (*raw0 & 0x0003f000L) << 12;
1349 *cook |= (*raw0 & 0x0000003fL) << 16;
1350 *cook |= (*raw1 & 0x0003f000L) >> 4;
1351 *cook++ |= (*raw1 & 0x0000003fL);
1354 memcpy(keyout, dough,
sizeof dough);
1377 for (cur_round = 0; cur_round < 8; cur_round++) {
1379 leftt ^=
SP7[work & 0x3fL]
1380 ^
SP5[(work >> 8) & 0x3fL]
1381 ^
SP3[(work >> 16) & 0x3fL]
1382 ^
SP1[(work >> 24) & 0x3fL];
1383 work =
right ^ *keys++;
1384 leftt ^=
SP8[ work & 0x3fL]
1385 ^
SP6[(work >> 8) & 0x3fL]
1386 ^
SP4[(work >> 16) & 0x3fL]
1387 ^
SP2[(work >> 24) & 0x3fL];
1389 work =
ROR(leftt, 4) ^ *keys++;
1391 ^
SP5[(work >> 8) & 0x3fL]
1392 ^
SP3[(work >> 16) & 0x3fL]
1393 ^
SP1[(work >> 24) & 0x3fL];
1394 work = leftt ^ *keys++;
1396 ^
SP6[(work >> 8) & 0x3fL]
1397 ^
SP4[(work >> 16) & 0x3fL]
1398 ^
SP2[(work >> 24) & 0x3fL];
1418 if (num_rounds != 0 && num_rounds != 16) {
1434 if(num_rounds != 0 && num_rounds != 16) {
int des_setup(const unsigned char *key, int keylen, int num_rounds, des_key *des)
static const unsigned char totrot[16]
static const ulong32 SP3[64]
static const ulong32 SP5[64]
static void deskey(const unsigned char *key, short edf, ulong32 *keyout)
static void desfunc(ulong32 *block, const ulong32 *keys)
static void cookey(const ulong32 *raw1, ulong32 *keyout)
void des_ecb_encrypt(const unsigned char *pt, unsigned char *ct, const des_key *des)
void des_ecb_decrypt(const unsigned char *ct, unsigned char *pt, const des_key *des)
static const ulong32 SP1[64]
static const ulong32 SP7[64]
static const unsigned char pc1[56]
void des3_ecb_encrypt(const unsigned char *pt, unsigned char *ct, const des3_key *des3)
static const ulong64 des_fp[8][256]
static const ulong32 bytebit[8]
void des3_ecb_decrypt(const unsigned char *ct, unsigned char *pt, const des3_key *des3)
static const ulong64 des_ip[8][256]
static const ulong32 bigbyte[24]
static const ulong32 SP2[64]
static const unsigned char pc2[48]
static const ulong32 SP4[64]
int des3_setup(const unsigned char *key, int keylen, int num_rounds, des3_key *des3)
static const ulong32 SP8[64]
static const ulong32 SP6[64]
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
#define memcpy(s1, s2, n)
static unsigned int block