diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | cipher.c | 67 | ||||
-rw-r--r-- | cipher.h | 10 | ||||
-rw-r--r-- | rijndael.c | 770 | ||||
-rw-r--r-- | rijndael.h | 48 | ||||
-rw-r--r-- | rijndael_boxes.h | 894 |
6 files changed, 1257 insertions, 538 deletions
@@ -3,6 +3,12 @@ | |||
3 | - markus@cvs.openbsd.org 2000/12/06 22:58:14 | 3 | - markus@cvs.openbsd.org 2000/12/06 22:58:14 |
4 | [compat.c compat.h packet.c] | 4 | [compat.c compat.h packet.c] |
5 | disable debug messages for ssh.com/f-secure 2.0.1x, 2.1.0 | 5 | disable debug messages for ssh.com/f-secure 2.0.1x, 2.1.0 |
6 | - markus@cvs.openbsd.org 2000/12/06 23:10:39 | ||
7 | [rijndael.c] | ||
8 | unexpand(1) | ||
9 | - markus@cvs.openbsd.org 2000/12/06 23:05:43 | ||
10 | [cipher.c cipher.h rijndael.c rijndael.h rijndael_boxes.h] | ||
11 | new rijndael implementation. fixes endian bugs | ||
6 | 12 | ||
7 | 20001206 | 13 | 20001206 |
8 | - (bal) OpenSSH CVS updates: | 14 | - (bal) OpenSSH CVS updates: |
@@ -35,7 +35,7 @@ | |||
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include "includes.h" | 37 | #include "includes.h" |
38 | RCSID("$OpenBSD: cipher.c,v 1.38 2000/11/29 20:39:17 markus Exp $"); | 38 | RCSID("$OpenBSD: cipher.c,v 1.39 2000/12/06 23:05:42 markus Exp $"); |
39 | 39 | ||
40 | #include "ssh.h" | 40 | #include "ssh.h" |
41 | #include "xmalloc.h" | 41 | #include "xmalloc.h" |
@@ -285,40 +285,45 @@ cast_cbc_decrypt(CipherContext *cc, u_char *dest, const u_char *src, u_int len) | |||
285 | /* RIJNDAEL */ | 285 | /* RIJNDAEL */ |
286 | 286 | ||
287 | #define RIJNDAEL_BLOCKSIZE 16 | 287 | #define RIJNDAEL_BLOCKSIZE 16 |
288 | |||
288 | void | 289 | void |
289 | rijndael_setkey(CipherContext *cc, const u_char *key, u_int keylen) | 290 | rijndael_setkey(CipherContext *cc, const u_char *key, u_int keylen) |
290 | { | 291 | { |
291 | rijndael_set_key(&cc->u.rijndael.enc, (u4byte *)key, 8*keylen, 1); | 292 | if (rijndael_makekey(&cc->u.rijndael.enc, RIJNDAEL_ENCRYPT, |
292 | rijndael_set_key(&cc->u.rijndael.dec, (u4byte *)key, 8*keylen, 0); | 293 | 8*keylen, (char *)key) == -1) |
294 | fatal("rijndael_setkey: RIJNDAEL_ENCRYPT"); | ||
295 | if (rijndael_makekey(&cc->u.rijndael.dec, RIJNDAEL_DECRYPT, | ||
296 | 8*keylen, (char *)key) == -1) | ||
297 | fatal("rijndael_setkey: RIJNDAEL_DECRYPT"); | ||
293 | } | 298 | } |
294 | void | 299 | void |
295 | rijndael_setiv(CipherContext *cc, const u_char *iv, u_int ivlen) | 300 | rijndael_setiv(CipherContext *cc, const u_char *iv, u_int ivlen) |
296 | { | 301 | { |
297 | if (iv == NULL) | 302 | if (iv == NULL || ivlen != RIJNDAEL_BLOCKSIZE) |
298 | fatal("no IV for %s.", cc->cipher->name); | 303 | fatal("bad/no IV for %s.", cc->cipher->name); |
299 | memcpy((u_char *)cc->u.rijndael.iv, iv, RIJNDAEL_BLOCKSIZE); | 304 | memcpy(cc->u.rijndael.iv, iv, RIJNDAEL_BLOCKSIZE); |
300 | } | 305 | } |
306 | |||
301 | void | 307 | void |
302 | rijndael_cbc_encrypt(CipherContext *cc, u_char *dest, const u_char *src, | 308 | rijndael_cbc_encrypt(CipherContext *cc, u_char *dest, const u_char *src, |
303 | u_int len) | 309 | u_int len) |
304 | { | 310 | { |
305 | rijndael_ctx *ctx = &cc->u.rijndael.enc; | 311 | rijndael_key *ctx = &cc->u.rijndael.enc; |
306 | u4byte *iv = cc->u.rijndael.iv; | 312 | u_char *iv = cc->u.rijndael.iv; |
307 | u4byte in[4]; | 313 | u_char in[RIJNDAEL_BLOCKSIZE]; |
308 | u4byte *cprev, *cnow, *plain; | 314 | u_char *cprev, *cnow, *plain; |
309 | int i, blocks = len / RIJNDAEL_BLOCKSIZE; | 315 | int i, j, blocks = len / RIJNDAEL_BLOCKSIZE; |
310 | if (len == 0) | 316 | if (len == 0) |
311 | return; | 317 | return; |
312 | if (len % RIJNDAEL_BLOCKSIZE) | 318 | if (len % RIJNDAEL_BLOCKSIZE) |
313 | fatal("rijndael_cbc_encrypt: bad len %d", len); | 319 | fatal("rijndael_cbc_encrypt: bad len %d", len); |
314 | cnow = (u4byte*) dest; | 320 | cnow = dest; |
315 | plain = (u4byte*) src; | 321 | plain = (u_char *) src; |
316 | cprev = iv; | 322 | cprev = iv; |
317 | for(i = 0; i < blocks; i++, plain+=4, cnow+=4) { | 323 | for(i = 0; i < blocks; i++, plain+=RIJNDAEL_BLOCKSIZE, |
318 | in[0] = plain[0] ^ cprev[0]; | 324 | cnow+=RIJNDAEL_BLOCKSIZE) { |
319 | in[1] = plain[1] ^ cprev[1]; | 325 | for (j = 0; j < RIJNDAEL_BLOCKSIZE; j++) |
320 | in[2] = plain[2] ^ cprev[2]; | 326 | in[j] = plain[j] ^ cprev[j]; |
321 | in[3] = plain[3] ^ cprev[3]; | ||
322 | rijndael_encrypt(ctx, in, cnow); | 327 | rijndael_encrypt(ctx, in, cnow); |
323 | cprev = cnow; | 328 | cprev = cnow; |
324 | } | 329 | } |
@@ -329,25 +334,25 @@ void | |||
329 | rijndael_cbc_decrypt(CipherContext *cc, u_char *dest, const u_char *src, | 334 | rijndael_cbc_decrypt(CipherContext *cc, u_char *dest, const u_char *src, |
330 | u_int len) | 335 | u_int len) |
331 | { | 336 | { |
332 | rijndael_ctx *ctx = &cc->u.rijndael.dec; | 337 | rijndael_key *ctx = &cc->u.rijndael.dec; |
333 | u4byte *iv = cc->u.rijndael.iv; | 338 | u_char *iv = cc->u.rijndael.iv; |
334 | u4byte ivsaved[4]; | 339 | u_char ivsaved[RIJNDAEL_BLOCKSIZE]; |
335 | u4byte *cnow = (u4byte*) (src+len-RIJNDAEL_BLOCKSIZE); | 340 | u_char *cnow = (u_char *) (src+len-RIJNDAEL_BLOCKSIZE); |
336 | u4byte *plain = (u4byte*) (dest+len-RIJNDAEL_BLOCKSIZE); | 341 | u_char *plain = dest+len-RIJNDAEL_BLOCKSIZE; |
337 | u4byte *ivp; | 342 | u_char *ivp; |
338 | int i, blocks = len / RIJNDAEL_BLOCKSIZE; | 343 | int i, j, blocks = len / RIJNDAEL_BLOCKSIZE; |
339 | if (len == 0) | 344 | if (len == 0) |
340 | return; | 345 | return; |
341 | if (len % RIJNDAEL_BLOCKSIZE) | 346 | if (len % RIJNDAEL_BLOCKSIZE) |
342 | fatal("rijndael_cbc_decrypt: bad len %d", len); | 347 | fatal("rijndael_cbc_decrypt: bad len %d", len); |
343 | memcpy(ivsaved, cnow, RIJNDAEL_BLOCKSIZE); | 348 | memcpy(ivsaved, cnow, RIJNDAEL_BLOCKSIZE); |
344 | for(i = blocks; i > 0; i--, cnow-=4, plain-=4) { | 349 | for(i = blocks; i > 0; i--, cnow-=RIJNDAEL_BLOCKSIZE, |
350 | plain-=RIJNDAEL_BLOCKSIZE) { | ||
345 | rijndael_decrypt(ctx, cnow, plain); | 351 | rijndael_decrypt(ctx, cnow, plain); |
346 | ivp = (i == 1) ? iv : cnow-4; | 352 | //rijndael_decrypt(cnow, plain, ctx->keySched, ctx->ROUNDS); |
347 | plain[0] ^= ivp[0]; | 353 | ivp = (i == 1) ? iv : cnow-RIJNDAEL_BLOCKSIZE; |
348 | plain[1] ^= ivp[1]; | 354 | for (j = 0; j < RIJNDAEL_BLOCKSIZE; j++) |
349 | plain[2] ^= ivp[2]; | 355 | plain[j] ^= ivp[j]; |
350 | plain[3] ^= ivp[3]; | ||
351 | } | 356 | } |
352 | memcpy(iv, ivsaved, RIJNDAEL_BLOCKSIZE); | 357 | memcpy(iv, ivsaved, RIJNDAEL_BLOCKSIZE); |
353 | } | 358 | } |
@@ -32,7 +32,7 @@ | |||
32 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 32 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
33 | */ | 33 | */ |
34 | 34 | ||
35 | /* RCSID("$OpenBSD: cipher.h,v 1.22 2000/10/13 18:59:14 markus Exp $"); */ | 35 | /* RCSID("$OpenBSD: cipher.h,v 1.23 2000/12/06 23:05:42 markus Exp $"); */ |
36 | 36 | ||
37 | #ifndef CIPHER_H | 37 | #ifndef CIPHER_H |
38 | #define CIPHER_H | 38 | #define CIPHER_H |
@@ -41,7 +41,9 @@ | |||
41 | #include <openssl/blowfish.h> | 41 | #include <openssl/blowfish.h> |
42 | #include <openssl/rc4.h> | 42 | #include <openssl/rc4.h> |
43 | #include <openssl/cast.h> | 43 | #include <openssl/cast.h> |
44 | |||
44 | #include "rijndael.h" | 45 | #include "rijndael.h" |
46 | |||
45 | /* | 47 | /* |
46 | * Cipher types for SSH-1. New types can be added, but old types should not | 48 | * Cipher types for SSH-1. New types can be added, but old types should not |
47 | * be removed for compatibility. The maximum allowed value is 31. | 49 | * be removed for compatibility. The maximum allowed value is 31. |
@@ -84,9 +86,9 @@ struct CipherContext { | |||
84 | u_char iv[8]; | 86 | u_char iv[8]; |
85 | } cast; | 87 | } cast; |
86 | struct { | 88 | struct { |
87 | u4byte iv[4]; | 89 | u_char iv[16]; |
88 | rijndael_ctx enc; | 90 | rijndael_key enc; |
89 | rijndael_ctx dec; | 91 | rijndael_key dec; |
90 | } rijndael; | 92 | } rijndael; |
91 | RC4_KEY rc4; | 93 | RC4_KEY rc4; |
92 | } u; | 94 | } u; |
diff --git a/rijndael.c b/rijndael.c index 963738030..92a39762f 100644 --- a/rijndael.c +++ b/rijndael.c | |||
@@ -1,493 +1,311 @@ | |||
1 | /* $OpenBSD: rijndael.c,v 1.2 2000/10/15 14:14:01 markus Exp $ */ | 1 | /* |
2 | 2 | * rijndael-alg-fst.c v2.4 April '2000 | |
3 | /* This is an independent implementation of the encryption algorithm: */ | 3 | * rijndael-alg-api.c v2.4 April '2000 |
4 | /* */ | 4 | * |
5 | /* RIJNDAEL by Joan Daemen and Vincent Rijmen */ | 5 | * Optimised ANSI C code |
6 | /* */ | 6 | * |
7 | /* which is a candidate algorithm in the Advanced Encryption Standard */ | 7 | * authors: v1.0: Antoon Bosselaers |
8 | /* programme of the US National Institute of Standards and Technology. */ | 8 | * v2.0: Vincent Rijmen, K.U.Leuven |
9 | /* */ | 9 | * v2.3: Paulo Barreto |
10 | /* Copyright in this implementation is held by Dr B R Gladman but I */ | 10 | * v2.4: Vincent Rijmen, K.U.Leuven |
11 | /* hereby give permission for its free direct or derivative use subject */ | 11 | * |
12 | /* to acknowledgment of its origin and compliance with any conditions */ | 12 | * This code is placed in the public domain. |
13 | /* that the originators of the algorithm place on its exploitation. */ | 13 | */ |
14 | /* */ | 14 | |
15 | /* Dr Brian Gladman (gladman@seven77.demon.co.uk) 14th January 1999 */ | 15 | #include <stdio.h> |
16 | 16 | #include <stdlib.h> | |
17 | /* Timing data for Rijndael (rijndael.c) | 17 | #include <assert.h> |
18 | |||
19 | Algorithm: rijndael (rijndael.c) | ||
20 | |||
21 | 128 bit key: | ||
22 | Key Setup: 305/1389 cycles (encrypt/decrypt) | ||
23 | Encrypt: 374 cycles = 68.4 mbits/sec | ||
24 | Decrypt: 352 cycles = 72.7 mbits/sec | ||
25 | Mean: 363 cycles = 70.5 mbits/sec | ||
26 | |||
27 | 192 bit key: | ||
28 | Key Setup: 277/1595 cycles (encrypt/decrypt) | ||
29 | Encrypt: 439 cycles = 58.3 mbits/sec | ||
30 | Decrypt: 425 cycles = 60.2 mbits/sec | ||
31 | Mean: 432 cycles = 59.3 mbits/sec | ||
32 | |||
33 | 256 bit key: | ||
34 | Key Setup: 374/1960 cycles (encrypt/decrypt) | ||
35 | Encrypt: 502 cycles = 51.0 mbits/sec | ||
36 | Decrypt: 498 cycles = 51.4 mbits/sec | ||
37 | Mean: 500 cycles = 51.2 mbits/sec | ||
38 | |||
39 | */ | ||
40 | 18 | ||
41 | #include "config.h" | 19 | #include "config.h" |
42 | #include "rijndael.h" | 20 | #include "rijndael.h" |
21 | #include "rijndael_boxes.h" | ||
43 | 22 | ||
44 | void gen_tabs __P((void)); | 23 | int |
45 | 24 | rijndael_keysched(u_int8_t k[RIJNDAEL_MAXKC][4], | |
46 | /* 3. Basic macros for speeding up generic operations */ | 25 | u_int8_t W[RIJNDAEL_MAXROUNDS+1][4][4], int ROUNDS) |
47 | |||
48 | /* Circular rotate of 32 bit values */ | ||
49 | |||
50 | #define rotr(x,n) (((x) >> ((int)(n))) | ((x) << (32 - (int)(n)))) | ||
51 | #define rotl(x,n) (((x) << ((int)(n))) | ((x) >> (32 - (int)(n)))) | ||
52 | |||
53 | /* Invert byte order in a 32 bit variable */ | ||
54 | |||
55 | #define bswap(x) (rotl(x, 8) & 0x00ff00ff | rotr(x, 8) & 0xff00ff00) | ||
56 | |||
57 | /* Extract byte from a 32 bit quantity (little endian notation) */ | ||
58 | |||
59 | #define byte(x,n) ((u1byte)((x) >> (8 * n))) | ||
60 | |||
61 | #if BYTE_ORDER != LITTLE_ENDIAN | ||
62 | #define BLOCK_SWAP | ||
63 | #endif | ||
64 | |||
65 | /* For inverting byte order in input/output 32 bit words if needed */ | ||
66 | |||
67 | #ifdef BLOCK_SWAP | ||
68 | #define BYTE_SWAP | ||
69 | #define WORD_SWAP | ||
70 | #endif | ||
71 | |||
72 | #ifdef BYTE_SWAP | ||
73 | #define io_swap(x) bswap(x) | ||
74 | #else | ||
75 | #define io_swap(x) (x) | ||
76 | #endif | ||
77 | |||
78 | /* For inverting the byte order of input/output blocks if needed */ | ||
79 | |||
80 | #ifdef WORD_SWAP | ||
81 | |||
82 | #define get_block(x) \ | ||
83 | ((u4byte*)(x))[0] = io_swap(in_blk[3]); \ | ||
84 | ((u4byte*)(x))[1] = io_swap(in_blk[2]); \ | ||
85 | ((u4byte*)(x))[2] = io_swap(in_blk[1]); \ | ||
86 | ((u4byte*)(x))[3] = io_swap(in_blk[0]) | ||
87 | |||
88 | #define put_block(x) \ | ||
89 | out_blk[3] = io_swap(((u4byte*)(x))[0]); \ | ||
90 | out_blk[2] = io_swap(((u4byte*)(x))[1]); \ | ||
91 | out_blk[1] = io_swap(((u4byte*)(x))[2]); \ | ||
92 | out_blk[0] = io_swap(((u4byte*)(x))[3]) | ||
93 | |||
94 | #define get_key(x,len) \ | ||
95 | ((u4byte*)(x))[4] = ((u4byte*)(x))[5] = \ | ||
96 | ((u4byte*)(x))[6] = ((u4byte*)(x))[7] = 0; \ | ||
97 | switch((((len) + 63) / 64)) { \ | ||
98 | case 2: \ | ||
99 | ((u4byte*)(x))[0] = io_swap(in_key[3]); \ | ||
100 | ((u4byte*)(x))[1] = io_swap(in_key[2]); \ | ||
101 | ((u4byte*)(x))[2] = io_swap(in_key[1]); \ | ||
102 | ((u4byte*)(x))[3] = io_swap(in_key[0]); \ | ||
103 | break; \ | ||
104 | case 3: \ | ||
105 | ((u4byte*)(x))[0] = io_swap(in_key[5]); \ | ||
106 | ((u4byte*)(x))[1] = io_swap(in_key[4]); \ | ||
107 | ((u4byte*)(x))[2] = io_swap(in_key[3]); \ | ||
108 | ((u4byte*)(x))[3] = io_swap(in_key[2]); \ | ||
109 | ((u4byte*)(x))[4] = io_swap(in_key[1]); \ | ||
110 | ((u4byte*)(x))[5] = io_swap(in_key[0]); \ | ||
111 | break; \ | ||
112 | case 4: \ | ||
113 | ((u4byte*)(x))[0] = io_swap(in_key[7]); \ | ||
114 | ((u4byte*)(x))[1] = io_swap(in_key[6]); \ | ||
115 | ((u4byte*)(x))[2] = io_swap(in_key[5]); \ | ||
116 | ((u4byte*)(x))[3] = io_swap(in_key[4]); \ | ||
117 | ((u4byte*)(x))[4] = io_swap(in_key[3]); \ | ||
118 | ((u4byte*)(x))[5] = io_swap(in_key[2]); \ | ||
119 | ((u4byte*)(x))[6] = io_swap(in_key[1]); \ | ||
120 | ((u4byte*)(x))[7] = io_swap(in_key[0]); \ | ||
121 | } | ||
122 | |||
123 | #else | ||
124 | |||
125 | #define get_block(x) \ | ||
126 | ((u4byte*)(x))[0] = io_swap(in_blk[0]); \ | ||
127 | ((u4byte*)(x))[1] = io_swap(in_blk[1]); \ | ||
128 | ((u4byte*)(x))[2] = io_swap(in_blk[2]); \ | ||
129 | ((u4byte*)(x))[3] = io_swap(in_blk[3]) | ||
130 | |||
131 | #define put_block(x) \ | ||
132 | out_blk[0] = io_swap(((u4byte*)(x))[0]); \ | ||
133 | out_blk[1] = io_swap(((u4byte*)(x))[1]); \ | ||
134 | out_blk[2] = io_swap(((u4byte*)(x))[2]); \ | ||
135 | out_blk[3] = io_swap(((u4byte*)(x))[3]) | ||
136 | |||
137 | #define get_key(x,len) \ | ||
138 | ((u4byte*)(x))[4] = ((u4byte*)(x))[5] = \ | ||
139 | ((u4byte*)(x))[6] = ((u4byte*)(x))[7] = 0; \ | ||
140 | switch((((len) + 63) / 64)) { \ | ||
141 | case 4: \ | ||
142 | ((u4byte*)(x))[6] = io_swap(in_key[6]); \ | ||
143 | ((u4byte*)(x))[7] = io_swap(in_key[7]); \ | ||
144 | case 3: \ | ||
145 | ((u4byte*)(x))[4] = io_swap(in_key[4]); \ | ||
146 | ((u4byte*)(x))[5] = io_swap(in_key[5]); \ | ||
147 | case 2: \ | ||
148 | ((u4byte*)(x))[0] = io_swap(in_key[0]); \ | ||
149 | ((u4byte*)(x))[1] = io_swap(in_key[1]); \ | ||
150 | ((u4byte*)(x))[2] = io_swap(in_key[2]); \ | ||
151 | ((u4byte*)(x))[3] = io_swap(in_key[3]); \ | ||
152 | } | ||
153 | |||
154 | #endif | ||
155 | |||
156 | #define LARGE_TABLES | ||
157 | |||
158 | u1byte pow_tab[256]; | ||
159 | u1byte log_tab[256]; | ||
160 | u1byte sbx_tab[256]; | ||
161 | u1byte isb_tab[256]; | ||
162 | u4byte rco_tab[ 10]; | ||
163 | u4byte ft_tab[4][256]; | ||
164 | u4byte it_tab[4][256]; | ||
165 | |||
166 | #ifdef LARGE_TABLES | ||
167 | u4byte fl_tab[4][256]; | ||
168 | u4byte il_tab[4][256]; | ||
169 | #endif | ||
170 | |||
171 | u4byte tab_gen = 0; | ||
172 | |||
173 | #define ff_mult(a,b) (a && b ? pow_tab[(log_tab[a] + log_tab[b]) % 255] : 0) | ||
174 | |||
175 | #define f_rn(bo, bi, n, k) \ | ||
176 | bo[n] = ft_tab[0][byte(bi[n],0)] ^ \ | ||
177 | ft_tab[1][byte(bi[(n + 1) & 3],1)] ^ \ | ||
178 | ft_tab[2][byte(bi[(n + 2) & 3],2)] ^ \ | ||
179 | ft_tab[3][byte(bi[(n + 3) & 3],3)] ^ *(k + n) | ||
180 | |||
181 | #define i_rn(bo, bi, n, k) \ | ||
182 | bo[n] = it_tab[0][byte(bi[n],0)] ^ \ | ||
183 | it_tab[1][byte(bi[(n + 3) & 3],1)] ^ \ | ||
184 | it_tab[2][byte(bi[(n + 2) & 3],2)] ^ \ | ||
185 | it_tab[3][byte(bi[(n + 1) & 3],3)] ^ *(k + n) | ||
186 | |||
187 | #ifdef LARGE_TABLES | ||
188 | |||
189 | #define ls_box(x) \ | ||
190 | ( fl_tab[0][byte(x, 0)] ^ \ | ||
191 | fl_tab[1][byte(x, 1)] ^ \ | ||
192 | fl_tab[2][byte(x, 2)] ^ \ | ||
193 | fl_tab[3][byte(x, 3)] ) | ||
194 | |||
195 | #define f_rl(bo, bi, n, k) \ | ||
196 | bo[n] = fl_tab[0][byte(bi[n],0)] ^ \ | ||
197 | fl_tab[1][byte(bi[(n + 1) & 3],1)] ^ \ | ||
198 | fl_tab[2][byte(bi[(n + 2) & 3],2)] ^ \ | ||
199 | fl_tab[3][byte(bi[(n + 3) & 3],3)] ^ *(k + n) | ||
200 | |||
201 | #define i_rl(bo, bi, n, k) \ | ||
202 | bo[n] = il_tab[0][byte(bi[n],0)] ^ \ | ||
203 | il_tab[1][byte(bi[(n + 3) & 3],1)] ^ \ | ||
204 | il_tab[2][byte(bi[(n + 2) & 3],2)] ^ \ | ||
205 | il_tab[3][byte(bi[(n + 1) & 3],3)] ^ *(k + n) | ||
206 | |||
207 | #else | ||
208 | |||
209 | #define ls_box(x) \ | ||
210 | ((u4byte)sbx_tab[byte(x, 0)] << 0) ^ \ | ||
211 | ((u4byte)sbx_tab[byte(x, 1)] << 8) ^ \ | ||
212 | ((u4byte)sbx_tab[byte(x, 2)] << 16) ^ \ | ||
213 | ((u4byte)sbx_tab[byte(x, 3)] << 24) | ||
214 | |||
215 | #define f_rl(bo, bi, n, k) \ | ||
216 | bo[n] = (u4byte)sbx_tab[byte(bi[n],0)] ^ \ | ||
217 | rotl(((u4byte)sbx_tab[byte(bi[(n + 1) & 3],1)]), 8) ^ \ | ||
218 | rotl(((u4byte)sbx_tab[byte(bi[(n + 2) & 3],2)]), 16) ^ \ | ||
219 | rotl(((u4byte)sbx_tab[byte(bi[(n + 3) & 3],3)]), 24) ^ *(k + n) | ||
220 | |||
221 | #define i_rl(bo, bi, n, k) \ | ||
222 | bo[n] = (u4byte)isb_tab[byte(bi[n],0)] ^ \ | ||
223 | rotl(((u4byte)isb_tab[byte(bi[(n + 3) & 3],1)]), 8) ^ \ | ||
224 | rotl(((u4byte)isb_tab[byte(bi[(n + 2) & 3],2)]), 16) ^ \ | ||
225 | rotl(((u4byte)isb_tab[byte(bi[(n + 1) & 3],3)]), 24) ^ *(k + n) | ||
226 | |||
227 | #endif | ||
228 | |||
229 | void | ||
230 | gen_tabs(void) | ||
231 | { | 26 | { |
232 | u4byte i, t; | 27 | /* Calculate the necessary round keys |
233 | u1byte p, q; | 28 | * The number of calculations depends on keyBits and blockBits |
234 | 29 | */ | |
235 | /* log and power tables for GF(2**8) finite field with */ | 30 | int j, r, t, rconpointer = 0; |
236 | /* 0x11b as modular polynomial - the simplest prmitive */ | 31 | u_int8_t tk[RIJNDAEL_MAXKC][4]; |
237 | /* root is 0x11, used here to generate the tables */ | 32 | int KC = ROUNDS - 6; |
238 | 33 | ||
239 | for(i = 0,p = 1; i < 256; ++i) { | 34 | for (j = KC-1; j >= 0; j--) { |
240 | pow_tab[i] = (u1byte)p; log_tab[p] = (u1byte)i; | 35 | *((u_int32_t*)tk[j]) = *((u_int32_t*)k[j]); |
241 | |||
242 | p = p ^ (p << 1) ^ (p & 0x80 ? 0x01b : 0); | ||
243 | } | ||
244 | |||
245 | log_tab[1] = 0; p = 1; | ||
246 | |||
247 | for(i = 0; i < 10; ++i) { | ||
248 | rco_tab[i] = p; | ||
249 | |||
250 | p = (p << 1) ^ (p & 0x80 ? 0x1b : 0); | ||
251 | } | 36 | } |
252 | 37 | r = 0; | |
253 | /* note that the affine byte transformation matrix in */ | 38 | t = 0; |
254 | /* rijndael specification is in big endian format with */ | 39 | /* copy values into round key array */ |
255 | /* bit 0 as the most significant bit. In the remainder */ | 40 | for (j = 0; (j < KC) && (r < ROUNDS + 1); ) { |
256 | /* of the specification the bits are numbered from the */ | 41 | for (; (j < KC) && (t < 4); j++, t++) { |
257 | /* least significant end of a byte. */ | 42 | *((u_int32_t*)W[r][t]) = *((u_int32_t*)tk[j]); |
258 | 43 | } | |
259 | for(i = 0; i < 256; ++i) { | 44 | if (t == 4) { |
260 | p = (i ? pow_tab[255 - log_tab[i]] : 0); q = p; | 45 | r++; |
261 | q = (q >> 7) | (q << 1); p ^= q; | 46 | t = 0; |
262 | q = (q >> 7) | (q << 1); p ^= q; | ||
263 | q = (q >> 7) | (q << 1); p ^= q; | ||
264 | q = (q >> 7) | (q << 1); p ^= q ^ 0x63; | ||
265 | sbx_tab[i] = (u1byte)p; isb_tab[p] = (u1byte)i; | ||
266 | } | ||
267 | |||
268 | for(i = 0; i < 256; ++i) { | ||
269 | p = sbx_tab[i]; | ||
270 | |||
271 | #ifdef LARGE_TABLES | ||
272 | |||
273 | t = p; fl_tab[0][i] = t; | ||
274 | fl_tab[1][i] = rotl(t, 8); | ||
275 | fl_tab[2][i] = rotl(t, 16); | ||
276 | fl_tab[3][i] = rotl(t, 24); | ||
277 | #endif | ||
278 | t = ((u4byte)ff_mult(2, p)) | | ||
279 | ((u4byte)p << 8) | | ||
280 | ((u4byte)p << 16) | | ||
281 | ((u4byte)ff_mult(3, p) << 24); | ||
282 | |||
283 | ft_tab[0][i] = t; | ||
284 | ft_tab[1][i] = rotl(t, 8); | ||
285 | ft_tab[2][i] = rotl(t, 16); | ||
286 | ft_tab[3][i] = rotl(t, 24); | ||
287 | |||
288 | p = isb_tab[i]; | ||
289 | |||
290 | #ifdef LARGE_TABLES | ||
291 | |||
292 | t = p; il_tab[0][i] = t; | ||
293 | il_tab[1][i] = rotl(t, 8); | ||
294 | il_tab[2][i] = rotl(t, 16); | ||
295 | il_tab[3][i] = rotl(t, 24); | ||
296 | #endif | ||
297 | t = ((u4byte)ff_mult(14, p)) | | ||
298 | ((u4byte)ff_mult( 9, p) << 8) | | ||
299 | ((u4byte)ff_mult(13, p) << 16) | | ||
300 | ((u4byte)ff_mult(11, p) << 24); | ||
301 | |||
302 | it_tab[0][i] = t; | ||
303 | it_tab[1][i] = rotl(t, 8); | ||
304 | it_tab[2][i] = rotl(t, 16); | ||
305 | it_tab[3][i] = rotl(t, 24); | ||
306 | } | ||
307 | |||
308 | tab_gen = 1; | ||
309 | } | ||
310 | |||
311 | #define star_x(x) (((x) & 0x7f7f7f7f) << 1) ^ ((((x) & 0x80808080) >> 7) * 0x1b) | ||
312 | |||
313 | #define imix_col(y,x) \ | ||
314 | u = star_x(x); \ | ||
315 | v = star_x(u); \ | ||
316 | w = star_x(v); \ | ||
317 | t = w ^ (x); \ | ||
318 | (y) = u ^ v ^ w; \ | ||
319 | (y) ^= rotr(u ^ t, 8) ^ \ | ||
320 | rotr(v ^ t, 16) ^ \ | ||
321 | rotr(t,24) | ||
322 | |||
323 | /* initialise the key schedule from the user supplied key */ | ||
324 | |||
325 | #define loop4(i) \ | ||
326 | { t = ls_box(rotr(t, 8)) ^ rco_tab[i]; \ | ||
327 | t ^= e_key[4 * i]; e_key[4 * i + 4] = t; \ | ||
328 | t ^= e_key[4 * i + 1]; e_key[4 * i + 5] = t; \ | ||
329 | t ^= e_key[4 * i + 2]; e_key[4 * i + 6] = t; \ | ||
330 | t ^= e_key[4 * i + 3]; e_key[4 * i + 7] = t; \ | ||
331 | } | ||
332 | |||
333 | #define loop6(i) \ | ||
334 | { t = ls_box(rotr(t, 8)) ^ rco_tab[i]; \ | ||
335 | t ^= e_key[6 * i]; e_key[6 * i + 6] = t; \ | ||
336 | t ^= e_key[6 * i + 1]; e_key[6 * i + 7] = t; \ | ||
337 | t ^= e_key[6 * i + 2]; e_key[6 * i + 8] = t; \ | ||
338 | t ^= e_key[6 * i + 3]; e_key[6 * i + 9] = t; \ | ||
339 | t ^= e_key[6 * i + 4]; e_key[6 * i + 10] = t; \ | ||
340 | t ^= e_key[6 * i + 5]; e_key[6 * i + 11] = t; \ | ||
341 | } | ||
342 | |||
343 | #define loop8(i) \ | ||
344 | { t = ls_box(rotr(t, 8)) ^ rco_tab[i]; \ | ||
345 | t ^= e_key[8 * i]; e_key[8 * i + 8] = t; \ | ||
346 | t ^= e_key[8 * i + 1]; e_key[8 * i + 9] = t; \ | ||
347 | t ^= e_key[8 * i + 2]; e_key[8 * i + 10] = t; \ | ||
348 | t ^= e_key[8 * i + 3]; e_key[8 * i + 11] = t; \ | ||
349 | t = e_key[8 * i + 4] ^ ls_box(t); \ | ||
350 | e_key[8 * i + 12] = t; \ | ||
351 | t ^= e_key[8 * i + 5]; e_key[8 * i + 13] = t; \ | ||
352 | t ^= e_key[8 * i + 6]; e_key[8 * i + 14] = t; \ | ||
353 | t ^= e_key[8 * i + 7]; e_key[8 * i + 15] = t; \ | ||
354 | } | ||
355 | |||
356 | rijndael_ctx * | ||
357 | rijndael_set_key(rijndael_ctx *ctx, const u4byte *in_key, const u4byte key_len, | ||
358 | int encrypt) | ||
359 | { | ||
360 | u4byte i, t, u, v, w; | ||
361 | u4byte *e_key = ctx->e_key; | ||
362 | u4byte *d_key = ctx->d_key; | ||
363 | |||
364 | ctx->decrypt = !encrypt; | ||
365 | |||
366 | if(!tab_gen) | ||
367 | gen_tabs(); | ||
368 | |||
369 | ctx->k_len = (key_len + 31) / 32; | ||
370 | |||
371 | e_key[0] = in_key[0]; e_key[1] = in_key[1]; | ||
372 | e_key[2] = in_key[2]; e_key[3] = in_key[3]; | ||
373 | |||
374 | switch(ctx->k_len) { | ||
375 | case 4: t = e_key[3]; | ||
376 | for(i = 0; i < 10; ++i) | ||
377 | loop4(i); | ||
378 | break; | ||
379 | |||
380 | case 6: e_key[4] = in_key[4]; t = e_key[5] = in_key[5]; | ||
381 | for(i = 0; i < 8; ++i) | ||
382 | loop6(i); | ||
383 | break; | ||
384 | |||
385 | case 8: e_key[4] = in_key[4]; e_key[5] = in_key[5]; | ||
386 | e_key[6] = in_key[6]; t = e_key[7] = in_key[7]; | ||
387 | for(i = 0; i < 7; ++i) | ||
388 | loop8(i); | ||
389 | break; | ||
390 | } | ||
391 | |||
392 | if (!encrypt) { | ||
393 | d_key[0] = e_key[0]; d_key[1] = e_key[1]; | ||
394 | d_key[2] = e_key[2]; d_key[3] = e_key[3]; | ||
395 | |||
396 | for(i = 4; i < 4 * ctx->k_len + 24; ++i) { | ||
397 | imix_col(d_key[i], e_key[i]); | ||
398 | } | 47 | } |
399 | } | 48 | } |
400 | 49 | ||
401 | return ctx; | 50 | while (r < ROUNDS + 1) { /* while not enough round key material calculated */ |
51 | /* calculate new values */ | ||
52 | tk[0][0] ^= S[tk[KC-1][1]]; | ||
53 | tk[0][1] ^= S[tk[KC-1][2]]; | ||
54 | tk[0][2] ^= S[tk[KC-1][3]]; | ||
55 | tk[0][3] ^= S[tk[KC-1][0]]; | ||
56 | tk[0][0] ^= rcon[rconpointer++]; | ||
57 | |||
58 | if (KC != 8) { | ||
59 | for (j = 1; j < KC; j++) { | ||
60 | *((u_int32_t*)tk[j]) ^= *((u_int32_t*)tk[j-1]); | ||
61 | } | ||
62 | } else { | ||
63 | for (j = 1; j < KC/2; j++) { | ||
64 | *((u_int32_t*)tk[j]) ^= *((u_int32_t*)tk[j-1]); | ||
65 | } | ||
66 | tk[KC/2][0] ^= S[tk[KC/2 - 1][0]]; | ||
67 | tk[KC/2][1] ^= S[tk[KC/2 - 1][1]]; | ||
68 | tk[KC/2][2] ^= S[tk[KC/2 - 1][2]]; | ||
69 | tk[KC/2][3] ^= S[tk[KC/2 - 1][3]]; | ||
70 | for (j = KC/2 + 1; j < KC; j++) { | ||
71 | *((u_int32_t*)tk[j]) ^= *((u_int32_t*)tk[j-1]); | ||
72 | } | ||
73 | } | ||
74 | /* copy values into round key array */ | ||
75 | for (j = 0; (j < KC) && (r < ROUNDS + 1); ) { | ||
76 | for (; (j < KC) && (t < 4); j++, t++) { | ||
77 | *((u_int32_t*)W[r][t]) = *((u_int32_t*)tk[j]); | ||
78 | } | ||
79 | if (t == 4) { | ||
80 | r++; | ||
81 | t = 0; | ||
82 | } | ||
83 | } | ||
84 | } | ||
85 | return 0; | ||
402 | } | 86 | } |
403 | 87 | ||
404 | /* encrypt a block of text */ | 88 | int |
405 | 89 | rijndael_key_enc_to_dec(u_int8_t W[RIJNDAEL_MAXROUNDS+1][4][4], int ROUNDS) | |
406 | #define f_nround(bo, bi, k) \ | 90 | { |
407 | f_rn(bo, bi, 0, k); \ | 91 | int r; |
408 | f_rn(bo, bi, 1, k); \ | 92 | u_int8_t *w; |
409 | f_rn(bo, bi, 2, k); \ | 93 | |
410 | f_rn(bo, bi, 3, k); \ | 94 | for (r = 1; r < ROUNDS; r++) { |
411 | k += 4 | 95 | w = W[r][0]; |
412 | 96 | *((u_int32_t*)w) = *((u_int32_t*)U1[w[0]]) | |
413 | #define f_lround(bo, bi, k) \ | 97 | ^ *((u_int32_t*)U2[w[1]]) |
414 | f_rl(bo, bi, 0, k); \ | 98 | ^ *((u_int32_t*)U3[w[2]]) |
415 | f_rl(bo, bi, 1, k); \ | 99 | ^ *((u_int32_t*)U4[w[3]]); |
416 | f_rl(bo, bi, 2, k); \ | 100 | |
417 | f_rl(bo, bi, 3, k) | 101 | w = W[r][1]; |
418 | 102 | *((u_int32_t*)w) = *((u_int32_t*)U1[w[0]]) | |
419 | void | 103 | ^ *((u_int32_t*)U2[w[1]]) |
420 | rijndael_encrypt(rijndael_ctx *ctx, const u4byte *in_blk, u4byte *out_blk) | 104 | ^ *((u_int32_t*)U3[w[2]]) |
421 | { | 105 | ^ *((u_int32_t*)U4[w[3]]); |
422 | u4byte k_len = ctx->k_len; | 106 | |
423 | u4byte *e_key = ctx->e_key; | 107 | w = W[r][2]; |
424 | u4byte b0[4], b1[4], *kp; | 108 | *((u_int32_t*)w) = *((u_int32_t*)U1[w[0]]) |
425 | 109 | ^ *((u_int32_t*)U2[w[1]]) | |
426 | b0[0] = in_blk[0] ^ e_key[0]; b0[1] = in_blk[1] ^ e_key[1]; | 110 | ^ *((u_int32_t*)U3[w[2]]) |
427 | b0[2] = in_blk[2] ^ e_key[2]; b0[3] = in_blk[3] ^ e_key[3]; | 111 | ^ *((u_int32_t*)U4[w[3]]); |
428 | 112 | ||
429 | kp = e_key + 4; | 113 | w = W[r][3]; |
430 | 114 | *((u_int32_t*)w) = *((u_int32_t*)U1[w[0]]) | |
431 | if(k_len > 6) { | 115 | ^ *((u_int32_t*)U2[w[1]]) |
432 | f_nround(b1, b0, kp); f_nround(b0, b1, kp); | 116 | ^ *((u_int32_t*)U3[w[2]]) |
117 | ^ *((u_int32_t*)U4[w[3]]); | ||
433 | } | 118 | } |
434 | 119 | return 0; | |
435 | if(k_len > 4) { | 120 | } |
436 | f_nround(b1, b0, kp); f_nround(b0, b1, kp); | 121 | |
122 | /** | ||
123 | * Encrypt a single block. | ||
124 | */ | ||
125 | int | ||
126 | rijndael_encrypt(rijndael_key *key, u_int8_t a[16], u_int8_t b[16]) | ||
127 | { | ||
128 | u_int8_t (*rk)[4][4] = key->keySched; | ||
129 | int ROUNDS = key->ROUNDS; | ||
130 | int r; | ||
131 | u_int8_t temp[4][4]; | ||
132 | |||
133 | *((u_int32_t*)temp[0]) = *((u_int32_t*)(a )) ^ *((u_int32_t*)rk[0][0]); | ||
134 | *((u_int32_t*)temp[1]) = *((u_int32_t*)(a+ 4)) ^ *((u_int32_t*)rk[0][1]); | ||
135 | *((u_int32_t*)temp[2]) = *((u_int32_t*)(a+ 8)) ^ *((u_int32_t*)rk[0][2]); | ||
136 | *((u_int32_t*)temp[3]) = *((u_int32_t*)(a+12)) ^ *((u_int32_t*)rk[0][3]); | ||
137 | *((u_int32_t*)(b )) = *((u_int32_t*)T1[temp[0][0]]) | ||
138 | ^ *((u_int32_t*)T2[temp[1][1]]) | ||
139 | ^ *((u_int32_t*)T3[temp[2][2]]) | ||
140 | ^ *((u_int32_t*)T4[temp[3][3]]); | ||
141 | *((u_int32_t*)(b + 4)) = *((u_int32_t*)T1[temp[1][0]]) | ||
142 | ^ *((u_int32_t*)T2[temp[2][1]]) | ||
143 | ^ *((u_int32_t*)T3[temp[3][2]]) | ||
144 | ^ *((u_int32_t*)T4[temp[0][3]]); | ||
145 | *((u_int32_t*)(b + 8)) = *((u_int32_t*)T1[temp[2][0]]) | ||
146 | ^ *((u_int32_t*)T2[temp[3][1]]) | ||
147 | ^ *((u_int32_t*)T3[temp[0][2]]) | ||
148 | ^ *((u_int32_t*)T4[temp[1][3]]); | ||
149 | *((u_int32_t*)(b +12)) = *((u_int32_t*)T1[temp[3][0]]) | ||
150 | ^ *((u_int32_t*)T2[temp[0][1]]) | ||
151 | ^ *((u_int32_t*)T3[temp[1][2]]) | ||
152 | ^ *((u_int32_t*)T4[temp[2][3]]); | ||
153 | for (r = 1; r < ROUNDS-1; r++) { | ||
154 | *((u_int32_t*)temp[0]) = *((u_int32_t*)(b )) ^ *((u_int32_t*)rk[r][0]); | ||
155 | *((u_int32_t*)temp[1]) = *((u_int32_t*)(b+ 4)) ^ *((u_int32_t*)rk[r][1]); | ||
156 | *((u_int32_t*)temp[2]) = *((u_int32_t*)(b+ 8)) ^ *((u_int32_t*)rk[r][2]); | ||
157 | *((u_int32_t*)temp[3]) = *((u_int32_t*)(b+12)) ^ *((u_int32_t*)rk[r][3]); | ||
158 | |||
159 | *((u_int32_t*)(b )) = *((u_int32_t*)T1[temp[0][0]]) | ||
160 | ^ *((u_int32_t*)T2[temp[1][1]]) | ||
161 | ^ *((u_int32_t*)T3[temp[2][2]]) | ||
162 | ^ *((u_int32_t*)T4[temp[3][3]]); | ||
163 | *((u_int32_t*)(b + 4)) = *((u_int32_t*)T1[temp[1][0]]) | ||
164 | ^ *((u_int32_t*)T2[temp[2][1]]) | ||
165 | ^ *((u_int32_t*)T3[temp[3][2]]) | ||
166 | ^ *((u_int32_t*)T4[temp[0][3]]); | ||
167 | *((u_int32_t*)(b + 8)) = *((u_int32_t*)T1[temp[2][0]]) | ||
168 | ^ *((u_int32_t*)T2[temp[3][1]]) | ||
169 | ^ *((u_int32_t*)T3[temp[0][2]]) | ||
170 | ^ *((u_int32_t*)T4[temp[1][3]]); | ||
171 | *((u_int32_t*)(b +12)) = *((u_int32_t*)T1[temp[3][0]]) | ||
172 | ^ *((u_int32_t*)T2[temp[0][1]]) | ||
173 | ^ *((u_int32_t*)T3[temp[1][2]]) | ||
174 | ^ *((u_int32_t*)T4[temp[2][3]]); | ||
437 | } | 175 | } |
438 | 176 | /* last round is special */ | |
439 | f_nround(b1, b0, kp); f_nround(b0, b1, kp); | 177 | *((u_int32_t*)temp[0]) = *((u_int32_t*)(b )) ^ *((u_int32_t*)rk[ROUNDS-1][0]); |
440 | f_nround(b1, b0, kp); f_nround(b0, b1, kp); | 178 | *((u_int32_t*)temp[1]) = *((u_int32_t*)(b+ 4)) ^ *((u_int32_t*)rk[ROUNDS-1][1]); |
441 | f_nround(b1, b0, kp); f_nround(b0, b1, kp); | 179 | *((u_int32_t*)temp[2]) = *((u_int32_t*)(b+ 8)) ^ *((u_int32_t*)rk[ROUNDS-1][2]); |
442 | f_nround(b1, b0, kp); f_nround(b0, b1, kp); | 180 | *((u_int32_t*)temp[3]) = *((u_int32_t*)(b+12)) ^ *((u_int32_t*)rk[ROUNDS-1][3]); |
443 | f_nround(b1, b0, kp); f_lround(b0, b1, kp); | 181 | b[ 0] = T1[temp[0][0]][1]; |
444 | 182 | b[ 1] = T1[temp[1][1]][1]; | |
445 | out_blk[0] = b0[0]; out_blk[1] = b0[1]; | 183 | b[ 2] = T1[temp[2][2]][1]; |
446 | out_blk[2] = b0[2]; out_blk[3] = b0[3]; | 184 | b[ 3] = T1[temp[3][3]][1]; |
185 | b[ 4] = T1[temp[1][0]][1]; | ||
186 | b[ 5] = T1[temp[2][1]][1]; | ||
187 | b[ 6] = T1[temp[3][2]][1]; | ||
188 | b[ 7] = T1[temp[0][3]][1]; | ||
189 | b[ 8] = T1[temp[2][0]][1]; | ||
190 | b[ 9] = T1[temp[3][1]][1]; | ||
191 | b[10] = T1[temp[0][2]][1]; | ||
192 | b[11] = T1[temp[1][3]][1]; | ||
193 | b[12] = T1[temp[3][0]][1]; | ||
194 | b[13] = T1[temp[0][1]][1]; | ||
195 | b[14] = T1[temp[1][2]][1]; | ||
196 | b[15] = T1[temp[2][3]][1]; | ||
197 | *((u_int32_t*)(b )) ^= *((u_int32_t*)rk[ROUNDS][0]); | ||
198 | *((u_int32_t*)(b+ 4)) ^= *((u_int32_t*)rk[ROUNDS][1]); | ||
199 | *((u_int32_t*)(b+ 8)) ^= *((u_int32_t*)rk[ROUNDS][2]); | ||
200 | *((u_int32_t*)(b+12)) ^= *((u_int32_t*)rk[ROUNDS][3]); | ||
201 | |||
202 | return 0; | ||
447 | } | 203 | } |
448 | 204 | ||
449 | /* decrypt a block of text */ | 205 | /** |
450 | 206 | * Decrypt a single block. | |
451 | #define i_nround(bo, bi, k) \ | 207 | */ |
452 | i_rn(bo, bi, 0, k); \ | 208 | int |
453 | i_rn(bo, bi, 1, k); \ | 209 | rijndael_decrypt(rijndael_key *key, u_int8_t a[16], u_int8_t b[16]) |
454 | i_rn(bo, bi, 2, k); \ | 210 | { |
455 | i_rn(bo, bi, 3, k); \ | 211 | u_int8_t (*rk)[4][4] = key->keySched; |
456 | k -= 4 | 212 | int ROUNDS = key->ROUNDS; |
457 | 213 | int r; | |
458 | #define i_lround(bo, bi, k) \ | 214 | u_int8_t temp[4][4]; |
459 | i_rl(bo, bi, 0, k); \ | 215 | |
460 | i_rl(bo, bi, 1, k); \ | 216 | *((u_int32_t*)temp[0]) = *((u_int32_t*)(a )) ^ *((u_int32_t*)rk[ROUNDS][0]); |
461 | i_rl(bo, bi, 2, k); \ | 217 | *((u_int32_t*)temp[1]) = *((u_int32_t*)(a+ 4)) ^ *((u_int32_t*)rk[ROUNDS][1]); |
462 | i_rl(bo, bi, 3, k) | 218 | *((u_int32_t*)temp[2]) = *((u_int32_t*)(a+ 8)) ^ *((u_int32_t*)rk[ROUNDS][2]); |
463 | 219 | *((u_int32_t*)temp[3]) = *((u_int32_t*)(a+12)) ^ *((u_int32_t*)rk[ROUNDS][3]); | |
464 | void | 220 | |
465 | rijndael_decrypt(rijndael_ctx *ctx, const u4byte *in_blk, u4byte *out_blk) | 221 | *((u_int32_t*)(b )) = *((u_int32_t*)T5[temp[0][0]]) |
466 | { | 222 | ^ *((u_int32_t*)T6[temp[3][1]]) |
467 | u4byte b0[4], b1[4], *kp; | 223 | ^ *((u_int32_t*)T7[temp[2][2]]) |
468 | u4byte k_len = ctx->k_len; | 224 | ^ *((u_int32_t*)T8[temp[1][3]]); |
469 | u4byte *e_key = ctx->e_key; | 225 | *((u_int32_t*)(b+ 4)) = *((u_int32_t*)T5[temp[1][0]]) |
470 | u4byte *d_key = ctx->d_key; | 226 | ^ *((u_int32_t*)T6[temp[0][1]]) |
471 | 227 | ^ *((u_int32_t*)T7[temp[3][2]]) | |
472 | b0[0] = in_blk[0] ^ e_key[4 * k_len + 24]; b0[1] = in_blk[1] ^ e_key[4 * k_len + 25]; | 228 | ^ *((u_int32_t*)T8[temp[2][3]]); |
473 | b0[2] = in_blk[2] ^ e_key[4 * k_len + 26]; b0[3] = in_blk[3] ^ e_key[4 * k_len + 27]; | 229 | *((u_int32_t*)(b+ 8)) = *((u_int32_t*)T5[temp[2][0]]) |
474 | 230 | ^ *((u_int32_t*)T6[temp[1][1]]) | |
475 | kp = d_key + 4 * (k_len + 5); | 231 | ^ *((u_int32_t*)T7[temp[0][2]]) |
476 | 232 | ^ *((u_int32_t*)T8[temp[3][3]]); | |
477 | if(k_len > 6) { | 233 | *((u_int32_t*)(b+12)) = *((u_int32_t*)T5[temp[3][0]]) |
478 | i_nround(b1, b0, kp); i_nround(b0, b1, kp); | 234 | ^ *((u_int32_t*)T6[temp[2][1]]) |
479 | } | 235 | ^ *((u_int32_t*)T7[temp[1][2]]) |
480 | 236 | ^ *((u_int32_t*)T8[temp[0][3]]); | |
481 | if(k_len > 4) { | 237 | for (r = ROUNDS-1; r > 1; r--) { |
482 | i_nround(b1, b0, kp); i_nround(b0, b1, kp); | 238 | *((u_int32_t*)temp[0]) = *((u_int32_t*)(b )) ^ *((u_int32_t*)rk[r][0]); |
239 | *((u_int32_t*)temp[1]) = *((u_int32_t*)(b+ 4)) ^ *((u_int32_t*)rk[r][1]); | ||
240 | *((u_int32_t*)temp[2]) = *((u_int32_t*)(b+ 8)) ^ *((u_int32_t*)rk[r][2]); | ||
241 | *((u_int32_t*)temp[3]) = *((u_int32_t*)(b+12)) ^ *((u_int32_t*)rk[r][3]); | ||
242 | *((u_int32_t*)(b )) = *((u_int32_t*)T5[temp[0][0]]) | ||
243 | ^ *((u_int32_t*)T6[temp[3][1]]) | ||
244 | ^ *((u_int32_t*)T7[temp[2][2]]) | ||
245 | ^ *((u_int32_t*)T8[temp[1][3]]); | ||
246 | *((u_int32_t*)(b+ 4)) = *((u_int32_t*)T5[temp[1][0]]) | ||
247 | ^ *((u_int32_t*)T6[temp[0][1]]) | ||
248 | ^ *((u_int32_t*)T7[temp[3][2]]) | ||
249 | ^ *((u_int32_t*)T8[temp[2][3]]); | ||
250 | *((u_int32_t*)(b+ 8)) = *((u_int32_t*)T5[temp[2][0]]) | ||
251 | ^ *((u_int32_t*)T6[temp[1][1]]) | ||
252 | ^ *((u_int32_t*)T7[temp[0][2]]) | ||
253 | ^ *((u_int32_t*)T8[temp[3][3]]); | ||
254 | *((u_int32_t*)(b+12)) = *((u_int32_t*)T5[temp[3][0]]) | ||
255 | ^ *((u_int32_t*)T6[temp[2][1]]) | ||
256 | ^ *((u_int32_t*)T7[temp[1][2]]) | ||
257 | ^ *((u_int32_t*)T8[temp[0][3]]); | ||
483 | } | 258 | } |
259 | /* last round is special */ | ||
260 | *((u_int32_t*)temp[0]) = *((u_int32_t*)(b )) ^ *((u_int32_t*)rk[1][0]); | ||
261 | *((u_int32_t*)temp[1]) = *((u_int32_t*)(b+ 4)) ^ *((u_int32_t*)rk[1][1]); | ||
262 | *((u_int32_t*)temp[2]) = *((u_int32_t*)(b+ 8)) ^ *((u_int32_t*)rk[1][2]); | ||
263 | *((u_int32_t*)temp[3]) = *((u_int32_t*)(b+12)) ^ *((u_int32_t*)rk[1][3]); | ||
264 | b[ 0] = S5[temp[0][0]]; | ||
265 | b[ 1] = S5[temp[3][1]]; | ||
266 | b[ 2] = S5[temp[2][2]]; | ||
267 | b[ 3] = S5[temp[1][3]]; | ||
268 | b[ 4] = S5[temp[1][0]]; | ||
269 | b[ 5] = S5[temp[0][1]]; | ||
270 | b[ 6] = S5[temp[3][2]]; | ||
271 | b[ 7] = S5[temp[2][3]]; | ||
272 | b[ 8] = S5[temp[2][0]]; | ||
273 | b[ 9] = S5[temp[1][1]]; | ||
274 | b[10] = S5[temp[0][2]]; | ||
275 | b[11] = S5[temp[3][3]]; | ||
276 | b[12] = S5[temp[3][0]]; | ||
277 | b[13] = S5[temp[2][1]]; | ||
278 | b[14] = S5[temp[1][2]]; | ||
279 | b[15] = S5[temp[0][3]]; | ||
280 | *((u_int32_t*)(b )) ^= *((u_int32_t*)rk[0][0]); | ||
281 | *((u_int32_t*)(b+ 4)) ^= *((u_int32_t*)rk[0][1]); | ||
282 | *((u_int32_t*)(b+ 8)) ^= *((u_int32_t*)rk[0][2]); | ||
283 | *((u_int32_t*)(b+12)) ^= *((u_int32_t*)rk[0][3]); | ||
284 | |||
285 | return 0; | ||
286 | } | ||
484 | 287 | ||
485 | i_nround(b1, b0, kp); i_nround(b0, b1, kp); | 288 | int |
486 | i_nround(b1, b0, kp); i_nround(b0, b1, kp); | 289 | rijndael_makekey(rijndael_key *key, int direction, int keyLen, u_int8_t *keyMaterial) |
487 | i_nround(b1, b0, kp); i_nround(b0, b1, kp); | 290 | { |
488 | i_nround(b1, b0, kp); i_nround(b0, b1, kp); | 291 | u_int8_t k[RIJNDAEL_MAXKC][4]; |
489 | i_nround(b1, b0, kp); i_lround(b0, b1, kp); | 292 | int i; |
490 | 293 | ||
491 | out_blk[0] = b0[0]; out_blk[1] = b0[1]; | 294 | if (key == NULL) |
492 | out_blk[2] = b0[2]; out_blk[3] = b0[3]; | 295 | return -1; |
296 | if ((direction != RIJNDAEL_ENCRYPT) && (direction != RIJNDAEL_DECRYPT)) | ||
297 | return -1; | ||
298 | if ((keyLen != 128) && (keyLen != 192) && (keyLen != 256)) | ||
299 | return -1; | ||
300 | |||
301 | key->ROUNDS = keyLen/32 + 6; | ||
302 | |||
303 | /* initialize key schedule: */ | ||
304 | for (i = 0; i < keyLen/8; i++) | ||
305 | k[i >> 2][i & 3] = (u_int8_t)keyMaterial[i]; | ||
306 | |||
307 | rijndael_keysched(k, key->keySched, key->ROUNDS); | ||
308 | if (direction == RIJNDAEL_DECRYPT) | ||
309 | rijndael_key_enc_to_dec(key->keySched, key->ROUNDS); | ||
310 | return 0; | ||
493 | } | 311 | } |
diff --git a/rijndael.h b/rijndael.h index 09c425742..75853cfff 100644 --- a/rijndael.h +++ b/rijndael.h | |||
@@ -1,33 +1,27 @@ | |||
1 | #ifndef _RIJNDAEL_H_ | 1 | /* |
2 | #define _RIJNDAEL_H_ | 2 | * rijndael-alg-fst.h v2.4 April '2000 |
3 | * rijndael-api-fst.h v2.4 April '2000 | ||
4 | * | ||
5 | * Optimised ANSI C code | ||
6 | * | ||
7 | */ | ||
3 | 8 | ||
4 | #include "config.h" | 9 | #ifndef RIJNDAEL_H |
10 | #define RIJNDAEL_H | ||
5 | 11 | ||
6 | /* 1. Standard types for AES cryptography source code */ | 12 | #define RIJNDAEL_MAXKC (256/32) |
13 | #define RIJNDAEL_MAXROUNDS 14 | ||
7 | 14 | ||
8 | typedef u_int8_t u1byte; /* an 8 bit unsigned character type */ | 15 | #define RIJNDAEL_ENCRYPT 0 |
9 | typedef u_int16_t u2byte; /* a 16 bit unsigned integer type */ | 16 | #define RIJNDAEL_DECRYPT 1 |
10 | typedef u_int32_t u4byte; /* a 32 bit unsigned integer type */ | ||
11 | 17 | ||
12 | typedef int8_t s1byte; /* an 8 bit signed character type */ | 18 | typedef struct { |
13 | typedef int16_t s2byte; /* a 16 bit signed integer type */ | 19 | int ROUNDS; /* key-length-dependent number of rounds */ |
14 | typedef int32_t s4byte; /* a 32 bit signed integer type */ | 20 | u_int8_t keySched[RIJNDAEL_MAXROUNDS+1][4][4]; |
21 | } rijndael_key; | ||
15 | 22 | ||
16 | typedef struct _rijndael_ctx { | 23 | int rijndael_encrypt(rijndael_key *key, u_int8_t a[16], u_int8_t b[16]); |
17 | u4byte k_len; | 24 | int rijndael_decrypt(rijndael_key *key, u_int8_t a[16], u_int8_t b[16]); |
18 | int decrypt; | 25 | int rijndael_makekey(rijndael_key *key, int direction, int keyLen, u_int8_t *keyMaterial); |
19 | u4byte e_key[64]; | ||
20 | u4byte d_key[64]; | ||
21 | } rijndael_ctx; | ||
22 | 26 | ||
23 | 27 | #endif | |
24 | /* 2. Standard interface for AES cryptographic routines */ | ||
25 | |||
26 | /* These are all based on 32 bit unsigned values and will therefore */ | ||
27 | /* require endian conversions for big-endian architectures */ | ||
28 | |||
29 | rijndael_ctx *rijndael_set_key __P((rijndael_ctx *, const u4byte *, u4byte, int)); | ||
30 | void rijndael_encrypt __P((rijndael_ctx *, const u4byte *, u4byte *)); | ||
31 | void rijndael_decrypt __P((rijndael_ctx *, const u4byte *, u4byte *)); | ||
32 | |||
33 | #endif /* _RIJNDAEL_H_ */ | ||
diff --git a/rijndael_boxes.h b/rijndael_boxes.h new file mode 100644 index 000000000..ab08de5c1 --- /dev/null +++ b/rijndael_boxes.h | |||
@@ -0,0 +1,894 @@ | |||
1 | static const u_int8_t S[256] = { | ||
2 | 99, 124, 119, 123, 242, 107, 111, 197, 48, 1, 103, 43, 254, 215, 171, 118, | ||
3 | 202, 130, 201, 125, 250, 89, 71, 240, 173, 212, 162, 175, 156, 164, 114, 192, | ||
4 | 183, 253, 147, 38, 54, 63, 247, 204, 52, 165, 229, 241, 113, 216, 49, 21, | ||
5 | 4, 199, 35, 195, 24, 150, 5, 154, 7, 18, 128, 226, 235, 39, 178, 117, | ||
6 | 9, 131, 44, 26, 27, 110, 90, 160, 82, 59, 214, 179, 41, 227, 47, 132, | ||
7 | 83, 209, 0, 237, 32, 252, 177, 91, 106, 203, 190, 57, 74, 76, 88, 207, | ||
8 | 208, 239, 170, 251, 67, 77, 51, 133, 69, 249, 2, 127, 80, 60, 159, 168, | ||
9 | 81, 163, 64, 143, 146, 157, 56, 245, 188, 182, 218, 33, 16, 255, 243, 210, | ||
10 | 205, 12, 19, 236, 95, 151, 68, 23, 196, 167, 126, 61, 100, 93, 25, 115, | ||
11 | 96, 129, 79, 220, 34, 42, 144, 136, 70, 238, 184, 20, 222, 94, 11, 219, | ||
12 | 224, 50, 58, 10, 73, 6, 36, 92, 194, 211, 172, 98, 145, 149, 228, 121, | ||
13 | 231, 200, 55, 109, 141, 213, 78, 169, 108, 86, 244, 234, 101, 122, 174, 8, | ||
14 | 186, 120, 37, 46, 28, 166, 180, 198, 232, 221, 116, 31, 75, 189, 139, 138, | ||
15 | 112, 62, 181, 102, 72, 3, 246, 14, 97, 53, 87, 185, 134, 193, 29, 158, | ||
16 | 225, 248, 152, 17, 105, 217, 142, 148, 155, 30, 135, 233, 206, 85, 40, 223, | ||
17 | 140, 161, 137, 13, 191, 230, 66, 104, 65, 153, 45, 15, 176, 84, 187, 22 | ||
18 | }; | ||
19 | |||
20 | static const u_int8_t T1[256][4] = { | ||
21 | {0xc6,0x63,0x63,0xa5}, {0xf8,0x7c,0x7c,0x84}, {0xee,0x77,0x77,0x99}, {0xf6,0x7b,0x7b,0x8d}, | ||
22 | {0xff,0xf2,0xf2,0x0d}, {0xd6,0x6b,0x6b,0xbd}, {0xde,0x6f,0x6f,0xb1}, {0x91,0xc5,0xc5,0x54}, | ||
23 | {0x60,0x30,0x30,0x50}, {0x02,0x01,0x01,0x03}, {0xce,0x67,0x67,0xa9}, {0x56,0x2b,0x2b,0x7d}, | ||
24 | {0xe7,0xfe,0xfe,0x19}, {0xb5,0xd7,0xd7,0x62}, {0x4d,0xab,0xab,0xe6}, {0xec,0x76,0x76,0x9a}, | ||
25 | {0x8f,0xca,0xca,0x45}, {0x1f,0x82,0x82,0x9d}, {0x89,0xc9,0xc9,0x40}, {0xfa,0x7d,0x7d,0x87}, | ||
26 | {0xef,0xfa,0xfa,0x15}, {0xb2,0x59,0x59,0xeb}, {0x8e,0x47,0x47,0xc9}, {0xfb,0xf0,0xf0,0x0b}, | ||
27 | {0x41,0xad,0xad,0xec}, {0xb3,0xd4,0xd4,0x67}, {0x5f,0xa2,0xa2,0xfd}, {0x45,0xaf,0xaf,0xea}, | ||
28 | {0x23,0x9c,0x9c,0xbf}, {0x53,0xa4,0xa4,0xf7}, {0xe4,0x72,0x72,0x96}, {0x9b,0xc0,0xc0,0x5b}, | ||
29 | {0x75,0xb7,0xb7,0xc2}, {0xe1,0xfd,0xfd,0x1c}, {0x3d,0x93,0x93,0xae}, {0x4c,0x26,0x26,0x6a}, | ||
30 | {0x6c,0x36,0x36,0x5a}, {0x7e,0x3f,0x3f,0x41}, {0xf5,0xf7,0xf7,0x02}, {0x83,0xcc,0xcc,0x4f}, | ||
31 | {0x68,0x34,0x34,0x5c}, {0x51,0xa5,0xa5,0xf4}, {0xd1,0xe5,0xe5,0x34}, {0xf9,0xf1,0xf1,0x08}, | ||
32 | {0xe2,0x71,0x71,0x93}, {0xab,0xd8,0xd8,0x73}, {0x62,0x31,0x31,0x53}, {0x2a,0x15,0x15,0x3f}, | ||
33 | {0x08,0x04,0x04,0x0c}, {0x95,0xc7,0xc7,0x52}, {0x46,0x23,0x23,0x65}, {0x9d,0xc3,0xc3,0x5e}, | ||
34 | {0x30,0x18,0x18,0x28}, {0x37,0x96,0x96,0xa1}, {0x0a,0x05,0x05,0x0f}, {0x2f,0x9a,0x9a,0xb5}, | ||
35 | {0x0e,0x07,0x07,0x09}, {0x24,0x12,0x12,0x36}, {0x1b,0x80,0x80,0x9b}, {0xdf,0xe2,0xe2,0x3d}, | ||
36 | {0xcd,0xeb,0xeb,0x26}, {0x4e,0x27,0x27,0x69}, {0x7f,0xb2,0xb2,0xcd}, {0xea,0x75,0x75,0x9f}, | ||
37 | {0x12,0x09,0x09,0x1b}, {0x1d,0x83,0x83,0x9e}, {0x58,0x2c,0x2c,0x74}, {0x34,0x1a,0x1a,0x2e}, | ||
38 | {0x36,0x1b,0x1b,0x2d}, {0xdc,0x6e,0x6e,0xb2}, {0xb4,0x5a,0x5a,0xee}, {0x5b,0xa0,0xa0,0xfb}, | ||
39 | {0xa4,0x52,0x52,0xf6}, {0x76,0x3b,0x3b,0x4d}, {0xb7,0xd6,0xd6,0x61}, {0x7d,0xb3,0xb3,0xce}, | ||
40 | {0x52,0x29,0x29,0x7b}, {0xdd,0xe3,0xe3,0x3e}, {0x5e,0x2f,0x2f,0x71}, {0x13,0x84,0x84,0x97}, | ||
41 | {0xa6,0x53,0x53,0xf5}, {0xb9,0xd1,0xd1,0x68}, {0x00,0x00,0x00,0x00}, {0xc1,0xed,0xed,0x2c}, | ||
42 | {0x40,0x20,0x20,0x60}, {0xe3,0xfc,0xfc,0x1f}, {0x79,0xb1,0xb1,0xc8}, {0xb6,0x5b,0x5b,0xed}, | ||
43 | {0xd4,0x6a,0x6a,0xbe}, {0x8d,0xcb,0xcb,0x46}, {0x67,0xbe,0xbe,0xd9}, {0x72,0x39,0x39,0x4b}, | ||
44 | {0x94,0x4a,0x4a,0xde}, {0x98,0x4c,0x4c,0xd4}, {0xb0,0x58,0x58,0xe8}, {0x85,0xcf,0xcf,0x4a}, | ||
45 | {0xbb,0xd0,0xd0,0x6b}, {0xc5,0xef,0xef,0x2a}, {0x4f,0xaa,0xaa,0xe5}, {0xed,0xfb,0xfb,0x16}, | ||
46 | {0x86,0x43,0x43,0xc5}, {0x9a,0x4d,0x4d,0xd7}, {0x66,0x33,0x33,0x55}, {0x11,0x85,0x85,0x94}, | ||
47 | {0x8a,0x45,0x45,0xcf}, {0xe9,0xf9,0xf9,0x10}, {0x04,0x02,0x02,0x06}, {0xfe,0x7f,0x7f,0x81}, | ||
48 | {0xa0,0x50,0x50,0xf0}, {0x78,0x3c,0x3c,0x44}, {0x25,0x9f,0x9f,0xba}, {0x4b,0xa8,0xa8,0xe3}, | ||
49 | {0xa2,0x51,0x51,0xf3}, {0x5d,0xa3,0xa3,0xfe}, {0x80,0x40,0x40,0xc0}, {0x05,0x8f,0x8f,0x8a}, | ||
50 | {0x3f,0x92,0x92,0xad}, {0x21,0x9d,0x9d,0xbc}, {0x70,0x38,0x38,0x48}, {0xf1,0xf5,0xf5,0x04}, | ||
51 | {0x63,0xbc,0xbc,0xdf}, {0x77,0xb6,0xb6,0xc1}, {0xaf,0xda,0xda,0x75}, {0x42,0x21,0x21,0x63}, | ||
52 | {0x20,0x10,0x10,0x30}, {0xe5,0xff,0xff,0x1a}, {0xfd,0xf3,0xf3,0x0e}, {0xbf,0xd2,0xd2,0x6d}, | ||
53 | {0x81,0xcd,0xcd,0x4c}, {0x18,0x0c,0x0c,0x14}, {0x26,0x13,0x13,0x35}, {0xc3,0xec,0xec,0x2f}, | ||
54 | {0xbe,0x5f,0x5f,0xe1}, {0x35,0x97,0x97,0xa2}, {0x88,0x44,0x44,0xcc}, {0x2e,0x17,0x17,0x39}, | ||
55 | {0x93,0xc4,0xc4,0x57}, {0x55,0xa7,0xa7,0xf2}, {0xfc,0x7e,0x7e,0x82}, {0x7a,0x3d,0x3d,0x47}, | ||
56 | {0xc8,0x64,0x64,0xac}, {0xba,0x5d,0x5d,0xe7}, {0x32,0x19,0x19,0x2b}, {0xe6,0x73,0x73,0x95}, | ||
57 | {0xc0,0x60,0x60,0xa0}, {0x19,0x81,0x81,0x98}, {0x9e,0x4f,0x4f,0xd1}, {0xa3,0xdc,0xdc,0x7f}, | ||
58 | {0x44,0x22,0x22,0x66}, {0x54,0x2a,0x2a,0x7e}, {0x3b,0x90,0x90,0xab}, {0x0b,0x88,0x88,0x83}, | ||
59 | {0x8c,0x46,0x46,0xca}, {0xc7,0xee,0xee,0x29}, {0x6b,0xb8,0xb8,0xd3}, {0x28,0x14,0x14,0x3c}, | ||
60 | {0xa7,0xde,0xde,0x79}, {0xbc,0x5e,0x5e,0xe2}, {0x16,0x0b,0x0b,0x1d}, {0xad,0xdb,0xdb,0x76}, | ||
61 | {0xdb,0xe0,0xe0,0x3b}, {0x64,0x32,0x32,0x56}, {0x74,0x3a,0x3a,0x4e}, {0x14,0x0a,0x0a,0x1e}, | ||
62 | {0x92,0x49,0x49,0xdb}, {0x0c,0x06,0x06,0x0a}, {0x48,0x24,0x24,0x6c}, {0xb8,0x5c,0x5c,0xe4}, | ||
63 | {0x9f,0xc2,0xc2,0x5d}, {0xbd,0xd3,0xd3,0x6e}, {0x43,0xac,0xac,0xef}, {0xc4,0x62,0x62,0xa6}, | ||
64 | {0x39,0x91,0x91,0xa8}, {0x31,0x95,0x95,0xa4}, {0xd3,0xe4,0xe4,0x37}, {0xf2,0x79,0x79,0x8b}, | ||
65 | {0xd5,0xe7,0xe7,0x32}, {0x8b,0xc8,0xc8,0x43}, {0x6e,0x37,0x37,0x59}, {0xda,0x6d,0x6d,0xb7}, | ||
66 | {0x01,0x8d,0x8d,0x8c}, {0xb1,0xd5,0xd5,0x64}, {0x9c,0x4e,0x4e,0xd2}, {0x49,0xa9,0xa9,0xe0}, | ||
67 | {0xd8,0x6c,0x6c,0xb4}, {0xac,0x56,0x56,0xfa}, {0xf3,0xf4,0xf4,0x07}, {0xcf,0xea,0xea,0x25}, | ||
68 | {0xca,0x65,0x65,0xaf}, {0xf4,0x7a,0x7a,0x8e}, {0x47,0xae,0xae,0xe9}, {0x10,0x08,0x08,0x18}, | ||
69 | {0x6f,0xba,0xba,0xd5}, {0xf0,0x78,0x78,0x88}, {0x4a,0x25,0x25,0x6f}, {0x5c,0x2e,0x2e,0x72}, | ||
70 | {0x38,0x1c,0x1c,0x24}, {0x57,0xa6,0xa6,0xf1}, {0x73,0xb4,0xb4,0xc7}, {0x97,0xc6,0xc6,0x51}, | ||
71 | {0xcb,0xe8,0xe8,0x23}, {0xa1,0xdd,0xdd,0x7c}, {0xe8,0x74,0x74,0x9c}, {0x3e,0x1f,0x1f,0x21}, | ||
72 | {0x96,0x4b,0x4b,0xdd}, {0x61,0xbd,0xbd,0xdc}, {0x0d,0x8b,0x8b,0x86}, {0x0f,0x8a,0x8a,0x85}, | ||
73 | {0xe0,0x70,0x70,0x90}, {0x7c,0x3e,0x3e,0x42}, {0x71,0xb5,0xb5,0xc4}, {0xcc,0x66,0x66,0xaa}, | ||
74 | {0x90,0x48,0x48,0xd8}, {0x06,0x03,0x03,0x05}, {0xf7,0xf6,0xf6,0x01}, {0x1c,0x0e,0x0e,0x12}, | ||
75 | {0xc2,0x61,0x61,0xa3}, {0x6a,0x35,0x35,0x5f}, {0xae,0x57,0x57,0xf9}, {0x69,0xb9,0xb9,0xd0}, | ||
76 | {0x17,0x86,0x86,0x91}, {0x99,0xc1,0xc1,0x58}, {0x3a,0x1d,0x1d,0x27}, {0x27,0x9e,0x9e,0xb9}, | ||
77 | {0xd9,0xe1,0xe1,0x38}, {0xeb,0xf8,0xf8,0x13}, {0x2b,0x98,0x98,0xb3}, {0x22,0x11,0x11,0x33}, | ||
78 | {0xd2,0x69,0x69,0xbb}, {0xa9,0xd9,0xd9,0x70}, {0x07,0x8e,0x8e,0x89}, {0x33,0x94,0x94,0xa7}, | ||
79 | {0x2d,0x9b,0x9b,0xb6}, {0x3c,0x1e,0x1e,0x22}, {0x15,0x87,0x87,0x92}, {0xc9,0xe9,0xe9,0x20}, | ||
80 | {0x87,0xce,0xce,0x49}, {0xaa,0x55,0x55,0xff}, {0x50,0x28,0x28,0x78}, {0xa5,0xdf,0xdf,0x7a}, | ||
81 | {0x03,0x8c,0x8c,0x8f}, {0x59,0xa1,0xa1,0xf8}, {0x09,0x89,0x89,0x80}, {0x1a,0x0d,0x0d,0x17}, | ||
82 | {0x65,0xbf,0xbf,0xda}, {0xd7,0xe6,0xe6,0x31}, {0x84,0x42,0x42,0xc6}, {0xd0,0x68,0x68,0xb8}, | ||
83 | {0x82,0x41,0x41,0xc3}, {0x29,0x99,0x99,0xb0}, {0x5a,0x2d,0x2d,0x77}, {0x1e,0x0f,0x0f,0x11}, | ||
84 | {0x7b,0xb0,0xb0,0xcb}, {0xa8,0x54,0x54,0xfc}, {0x6d,0xbb,0xbb,0xd6}, {0x2c,0x16,0x16,0x3a} | ||
85 | }; | ||
86 | |||
87 | static const u_int8_t T2[256][4] = { | ||
88 | {0xa5,0xc6,0x63,0x63}, {0x84,0xf8,0x7c,0x7c}, {0x99,0xee,0x77,0x77}, {0x8d,0xf6,0x7b,0x7b}, | ||
89 | {0x0d,0xff,0xf2,0xf2}, {0xbd,0xd6,0x6b,0x6b}, {0xb1,0xde,0x6f,0x6f}, {0x54,0x91,0xc5,0xc5}, | ||
90 | {0x50,0x60,0x30,0x30}, {0x03,0x02,0x01,0x01}, {0xa9,0xce,0x67,0x67}, {0x7d,0x56,0x2b,0x2b}, | ||
91 | {0x19,0xe7,0xfe,0xfe}, {0x62,0xb5,0xd7,0xd7}, {0xe6,0x4d,0xab,0xab}, {0x9a,0xec,0x76,0x76}, | ||
92 | {0x45,0x8f,0xca,0xca}, {0x9d,0x1f,0x82,0x82}, {0x40,0x89,0xc9,0xc9}, {0x87,0xfa,0x7d,0x7d}, | ||
93 | {0x15,0xef,0xfa,0xfa}, {0xeb,0xb2,0x59,0x59}, {0xc9,0x8e,0x47,0x47}, {0x0b,0xfb,0xf0,0xf0}, | ||
94 | {0xec,0x41,0xad,0xad}, {0x67,0xb3,0xd4,0xd4}, {0xfd,0x5f,0xa2,0xa2}, {0xea,0x45,0xaf,0xaf}, | ||
95 | {0xbf,0x23,0x9c,0x9c}, {0xf7,0x53,0xa4,0xa4}, {0x96,0xe4,0x72,0x72}, {0x5b,0x9b,0xc0,0xc0}, | ||
96 | {0xc2,0x75,0xb7,0xb7}, {0x1c,0xe1,0xfd,0xfd}, {0xae,0x3d,0x93,0x93}, {0x6a,0x4c,0x26,0x26}, | ||
97 | {0x5a,0x6c,0x36,0x36}, {0x41,0x7e,0x3f,0x3f}, {0x02,0xf5,0xf7,0xf7}, {0x4f,0x83,0xcc,0xcc}, | ||
98 | {0x5c,0x68,0x34,0x34}, {0xf4,0x51,0xa5,0xa5}, {0x34,0xd1,0xe5,0xe5}, {0x08,0xf9,0xf1,0xf1}, | ||
99 | {0x93,0xe2,0x71,0x71}, {0x73,0xab,0xd8,0xd8}, {0x53,0x62,0x31,0x31}, {0x3f,0x2a,0x15,0x15}, | ||
100 | {0x0c,0x08,0x04,0x04}, {0x52,0x95,0xc7,0xc7}, {0x65,0x46,0x23,0x23}, {0x5e,0x9d,0xc3,0xc3}, | ||
101 | {0x28,0x30,0x18,0x18}, {0xa1,0x37,0x96,0x96}, {0x0f,0x0a,0x05,0x05}, {0xb5,0x2f,0x9a,0x9a}, | ||
102 | {0x09,0x0e,0x07,0x07}, {0x36,0x24,0x12,0x12}, {0x9b,0x1b,0x80,0x80}, {0x3d,0xdf,0xe2,0xe2}, | ||
103 | {0x26,0xcd,0xeb,0xeb}, {0x69,0x4e,0x27,0x27}, {0xcd,0x7f,0xb2,0xb2}, {0x9f,0xea,0x75,0x75}, | ||
104 | {0x1b,0x12,0x09,0x09}, {0x9e,0x1d,0x83,0x83}, {0x74,0x58,0x2c,0x2c}, {0x2e,0x34,0x1a,0x1a}, | ||
105 | {0x2d,0x36,0x1b,0x1b}, {0xb2,0xdc,0x6e,0x6e}, {0xee,0xb4,0x5a,0x5a}, {0xfb,0x5b,0xa0,0xa0}, | ||
106 | {0xf6,0xa4,0x52,0x52}, {0x4d,0x76,0x3b,0x3b}, {0x61,0xb7,0xd6,0xd6}, {0xce,0x7d,0xb3,0xb3}, | ||
107 | {0x7b,0x52,0x29,0x29}, {0x3e,0xdd,0xe3,0xe3}, {0x71,0x5e,0x2f,0x2f}, {0x97,0x13,0x84,0x84}, | ||
108 | {0xf5,0xa6,0x53,0x53}, {0x68,0xb9,0xd1,0xd1}, {0x00,0x00,0x00,0x00}, {0x2c,0xc1,0xed,0xed}, | ||
109 | {0x60,0x40,0x20,0x20}, {0x1f,0xe3,0xfc,0xfc}, {0xc8,0x79,0xb1,0xb1}, {0xed,0xb6,0x5b,0x5b}, | ||
110 | {0xbe,0xd4,0x6a,0x6a}, {0x46,0x8d,0xcb,0xcb}, {0xd9,0x67,0xbe,0xbe}, {0x4b,0x72,0x39,0x39}, | ||
111 | {0xde,0x94,0x4a,0x4a}, {0xd4,0x98,0x4c,0x4c}, {0xe8,0xb0,0x58,0x58}, {0x4a,0x85,0xcf,0xcf}, | ||
112 | {0x6b,0xbb,0xd0,0xd0}, {0x2a,0xc5,0xef,0xef}, {0xe5,0x4f,0xaa,0xaa}, {0x16,0xed,0xfb,0xfb}, | ||
113 | {0xc5,0x86,0x43,0x43}, {0xd7,0x9a,0x4d,0x4d}, {0x55,0x66,0x33,0x33}, {0x94,0x11,0x85,0x85}, | ||
114 | {0xcf,0x8a,0x45,0x45}, {0x10,0xe9,0xf9,0xf9}, {0x06,0x04,0x02,0x02}, {0x81,0xfe,0x7f,0x7f}, | ||
115 | {0xf0,0xa0,0x50,0x50}, {0x44,0x78,0x3c,0x3c}, {0xba,0x25,0x9f,0x9f}, {0xe3,0x4b,0xa8,0xa8}, | ||
116 | {0xf3,0xa2,0x51,0x51}, {0xfe,0x5d,0xa3,0xa3}, {0xc0,0x80,0x40,0x40}, {0x8a,0x05,0x8f,0x8f}, | ||
117 | {0xad,0x3f,0x92,0x92}, {0xbc,0x21,0x9d,0x9d}, {0x48,0x70,0x38,0x38}, {0x04,0xf1,0xf5,0xf5}, | ||
118 | {0xdf,0x63,0xbc,0xbc}, {0xc1,0x77,0xb6,0xb6}, {0x75,0xaf,0xda,0xda}, {0x63,0x42,0x21,0x21}, | ||
119 | {0x30,0x20,0x10,0x10}, {0x1a,0xe5,0xff,0xff}, {0x0e,0xfd,0xf3,0xf3}, {0x6d,0xbf,0xd2,0xd2}, | ||
120 | {0x4c,0x81,0xcd,0xcd}, {0x14,0x18,0x0c,0x0c}, {0x35,0x26,0x13,0x13}, {0x2f,0xc3,0xec,0xec}, | ||
121 | {0xe1,0xbe,0x5f,0x5f}, {0xa2,0x35,0x97,0x97}, {0xcc,0x88,0x44,0x44}, {0x39,0x2e,0x17,0x17}, | ||
122 | {0x57,0x93,0xc4,0xc4}, {0xf2,0x55,0xa7,0xa7}, {0x82,0xfc,0x7e,0x7e}, {0x47,0x7a,0x3d,0x3d}, | ||
123 | {0xac,0xc8,0x64,0x64}, {0xe7,0xba,0x5d,0x5d}, {0x2b,0x32,0x19,0x19}, {0x95,0xe6,0x73,0x73}, | ||
124 | {0xa0,0xc0,0x60,0x60}, {0x98,0x19,0x81,0x81}, {0xd1,0x9e,0x4f,0x4f}, {0x7f,0xa3,0xdc,0xdc}, | ||
125 | {0x66,0x44,0x22,0x22}, {0x7e,0x54,0x2a,0x2a}, {0xab,0x3b,0x90,0x90}, {0x83,0x0b,0x88,0x88}, | ||
126 | {0xca,0x8c,0x46,0x46}, {0x29,0xc7,0xee,0xee}, {0xd3,0x6b,0xb8,0xb8}, {0x3c,0x28,0x14,0x14}, | ||
127 | {0x79,0xa7,0xde,0xde}, {0xe2,0xbc,0x5e,0x5e}, {0x1d,0x16,0x0b,0x0b}, {0x76,0xad,0xdb,0xdb}, | ||
128 | {0x3b,0xdb,0xe0,0xe0}, {0x56,0x64,0x32,0x32}, {0x4e,0x74,0x3a,0x3a}, {0x1e,0x14,0x0a,0x0a}, | ||
129 | {0xdb,0x92,0x49,0x49}, {0x0a,0x0c,0x06,0x06}, {0x6c,0x48,0x24,0x24}, {0xe4,0xb8,0x5c,0x5c}, | ||
130 | {0x5d,0x9f,0xc2,0xc2}, {0x6e,0xbd,0xd3,0xd3}, {0xef,0x43,0xac,0xac}, {0xa6,0xc4,0x62,0x62}, | ||
131 | {0xa8,0x39,0x91,0x91}, {0xa4,0x31,0x95,0x95}, {0x37,0xd3,0xe4,0xe4}, {0x8b,0xf2,0x79,0x79}, | ||
132 | {0x32,0xd5,0xe7,0xe7}, {0x43,0x8b,0xc8,0xc8}, {0x59,0x6e,0x37,0x37}, {0xb7,0xda,0x6d,0x6d}, | ||
133 | {0x8c,0x01,0x8d,0x8d}, {0x64,0xb1,0xd5,0xd5}, {0xd2,0x9c,0x4e,0x4e}, {0xe0,0x49,0xa9,0xa9}, | ||
134 | {0xb4,0xd8,0x6c,0x6c}, {0xfa,0xac,0x56,0x56}, {0x07,0xf3,0xf4,0xf4}, {0x25,0xcf,0xea,0xea}, | ||
135 | {0xaf,0xca,0x65,0x65}, {0x8e,0xf4,0x7a,0x7a}, {0xe9,0x47,0xae,0xae}, {0x18,0x10,0x08,0x08}, | ||
136 | {0xd5,0x6f,0xba,0xba}, {0x88,0xf0,0x78,0x78}, {0x6f,0x4a,0x25,0x25}, {0x72,0x5c,0x2e,0x2e}, | ||
137 | {0x24,0x38,0x1c,0x1c}, {0xf1,0x57,0xa6,0xa6}, {0xc7,0x73,0xb4,0xb4}, {0x51,0x97,0xc6,0xc6}, | ||
138 | {0x23,0xcb,0xe8,0xe8}, {0x7c,0xa1,0xdd,0xdd}, {0x9c,0xe8,0x74,0x74}, {0x21,0x3e,0x1f,0x1f}, | ||
139 | {0xdd,0x96,0x4b,0x4b}, {0xdc,0x61,0xbd,0xbd}, {0x86,0x0d,0x8b,0x8b}, {0x85,0x0f,0x8a,0x8a}, | ||
140 | {0x90,0xe0,0x70,0x70}, {0x42,0x7c,0x3e,0x3e}, {0xc4,0x71,0xb5,0xb5}, {0xaa,0xcc,0x66,0x66}, | ||
141 | {0xd8,0x90,0x48,0x48}, {0x05,0x06,0x03,0x03}, {0x01,0xf7,0xf6,0xf6}, {0x12,0x1c,0x0e,0x0e}, | ||
142 | {0xa3,0xc2,0x61,0x61}, {0x5f,0x6a,0x35,0x35}, {0xf9,0xae,0x57,0x57}, {0xd0,0x69,0xb9,0xb9}, | ||
143 | {0x91,0x17,0x86,0x86}, {0x58,0x99,0xc1,0xc1}, {0x27,0x3a,0x1d,0x1d}, {0xb9,0x27,0x9e,0x9e}, | ||
144 | {0x38,0xd9,0xe1,0xe1}, {0x13,0xeb,0xf8,0xf8}, {0xb3,0x2b,0x98,0x98}, {0x33,0x22,0x11,0x11}, | ||
145 | {0xbb,0xd2,0x69,0x69}, {0x70,0xa9,0xd9,0xd9}, {0x89,0x07,0x8e,0x8e}, {0xa7,0x33,0x94,0x94}, | ||
146 | {0xb6,0x2d,0x9b,0x9b}, {0x22,0x3c,0x1e,0x1e}, {0x92,0x15,0x87,0x87}, {0x20,0xc9,0xe9,0xe9}, | ||
147 | {0x49,0x87,0xce,0xce}, {0xff,0xaa,0x55,0x55}, {0x78,0x50,0x28,0x28}, {0x7a,0xa5,0xdf,0xdf}, | ||
148 | {0x8f,0x03,0x8c,0x8c}, {0xf8,0x59,0xa1,0xa1}, {0x80,0x09,0x89,0x89}, {0x17,0x1a,0x0d,0x0d}, | ||
149 | {0xda,0x65,0xbf,0xbf}, {0x31,0xd7,0xe6,0xe6}, {0xc6,0x84,0x42,0x42}, {0xb8,0xd0,0x68,0x68}, | ||
150 | {0xc3,0x82,0x41,0x41}, {0xb0,0x29,0x99,0x99}, {0x77,0x5a,0x2d,0x2d}, {0x11,0x1e,0x0f,0x0f}, | ||
151 | {0xcb,0x7b,0xb0,0xb0}, {0xfc,0xa8,0x54,0x54}, {0xd6,0x6d,0xbb,0xbb}, {0x3a,0x2c,0x16,0x16} | ||
152 | }; | ||
153 | |||
154 | static const u_int8_t T3[256][4] = { | ||
155 | {0x63,0xa5,0xc6,0x63}, {0x7c,0x84,0xf8,0x7c}, {0x77,0x99,0xee,0x77}, {0x7b,0x8d,0xf6,0x7b}, | ||
156 | {0xf2,0x0d,0xff,0xf2}, {0x6b,0xbd,0xd6,0x6b}, {0x6f,0xb1,0xde,0x6f}, {0xc5,0x54,0x91,0xc5}, | ||
157 | {0x30,0x50,0x60,0x30}, {0x01,0x03,0x02,0x01}, {0x67,0xa9,0xce,0x67}, {0x2b,0x7d,0x56,0x2b}, | ||
158 | {0xfe,0x19,0xe7,0xfe}, {0xd7,0x62,0xb5,0xd7}, {0xab,0xe6,0x4d,0xab}, {0x76,0x9a,0xec,0x76}, | ||
159 | {0xca,0x45,0x8f,0xca}, {0x82,0x9d,0x1f,0x82}, {0xc9,0x40,0x89,0xc9}, {0x7d,0x87,0xfa,0x7d}, | ||
160 | {0xfa,0x15,0xef,0xfa}, {0x59,0xeb,0xb2,0x59}, {0x47,0xc9,0x8e,0x47}, {0xf0,0x0b,0xfb,0xf0}, | ||
161 | {0xad,0xec,0x41,0xad}, {0xd4,0x67,0xb3,0xd4}, {0xa2,0xfd,0x5f,0xa2}, {0xaf,0xea,0x45,0xaf}, | ||
162 | {0x9c,0xbf,0x23,0x9c}, {0xa4,0xf7,0x53,0xa4}, {0x72,0x96,0xe4,0x72}, {0xc0,0x5b,0x9b,0xc0}, | ||
163 | {0xb7,0xc2,0x75,0xb7}, {0xfd,0x1c,0xe1,0xfd}, {0x93,0xae,0x3d,0x93}, {0x26,0x6a,0x4c,0x26}, | ||
164 | {0x36,0x5a,0x6c,0x36}, {0x3f,0x41,0x7e,0x3f}, {0xf7,0x02,0xf5,0xf7}, {0xcc,0x4f,0x83,0xcc}, | ||
165 | {0x34,0x5c,0x68,0x34}, {0xa5,0xf4,0x51,0xa5}, {0xe5,0x34,0xd1,0xe5}, {0xf1,0x08,0xf9,0xf1}, | ||
166 | {0x71,0x93,0xe2,0x71}, {0xd8,0x73,0xab,0xd8}, {0x31,0x53,0x62,0x31}, {0x15,0x3f,0x2a,0x15}, | ||
167 | {0x04,0x0c,0x08,0x04}, {0xc7,0x52,0x95,0xc7}, {0x23,0x65,0x46,0x23}, {0xc3,0x5e,0x9d,0xc3}, | ||
168 | {0x18,0x28,0x30,0x18}, {0x96,0xa1,0x37,0x96}, {0x05,0x0f,0x0a,0x05}, {0x9a,0xb5,0x2f,0x9a}, | ||
169 | {0x07,0x09,0x0e,0x07}, {0x12,0x36,0x24,0x12}, {0x80,0x9b,0x1b,0x80}, {0xe2,0x3d,0xdf,0xe2}, | ||
170 | {0xeb,0x26,0xcd,0xeb}, {0x27,0x69,0x4e,0x27}, {0xb2,0xcd,0x7f,0xb2}, {0x75,0x9f,0xea,0x75}, | ||
171 | {0x09,0x1b,0x12,0x09}, {0x83,0x9e,0x1d,0x83}, {0x2c,0x74,0x58,0x2c}, {0x1a,0x2e,0x34,0x1a}, | ||
172 | {0x1b,0x2d,0x36,0x1b}, {0x6e,0xb2,0xdc,0x6e}, {0x5a,0xee,0xb4,0x5a}, {0xa0,0xfb,0x5b,0xa0}, | ||
173 | {0x52,0xf6,0xa4,0x52}, {0x3b,0x4d,0x76,0x3b}, {0xd6,0x61,0xb7,0xd6}, {0xb3,0xce,0x7d,0xb3}, | ||
174 | {0x29,0x7b,0x52,0x29}, {0xe3,0x3e,0xdd,0xe3}, {0x2f,0x71,0x5e,0x2f}, {0x84,0x97,0x13,0x84}, | ||
175 | {0x53,0xf5,0xa6,0x53}, {0xd1,0x68,0xb9,0xd1}, {0x00,0x00,0x00,0x00}, {0xed,0x2c,0xc1,0xed}, | ||
176 | {0x20,0x60,0x40,0x20}, {0xfc,0x1f,0xe3,0xfc}, {0xb1,0xc8,0x79,0xb1}, {0x5b,0xed,0xb6,0x5b}, | ||
177 | {0x6a,0xbe,0xd4,0x6a}, {0xcb,0x46,0x8d,0xcb}, {0xbe,0xd9,0x67,0xbe}, {0x39,0x4b,0x72,0x39}, | ||
178 | {0x4a,0xde,0x94,0x4a}, {0x4c,0xd4,0x98,0x4c}, {0x58,0xe8,0xb0,0x58}, {0xcf,0x4a,0x85,0xcf}, | ||
179 | {0xd0,0x6b,0xbb,0xd0}, {0xef,0x2a,0xc5,0xef}, {0xaa,0xe5,0x4f,0xaa}, {0xfb,0x16,0xed,0xfb}, | ||
180 | {0x43,0xc5,0x86,0x43}, {0x4d,0xd7,0x9a,0x4d}, {0x33,0x55,0x66,0x33}, {0x85,0x94,0x11,0x85}, | ||
181 | {0x45,0xcf,0x8a,0x45}, {0xf9,0x10,0xe9,0xf9}, {0x02,0x06,0x04,0x02}, {0x7f,0x81,0xfe,0x7f}, | ||
182 | {0x50,0xf0,0xa0,0x50}, {0x3c,0x44,0x78,0x3c}, {0x9f,0xba,0x25,0x9f}, {0xa8,0xe3,0x4b,0xa8}, | ||
183 | {0x51,0xf3,0xa2,0x51}, {0xa3,0xfe,0x5d,0xa3}, {0x40,0xc0,0x80,0x40}, {0x8f,0x8a,0x05,0x8f}, | ||
184 | {0x92,0xad,0x3f,0x92}, {0x9d,0xbc,0x21,0x9d}, {0x38,0x48,0x70,0x38}, {0xf5,0x04,0xf1,0xf5}, | ||
185 | {0xbc,0xdf,0x63,0xbc}, {0xb6,0xc1,0x77,0xb6}, {0xda,0x75,0xaf,0xda}, {0x21,0x63,0x42,0x21}, | ||
186 | {0x10,0x30,0x20,0x10}, {0xff,0x1a,0xe5,0xff}, {0xf3,0x0e,0xfd,0xf3}, {0xd2,0x6d,0xbf,0xd2}, | ||
187 | {0xcd,0x4c,0x81,0xcd}, {0x0c,0x14,0x18,0x0c}, {0x13,0x35,0x26,0x13}, {0xec,0x2f,0xc3,0xec}, | ||
188 | {0x5f,0xe1,0xbe,0x5f}, {0x97,0xa2,0x35,0x97}, {0x44,0xcc,0x88,0x44}, {0x17,0x39,0x2e,0x17}, | ||
189 | {0xc4,0x57,0x93,0xc4}, {0xa7,0xf2,0x55,0xa7}, {0x7e,0x82,0xfc,0x7e}, {0x3d,0x47,0x7a,0x3d}, | ||
190 | {0x64,0xac,0xc8,0x64}, {0x5d,0xe7,0xba,0x5d}, {0x19,0x2b,0x32,0x19}, {0x73,0x95,0xe6,0x73}, | ||
191 | {0x60,0xa0,0xc0,0x60}, {0x81,0x98,0x19,0x81}, {0x4f,0xd1,0x9e,0x4f}, {0xdc,0x7f,0xa3,0xdc}, | ||
192 | {0x22,0x66,0x44,0x22}, {0x2a,0x7e,0x54,0x2a}, {0x90,0xab,0x3b,0x90}, {0x88,0x83,0x0b,0x88}, | ||
193 | {0x46,0xca,0x8c,0x46}, {0xee,0x29,0xc7,0xee}, {0xb8,0xd3,0x6b,0xb8}, {0x14,0x3c,0x28,0x14}, | ||
194 | {0xde,0x79,0xa7,0xde}, {0x5e,0xe2,0xbc,0x5e}, {0x0b,0x1d,0x16,0x0b}, {0xdb,0x76,0xad,0xdb}, | ||
195 | {0xe0,0x3b,0xdb,0xe0}, {0x32,0x56,0x64,0x32}, {0x3a,0x4e,0x74,0x3a}, {0x0a,0x1e,0x14,0x0a}, | ||
196 | {0x49,0xdb,0x92,0x49}, {0x06,0x0a,0x0c,0x06}, {0x24,0x6c,0x48,0x24}, {0x5c,0xe4,0xb8,0x5c}, | ||
197 | {0xc2,0x5d,0x9f,0xc2}, {0xd3,0x6e,0xbd,0xd3}, {0xac,0xef,0x43,0xac}, {0x62,0xa6,0xc4,0x62}, | ||
198 | {0x91,0xa8,0x39,0x91}, {0x95,0xa4,0x31,0x95}, {0xe4,0x37,0xd3,0xe4}, {0x79,0x8b,0xf2,0x79}, | ||
199 | {0xe7,0x32,0xd5,0xe7}, {0xc8,0x43,0x8b,0xc8}, {0x37,0x59,0x6e,0x37}, {0x6d,0xb7,0xda,0x6d}, | ||
200 | {0x8d,0x8c,0x01,0x8d}, {0xd5,0x64,0xb1,0xd5}, {0x4e,0xd2,0x9c,0x4e}, {0xa9,0xe0,0x49,0xa9}, | ||
201 | {0x6c,0xb4,0xd8,0x6c}, {0x56,0xfa,0xac,0x56}, {0xf4,0x07,0xf3,0xf4}, {0xea,0x25,0xcf,0xea}, | ||
202 | {0x65,0xaf,0xca,0x65}, {0x7a,0x8e,0xf4,0x7a}, {0xae,0xe9,0x47,0xae}, {0x08,0x18,0x10,0x08}, | ||
203 | {0xba,0xd5,0x6f,0xba}, {0x78,0x88,0xf0,0x78}, {0x25,0x6f,0x4a,0x25}, {0x2e,0x72,0x5c,0x2e}, | ||
204 | {0x1c,0x24,0x38,0x1c}, {0xa6,0xf1,0x57,0xa6}, {0xb4,0xc7,0x73,0xb4}, {0xc6,0x51,0x97,0xc6}, | ||
205 | {0xe8,0x23,0xcb,0xe8}, {0xdd,0x7c,0xa1,0xdd}, {0x74,0x9c,0xe8,0x74}, {0x1f,0x21,0x3e,0x1f}, | ||
206 | {0x4b,0xdd,0x96,0x4b}, {0xbd,0xdc,0x61,0xbd}, {0x8b,0x86,0x0d,0x8b}, {0x8a,0x85,0x0f,0x8a}, | ||
207 | {0x70,0x90,0xe0,0x70}, {0x3e,0x42,0x7c,0x3e}, {0xb5,0xc4,0x71,0xb5}, {0x66,0xaa,0xcc,0x66}, | ||
208 | {0x48,0xd8,0x90,0x48}, {0x03,0x05,0x06,0x03}, {0xf6,0x01,0xf7,0xf6}, {0x0e,0x12,0x1c,0x0e}, | ||
209 | {0x61,0xa3,0xc2,0x61}, {0x35,0x5f,0x6a,0x35}, {0x57,0xf9,0xae,0x57}, {0xb9,0xd0,0x69,0xb9}, | ||
210 | {0x86,0x91,0x17,0x86}, {0xc1,0x58,0x99,0xc1}, {0x1d,0x27,0x3a,0x1d}, {0x9e,0xb9,0x27,0x9e}, | ||
211 | {0xe1,0x38,0xd9,0xe1}, {0xf8,0x13,0xeb,0xf8}, {0x98,0xb3,0x2b,0x98}, {0x11,0x33,0x22,0x11}, | ||
212 | {0x69,0xbb,0xd2,0x69}, {0xd9,0x70,0xa9,0xd9}, {0x8e,0x89,0x07,0x8e}, {0x94,0xa7,0x33,0x94}, | ||
213 | {0x9b,0xb6,0x2d,0x9b}, {0x1e,0x22,0x3c,0x1e}, {0x87,0x92,0x15,0x87}, {0xe9,0x20,0xc9,0xe9}, | ||
214 | {0xce,0x49,0x87,0xce}, {0x55,0xff,0xaa,0x55}, {0x28,0x78,0x50,0x28}, {0xdf,0x7a,0xa5,0xdf}, | ||
215 | {0x8c,0x8f,0x03,0x8c}, {0xa1,0xf8,0x59,0xa1}, {0x89,0x80,0x09,0x89}, {0x0d,0x17,0x1a,0x0d}, | ||
216 | {0xbf,0xda,0x65,0xbf}, {0xe6,0x31,0xd7,0xe6}, {0x42,0xc6,0x84,0x42}, {0x68,0xb8,0xd0,0x68}, | ||
217 | {0x41,0xc3,0x82,0x41}, {0x99,0xb0,0x29,0x99}, {0x2d,0x77,0x5a,0x2d}, {0x0f,0x11,0x1e,0x0f}, | ||
218 | {0xb0,0xcb,0x7b,0xb0}, {0x54,0xfc,0xa8,0x54}, {0xbb,0xd6,0x6d,0xbb}, {0x16,0x3a,0x2c,0x16} | ||
219 | }; | ||
220 | |||
221 | static const u_int8_t T4[256][4] = { | ||
222 | {0x63,0x63,0xa5,0xc6}, {0x7c,0x7c,0x84,0xf8}, {0x77,0x77,0x99,0xee}, {0x7b,0x7b,0x8d,0xf6}, | ||
223 | {0xf2,0xf2,0x0d,0xff}, {0x6b,0x6b,0xbd,0xd6}, {0x6f,0x6f,0xb1,0xde}, {0xc5,0xc5,0x54,0x91}, | ||
224 | {0x30,0x30,0x50,0x60}, {0x01,0x01,0x03,0x02}, {0x67,0x67,0xa9,0xce}, {0x2b,0x2b,0x7d,0x56}, | ||
225 | {0xfe,0xfe,0x19,0xe7}, {0xd7,0xd7,0x62,0xb5}, {0xab,0xab,0xe6,0x4d}, {0x76,0x76,0x9a,0xec}, | ||
226 | {0xca,0xca,0x45,0x8f}, {0x82,0x82,0x9d,0x1f}, {0xc9,0xc9,0x40,0x89}, {0x7d,0x7d,0x87,0xfa}, | ||
227 | {0xfa,0xfa,0x15,0xef}, {0x59,0x59,0xeb,0xb2}, {0x47,0x47,0xc9,0x8e}, {0xf0,0xf0,0x0b,0xfb}, | ||
228 | {0xad,0xad,0xec,0x41}, {0xd4,0xd4,0x67,0xb3}, {0xa2,0xa2,0xfd,0x5f}, {0xaf,0xaf,0xea,0x45}, | ||
229 | {0x9c,0x9c,0xbf,0x23}, {0xa4,0xa4,0xf7,0x53}, {0x72,0x72,0x96,0xe4}, {0xc0,0xc0,0x5b,0x9b}, | ||
230 | {0xb7,0xb7,0xc2,0x75}, {0xfd,0xfd,0x1c,0xe1}, {0x93,0x93,0xae,0x3d}, {0x26,0x26,0x6a,0x4c}, | ||
231 | {0x36,0x36,0x5a,0x6c}, {0x3f,0x3f,0x41,0x7e}, {0xf7,0xf7,0x02,0xf5}, {0xcc,0xcc,0x4f,0x83}, | ||
232 | {0x34,0x34,0x5c,0x68}, {0xa5,0xa5,0xf4,0x51}, {0xe5,0xe5,0x34,0xd1}, {0xf1,0xf1,0x08,0xf9}, | ||
233 | {0x71,0x71,0x93,0xe2}, {0xd8,0xd8,0x73,0xab}, {0x31,0x31,0x53,0x62}, {0x15,0x15,0x3f,0x2a}, | ||
234 | {0x04,0x04,0x0c,0x08}, {0xc7,0xc7,0x52,0x95}, {0x23,0x23,0x65,0x46}, {0xc3,0xc3,0x5e,0x9d}, | ||
235 | {0x18,0x18,0x28,0x30}, {0x96,0x96,0xa1,0x37}, {0x05,0x05,0x0f,0x0a}, {0x9a,0x9a,0xb5,0x2f}, | ||
236 | {0x07,0x07,0x09,0x0e}, {0x12,0x12,0x36,0x24}, {0x80,0x80,0x9b,0x1b}, {0xe2,0xe2,0x3d,0xdf}, | ||
237 | {0xeb,0xeb,0x26,0xcd}, {0x27,0x27,0x69,0x4e}, {0xb2,0xb2,0xcd,0x7f}, {0x75,0x75,0x9f,0xea}, | ||
238 | {0x09,0x09,0x1b,0x12}, {0x83,0x83,0x9e,0x1d}, {0x2c,0x2c,0x74,0x58}, {0x1a,0x1a,0x2e,0x34}, | ||
239 | {0x1b,0x1b,0x2d,0x36}, {0x6e,0x6e,0xb2,0xdc}, {0x5a,0x5a,0xee,0xb4}, {0xa0,0xa0,0xfb,0x5b}, | ||
240 | {0x52,0x52,0xf6,0xa4}, {0x3b,0x3b,0x4d,0x76}, {0xd6,0xd6,0x61,0xb7}, {0xb3,0xb3,0xce,0x7d}, | ||
241 | {0x29,0x29,0x7b,0x52}, {0xe3,0xe3,0x3e,0xdd}, {0x2f,0x2f,0x71,0x5e}, {0x84,0x84,0x97,0x13}, | ||
242 | {0x53,0x53,0xf5,0xa6}, {0xd1,0xd1,0x68,0xb9}, {0x00,0x00,0x00,0x00}, {0xed,0xed,0x2c,0xc1}, | ||
243 | {0x20,0x20,0x60,0x40}, {0xfc,0xfc,0x1f,0xe3}, {0xb1,0xb1,0xc8,0x79}, {0x5b,0x5b,0xed,0xb6}, | ||
244 | {0x6a,0x6a,0xbe,0xd4}, {0xcb,0xcb,0x46,0x8d}, {0xbe,0xbe,0xd9,0x67}, {0x39,0x39,0x4b,0x72}, | ||
245 | {0x4a,0x4a,0xde,0x94}, {0x4c,0x4c,0xd4,0x98}, {0x58,0x58,0xe8,0xb0}, {0xcf,0xcf,0x4a,0x85}, | ||
246 | {0xd0,0xd0,0x6b,0xbb}, {0xef,0xef,0x2a,0xc5}, {0xaa,0xaa,0xe5,0x4f}, {0xfb,0xfb,0x16,0xed}, | ||
247 | {0x43,0x43,0xc5,0x86}, {0x4d,0x4d,0xd7,0x9a}, {0x33,0x33,0x55,0x66}, {0x85,0x85,0x94,0x11}, | ||
248 | {0x45,0x45,0xcf,0x8a}, {0xf9,0xf9,0x10,0xe9}, {0x02,0x02,0x06,0x04}, {0x7f,0x7f,0x81,0xfe}, | ||
249 | {0x50,0x50,0xf0,0xa0}, {0x3c,0x3c,0x44,0x78}, {0x9f,0x9f,0xba,0x25}, {0xa8,0xa8,0xe3,0x4b}, | ||
250 | {0x51,0x51,0xf3,0xa2}, {0xa3,0xa3,0xfe,0x5d}, {0x40,0x40,0xc0,0x80}, {0x8f,0x8f,0x8a,0x05}, | ||
251 | {0x92,0x92,0xad,0x3f}, {0x9d,0x9d,0xbc,0x21}, {0x38,0x38,0x48,0x70}, {0xf5,0xf5,0x04,0xf1}, | ||
252 | {0xbc,0xbc,0xdf,0x63}, {0xb6,0xb6,0xc1,0x77}, {0xda,0xda,0x75,0xaf}, {0x21,0x21,0x63,0x42}, | ||
253 | {0x10,0x10,0x30,0x20}, {0xff,0xff,0x1a,0xe5}, {0xf3,0xf3,0x0e,0xfd}, {0xd2,0xd2,0x6d,0xbf}, | ||
254 | {0xcd,0xcd,0x4c,0x81}, {0x0c,0x0c,0x14,0x18}, {0x13,0x13,0x35,0x26}, {0xec,0xec,0x2f,0xc3}, | ||
255 | {0x5f,0x5f,0xe1,0xbe}, {0x97,0x97,0xa2,0x35}, {0x44,0x44,0xcc,0x88}, {0x17,0x17,0x39,0x2e}, | ||
256 | {0xc4,0xc4,0x57,0x93}, {0xa7,0xa7,0xf2,0x55}, {0x7e,0x7e,0x82,0xfc}, {0x3d,0x3d,0x47,0x7a}, | ||
257 | {0x64,0x64,0xac,0xc8}, {0x5d,0x5d,0xe7,0xba}, {0x19,0x19,0x2b,0x32}, {0x73,0x73,0x95,0xe6}, | ||
258 | {0x60,0x60,0xa0,0xc0}, {0x81,0x81,0x98,0x19}, {0x4f,0x4f,0xd1,0x9e}, {0xdc,0xdc,0x7f,0xa3}, | ||
259 | {0x22,0x22,0x66,0x44}, {0x2a,0x2a,0x7e,0x54}, {0x90,0x90,0xab,0x3b}, {0x88,0x88,0x83,0x0b}, | ||
260 | {0x46,0x46,0xca,0x8c}, {0xee,0xee,0x29,0xc7}, {0xb8,0xb8,0xd3,0x6b}, {0x14,0x14,0x3c,0x28}, | ||
261 | {0xde,0xde,0x79,0xa7}, {0x5e,0x5e,0xe2,0xbc}, {0x0b,0x0b,0x1d,0x16}, {0xdb,0xdb,0x76,0xad}, | ||
262 | {0xe0,0xe0,0x3b,0xdb}, {0x32,0x32,0x56,0x64}, {0x3a,0x3a,0x4e,0x74}, {0x0a,0x0a,0x1e,0x14}, | ||
263 | {0x49,0x49,0xdb,0x92}, {0x06,0x06,0x0a,0x0c}, {0x24,0x24,0x6c,0x48}, {0x5c,0x5c,0xe4,0xb8}, | ||
264 | {0xc2,0xc2,0x5d,0x9f}, {0xd3,0xd3,0x6e,0xbd}, {0xac,0xac,0xef,0x43}, {0x62,0x62,0xa6,0xc4}, | ||
265 | {0x91,0x91,0xa8,0x39}, {0x95,0x95,0xa4,0x31}, {0xe4,0xe4,0x37,0xd3}, {0x79,0x79,0x8b,0xf2}, | ||
266 | {0xe7,0xe7,0x32,0xd5}, {0xc8,0xc8,0x43,0x8b}, {0x37,0x37,0x59,0x6e}, {0x6d,0x6d,0xb7,0xda}, | ||
267 | {0x8d,0x8d,0x8c,0x01}, {0xd5,0xd5,0x64,0xb1}, {0x4e,0x4e,0xd2,0x9c}, {0xa9,0xa9,0xe0,0x49}, | ||
268 | {0x6c,0x6c,0xb4,0xd8}, {0x56,0x56,0xfa,0xac}, {0xf4,0xf4,0x07,0xf3}, {0xea,0xea,0x25,0xcf}, | ||
269 | {0x65,0x65,0xaf,0xca}, {0x7a,0x7a,0x8e,0xf4}, {0xae,0xae,0xe9,0x47}, {0x08,0x08,0x18,0x10}, | ||
270 | {0xba,0xba,0xd5,0x6f}, {0x78,0x78,0x88,0xf0}, {0x25,0x25,0x6f,0x4a}, {0x2e,0x2e,0x72,0x5c}, | ||
271 | {0x1c,0x1c,0x24,0x38}, {0xa6,0xa6,0xf1,0x57}, {0xb4,0xb4,0xc7,0x73}, {0xc6,0xc6,0x51,0x97}, | ||
272 | {0xe8,0xe8,0x23,0xcb}, {0xdd,0xdd,0x7c,0xa1}, {0x74,0x74,0x9c,0xe8}, {0x1f,0x1f,0x21,0x3e}, | ||
273 | {0x4b,0x4b,0xdd,0x96}, {0xbd,0xbd,0xdc,0x61}, {0x8b,0x8b,0x86,0x0d}, {0x8a,0x8a,0x85,0x0f}, | ||
274 | {0x70,0x70,0x90,0xe0}, {0x3e,0x3e,0x42,0x7c}, {0xb5,0xb5,0xc4,0x71}, {0x66,0x66,0xaa,0xcc}, | ||
275 | {0x48,0x48,0xd8,0x90}, {0x03,0x03,0x05,0x06}, {0xf6,0xf6,0x01,0xf7}, {0x0e,0x0e,0x12,0x1c}, | ||
276 | {0x61,0x61,0xa3,0xc2}, {0x35,0x35,0x5f,0x6a}, {0x57,0x57,0xf9,0xae}, {0xb9,0xb9,0xd0,0x69}, | ||
277 | {0x86,0x86,0x91,0x17}, {0xc1,0xc1,0x58,0x99}, {0x1d,0x1d,0x27,0x3a}, {0x9e,0x9e,0xb9,0x27}, | ||
278 | {0xe1,0xe1,0x38,0xd9}, {0xf8,0xf8,0x13,0xeb}, {0x98,0x98,0xb3,0x2b}, {0x11,0x11,0x33,0x22}, | ||
279 | {0x69,0x69,0xbb,0xd2}, {0xd9,0xd9,0x70,0xa9}, {0x8e,0x8e,0x89,0x07}, {0x94,0x94,0xa7,0x33}, | ||
280 | {0x9b,0x9b,0xb6,0x2d}, {0x1e,0x1e,0x22,0x3c}, {0x87,0x87,0x92,0x15}, {0xe9,0xe9,0x20,0xc9}, | ||
281 | {0xce,0xce,0x49,0x87}, {0x55,0x55,0xff,0xaa}, {0x28,0x28,0x78,0x50}, {0xdf,0xdf,0x7a,0xa5}, | ||
282 | {0x8c,0x8c,0x8f,0x03}, {0xa1,0xa1,0xf8,0x59}, {0x89,0x89,0x80,0x09}, {0x0d,0x0d,0x17,0x1a}, | ||
283 | {0xbf,0xbf,0xda,0x65}, {0xe6,0xe6,0x31,0xd7}, {0x42,0x42,0xc6,0x84}, {0x68,0x68,0xb8,0xd0}, | ||
284 | {0x41,0x41,0xc3,0x82}, {0x99,0x99,0xb0,0x29}, {0x2d,0x2d,0x77,0x5a}, {0x0f,0x0f,0x11,0x1e}, | ||
285 | {0xb0,0xb0,0xcb,0x7b}, {0x54,0x54,0xfc,0xa8}, {0xbb,0xbb,0xd6,0x6d}, {0x16,0x16,0x3a,0x2c} | ||
286 | }; | ||
287 | |||
288 | static const u_int8_t T5[256][4] = { | ||
289 | {0x51,0xf4,0xa7,0x50}, {0x7e,0x41,0x65,0x53}, {0x1a,0x17,0xa4,0xc3}, {0x3a,0x27,0x5e,0x96}, | ||
290 | {0x3b,0xab,0x6b,0xcb}, {0x1f,0x9d,0x45,0xf1}, {0xac,0xfa,0x58,0xab}, {0x4b,0xe3,0x03,0x93}, | ||
291 | {0x20,0x30,0xfa,0x55}, {0xad,0x76,0x6d,0xf6}, {0x88,0xcc,0x76,0x91}, {0xf5,0x02,0x4c,0x25}, | ||
292 | {0x4f,0xe5,0xd7,0xfc}, {0xc5,0x2a,0xcb,0xd7}, {0x26,0x35,0x44,0x80}, {0xb5,0x62,0xa3,0x8f}, | ||
293 | {0xde,0xb1,0x5a,0x49}, {0x25,0xba,0x1b,0x67}, {0x45,0xea,0x0e,0x98}, {0x5d,0xfe,0xc0,0xe1}, | ||
294 | {0xc3,0x2f,0x75,0x02}, {0x81,0x4c,0xf0,0x12}, {0x8d,0x46,0x97,0xa3}, {0x6b,0xd3,0xf9,0xc6}, | ||
295 | {0x03,0x8f,0x5f,0xe7}, {0x15,0x92,0x9c,0x95}, {0xbf,0x6d,0x7a,0xeb}, {0x95,0x52,0x59,0xda}, | ||
296 | {0xd4,0xbe,0x83,0x2d}, {0x58,0x74,0x21,0xd3}, {0x49,0xe0,0x69,0x29}, {0x8e,0xc9,0xc8,0x44}, | ||
297 | {0x75,0xc2,0x89,0x6a}, {0xf4,0x8e,0x79,0x78}, {0x99,0x58,0x3e,0x6b}, {0x27,0xb9,0x71,0xdd}, | ||
298 | {0xbe,0xe1,0x4f,0xb6}, {0xf0,0x88,0xad,0x17}, {0xc9,0x20,0xac,0x66}, {0x7d,0xce,0x3a,0xb4}, | ||
299 | {0x63,0xdf,0x4a,0x18}, {0xe5,0x1a,0x31,0x82}, {0x97,0x51,0x33,0x60}, {0x62,0x53,0x7f,0x45}, | ||
300 | {0xb1,0x64,0x77,0xe0}, {0xbb,0x6b,0xae,0x84}, {0xfe,0x81,0xa0,0x1c}, {0xf9,0x08,0x2b,0x94}, | ||
301 | {0x70,0x48,0x68,0x58}, {0x8f,0x45,0xfd,0x19}, {0x94,0xde,0x6c,0x87}, {0x52,0x7b,0xf8,0xb7}, | ||
302 | {0xab,0x73,0xd3,0x23}, {0x72,0x4b,0x02,0xe2}, {0xe3,0x1f,0x8f,0x57}, {0x66,0x55,0xab,0x2a}, | ||
303 | {0xb2,0xeb,0x28,0x07}, {0x2f,0xb5,0xc2,0x03}, {0x86,0xc5,0x7b,0x9a}, {0xd3,0x37,0x08,0xa5}, | ||
304 | {0x30,0x28,0x87,0xf2}, {0x23,0xbf,0xa5,0xb2}, {0x02,0x03,0x6a,0xba}, {0xed,0x16,0x82,0x5c}, | ||
305 | {0x8a,0xcf,0x1c,0x2b}, {0xa7,0x79,0xb4,0x92}, {0xf3,0x07,0xf2,0xf0}, {0x4e,0x69,0xe2,0xa1}, | ||
306 | {0x65,0xda,0xf4,0xcd}, {0x06,0x05,0xbe,0xd5}, {0xd1,0x34,0x62,0x1f}, {0xc4,0xa6,0xfe,0x8a}, | ||
307 | {0x34,0x2e,0x53,0x9d}, {0xa2,0xf3,0x55,0xa0}, {0x05,0x8a,0xe1,0x32}, {0xa4,0xf6,0xeb,0x75}, | ||
308 | {0x0b,0x83,0xec,0x39}, {0x40,0x60,0xef,0xaa}, {0x5e,0x71,0x9f,0x06}, {0xbd,0x6e,0x10,0x51}, | ||
309 | {0x3e,0x21,0x8a,0xf9}, {0x96,0xdd,0x06,0x3d}, {0xdd,0x3e,0x05,0xae}, {0x4d,0xe6,0xbd,0x46}, | ||
310 | {0x91,0x54,0x8d,0xb5}, {0x71,0xc4,0x5d,0x05}, {0x04,0x06,0xd4,0x6f}, {0x60,0x50,0x15,0xff}, | ||
311 | {0x19,0x98,0xfb,0x24}, {0xd6,0xbd,0xe9,0x97}, {0x89,0x40,0x43,0xcc}, {0x67,0xd9,0x9e,0x77}, | ||
312 | {0xb0,0xe8,0x42,0xbd}, {0x07,0x89,0x8b,0x88}, {0xe7,0x19,0x5b,0x38}, {0x79,0xc8,0xee,0xdb}, | ||
313 | {0xa1,0x7c,0x0a,0x47}, {0x7c,0x42,0x0f,0xe9}, {0xf8,0x84,0x1e,0xc9}, {0x00,0x00,0x00,0x00}, | ||
314 | {0x09,0x80,0x86,0x83}, {0x32,0x2b,0xed,0x48}, {0x1e,0x11,0x70,0xac}, {0x6c,0x5a,0x72,0x4e}, | ||
315 | {0xfd,0x0e,0xff,0xfb}, {0x0f,0x85,0x38,0x56}, {0x3d,0xae,0xd5,0x1e}, {0x36,0x2d,0x39,0x27}, | ||
316 | {0x0a,0x0f,0xd9,0x64}, {0x68,0x5c,0xa6,0x21}, {0x9b,0x5b,0x54,0xd1}, {0x24,0x36,0x2e,0x3a}, | ||
317 | {0x0c,0x0a,0x67,0xb1}, {0x93,0x57,0xe7,0x0f}, {0xb4,0xee,0x96,0xd2}, {0x1b,0x9b,0x91,0x9e}, | ||
318 | {0x80,0xc0,0xc5,0x4f}, {0x61,0xdc,0x20,0xa2}, {0x5a,0x77,0x4b,0x69}, {0x1c,0x12,0x1a,0x16}, | ||
319 | {0xe2,0x93,0xba,0x0a}, {0xc0,0xa0,0x2a,0xe5}, {0x3c,0x22,0xe0,0x43}, {0x12,0x1b,0x17,0x1d}, | ||
320 | {0x0e,0x09,0x0d,0x0b}, {0xf2,0x8b,0xc7,0xad}, {0x2d,0xb6,0xa8,0xb9}, {0x14,0x1e,0xa9,0xc8}, | ||
321 | {0x57,0xf1,0x19,0x85}, {0xaf,0x75,0x07,0x4c}, {0xee,0x99,0xdd,0xbb}, {0xa3,0x7f,0x60,0xfd}, | ||
322 | {0xf7,0x01,0x26,0x9f}, {0x5c,0x72,0xf5,0xbc}, {0x44,0x66,0x3b,0xc5}, {0x5b,0xfb,0x7e,0x34}, | ||
323 | {0x8b,0x43,0x29,0x76}, {0xcb,0x23,0xc6,0xdc}, {0xb6,0xed,0xfc,0x68}, {0xb8,0xe4,0xf1,0x63}, | ||
324 | {0xd7,0x31,0xdc,0xca}, {0x42,0x63,0x85,0x10}, {0x13,0x97,0x22,0x40}, {0x84,0xc6,0x11,0x20}, | ||
325 | {0x85,0x4a,0x24,0x7d}, {0xd2,0xbb,0x3d,0xf8}, {0xae,0xf9,0x32,0x11}, {0xc7,0x29,0xa1,0x6d}, | ||
326 | {0x1d,0x9e,0x2f,0x4b}, {0xdc,0xb2,0x30,0xf3}, {0x0d,0x86,0x52,0xec}, {0x77,0xc1,0xe3,0xd0}, | ||
327 | {0x2b,0xb3,0x16,0x6c}, {0xa9,0x70,0xb9,0x99}, {0x11,0x94,0x48,0xfa}, {0x47,0xe9,0x64,0x22}, | ||
328 | {0xa8,0xfc,0x8c,0xc4}, {0xa0,0xf0,0x3f,0x1a}, {0x56,0x7d,0x2c,0xd8}, {0x22,0x33,0x90,0xef}, | ||
329 | {0x87,0x49,0x4e,0xc7}, {0xd9,0x38,0xd1,0xc1}, {0x8c,0xca,0xa2,0xfe}, {0x98,0xd4,0x0b,0x36}, | ||
330 | {0xa6,0xf5,0x81,0xcf}, {0xa5,0x7a,0xde,0x28}, {0xda,0xb7,0x8e,0x26}, {0x3f,0xad,0xbf,0xa4}, | ||
331 | {0x2c,0x3a,0x9d,0xe4}, {0x50,0x78,0x92,0x0d}, {0x6a,0x5f,0xcc,0x9b}, {0x54,0x7e,0x46,0x62}, | ||
332 | {0xf6,0x8d,0x13,0xc2}, {0x90,0xd8,0xb8,0xe8}, {0x2e,0x39,0xf7,0x5e}, {0x82,0xc3,0xaf,0xf5}, | ||
333 | {0x9f,0x5d,0x80,0xbe}, {0x69,0xd0,0x93,0x7c}, {0x6f,0xd5,0x2d,0xa9}, {0xcf,0x25,0x12,0xb3}, | ||
334 | {0xc8,0xac,0x99,0x3b}, {0x10,0x18,0x7d,0xa7}, {0xe8,0x9c,0x63,0x6e}, {0xdb,0x3b,0xbb,0x7b}, | ||
335 | {0xcd,0x26,0x78,0x09}, {0x6e,0x59,0x18,0xf4}, {0xec,0x9a,0xb7,0x01}, {0x83,0x4f,0x9a,0xa8}, | ||
336 | {0xe6,0x95,0x6e,0x65}, {0xaa,0xff,0xe6,0x7e}, {0x21,0xbc,0xcf,0x08}, {0xef,0x15,0xe8,0xe6}, | ||
337 | {0xba,0xe7,0x9b,0xd9}, {0x4a,0x6f,0x36,0xce}, {0xea,0x9f,0x09,0xd4}, {0x29,0xb0,0x7c,0xd6}, | ||
338 | {0x31,0xa4,0xb2,0xaf}, {0x2a,0x3f,0x23,0x31}, {0xc6,0xa5,0x94,0x30}, {0x35,0xa2,0x66,0xc0}, | ||
339 | {0x74,0x4e,0xbc,0x37}, {0xfc,0x82,0xca,0xa6}, {0xe0,0x90,0xd0,0xb0}, {0x33,0xa7,0xd8,0x15}, | ||
340 | {0xf1,0x04,0x98,0x4a}, {0x41,0xec,0xda,0xf7}, {0x7f,0xcd,0x50,0x0e}, {0x17,0x91,0xf6,0x2f}, | ||
341 | {0x76,0x4d,0xd6,0x8d}, {0x43,0xef,0xb0,0x4d}, {0xcc,0xaa,0x4d,0x54}, {0xe4,0x96,0x04,0xdf}, | ||
342 | {0x9e,0xd1,0xb5,0xe3}, {0x4c,0x6a,0x88,0x1b}, {0xc1,0x2c,0x1f,0xb8}, {0x46,0x65,0x51,0x7f}, | ||
343 | {0x9d,0x5e,0xea,0x04}, {0x01,0x8c,0x35,0x5d}, {0xfa,0x87,0x74,0x73}, {0xfb,0x0b,0x41,0x2e}, | ||
344 | {0xb3,0x67,0x1d,0x5a}, {0x92,0xdb,0xd2,0x52}, {0xe9,0x10,0x56,0x33}, {0x6d,0xd6,0x47,0x13}, | ||
345 | {0x9a,0xd7,0x61,0x8c}, {0x37,0xa1,0x0c,0x7a}, {0x59,0xf8,0x14,0x8e}, {0xeb,0x13,0x3c,0x89}, | ||
346 | {0xce,0xa9,0x27,0xee}, {0xb7,0x61,0xc9,0x35}, {0xe1,0x1c,0xe5,0xed}, {0x7a,0x47,0xb1,0x3c}, | ||
347 | {0x9c,0xd2,0xdf,0x59}, {0x55,0xf2,0x73,0x3f}, {0x18,0x14,0xce,0x79}, {0x73,0xc7,0x37,0xbf}, | ||
348 | {0x53,0xf7,0xcd,0xea}, {0x5f,0xfd,0xaa,0x5b}, {0xdf,0x3d,0x6f,0x14}, {0x78,0x44,0xdb,0x86}, | ||
349 | {0xca,0xaf,0xf3,0x81}, {0xb9,0x68,0xc4,0x3e}, {0x38,0x24,0x34,0x2c}, {0xc2,0xa3,0x40,0x5f}, | ||
350 | {0x16,0x1d,0xc3,0x72}, {0xbc,0xe2,0x25,0x0c}, {0x28,0x3c,0x49,0x8b}, {0xff,0x0d,0x95,0x41}, | ||
351 | {0x39,0xa8,0x01,0x71}, {0x08,0x0c,0xb3,0xde}, {0xd8,0xb4,0xe4,0x9c}, {0x64,0x56,0xc1,0x90}, | ||
352 | {0x7b,0xcb,0x84,0x61}, {0xd5,0x32,0xb6,0x70}, {0x48,0x6c,0x5c,0x74}, {0xd0,0xb8,0x57,0x42} | ||
353 | }; | ||
354 | |||
355 | static const u_int8_t T6[256][4] = { | ||
356 | {0x50,0x51,0xf4,0xa7}, {0x53,0x7e,0x41,0x65}, {0xc3,0x1a,0x17,0xa4}, {0x96,0x3a,0x27,0x5e}, | ||
357 | {0xcb,0x3b,0xab,0x6b}, {0xf1,0x1f,0x9d,0x45}, {0xab,0xac,0xfa,0x58}, {0x93,0x4b,0xe3,0x03}, | ||
358 | {0x55,0x20,0x30,0xfa}, {0xf6,0xad,0x76,0x6d}, {0x91,0x88,0xcc,0x76}, {0x25,0xf5,0x02,0x4c}, | ||
359 | {0xfc,0x4f,0xe5,0xd7}, {0xd7,0xc5,0x2a,0xcb}, {0x80,0x26,0x35,0x44}, {0x8f,0xb5,0x62,0xa3}, | ||
360 | {0x49,0xde,0xb1,0x5a}, {0x67,0x25,0xba,0x1b}, {0x98,0x45,0xea,0x0e}, {0xe1,0x5d,0xfe,0xc0}, | ||
361 | {0x02,0xc3,0x2f,0x75}, {0x12,0x81,0x4c,0xf0}, {0xa3,0x8d,0x46,0x97}, {0xc6,0x6b,0xd3,0xf9}, | ||
362 | {0xe7,0x03,0x8f,0x5f}, {0x95,0x15,0x92,0x9c}, {0xeb,0xbf,0x6d,0x7a}, {0xda,0x95,0x52,0x59}, | ||
363 | {0x2d,0xd4,0xbe,0x83}, {0xd3,0x58,0x74,0x21}, {0x29,0x49,0xe0,0x69}, {0x44,0x8e,0xc9,0xc8}, | ||
364 | {0x6a,0x75,0xc2,0x89}, {0x78,0xf4,0x8e,0x79}, {0x6b,0x99,0x58,0x3e}, {0xdd,0x27,0xb9,0x71}, | ||
365 | {0xb6,0xbe,0xe1,0x4f}, {0x17,0xf0,0x88,0xad}, {0x66,0xc9,0x20,0xac}, {0xb4,0x7d,0xce,0x3a}, | ||
366 | {0x18,0x63,0xdf,0x4a}, {0x82,0xe5,0x1a,0x31}, {0x60,0x97,0x51,0x33}, {0x45,0x62,0x53,0x7f}, | ||
367 | {0xe0,0xb1,0x64,0x77}, {0x84,0xbb,0x6b,0xae}, {0x1c,0xfe,0x81,0xa0}, {0x94,0xf9,0x08,0x2b}, | ||
368 | {0x58,0x70,0x48,0x68}, {0x19,0x8f,0x45,0xfd}, {0x87,0x94,0xde,0x6c}, {0xb7,0x52,0x7b,0xf8}, | ||
369 | {0x23,0xab,0x73,0xd3}, {0xe2,0x72,0x4b,0x02}, {0x57,0xe3,0x1f,0x8f}, {0x2a,0x66,0x55,0xab}, | ||
370 | {0x07,0xb2,0xeb,0x28}, {0x03,0x2f,0xb5,0xc2}, {0x9a,0x86,0xc5,0x7b}, {0xa5,0xd3,0x37,0x08}, | ||
371 | {0xf2,0x30,0x28,0x87}, {0xb2,0x23,0xbf,0xa5}, {0xba,0x02,0x03,0x6a}, {0x5c,0xed,0x16,0x82}, | ||
372 | {0x2b,0x8a,0xcf,0x1c}, {0x92,0xa7,0x79,0xb4}, {0xf0,0xf3,0x07,0xf2}, {0xa1,0x4e,0x69,0xe2}, | ||
373 | {0xcd,0x65,0xda,0xf4}, {0xd5,0x06,0x05,0xbe}, {0x1f,0xd1,0x34,0x62}, {0x8a,0xc4,0xa6,0xfe}, | ||
374 | {0x9d,0x34,0x2e,0x53}, {0xa0,0xa2,0xf3,0x55}, {0x32,0x05,0x8a,0xe1}, {0x75,0xa4,0xf6,0xeb}, | ||
375 | {0x39,0x0b,0x83,0xec}, {0xaa,0x40,0x60,0xef}, {0x06,0x5e,0x71,0x9f}, {0x51,0xbd,0x6e,0x10}, | ||
376 | {0xf9,0x3e,0x21,0x8a}, {0x3d,0x96,0xdd,0x06}, {0xae,0xdd,0x3e,0x05}, {0x46,0x4d,0xe6,0xbd}, | ||
377 | {0xb5,0x91,0x54,0x8d}, {0x05,0x71,0xc4,0x5d}, {0x6f,0x04,0x06,0xd4}, {0xff,0x60,0x50,0x15}, | ||
378 | {0x24,0x19,0x98,0xfb}, {0x97,0xd6,0xbd,0xe9}, {0xcc,0x89,0x40,0x43}, {0x77,0x67,0xd9,0x9e}, | ||
379 | {0xbd,0xb0,0xe8,0x42}, {0x88,0x07,0x89,0x8b}, {0x38,0xe7,0x19,0x5b}, {0xdb,0x79,0xc8,0xee}, | ||
380 | {0x47,0xa1,0x7c,0x0a}, {0xe9,0x7c,0x42,0x0f}, {0xc9,0xf8,0x84,0x1e}, {0x00,0x00,0x00,0x00}, | ||
381 | {0x83,0x09,0x80,0x86}, {0x48,0x32,0x2b,0xed}, {0xac,0x1e,0x11,0x70}, {0x4e,0x6c,0x5a,0x72}, | ||
382 | {0xfb,0xfd,0x0e,0xff}, {0x56,0x0f,0x85,0x38}, {0x1e,0x3d,0xae,0xd5}, {0x27,0x36,0x2d,0x39}, | ||
383 | {0x64,0x0a,0x0f,0xd9}, {0x21,0x68,0x5c,0xa6}, {0xd1,0x9b,0x5b,0x54}, {0x3a,0x24,0x36,0x2e}, | ||
384 | {0xb1,0x0c,0x0a,0x67}, {0x0f,0x93,0x57,0xe7}, {0xd2,0xb4,0xee,0x96}, {0x9e,0x1b,0x9b,0x91}, | ||
385 | {0x4f,0x80,0xc0,0xc5}, {0xa2,0x61,0xdc,0x20}, {0x69,0x5a,0x77,0x4b}, {0x16,0x1c,0x12,0x1a}, | ||
386 | {0x0a,0xe2,0x93,0xba}, {0xe5,0xc0,0xa0,0x2a}, {0x43,0x3c,0x22,0xe0}, {0x1d,0x12,0x1b,0x17}, | ||
387 | {0x0b,0x0e,0x09,0x0d}, {0xad,0xf2,0x8b,0xc7}, {0xb9,0x2d,0xb6,0xa8}, {0xc8,0x14,0x1e,0xa9}, | ||
388 | {0x85,0x57,0xf1,0x19}, {0x4c,0xaf,0x75,0x07}, {0xbb,0xee,0x99,0xdd}, {0xfd,0xa3,0x7f,0x60}, | ||
389 | {0x9f,0xf7,0x01,0x26}, {0xbc,0x5c,0x72,0xf5}, {0xc5,0x44,0x66,0x3b}, {0x34,0x5b,0xfb,0x7e}, | ||
390 | {0x76,0x8b,0x43,0x29}, {0xdc,0xcb,0x23,0xc6}, {0x68,0xb6,0xed,0xfc}, {0x63,0xb8,0xe4,0xf1}, | ||
391 | {0xca,0xd7,0x31,0xdc}, {0x10,0x42,0x63,0x85}, {0x40,0x13,0x97,0x22}, {0x20,0x84,0xc6,0x11}, | ||
392 | {0x7d,0x85,0x4a,0x24}, {0xf8,0xd2,0xbb,0x3d}, {0x11,0xae,0xf9,0x32}, {0x6d,0xc7,0x29,0xa1}, | ||
393 | {0x4b,0x1d,0x9e,0x2f}, {0xf3,0xdc,0xb2,0x30}, {0xec,0x0d,0x86,0x52}, {0xd0,0x77,0xc1,0xe3}, | ||
394 | {0x6c,0x2b,0xb3,0x16}, {0x99,0xa9,0x70,0xb9}, {0xfa,0x11,0x94,0x48}, {0x22,0x47,0xe9,0x64}, | ||
395 | {0xc4,0xa8,0xfc,0x8c}, {0x1a,0xa0,0xf0,0x3f}, {0xd8,0x56,0x7d,0x2c}, {0xef,0x22,0x33,0x90}, | ||
396 | {0xc7,0x87,0x49,0x4e}, {0xc1,0xd9,0x38,0xd1}, {0xfe,0x8c,0xca,0xa2}, {0x36,0x98,0xd4,0x0b}, | ||
397 | {0xcf,0xa6,0xf5,0x81}, {0x28,0xa5,0x7a,0xde}, {0x26,0xda,0xb7,0x8e}, {0xa4,0x3f,0xad,0xbf}, | ||
398 | {0xe4,0x2c,0x3a,0x9d}, {0x0d,0x50,0x78,0x92}, {0x9b,0x6a,0x5f,0xcc}, {0x62,0x54,0x7e,0x46}, | ||
399 | {0xc2,0xf6,0x8d,0x13}, {0xe8,0x90,0xd8,0xb8}, {0x5e,0x2e,0x39,0xf7}, {0xf5,0x82,0xc3,0xaf}, | ||
400 | {0xbe,0x9f,0x5d,0x80}, {0x7c,0x69,0xd0,0x93}, {0xa9,0x6f,0xd5,0x2d}, {0xb3,0xcf,0x25,0x12}, | ||
401 | {0x3b,0xc8,0xac,0x99}, {0xa7,0x10,0x18,0x7d}, {0x6e,0xe8,0x9c,0x63}, {0x7b,0xdb,0x3b,0xbb}, | ||
402 | {0x09,0xcd,0x26,0x78}, {0xf4,0x6e,0x59,0x18}, {0x01,0xec,0x9a,0xb7}, {0xa8,0x83,0x4f,0x9a}, | ||
403 | {0x65,0xe6,0x95,0x6e}, {0x7e,0xaa,0xff,0xe6}, {0x08,0x21,0xbc,0xcf}, {0xe6,0xef,0x15,0xe8}, | ||
404 | {0xd9,0xba,0xe7,0x9b}, {0xce,0x4a,0x6f,0x36}, {0xd4,0xea,0x9f,0x09}, {0xd6,0x29,0xb0,0x7c}, | ||
405 | {0xaf,0x31,0xa4,0xb2}, {0x31,0x2a,0x3f,0x23}, {0x30,0xc6,0xa5,0x94}, {0xc0,0x35,0xa2,0x66}, | ||
406 | {0x37,0x74,0x4e,0xbc}, {0xa6,0xfc,0x82,0xca}, {0xb0,0xe0,0x90,0xd0}, {0x15,0x33,0xa7,0xd8}, | ||
407 | {0x4a,0xf1,0x04,0x98}, {0xf7,0x41,0xec,0xda}, {0x0e,0x7f,0xcd,0x50}, {0x2f,0x17,0x91,0xf6}, | ||
408 | {0x8d,0x76,0x4d,0xd6}, {0x4d,0x43,0xef,0xb0}, {0x54,0xcc,0xaa,0x4d}, {0xdf,0xe4,0x96,0x04}, | ||
409 | {0xe3,0x9e,0xd1,0xb5}, {0x1b,0x4c,0x6a,0x88}, {0xb8,0xc1,0x2c,0x1f}, {0x7f,0x46,0x65,0x51}, | ||
410 | {0x04,0x9d,0x5e,0xea}, {0x5d,0x01,0x8c,0x35}, {0x73,0xfa,0x87,0x74}, {0x2e,0xfb,0x0b,0x41}, | ||
411 | {0x5a,0xb3,0x67,0x1d}, {0x52,0x92,0xdb,0xd2}, {0x33,0xe9,0x10,0x56}, {0x13,0x6d,0xd6,0x47}, | ||
412 | {0x8c,0x9a,0xd7,0x61}, {0x7a,0x37,0xa1,0x0c}, {0x8e,0x59,0xf8,0x14}, {0x89,0xeb,0x13,0x3c}, | ||
413 | {0xee,0xce,0xa9,0x27}, {0x35,0xb7,0x61,0xc9}, {0xed,0xe1,0x1c,0xe5}, {0x3c,0x7a,0x47,0xb1}, | ||
414 | {0x59,0x9c,0xd2,0xdf}, {0x3f,0x55,0xf2,0x73}, {0x79,0x18,0x14,0xce}, {0xbf,0x73,0xc7,0x37}, | ||
415 | {0xea,0x53,0xf7,0xcd}, {0x5b,0x5f,0xfd,0xaa}, {0x14,0xdf,0x3d,0x6f}, {0x86,0x78,0x44,0xdb}, | ||
416 | {0x81,0xca,0xaf,0xf3}, {0x3e,0xb9,0x68,0xc4}, {0x2c,0x38,0x24,0x34}, {0x5f,0xc2,0xa3,0x40}, | ||
417 | {0x72,0x16,0x1d,0xc3}, {0x0c,0xbc,0xe2,0x25}, {0x8b,0x28,0x3c,0x49}, {0x41,0xff,0x0d,0x95}, | ||
418 | {0x71,0x39,0xa8,0x01}, {0xde,0x08,0x0c,0xb3}, {0x9c,0xd8,0xb4,0xe4}, {0x90,0x64,0x56,0xc1}, | ||
419 | {0x61,0x7b,0xcb,0x84}, {0x70,0xd5,0x32,0xb6}, {0x74,0x48,0x6c,0x5c}, {0x42,0xd0,0xb8,0x57} | ||
420 | }; | ||
421 | |||
422 | static const u_int8_t T7[256][4] = { | ||
423 | {0xa7,0x50,0x51,0xf4}, {0x65,0x53,0x7e,0x41}, {0xa4,0xc3,0x1a,0x17}, {0x5e,0x96,0x3a,0x27}, | ||
424 | {0x6b,0xcb,0x3b,0xab}, {0x45,0xf1,0x1f,0x9d}, {0x58,0xab,0xac,0xfa}, {0x03,0x93,0x4b,0xe3}, | ||
425 | {0xfa,0x55,0x20,0x30}, {0x6d,0xf6,0xad,0x76}, {0x76,0x91,0x88,0xcc}, {0x4c,0x25,0xf5,0x02}, | ||
426 | {0xd7,0xfc,0x4f,0xe5}, {0xcb,0xd7,0xc5,0x2a}, {0x44,0x80,0x26,0x35}, {0xa3,0x8f,0xb5,0x62}, | ||
427 | {0x5a,0x49,0xde,0xb1}, {0x1b,0x67,0x25,0xba}, {0x0e,0x98,0x45,0xea}, {0xc0,0xe1,0x5d,0xfe}, | ||
428 | {0x75,0x02,0xc3,0x2f}, {0xf0,0x12,0x81,0x4c}, {0x97,0xa3,0x8d,0x46}, {0xf9,0xc6,0x6b,0xd3}, | ||
429 | {0x5f,0xe7,0x03,0x8f}, {0x9c,0x95,0x15,0x92}, {0x7a,0xeb,0xbf,0x6d}, {0x59,0xda,0x95,0x52}, | ||
430 | {0x83,0x2d,0xd4,0xbe}, {0x21,0xd3,0x58,0x74}, {0x69,0x29,0x49,0xe0}, {0xc8,0x44,0x8e,0xc9}, | ||
431 | {0x89,0x6a,0x75,0xc2}, {0x79,0x78,0xf4,0x8e}, {0x3e,0x6b,0x99,0x58}, {0x71,0xdd,0x27,0xb9}, | ||
432 | {0x4f,0xb6,0xbe,0xe1}, {0xad,0x17,0xf0,0x88}, {0xac,0x66,0xc9,0x20}, {0x3a,0xb4,0x7d,0xce}, | ||
433 | {0x4a,0x18,0x63,0xdf}, {0x31,0x82,0xe5,0x1a}, {0x33,0x60,0x97,0x51}, {0x7f,0x45,0x62,0x53}, | ||
434 | {0x77,0xe0,0xb1,0x64}, {0xae,0x84,0xbb,0x6b}, {0xa0,0x1c,0xfe,0x81}, {0x2b,0x94,0xf9,0x08}, | ||
435 | {0x68,0x58,0x70,0x48}, {0xfd,0x19,0x8f,0x45}, {0x6c,0x87,0x94,0xde}, {0xf8,0xb7,0x52,0x7b}, | ||
436 | {0xd3,0x23,0xab,0x73}, {0x02,0xe2,0x72,0x4b}, {0x8f,0x57,0xe3,0x1f}, {0xab,0x2a,0x66,0x55}, | ||
437 | {0x28,0x07,0xb2,0xeb}, {0xc2,0x03,0x2f,0xb5}, {0x7b,0x9a,0x86,0xc5}, {0x08,0xa5,0xd3,0x37}, | ||
438 | {0x87,0xf2,0x30,0x28}, {0xa5,0xb2,0x23,0xbf}, {0x6a,0xba,0x02,0x03}, {0x82,0x5c,0xed,0x16}, | ||
439 | {0x1c,0x2b,0x8a,0xcf}, {0xb4,0x92,0xa7,0x79}, {0xf2,0xf0,0xf3,0x07}, {0xe2,0xa1,0x4e,0x69}, | ||
440 | {0xf4,0xcd,0x65,0xda}, {0xbe,0xd5,0x06,0x05}, {0x62,0x1f,0xd1,0x34}, {0xfe,0x8a,0xc4,0xa6}, | ||
441 | {0x53,0x9d,0x34,0x2e}, {0x55,0xa0,0xa2,0xf3}, {0xe1,0x32,0x05,0x8a}, {0xeb,0x75,0xa4,0xf6}, | ||
442 | {0xec,0x39,0x0b,0x83}, {0xef,0xaa,0x40,0x60}, {0x9f,0x06,0x5e,0x71}, {0x10,0x51,0xbd,0x6e}, | ||
443 | {0x8a,0xf9,0x3e,0x21}, {0x06,0x3d,0x96,0xdd}, {0x05,0xae,0xdd,0x3e}, {0xbd,0x46,0x4d,0xe6}, | ||
444 | {0x8d,0xb5,0x91,0x54}, {0x5d,0x05,0x71,0xc4}, {0xd4,0x6f,0x04,0x06}, {0x15,0xff,0x60,0x50}, | ||
445 | {0xfb,0x24,0x19,0x98}, {0xe9,0x97,0xd6,0xbd}, {0x43,0xcc,0x89,0x40}, {0x9e,0x77,0x67,0xd9}, | ||
446 | {0x42,0xbd,0xb0,0xe8}, {0x8b,0x88,0x07,0x89}, {0x5b,0x38,0xe7,0x19}, {0xee,0xdb,0x79,0xc8}, | ||
447 | {0x0a,0x47,0xa1,0x7c}, {0x0f,0xe9,0x7c,0x42}, {0x1e,0xc9,0xf8,0x84}, {0x00,0x00,0x00,0x00}, | ||
448 | {0x86,0x83,0x09,0x80}, {0xed,0x48,0x32,0x2b}, {0x70,0xac,0x1e,0x11}, {0x72,0x4e,0x6c,0x5a}, | ||
449 | {0xff,0xfb,0xfd,0x0e}, {0x38,0x56,0x0f,0x85}, {0xd5,0x1e,0x3d,0xae}, {0x39,0x27,0x36,0x2d}, | ||
450 | {0xd9,0x64,0x0a,0x0f}, {0xa6,0x21,0x68,0x5c}, {0x54,0xd1,0x9b,0x5b}, {0x2e,0x3a,0x24,0x36}, | ||
451 | {0x67,0xb1,0x0c,0x0a}, {0xe7,0x0f,0x93,0x57}, {0x96,0xd2,0xb4,0xee}, {0x91,0x9e,0x1b,0x9b}, | ||
452 | {0xc5,0x4f,0x80,0xc0}, {0x20,0xa2,0x61,0xdc}, {0x4b,0x69,0x5a,0x77}, {0x1a,0x16,0x1c,0x12}, | ||
453 | {0xba,0x0a,0xe2,0x93}, {0x2a,0xe5,0xc0,0xa0}, {0xe0,0x43,0x3c,0x22}, {0x17,0x1d,0x12,0x1b}, | ||
454 | {0x0d,0x0b,0x0e,0x09}, {0xc7,0xad,0xf2,0x8b}, {0xa8,0xb9,0x2d,0xb6}, {0xa9,0xc8,0x14,0x1e}, | ||
455 | {0x19,0x85,0x57,0xf1}, {0x07,0x4c,0xaf,0x75}, {0xdd,0xbb,0xee,0x99}, {0x60,0xfd,0xa3,0x7f}, | ||
456 | {0x26,0x9f,0xf7,0x01}, {0xf5,0xbc,0x5c,0x72}, {0x3b,0xc5,0x44,0x66}, {0x7e,0x34,0x5b,0xfb}, | ||
457 | {0x29,0x76,0x8b,0x43}, {0xc6,0xdc,0xcb,0x23}, {0xfc,0x68,0xb6,0xed}, {0xf1,0x63,0xb8,0xe4}, | ||
458 | {0xdc,0xca,0xd7,0x31}, {0x85,0x10,0x42,0x63}, {0x22,0x40,0x13,0x97}, {0x11,0x20,0x84,0xc6}, | ||
459 | {0x24,0x7d,0x85,0x4a}, {0x3d,0xf8,0xd2,0xbb}, {0x32,0x11,0xae,0xf9}, {0xa1,0x6d,0xc7,0x29}, | ||
460 | {0x2f,0x4b,0x1d,0x9e}, {0x30,0xf3,0xdc,0xb2}, {0x52,0xec,0x0d,0x86}, {0xe3,0xd0,0x77,0xc1}, | ||
461 | {0x16,0x6c,0x2b,0xb3}, {0xb9,0x99,0xa9,0x70}, {0x48,0xfa,0x11,0x94}, {0x64,0x22,0x47,0xe9}, | ||
462 | {0x8c,0xc4,0xa8,0xfc}, {0x3f,0x1a,0xa0,0xf0}, {0x2c,0xd8,0x56,0x7d}, {0x90,0xef,0x22,0x33}, | ||
463 | {0x4e,0xc7,0x87,0x49}, {0xd1,0xc1,0xd9,0x38}, {0xa2,0xfe,0x8c,0xca}, {0x0b,0x36,0x98,0xd4}, | ||
464 | {0x81,0xcf,0xa6,0xf5}, {0xde,0x28,0xa5,0x7a}, {0x8e,0x26,0xda,0xb7}, {0xbf,0xa4,0x3f,0xad}, | ||
465 | {0x9d,0xe4,0x2c,0x3a}, {0x92,0x0d,0x50,0x78}, {0xcc,0x9b,0x6a,0x5f}, {0x46,0x62,0x54,0x7e}, | ||
466 | {0x13,0xc2,0xf6,0x8d}, {0xb8,0xe8,0x90,0xd8}, {0xf7,0x5e,0x2e,0x39}, {0xaf,0xf5,0x82,0xc3}, | ||
467 | {0x80,0xbe,0x9f,0x5d}, {0x93,0x7c,0x69,0xd0}, {0x2d,0xa9,0x6f,0xd5}, {0x12,0xb3,0xcf,0x25}, | ||
468 | {0x99,0x3b,0xc8,0xac}, {0x7d,0xa7,0x10,0x18}, {0x63,0x6e,0xe8,0x9c}, {0xbb,0x7b,0xdb,0x3b}, | ||
469 | {0x78,0x09,0xcd,0x26}, {0x18,0xf4,0x6e,0x59}, {0xb7,0x01,0xec,0x9a}, {0x9a,0xa8,0x83,0x4f}, | ||
470 | {0x6e,0x65,0xe6,0x95}, {0xe6,0x7e,0xaa,0xff}, {0xcf,0x08,0x21,0xbc}, {0xe8,0xe6,0xef,0x15}, | ||
471 | {0x9b,0xd9,0xba,0xe7}, {0x36,0xce,0x4a,0x6f}, {0x09,0xd4,0xea,0x9f}, {0x7c,0xd6,0x29,0xb0}, | ||
472 | {0xb2,0xaf,0x31,0xa4}, {0x23,0x31,0x2a,0x3f}, {0x94,0x30,0xc6,0xa5}, {0x66,0xc0,0x35,0xa2}, | ||
473 | {0xbc,0x37,0x74,0x4e}, {0xca,0xa6,0xfc,0x82}, {0xd0,0xb0,0xe0,0x90}, {0xd8,0x15,0x33,0xa7}, | ||
474 | {0x98,0x4a,0xf1,0x04}, {0xda,0xf7,0x41,0xec}, {0x50,0x0e,0x7f,0xcd}, {0xf6,0x2f,0x17,0x91}, | ||
475 | {0xd6,0x8d,0x76,0x4d}, {0xb0,0x4d,0x43,0xef}, {0x4d,0x54,0xcc,0xaa}, {0x04,0xdf,0xe4,0x96}, | ||
476 | {0xb5,0xe3,0x9e,0xd1}, {0x88,0x1b,0x4c,0x6a}, {0x1f,0xb8,0xc1,0x2c}, {0x51,0x7f,0x46,0x65}, | ||
477 | {0xea,0x04,0x9d,0x5e}, {0x35,0x5d,0x01,0x8c}, {0x74,0x73,0xfa,0x87}, {0x41,0x2e,0xfb,0x0b}, | ||
478 | {0x1d,0x5a,0xb3,0x67}, {0xd2,0x52,0x92,0xdb}, {0x56,0x33,0xe9,0x10}, {0x47,0x13,0x6d,0xd6}, | ||
479 | {0x61,0x8c,0x9a,0xd7}, {0x0c,0x7a,0x37,0xa1}, {0x14,0x8e,0x59,0xf8}, {0x3c,0x89,0xeb,0x13}, | ||
480 | {0x27,0xee,0xce,0xa9}, {0xc9,0x35,0xb7,0x61}, {0xe5,0xed,0xe1,0x1c}, {0xb1,0x3c,0x7a,0x47}, | ||
481 | {0xdf,0x59,0x9c,0xd2}, {0x73,0x3f,0x55,0xf2}, {0xce,0x79,0x18,0x14}, {0x37,0xbf,0x73,0xc7}, | ||
482 | {0xcd,0xea,0x53,0xf7}, {0xaa,0x5b,0x5f,0xfd}, {0x6f,0x14,0xdf,0x3d}, {0xdb,0x86,0x78,0x44}, | ||
483 | {0xf3,0x81,0xca,0xaf}, {0xc4,0x3e,0xb9,0x68}, {0x34,0x2c,0x38,0x24}, {0x40,0x5f,0xc2,0xa3}, | ||
484 | {0xc3,0x72,0x16,0x1d}, {0x25,0x0c,0xbc,0xe2}, {0x49,0x8b,0x28,0x3c}, {0x95,0x41,0xff,0x0d}, | ||
485 | {0x01,0x71,0x39,0xa8}, {0xb3,0xde,0x08,0x0c}, {0xe4,0x9c,0xd8,0xb4}, {0xc1,0x90,0x64,0x56}, | ||
486 | {0x84,0x61,0x7b,0xcb}, {0xb6,0x70,0xd5,0x32}, {0x5c,0x74,0x48,0x6c}, {0x57,0x42,0xd0,0xb8} | ||
487 | }; | ||
488 | |||
489 | static const u_int8_t T8[256][4] = { | ||
490 | {0xf4,0xa7,0x50,0x51}, {0x41,0x65,0x53,0x7e}, {0x17,0xa4,0xc3,0x1a}, {0x27,0x5e,0x96,0x3a}, | ||
491 | {0xab,0x6b,0xcb,0x3b}, {0x9d,0x45,0xf1,0x1f}, {0xfa,0x58,0xab,0xac}, {0xe3,0x03,0x93,0x4b}, | ||
492 | {0x30,0xfa,0x55,0x20}, {0x76,0x6d,0xf6,0xad}, {0xcc,0x76,0x91,0x88}, {0x02,0x4c,0x25,0xf5}, | ||
493 | {0xe5,0xd7,0xfc,0x4f}, {0x2a,0xcb,0xd7,0xc5}, {0x35,0x44,0x80,0x26}, {0x62,0xa3,0x8f,0xb5}, | ||
494 | {0xb1,0x5a,0x49,0xde}, {0xba,0x1b,0x67,0x25}, {0xea,0x0e,0x98,0x45}, {0xfe,0xc0,0xe1,0x5d}, | ||
495 | {0x2f,0x75,0x02,0xc3}, {0x4c,0xf0,0x12,0x81}, {0x46,0x97,0xa3,0x8d}, {0xd3,0xf9,0xc6,0x6b}, | ||
496 | {0x8f,0x5f,0xe7,0x03}, {0x92,0x9c,0x95,0x15}, {0x6d,0x7a,0xeb,0xbf}, {0x52,0x59,0xda,0x95}, | ||
497 | {0xbe,0x83,0x2d,0xd4}, {0x74,0x21,0xd3,0x58}, {0xe0,0x69,0x29,0x49}, {0xc9,0xc8,0x44,0x8e}, | ||
498 | {0xc2,0x89,0x6a,0x75}, {0x8e,0x79,0x78,0xf4}, {0x58,0x3e,0x6b,0x99}, {0xb9,0x71,0xdd,0x27}, | ||
499 | {0xe1,0x4f,0xb6,0xbe}, {0x88,0xad,0x17,0xf0}, {0x20,0xac,0x66,0xc9}, {0xce,0x3a,0xb4,0x7d}, | ||
500 | {0xdf,0x4a,0x18,0x63}, {0x1a,0x31,0x82,0xe5}, {0x51,0x33,0x60,0x97}, {0x53,0x7f,0x45,0x62}, | ||
501 | {0x64,0x77,0xe0,0xb1}, {0x6b,0xae,0x84,0xbb}, {0x81,0xa0,0x1c,0xfe}, {0x08,0x2b,0x94,0xf9}, | ||
502 | {0x48,0x68,0x58,0x70}, {0x45,0xfd,0x19,0x8f}, {0xde,0x6c,0x87,0x94}, {0x7b,0xf8,0xb7,0x52}, | ||
503 | {0x73,0xd3,0x23,0xab}, {0x4b,0x02,0xe2,0x72}, {0x1f,0x8f,0x57,0xe3}, {0x55,0xab,0x2a,0x66}, | ||
504 | {0xeb,0x28,0x07,0xb2}, {0xb5,0xc2,0x03,0x2f}, {0xc5,0x7b,0x9a,0x86}, {0x37,0x08,0xa5,0xd3}, | ||
505 | {0x28,0x87,0xf2,0x30}, {0xbf,0xa5,0xb2,0x23}, {0x03,0x6a,0xba,0x02}, {0x16,0x82,0x5c,0xed}, | ||
506 | {0xcf,0x1c,0x2b,0x8a}, {0x79,0xb4,0x92,0xa7}, {0x07,0xf2,0xf0,0xf3}, {0x69,0xe2,0xa1,0x4e}, | ||
507 | {0xda,0xf4,0xcd,0x65}, {0x05,0xbe,0xd5,0x06}, {0x34,0x62,0x1f,0xd1}, {0xa6,0xfe,0x8a,0xc4}, | ||
508 | {0x2e,0x53,0x9d,0x34}, {0xf3,0x55,0xa0,0xa2}, {0x8a,0xe1,0x32,0x05}, {0xf6,0xeb,0x75,0xa4}, | ||
509 | {0x83,0xec,0x39,0x0b}, {0x60,0xef,0xaa,0x40}, {0x71,0x9f,0x06,0x5e}, {0x6e,0x10,0x51,0xbd}, | ||
510 | {0x21,0x8a,0xf9,0x3e}, {0xdd,0x06,0x3d,0x96}, {0x3e,0x05,0xae,0xdd}, {0xe6,0xbd,0x46,0x4d}, | ||
511 | {0x54,0x8d,0xb5,0x91}, {0xc4,0x5d,0x05,0x71}, {0x06,0xd4,0x6f,0x04}, {0x50,0x15,0xff,0x60}, | ||
512 | {0x98,0xfb,0x24,0x19}, {0xbd,0xe9,0x97,0xd6}, {0x40,0x43,0xcc,0x89}, {0xd9,0x9e,0x77,0x67}, | ||
513 | {0xe8,0x42,0xbd,0xb0}, {0x89,0x8b,0x88,0x07}, {0x19,0x5b,0x38,0xe7}, {0xc8,0xee,0xdb,0x79}, | ||
514 | {0x7c,0x0a,0x47,0xa1}, {0x42,0x0f,0xe9,0x7c}, {0x84,0x1e,0xc9,0xf8}, {0x00,0x00,0x00,0x00}, | ||
515 | {0x80,0x86,0x83,0x09}, {0x2b,0xed,0x48,0x32}, {0x11,0x70,0xac,0x1e}, {0x5a,0x72,0x4e,0x6c}, | ||
516 | {0x0e,0xff,0xfb,0xfd}, {0x85,0x38,0x56,0x0f}, {0xae,0xd5,0x1e,0x3d}, {0x2d,0x39,0x27,0x36}, | ||
517 | {0x0f,0xd9,0x64,0x0a}, {0x5c,0xa6,0x21,0x68}, {0x5b,0x54,0xd1,0x9b}, {0x36,0x2e,0x3a,0x24}, | ||
518 | {0x0a,0x67,0xb1,0x0c}, {0x57,0xe7,0x0f,0x93}, {0xee,0x96,0xd2,0xb4}, {0x9b,0x91,0x9e,0x1b}, | ||
519 | {0xc0,0xc5,0x4f,0x80}, {0xdc,0x20,0xa2,0x61}, {0x77,0x4b,0x69,0x5a}, {0x12,0x1a,0x16,0x1c}, | ||
520 | {0x93,0xba,0x0a,0xe2}, {0xa0,0x2a,0xe5,0xc0}, {0x22,0xe0,0x43,0x3c}, {0x1b,0x17,0x1d,0x12}, | ||
521 | {0x09,0x0d,0x0b,0x0e}, {0x8b,0xc7,0xad,0xf2}, {0xb6,0xa8,0xb9,0x2d}, {0x1e,0xa9,0xc8,0x14}, | ||
522 | {0xf1,0x19,0x85,0x57}, {0x75,0x07,0x4c,0xaf}, {0x99,0xdd,0xbb,0xee}, {0x7f,0x60,0xfd,0xa3}, | ||
523 | {0x01,0x26,0x9f,0xf7}, {0x72,0xf5,0xbc,0x5c}, {0x66,0x3b,0xc5,0x44}, {0xfb,0x7e,0x34,0x5b}, | ||
524 | {0x43,0x29,0x76,0x8b}, {0x23,0xc6,0xdc,0xcb}, {0xed,0xfc,0x68,0xb6}, {0xe4,0xf1,0x63,0xb8}, | ||
525 | {0x31,0xdc,0xca,0xd7}, {0x63,0x85,0x10,0x42}, {0x97,0x22,0x40,0x13}, {0xc6,0x11,0x20,0x84}, | ||
526 | {0x4a,0x24,0x7d,0x85}, {0xbb,0x3d,0xf8,0xd2}, {0xf9,0x32,0x11,0xae}, {0x29,0xa1,0x6d,0xc7}, | ||
527 | {0x9e,0x2f,0x4b,0x1d}, {0xb2,0x30,0xf3,0xdc}, {0x86,0x52,0xec,0x0d}, {0xc1,0xe3,0xd0,0x77}, | ||
528 | {0xb3,0x16,0x6c,0x2b}, {0x70,0xb9,0x99,0xa9}, {0x94,0x48,0xfa,0x11}, {0xe9,0x64,0x22,0x47}, | ||
529 | {0xfc,0x8c,0xc4,0xa8}, {0xf0,0x3f,0x1a,0xa0}, {0x7d,0x2c,0xd8,0x56}, {0x33,0x90,0xef,0x22}, | ||
530 | {0x49,0x4e,0xc7,0x87}, {0x38,0xd1,0xc1,0xd9}, {0xca,0xa2,0xfe,0x8c}, {0xd4,0x0b,0x36,0x98}, | ||
531 | {0xf5,0x81,0xcf,0xa6}, {0x7a,0xde,0x28,0xa5}, {0xb7,0x8e,0x26,0xda}, {0xad,0xbf,0xa4,0x3f}, | ||
532 | {0x3a,0x9d,0xe4,0x2c}, {0x78,0x92,0x0d,0x50}, {0x5f,0xcc,0x9b,0x6a}, {0x7e,0x46,0x62,0x54}, | ||
533 | {0x8d,0x13,0xc2,0xf6}, {0xd8,0xb8,0xe8,0x90}, {0x39,0xf7,0x5e,0x2e}, {0xc3,0xaf,0xf5,0x82}, | ||
534 | {0x5d,0x80,0xbe,0x9f}, {0xd0,0x93,0x7c,0x69}, {0xd5,0x2d,0xa9,0x6f}, {0x25,0x12,0xb3,0xcf}, | ||
535 | {0xac,0x99,0x3b,0xc8}, {0x18,0x7d,0xa7,0x10}, {0x9c,0x63,0x6e,0xe8}, {0x3b,0xbb,0x7b,0xdb}, | ||
536 | {0x26,0x78,0x09,0xcd}, {0x59,0x18,0xf4,0x6e}, {0x9a,0xb7,0x01,0xec}, {0x4f,0x9a,0xa8,0x83}, | ||
537 | {0x95,0x6e,0x65,0xe6}, {0xff,0xe6,0x7e,0xaa}, {0xbc,0xcf,0x08,0x21}, {0x15,0xe8,0xe6,0xef}, | ||
538 | {0xe7,0x9b,0xd9,0xba}, {0x6f,0x36,0xce,0x4a}, {0x9f,0x09,0xd4,0xea}, {0xb0,0x7c,0xd6,0x29}, | ||
539 | {0xa4,0xb2,0xaf,0x31}, {0x3f,0x23,0x31,0x2a}, {0xa5,0x94,0x30,0xc6}, {0xa2,0x66,0xc0,0x35}, | ||
540 | {0x4e,0xbc,0x37,0x74}, {0x82,0xca,0xa6,0xfc}, {0x90,0xd0,0xb0,0xe0}, {0xa7,0xd8,0x15,0x33}, | ||
541 | {0x04,0x98,0x4a,0xf1}, {0xec,0xda,0xf7,0x41}, {0xcd,0x50,0x0e,0x7f}, {0x91,0xf6,0x2f,0x17}, | ||
542 | {0x4d,0xd6,0x8d,0x76}, {0xef,0xb0,0x4d,0x43}, {0xaa,0x4d,0x54,0xcc}, {0x96,0x04,0xdf,0xe4}, | ||
543 | {0xd1,0xb5,0xe3,0x9e}, {0x6a,0x88,0x1b,0x4c}, {0x2c,0x1f,0xb8,0xc1}, {0x65,0x51,0x7f,0x46}, | ||
544 | {0x5e,0xea,0x04,0x9d}, {0x8c,0x35,0x5d,0x01}, {0x87,0x74,0x73,0xfa}, {0x0b,0x41,0x2e,0xfb}, | ||
545 | {0x67,0x1d,0x5a,0xb3}, {0xdb,0xd2,0x52,0x92}, {0x10,0x56,0x33,0xe9}, {0xd6,0x47,0x13,0x6d}, | ||
546 | {0xd7,0x61,0x8c,0x9a}, {0xa1,0x0c,0x7a,0x37}, {0xf8,0x14,0x8e,0x59}, {0x13,0x3c,0x89,0xeb}, | ||
547 | {0xa9,0x27,0xee,0xce}, {0x61,0xc9,0x35,0xb7}, {0x1c,0xe5,0xed,0xe1}, {0x47,0xb1,0x3c,0x7a}, | ||
548 | {0xd2,0xdf,0x59,0x9c}, {0xf2,0x73,0x3f,0x55}, {0x14,0xce,0x79,0x18}, {0xc7,0x37,0xbf,0x73}, | ||
549 | {0xf7,0xcd,0xea,0x53}, {0xfd,0xaa,0x5b,0x5f}, {0x3d,0x6f,0x14,0xdf}, {0x44,0xdb,0x86,0x78}, | ||
550 | {0xaf,0xf3,0x81,0xca}, {0x68,0xc4,0x3e,0xb9}, {0x24,0x34,0x2c,0x38}, {0xa3,0x40,0x5f,0xc2}, | ||
551 | {0x1d,0xc3,0x72,0x16}, {0xe2,0x25,0x0c,0xbc}, {0x3c,0x49,0x8b,0x28}, {0x0d,0x95,0x41,0xff}, | ||
552 | {0xa8,0x01,0x71,0x39}, {0x0c,0xb3,0xde,0x08}, {0xb4,0xe4,0x9c,0xd8}, {0x56,0xc1,0x90,0x64}, | ||
553 | {0xcb,0x84,0x61,0x7b}, {0x32,0xb6,0x70,0xd5}, {0x6c,0x5c,0x74,0x48}, {0xb8,0x57,0x42,0xd0} | ||
554 | }; | ||
555 | |||
556 | static const u_int8_t S5[256] = { | ||
557 | 0x52,0x09,0x6a,0xd5, | ||
558 | 0x30,0x36,0xa5,0x38, | ||
559 | 0xbf,0x40,0xa3,0x9e, | ||
560 | 0x81,0xf3,0xd7,0xfb, | ||
561 | 0x7c,0xe3,0x39,0x82, | ||
562 | 0x9b,0x2f,0xff,0x87, | ||
563 | 0x34,0x8e,0x43,0x44, | ||
564 | 0xc4,0xde,0xe9,0xcb, | ||
565 | 0x54,0x7b,0x94,0x32, | ||
566 | 0xa6,0xc2,0x23,0x3d, | ||
567 | 0xee,0x4c,0x95,0x0b, | ||
568 | 0x42,0xfa,0xc3,0x4e, | ||
569 | 0x08,0x2e,0xa1,0x66, | ||
570 | 0x28,0xd9,0x24,0xb2, | ||
571 | 0x76,0x5b,0xa2,0x49, | ||
572 | 0x6d,0x8b,0xd1,0x25, | ||
573 | 0x72,0xf8,0xf6,0x64, | ||
574 | 0x86,0x68,0x98,0x16, | ||
575 | 0xd4,0xa4,0x5c,0xcc, | ||
576 | 0x5d,0x65,0xb6,0x92, | ||
577 | 0x6c,0x70,0x48,0x50, | ||
578 | 0xfd,0xed,0xb9,0xda, | ||
579 | 0x5e,0x15,0x46,0x57, | ||
580 | 0xa7,0x8d,0x9d,0x84, | ||
581 | 0x90,0xd8,0xab,0x00, | ||
582 | 0x8c,0xbc,0xd3,0x0a, | ||
583 | 0xf7,0xe4,0x58,0x05, | ||
584 | 0xb8,0xb3,0x45,0x06, | ||
585 | 0xd0,0x2c,0x1e,0x8f, | ||
586 | 0xca,0x3f,0x0f,0x02, | ||
587 | 0xc1,0xaf,0xbd,0x03, | ||
588 | 0x01,0x13,0x8a,0x6b, | ||
589 | 0x3a,0x91,0x11,0x41, | ||
590 | 0x4f,0x67,0xdc,0xea, | ||
591 | 0x97,0xf2,0xcf,0xce, | ||
592 | 0xf0,0xb4,0xe6,0x73, | ||
593 | 0x96,0xac,0x74,0x22, | ||
594 | 0xe7,0xad,0x35,0x85, | ||
595 | 0xe2,0xf9,0x37,0xe8, | ||
596 | 0x1c,0x75,0xdf,0x6e, | ||
597 | 0x47,0xf1,0x1a,0x71, | ||
598 | 0x1d,0x29,0xc5,0x89, | ||
599 | 0x6f,0xb7,0x62,0x0e, | ||
600 | 0xaa,0x18,0xbe,0x1b, | ||
601 | 0xfc,0x56,0x3e,0x4b, | ||
602 | 0xc6,0xd2,0x79,0x20, | ||
603 | 0x9a,0xdb,0xc0,0xfe, | ||
604 | 0x78,0xcd,0x5a,0xf4, | ||
605 | 0x1f,0xdd,0xa8,0x33, | ||
606 | 0x88,0x07,0xc7,0x31, | ||
607 | 0xb1,0x12,0x10,0x59, | ||
608 | 0x27,0x80,0xec,0x5f, | ||
609 | 0x60,0x51,0x7f,0xa9, | ||
610 | 0x19,0xb5,0x4a,0x0d, | ||
611 | 0x2d,0xe5,0x7a,0x9f, | ||
612 | 0x93,0xc9,0x9c,0xef, | ||
613 | 0xa0,0xe0,0x3b,0x4d, | ||
614 | 0xae,0x2a,0xf5,0xb0, | ||
615 | 0xc8,0xeb,0xbb,0x3c, | ||
616 | 0x83,0x53,0x99,0x61, | ||
617 | 0x17,0x2b,0x04,0x7e, | ||
618 | 0xba,0x77,0xd6,0x26, | ||
619 | 0xe1,0x69,0x14,0x63, | ||
620 | 0x55,0x21,0x0c,0x7d | ||
621 | }; | ||
622 | |||
623 | static const u_int8_t U1[256][4] = { | ||
624 | {0x00,0x00,0x00,0x00}, {0x0e,0x09,0x0d,0x0b}, {0x1c,0x12,0x1a,0x16}, {0x12,0x1b,0x17,0x1d}, | ||
625 | {0x38,0x24,0x34,0x2c}, {0x36,0x2d,0x39,0x27}, {0x24,0x36,0x2e,0x3a}, {0x2a,0x3f,0x23,0x31}, | ||
626 | {0x70,0x48,0x68,0x58}, {0x7e,0x41,0x65,0x53}, {0x6c,0x5a,0x72,0x4e}, {0x62,0x53,0x7f,0x45}, | ||
627 | {0x48,0x6c,0x5c,0x74}, {0x46,0x65,0x51,0x7f}, {0x54,0x7e,0x46,0x62}, {0x5a,0x77,0x4b,0x69}, | ||
628 | {0xe0,0x90,0xd0,0xb0}, {0xee,0x99,0xdd,0xbb}, {0xfc,0x82,0xca,0xa6}, {0xf2,0x8b,0xc7,0xad}, | ||
629 | {0xd8,0xb4,0xe4,0x9c}, {0xd6,0xbd,0xe9,0x97}, {0xc4,0xa6,0xfe,0x8a}, {0xca,0xaf,0xf3,0x81}, | ||
630 | {0x90,0xd8,0xb8,0xe8}, {0x9e,0xd1,0xb5,0xe3}, {0x8c,0xca,0xa2,0xfe}, {0x82,0xc3,0xaf,0xf5}, | ||
631 | {0xa8,0xfc,0x8c,0xc4}, {0xa6,0xf5,0x81,0xcf}, {0xb4,0xee,0x96,0xd2}, {0xba,0xe7,0x9b,0xd9}, | ||
632 | {0xdb,0x3b,0xbb,0x7b}, {0xd5,0x32,0xb6,0x70}, {0xc7,0x29,0xa1,0x6d}, {0xc9,0x20,0xac,0x66}, | ||
633 | {0xe3,0x1f,0x8f,0x57}, {0xed,0x16,0x82,0x5c}, {0xff,0x0d,0x95,0x41}, {0xf1,0x04,0x98,0x4a}, | ||
634 | {0xab,0x73,0xd3,0x23}, {0xa5,0x7a,0xde,0x28}, {0xb7,0x61,0xc9,0x35}, {0xb9,0x68,0xc4,0x3e}, | ||
635 | {0x93,0x57,0xe7,0x0f}, {0x9d,0x5e,0xea,0x04}, {0x8f,0x45,0xfd,0x19}, {0x81,0x4c,0xf0,0x12}, | ||
636 | {0x3b,0xab,0x6b,0xcb}, {0x35,0xa2,0x66,0xc0}, {0x27,0xb9,0x71,0xdd}, {0x29,0xb0,0x7c,0xd6}, | ||
637 | {0x03,0x8f,0x5f,0xe7}, {0x0d,0x86,0x52,0xec}, {0x1f,0x9d,0x45,0xf1}, {0x11,0x94,0x48,0xfa}, | ||
638 | {0x4b,0xe3,0x03,0x93}, {0x45,0xea,0x0e,0x98}, {0x57,0xf1,0x19,0x85}, {0x59,0xf8,0x14,0x8e}, | ||
639 | {0x73,0xc7,0x37,0xbf}, {0x7d,0xce,0x3a,0xb4}, {0x6f,0xd5,0x2d,0xa9}, {0x61,0xdc,0x20,0xa2}, | ||
640 | {0xad,0x76,0x6d,0xf6}, {0xa3,0x7f,0x60,0xfd}, {0xb1,0x64,0x77,0xe0}, {0xbf,0x6d,0x7a,0xeb}, | ||
641 | {0x95,0x52,0x59,0xda}, {0x9b,0x5b,0x54,0xd1}, {0x89,0x40,0x43,0xcc}, {0x87,0x49,0x4e,0xc7}, | ||
642 | {0xdd,0x3e,0x05,0xae}, {0xd3,0x37,0x08,0xa5}, {0xc1,0x2c,0x1f,0xb8}, {0xcf,0x25,0x12,0xb3}, | ||
643 | {0xe5,0x1a,0x31,0x82}, {0xeb,0x13,0x3c,0x89}, {0xf9,0x08,0x2b,0x94}, {0xf7,0x01,0x26,0x9f}, | ||
644 | {0x4d,0xe6,0xbd,0x46}, {0x43,0xef,0xb0,0x4d}, {0x51,0xf4,0xa7,0x50}, {0x5f,0xfd,0xaa,0x5b}, | ||
645 | {0x75,0xc2,0x89,0x6a}, {0x7b,0xcb,0x84,0x61}, {0x69,0xd0,0x93,0x7c}, {0x67,0xd9,0x9e,0x77}, | ||
646 | {0x3d,0xae,0xd5,0x1e}, {0x33,0xa7,0xd8,0x15}, {0x21,0xbc,0xcf,0x08}, {0x2f,0xb5,0xc2,0x03}, | ||
647 | {0x05,0x8a,0xe1,0x32}, {0x0b,0x83,0xec,0x39}, {0x19,0x98,0xfb,0x24}, {0x17,0x91,0xf6,0x2f}, | ||
648 | {0x76,0x4d,0xd6,0x8d}, {0x78,0x44,0xdb,0x86}, {0x6a,0x5f,0xcc,0x9b}, {0x64,0x56,0xc1,0x90}, | ||
649 | {0x4e,0x69,0xe2,0xa1}, {0x40,0x60,0xef,0xaa}, {0x52,0x7b,0xf8,0xb7}, {0x5c,0x72,0xf5,0xbc}, | ||
650 | {0x06,0x05,0xbe,0xd5}, {0x08,0x0c,0xb3,0xde}, {0x1a,0x17,0xa4,0xc3}, {0x14,0x1e,0xa9,0xc8}, | ||
651 | {0x3e,0x21,0x8a,0xf9}, {0x30,0x28,0x87,0xf2}, {0x22,0x33,0x90,0xef}, {0x2c,0x3a,0x9d,0xe4}, | ||
652 | {0x96,0xdd,0x06,0x3d}, {0x98,0xd4,0x0b,0x36}, {0x8a,0xcf,0x1c,0x2b}, {0x84,0xc6,0x11,0x20}, | ||
653 | {0xae,0xf9,0x32,0x11}, {0xa0,0xf0,0x3f,0x1a}, {0xb2,0xeb,0x28,0x07}, {0xbc,0xe2,0x25,0x0c}, | ||
654 | {0xe6,0x95,0x6e,0x65}, {0xe8,0x9c,0x63,0x6e}, {0xfa,0x87,0x74,0x73}, {0xf4,0x8e,0x79,0x78}, | ||
655 | {0xde,0xb1,0x5a,0x49}, {0xd0,0xb8,0x57,0x42}, {0xc2,0xa3,0x40,0x5f}, {0xcc,0xaa,0x4d,0x54}, | ||
656 | {0x41,0xec,0xda,0xf7}, {0x4f,0xe5,0xd7,0xfc}, {0x5d,0xfe,0xc0,0xe1}, {0x53,0xf7,0xcd,0xea}, | ||
657 | {0x79,0xc8,0xee,0xdb}, {0x77,0xc1,0xe3,0xd0}, {0x65,0xda,0xf4,0xcd}, {0x6b,0xd3,0xf9,0xc6}, | ||
658 | {0x31,0xa4,0xb2,0xaf}, {0x3f,0xad,0xbf,0xa4}, {0x2d,0xb6,0xa8,0xb9}, {0x23,0xbf,0xa5,0xb2}, | ||
659 | {0x09,0x80,0x86,0x83}, {0x07,0x89,0x8b,0x88}, {0x15,0x92,0x9c,0x95}, {0x1b,0x9b,0x91,0x9e}, | ||
660 | {0xa1,0x7c,0x0a,0x47}, {0xaf,0x75,0x07,0x4c}, {0xbd,0x6e,0x10,0x51}, {0xb3,0x67,0x1d,0x5a}, | ||
661 | {0x99,0x58,0x3e,0x6b}, {0x97,0x51,0x33,0x60}, {0x85,0x4a,0x24,0x7d}, {0x8b,0x43,0x29,0x76}, | ||
662 | {0xd1,0x34,0x62,0x1f}, {0xdf,0x3d,0x6f,0x14}, {0xcd,0x26,0x78,0x09}, {0xc3,0x2f,0x75,0x02}, | ||
663 | {0xe9,0x10,0x56,0x33}, {0xe7,0x19,0x5b,0x38}, {0xf5,0x02,0x4c,0x25}, {0xfb,0x0b,0x41,0x2e}, | ||
664 | {0x9a,0xd7,0x61,0x8c}, {0x94,0xde,0x6c,0x87}, {0x86,0xc5,0x7b,0x9a}, {0x88,0xcc,0x76,0x91}, | ||
665 | {0xa2,0xf3,0x55,0xa0}, {0xac,0xfa,0x58,0xab}, {0xbe,0xe1,0x4f,0xb6}, {0xb0,0xe8,0x42,0xbd}, | ||
666 | {0xea,0x9f,0x09,0xd4}, {0xe4,0x96,0x04,0xdf}, {0xf6,0x8d,0x13,0xc2}, {0xf8,0x84,0x1e,0xc9}, | ||
667 | {0xd2,0xbb,0x3d,0xf8}, {0xdc,0xb2,0x30,0xf3}, {0xce,0xa9,0x27,0xee}, {0xc0,0xa0,0x2a,0xe5}, | ||
668 | {0x7a,0x47,0xb1,0x3c}, {0x74,0x4e,0xbc,0x37}, {0x66,0x55,0xab,0x2a}, {0x68,0x5c,0xa6,0x21}, | ||
669 | {0x42,0x63,0x85,0x10}, {0x4c,0x6a,0x88,0x1b}, {0x5e,0x71,0x9f,0x06}, {0x50,0x78,0x92,0x0d}, | ||
670 | {0x0a,0x0f,0xd9,0x64}, {0x04,0x06,0xd4,0x6f}, {0x16,0x1d,0xc3,0x72}, {0x18,0x14,0xce,0x79}, | ||
671 | {0x32,0x2b,0xed,0x48}, {0x3c,0x22,0xe0,0x43}, {0x2e,0x39,0xf7,0x5e}, {0x20,0x30,0xfa,0x55}, | ||
672 | {0xec,0x9a,0xb7,0x01}, {0xe2,0x93,0xba,0x0a}, {0xf0,0x88,0xad,0x17}, {0xfe,0x81,0xa0,0x1c}, | ||
673 | {0xd4,0xbe,0x83,0x2d}, {0xda,0xb7,0x8e,0x26}, {0xc8,0xac,0x99,0x3b}, {0xc6,0xa5,0x94,0x30}, | ||
674 | {0x9c,0xd2,0xdf,0x59}, {0x92,0xdb,0xd2,0x52}, {0x80,0xc0,0xc5,0x4f}, {0x8e,0xc9,0xc8,0x44}, | ||
675 | {0xa4,0xf6,0xeb,0x75}, {0xaa,0xff,0xe6,0x7e}, {0xb8,0xe4,0xf1,0x63}, {0xb6,0xed,0xfc,0x68}, | ||
676 | {0x0c,0x0a,0x67,0xb1}, {0x02,0x03,0x6a,0xba}, {0x10,0x18,0x7d,0xa7}, {0x1e,0x11,0x70,0xac}, | ||
677 | {0x34,0x2e,0x53,0x9d}, {0x3a,0x27,0x5e,0x96}, {0x28,0x3c,0x49,0x8b}, {0x26,0x35,0x44,0x80}, | ||
678 | {0x7c,0x42,0x0f,0xe9}, {0x72,0x4b,0x02,0xe2}, {0x60,0x50,0x15,0xff}, {0x6e,0x59,0x18,0xf4}, | ||
679 | {0x44,0x66,0x3b,0xc5}, {0x4a,0x6f,0x36,0xce}, {0x58,0x74,0x21,0xd3}, {0x56,0x7d,0x2c,0xd8}, | ||
680 | {0x37,0xa1,0x0c,0x7a}, {0x39,0xa8,0x01,0x71}, {0x2b,0xb3,0x16,0x6c}, {0x25,0xba,0x1b,0x67}, | ||
681 | {0x0f,0x85,0x38,0x56}, {0x01,0x8c,0x35,0x5d}, {0x13,0x97,0x22,0x40}, {0x1d,0x9e,0x2f,0x4b}, | ||
682 | {0x47,0xe9,0x64,0x22}, {0x49,0xe0,0x69,0x29}, {0x5b,0xfb,0x7e,0x34}, {0x55,0xf2,0x73,0x3f}, | ||
683 | {0x7f,0xcd,0x50,0x0e}, {0x71,0xc4,0x5d,0x05}, {0x63,0xdf,0x4a,0x18}, {0x6d,0xd6,0x47,0x13}, | ||
684 | {0xd7,0x31,0xdc,0xca}, {0xd9,0x38,0xd1,0xc1}, {0xcb,0x23,0xc6,0xdc}, {0xc5,0x2a,0xcb,0xd7}, | ||
685 | {0xef,0x15,0xe8,0xe6}, {0xe1,0x1c,0xe5,0xed}, {0xf3,0x07,0xf2,0xf0}, {0xfd,0x0e,0xff,0xfb}, | ||
686 | {0xa7,0x79,0xb4,0x92}, {0xa9,0x70,0xb9,0x99}, {0xbb,0x6b,0xae,0x84}, {0xb5,0x62,0xa3,0x8f}, | ||
687 | {0x9f,0x5d,0x80,0xbe}, {0x91,0x54,0x8d,0xb5}, {0x83,0x4f,0x9a,0xa8}, {0x8d,0x46,0x97,0xa3} | ||
688 | }; | ||
689 | |||
690 | static const u_int8_t U2[256][4] = { | ||
691 | {0x00,0x00,0x00,0x00}, {0x0b,0x0e,0x09,0x0d}, {0x16,0x1c,0x12,0x1a}, {0x1d,0x12,0x1b,0x17}, | ||
692 | {0x2c,0x38,0x24,0x34}, {0x27,0x36,0x2d,0x39}, {0x3a,0x24,0x36,0x2e}, {0x31,0x2a,0x3f,0x23}, | ||
693 | {0x58,0x70,0x48,0x68}, {0x53,0x7e,0x41,0x65}, {0x4e,0x6c,0x5a,0x72}, {0x45,0x62,0x53,0x7f}, | ||
694 | {0x74,0x48,0x6c,0x5c}, {0x7f,0x46,0x65,0x51}, {0x62,0x54,0x7e,0x46}, {0x69,0x5a,0x77,0x4b}, | ||
695 | {0xb0,0xe0,0x90,0xd0}, {0xbb,0xee,0x99,0xdd}, {0xa6,0xfc,0x82,0xca}, {0xad,0xf2,0x8b,0xc7}, | ||
696 | {0x9c,0xd8,0xb4,0xe4}, {0x97,0xd6,0xbd,0xe9}, {0x8a,0xc4,0xa6,0xfe}, {0x81,0xca,0xaf,0xf3}, | ||
697 | {0xe8,0x90,0xd8,0xb8}, {0xe3,0x9e,0xd1,0xb5}, {0xfe,0x8c,0xca,0xa2}, {0xf5,0x82,0xc3,0xaf}, | ||
698 | {0xc4,0xa8,0xfc,0x8c}, {0xcf,0xa6,0xf5,0x81}, {0xd2,0xb4,0xee,0x96}, {0xd9,0xba,0xe7,0x9b}, | ||
699 | {0x7b,0xdb,0x3b,0xbb}, {0x70,0xd5,0x32,0xb6}, {0x6d,0xc7,0x29,0xa1}, {0x66,0xc9,0x20,0xac}, | ||
700 | {0x57,0xe3,0x1f,0x8f}, {0x5c,0xed,0x16,0x82}, {0x41,0xff,0x0d,0x95}, {0x4a,0xf1,0x04,0x98}, | ||
701 | {0x23,0xab,0x73,0xd3}, {0x28,0xa5,0x7a,0xde}, {0x35,0xb7,0x61,0xc9}, {0x3e,0xb9,0x68,0xc4}, | ||
702 | {0x0f,0x93,0x57,0xe7}, {0x04,0x9d,0x5e,0xea}, {0x19,0x8f,0x45,0xfd}, {0x12,0x81,0x4c,0xf0}, | ||
703 | {0xcb,0x3b,0xab,0x6b}, {0xc0,0x35,0xa2,0x66}, {0xdd,0x27,0xb9,0x71}, {0xd6,0x29,0xb0,0x7c}, | ||
704 | {0xe7,0x03,0x8f,0x5f}, {0xec,0x0d,0x86,0x52}, {0xf1,0x1f,0x9d,0x45}, {0xfa,0x11,0x94,0x48}, | ||
705 | {0x93,0x4b,0xe3,0x03}, {0x98,0x45,0xea,0x0e}, {0x85,0x57,0xf1,0x19}, {0x8e,0x59,0xf8,0x14}, | ||
706 | {0xbf,0x73,0xc7,0x37}, {0xb4,0x7d,0xce,0x3a}, {0xa9,0x6f,0xd5,0x2d}, {0xa2,0x61,0xdc,0x20}, | ||
707 | {0xf6,0xad,0x76,0x6d}, {0xfd,0xa3,0x7f,0x60}, {0xe0,0xb1,0x64,0x77}, {0xeb,0xbf,0x6d,0x7a}, | ||
708 | {0xda,0x95,0x52,0x59}, {0xd1,0x9b,0x5b,0x54}, {0xcc,0x89,0x40,0x43}, {0xc7,0x87,0x49,0x4e}, | ||
709 | {0xae,0xdd,0x3e,0x05}, {0xa5,0xd3,0x37,0x08}, {0xb8,0xc1,0x2c,0x1f}, {0xb3,0xcf,0x25,0x12}, | ||
710 | {0x82,0xe5,0x1a,0x31}, {0x89,0xeb,0x13,0x3c}, {0x94,0xf9,0x08,0x2b}, {0x9f,0xf7,0x01,0x26}, | ||
711 | {0x46,0x4d,0xe6,0xbd}, {0x4d,0x43,0xef,0xb0}, {0x50,0x51,0xf4,0xa7}, {0x5b,0x5f,0xfd,0xaa}, | ||
712 | {0x6a,0x75,0xc2,0x89}, {0x61,0x7b,0xcb,0x84}, {0x7c,0x69,0xd0,0x93}, {0x77,0x67,0xd9,0x9e}, | ||
713 | {0x1e,0x3d,0xae,0xd5}, {0x15,0x33,0xa7,0xd8}, {0x08,0x21,0xbc,0xcf}, {0x03,0x2f,0xb5,0xc2}, | ||
714 | {0x32,0x05,0x8a,0xe1}, {0x39,0x0b,0x83,0xec}, {0x24,0x19,0x98,0xfb}, {0x2f,0x17,0x91,0xf6}, | ||
715 | {0x8d,0x76,0x4d,0xd6}, {0x86,0x78,0x44,0xdb}, {0x9b,0x6a,0x5f,0xcc}, {0x90,0x64,0x56,0xc1}, | ||
716 | {0xa1,0x4e,0x69,0xe2}, {0xaa,0x40,0x60,0xef}, {0xb7,0x52,0x7b,0xf8}, {0xbc,0x5c,0x72,0xf5}, | ||
717 | {0xd5,0x06,0x05,0xbe}, {0xde,0x08,0x0c,0xb3}, {0xc3,0x1a,0x17,0xa4}, {0xc8,0x14,0x1e,0xa9}, | ||
718 | {0xf9,0x3e,0x21,0x8a}, {0xf2,0x30,0x28,0x87}, {0xef,0x22,0x33,0x90}, {0xe4,0x2c,0x3a,0x9d}, | ||
719 | {0x3d,0x96,0xdd,0x06}, {0x36,0x98,0xd4,0x0b}, {0x2b,0x8a,0xcf,0x1c}, {0x20,0x84,0xc6,0x11}, | ||
720 | {0x11,0xae,0xf9,0x32}, {0x1a,0xa0,0xf0,0x3f}, {0x07,0xb2,0xeb,0x28}, {0x0c,0xbc,0xe2,0x25}, | ||
721 | {0x65,0xe6,0x95,0x6e}, {0x6e,0xe8,0x9c,0x63}, {0x73,0xfa,0x87,0x74}, {0x78,0xf4,0x8e,0x79}, | ||
722 | {0x49,0xde,0xb1,0x5a}, {0x42,0xd0,0xb8,0x57}, {0x5f,0xc2,0xa3,0x40}, {0x54,0xcc,0xaa,0x4d}, | ||
723 | {0xf7,0x41,0xec,0xda}, {0xfc,0x4f,0xe5,0xd7}, {0xe1,0x5d,0xfe,0xc0}, {0xea,0x53,0xf7,0xcd}, | ||
724 | {0xdb,0x79,0xc8,0xee}, {0xd0,0x77,0xc1,0xe3}, {0xcd,0x65,0xda,0xf4}, {0xc6,0x6b,0xd3,0xf9}, | ||
725 | {0xaf,0x31,0xa4,0xb2}, {0xa4,0x3f,0xad,0xbf}, {0xb9,0x2d,0xb6,0xa8}, {0xb2,0x23,0xbf,0xa5}, | ||
726 | {0x83,0x09,0x80,0x86}, {0x88,0x07,0x89,0x8b}, {0x95,0x15,0x92,0x9c}, {0x9e,0x1b,0x9b,0x91}, | ||
727 | {0x47,0xa1,0x7c,0x0a}, {0x4c,0xaf,0x75,0x07}, {0x51,0xbd,0x6e,0x10}, {0x5a,0xb3,0x67,0x1d}, | ||
728 | {0x6b,0x99,0x58,0x3e}, {0x60,0x97,0x51,0x33}, {0x7d,0x85,0x4a,0x24}, {0x76,0x8b,0x43,0x29}, | ||
729 | {0x1f,0xd1,0x34,0x62}, {0x14,0xdf,0x3d,0x6f}, {0x09,0xcd,0x26,0x78}, {0x02,0xc3,0x2f,0x75}, | ||
730 | {0x33,0xe9,0x10,0x56}, {0x38,0xe7,0x19,0x5b}, {0x25,0xf5,0x02,0x4c}, {0x2e,0xfb,0x0b,0x41}, | ||
731 | {0x8c,0x9a,0xd7,0x61}, {0x87,0x94,0xde,0x6c}, {0x9a,0x86,0xc5,0x7b}, {0x91,0x88,0xcc,0x76}, | ||
732 | {0xa0,0xa2,0xf3,0x55}, {0xab,0xac,0xfa,0x58}, {0xb6,0xbe,0xe1,0x4f}, {0xbd,0xb0,0xe8,0x42}, | ||
733 | {0xd4,0xea,0x9f,0x09}, {0xdf,0xe4,0x96,0x04}, {0xc2,0xf6,0x8d,0x13}, {0xc9,0xf8,0x84,0x1e}, | ||
734 | {0xf8,0xd2,0xbb,0x3d}, {0xf3,0xdc,0xb2,0x30}, {0xee,0xce,0xa9,0x27}, {0xe5,0xc0,0xa0,0x2a}, | ||
735 | {0x3c,0x7a,0x47,0xb1}, {0x37,0x74,0x4e,0xbc}, {0x2a,0x66,0x55,0xab}, {0x21,0x68,0x5c,0xa6}, | ||
736 | {0x10,0x42,0x63,0x85}, {0x1b,0x4c,0x6a,0x88}, {0x06,0x5e,0x71,0x9f}, {0x0d,0x50,0x78,0x92}, | ||
737 | {0x64,0x0a,0x0f,0xd9}, {0x6f,0x04,0x06,0xd4}, {0x72,0x16,0x1d,0xc3}, {0x79,0x18,0x14,0xce}, | ||
738 | {0x48,0x32,0x2b,0xed}, {0x43,0x3c,0x22,0xe0}, {0x5e,0x2e,0x39,0xf7}, {0x55,0x20,0x30,0xfa}, | ||
739 | {0x01,0xec,0x9a,0xb7}, {0x0a,0xe2,0x93,0xba}, {0x17,0xf0,0x88,0xad}, {0x1c,0xfe,0x81,0xa0}, | ||
740 | {0x2d,0xd4,0xbe,0x83}, {0x26,0xda,0xb7,0x8e}, {0x3b,0xc8,0xac,0x99}, {0x30,0xc6,0xa5,0x94}, | ||
741 | {0x59,0x9c,0xd2,0xdf}, {0x52,0x92,0xdb,0xd2}, {0x4f,0x80,0xc0,0xc5}, {0x44,0x8e,0xc9,0xc8}, | ||
742 | {0x75,0xa4,0xf6,0xeb}, {0x7e,0xaa,0xff,0xe6}, {0x63,0xb8,0xe4,0xf1}, {0x68,0xb6,0xed,0xfc}, | ||
743 | {0xb1,0x0c,0x0a,0x67}, {0xba,0x02,0x03,0x6a}, {0xa7,0x10,0x18,0x7d}, {0xac,0x1e,0x11,0x70}, | ||
744 | {0x9d,0x34,0x2e,0x53}, {0x96,0x3a,0x27,0x5e}, {0x8b,0x28,0x3c,0x49}, {0x80,0x26,0x35,0x44}, | ||
745 | {0xe9,0x7c,0x42,0x0f}, {0xe2,0x72,0x4b,0x02}, {0xff,0x60,0x50,0x15}, {0xf4,0x6e,0x59,0x18}, | ||
746 | {0xc5,0x44,0x66,0x3b}, {0xce,0x4a,0x6f,0x36}, {0xd3,0x58,0x74,0x21}, {0xd8,0x56,0x7d,0x2c}, | ||
747 | {0x7a,0x37,0xa1,0x0c}, {0x71,0x39,0xa8,0x01}, {0x6c,0x2b,0xb3,0x16}, {0x67,0x25,0xba,0x1b}, | ||
748 | {0x56,0x0f,0x85,0x38}, {0x5d,0x01,0x8c,0x35}, {0x40,0x13,0x97,0x22}, {0x4b,0x1d,0x9e,0x2f}, | ||
749 | {0x22,0x47,0xe9,0x64}, {0x29,0x49,0xe0,0x69}, {0x34,0x5b,0xfb,0x7e}, {0x3f,0x55,0xf2,0x73}, | ||
750 | {0x0e,0x7f,0xcd,0x50}, {0x05,0x71,0xc4,0x5d}, {0x18,0x63,0xdf,0x4a}, {0x13,0x6d,0xd6,0x47}, | ||
751 | {0xca,0xd7,0x31,0xdc}, {0xc1,0xd9,0x38,0xd1}, {0xdc,0xcb,0x23,0xc6}, {0xd7,0xc5,0x2a,0xcb}, | ||
752 | {0xe6,0xef,0x15,0xe8}, {0xed,0xe1,0x1c,0xe5}, {0xf0,0xf3,0x07,0xf2}, {0xfb,0xfd,0x0e,0xff}, | ||
753 | {0x92,0xa7,0x79,0xb4}, {0x99,0xa9,0x70,0xb9}, {0x84,0xbb,0x6b,0xae}, {0x8f,0xb5,0x62,0xa3}, | ||
754 | {0xbe,0x9f,0x5d,0x80}, {0xb5,0x91,0x54,0x8d}, {0xa8,0x83,0x4f,0x9a}, {0xa3,0x8d,0x46,0x97} | ||
755 | }; | ||
756 | |||
757 | static const u_int8_t U3[256][4] = { | ||
758 | {0x00,0x00,0x00,0x00}, {0x0d,0x0b,0x0e,0x09}, {0x1a,0x16,0x1c,0x12}, {0x17,0x1d,0x12,0x1b}, | ||
759 | {0x34,0x2c,0x38,0x24}, {0x39,0x27,0x36,0x2d}, {0x2e,0x3a,0x24,0x36}, {0x23,0x31,0x2a,0x3f}, | ||
760 | {0x68,0x58,0x70,0x48}, {0x65,0x53,0x7e,0x41}, {0x72,0x4e,0x6c,0x5a}, {0x7f,0x45,0x62,0x53}, | ||
761 | {0x5c,0x74,0x48,0x6c}, {0x51,0x7f,0x46,0x65}, {0x46,0x62,0x54,0x7e}, {0x4b,0x69,0x5a,0x77}, | ||
762 | {0xd0,0xb0,0xe0,0x90}, {0xdd,0xbb,0xee,0x99}, {0xca,0xa6,0xfc,0x82}, {0xc7,0xad,0xf2,0x8b}, | ||
763 | {0xe4,0x9c,0xd8,0xb4}, {0xe9,0x97,0xd6,0xbd}, {0xfe,0x8a,0xc4,0xa6}, {0xf3,0x81,0xca,0xaf}, | ||
764 | {0xb8,0xe8,0x90,0xd8}, {0xb5,0xe3,0x9e,0xd1}, {0xa2,0xfe,0x8c,0xca}, {0xaf,0xf5,0x82,0xc3}, | ||
765 | {0x8c,0xc4,0xa8,0xfc}, {0x81,0xcf,0xa6,0xf5}, {0x96,0xd2,0xb4,0xee}, {0x9b,0xd9,0xba,0xe7}, | ||
766 | {0xbb,0x7b,0xdb,0x3b}, {0xb6,0x70,0xd5,0x32}, {0xa1,0x6d,0xc7,0x29}, {0xac,0x66,0xc9,0x20}, | ||
767 | {0x8f,0x57,0xe3,0x1f}, {0x82,0x5c,0xed,0x16}, {0x95,0x41,0xff,0x0d}, {0x98,0x4a,0xf1,0x04}, | ||
768 | {0xd3,0x23,0xab,0x73}, {0xde,0x28,0xa5,0x7a}, {0xc9,0x35,0xb7,0x61}, {0xc4,0x3e,0xb9,0x68}, | ||
769 | {0xe7,0x0f,0x93,0x57}, {0xea,0x04,0x9d,0x5e}, {0xfd,0x19,0x8f,0x45}, {0xf0,0x12,0x81,0x4c}, | ||
770 | {0x6b,0xcb,0x3b,0xab}, {0x66,0xc0,0x35,0xa2}, {0x71,0xdd,0x27,0xb9}, {0x7c,0xd6,0x29,0xb0}, | ||
771 | {0x5f,0xe7,0x03,0x8f}, {0x52,0xec,0x0d,0x86}, {0x45,0xf1,0x1f,0x9d}, {0x48,0xfa,0x11,0x94}, | ||
772 | {0x03,0x93,0x4b,0xe3}, {0x0e,0x98,0x45,0xea}, {0x19,0x85,0x57,0xf1}, {0x14,0x8e,0x59,0xf8}, | ||
773 | {0x37,0xbf,0x73,0xc7}, {0x3a,0xb4,0x7d,0xce}, {0x2d,0xa9,0x6f,0xd5}, {0x20,0xa2,0x61,0xdc}, | ||
774 | {0x6d,0xf6,0xad,0x76}, {0x60,0xfd,0xa3,0x7f}, {0x77,0xe0,0xb1,0x64}, {0x7a,0xeb,0xbf,0x6d}, | ||
775 | {0x59,0xda,0x95,0x52}, {0x54,0xd1,0x9b,0x5b}, {0x43,0xcc,0x89,0x40}, {0x4e,0xc7,0x87,0x49}, | ||
776 | {0x05,0xae,0xdd,0x3e}, {0x08,0xa5,0xd3,0x37}, {0x1f,0xb8,0xc1,0x2c}, {0x12,0xb3,0xcf,0x25}, | ||
777 | {0x31,0x82,0xe5,0x1a}, {0x3c,0x89,0xeb,0x13}, {0x2b,0x94,0xf9,0x08}, {0x26,0x9f,0xf7,0x01}, | ||
778 | {0xbd,0x46,0x4d,0xe6}, {0xb0,0x4d,0x43,0xef}, {0xa7,0x50,0x51,0xf4}, {0xaa,0x5b,0x5f,0xfd}, | ||
779 | {0x89,0x6a,0x75,0xc2}, {0x84,0x61,0x7b,0xcb}, {0x93,0x7c,0x69,0xd0}, {0x9e,0x77,0x67,0xd9}, | ||
780 | {0xd5,0x1e,0x3d,0xae}, {0xd8,0x15,0x33,0xa7}, {0xcf,0x08,0x21,0xbc}, {0xc2,0x03,0x2f,0xb5}, | ||
781 | {0xe1,0x32,0x05,0x8a}, {0xec,0x39,0x0b,0x83}, {0xfb,0x24,0x19,0x98}, {0xf6,0x2f,0x17,0x91}, | ||
782 | {0xd6,0x8d,0x76,0x4d}, {0xdb,0x86,0x78,0x44}, {0xcc,0x9b,0x6a,0x5f}, {0xc1,0x90,0x64,0x56}, | ||
783 | {0xe2,0xa1,0x4e,0x69}, {0xef,0xaa,0x40,0x60}, {0xf8,0xb7,0x52,0x7b}, {0xf5,0xbc,0x5c,0x72}, | ||
784 | {0xbe,0xd5,0x06,0x05}, {0xb3,0xde,0x08,0x0c}, {0xa4,0xc3,0x1a,0x17}, {0xa9,0xc8,0x14,0x1e}, | ||
785 | {0x8a,0xf9,0x3e,0x21}, {0x87,0xf2,0x30,0x28}, {0x90,0xef,0x22,0x33}, {0x9d,0xe4,0x2c,0x3a}, | ||
786 | {0x06,0x3d,0x96,0xdd}, {0x0b,0x36,0x98,0xd4}, {0x1c,0x2b,0x8a,0xcf}, {0x11,0x20,0x84,0xc6}, | ||
787 | {0x32,0x11,0xae,0xf9}, {0x3f,0x1a,0xa0,0xf0}, {0x28,0x07,0xb2,0xeb}, {0x25,0x0c,0xbc,0xe2}, | ||
788 | {0x6e,0x65,0xe6,0x95}, {0x63,0x6e,0xe8,0x9c}, {0x74,0x73,0xfa,0x87}, {0x79,0x78,0xf4,0x8e}, | ||
789 | {0x5a,0x49,0xde,0xb1}, {0x57,0x42,0xd0,0xb8}, {0x40,0x5f,0xc2,0xa3}, {0x4d,0x54,0xcc,0xaa}, | ||
790 | {0xda,0xf7,0x41,0xec}, {0xd7,0xfc,0x4f,0xe5}, {0xc0,0xe1,0x5d,0xfe}, {0xcd,0xea,0x53,0xf7}, | ||
791 | {0xee,0xdb,0x79,0xc8}, {0xe3,0xd0,0x77,0xc1}, {0xf4,0xcd,0x65,0xda}, {0xf9,0xc6,0x6b,0xd3}, | ||
792 | {0xb2,0xaf,0x31,0xa4}, {0xbf,0xa4,0x3f,0xad}, {0xa8,0xb9,0x2d,0xb6}, {0xa5,0xb2,0x23,0xbf}, | ||
793 | {0x86,0x83,0x09,0x80}, {0x8b,0x88,0x07,0x89}, {0x9c,0x95,0x15,0x92}, {0x91,0x9e,0x1b,0x9b}, | ||
794 | {0x0a,0x47,0xa1,0x7c}, {0x07,0x4c,0xaf,0x75}, {0x10,0x51,0xbd,0x6e}, {0x1d,0x5a,0xb3,0x67}, | ||
795 | {0x3e,0x6b,0x99,0x58}, {0x33,0x60,0x97,0x51}, {0x24,0x7d,0x85,0x4a}, {0x29,0x76,0x8b,0x43}, | ||
796 | {0x62,0x1f,0xd1,0x34}, {0x6f,0x14,0xdf,0x3d}, {0x78,0x09,0xcd,0x26}, {0x75,0x02,0xc3,0x2f}, | ||
797 | {0x56,0x33,0xe9,0x10}, {0x5b,0x38,0xe7,0x19}, {0x4c,0x25,0xf5,0x02}, {0x41,0x2e,0xfb,0x0b}, | ||
798 | {0x61,0x8c,0x9a,0xd7}, {0x6c,0x87,0x94,0xde}, {0x7b,0x9a,0x86,0xc5}, {0x76,0x91,0x88,0xcc}, | ||
799 | {0x55,0xa0,0xa2,0xf3}, {0x58,0xab,0xac,0xfa}, {0x4f,0xb6,0xbe,0xe1}, {0x42,0xbd,0xb0,0xe8}, | ||
800 | {0x09,0xd4,0xea,0x9f}, {0x04,0xdf,0xe4,0x96}, {0x13,0xc2,0xf6,0x8d}, {0x1e,0xc9,0xf8,0x84}, | ||
801 | {0x3d,0xf8,0xd2,0xbb}, {0x30,0xf3,0xdc,0xb2}, {0x27,0xee,0xce,0xa9}, {0x2a,0xe5,0xc0,0xa0}, | ||
802 | {0xb1,0x3c,0x7a,0x47}, {0xbc,0x37,0x74,0x4e}, {0xab,0x2a,0x66,0x55}, {0xa6,0x21,0x68,0x5c}, | ||
803 | {0x85,0x10,0x42,0x63}, {0x88,0x1b,0x4c,0x6a}, {0x9f,0x06,0x5e,0x71}, {0x92,0x0d,0x50,0x78}, | ||
804 | {0xd9,0x64,0x0a,0x0f}, {0xd4,0x6f,0x04,0x06}, {0xc3,0x72,0x16,0x1d}, {0xce,0x79,0x18,0x14}, | ||
805 | {0xed,0x48,0x32,0x2b}, {0xe0,0x43,0x3c,0x22}, {0xf7,0x5e,0x2e,0x39}, {0xfa,0x55,0x20,0x30}, | ||
806 | {0xb7,0x01,0xec,0x9a}, {0xba,0x0a,0xe2,0x93}, {0xad,0x17,0xf0,0x88}, {0xa0,0x1c,0xfe,0x81}, | ||
807 | {0x83,0x2d,0xd4,0xbe}, {0x8e,0x26,0xda,0xb7}, {0x99,0x3b,0xc8,0xac}, {0x94,0x30,0xc6,0xa5}, | ||
808 | {0xdf,0x59,0x9c,0xd2}, {0xd2,0x52,0x92,0xdb}, {0xc5,0x4f,0x80,0xc0}, {0xc8,0x44,0x8e,0xc9}, | ||
809 | {0xeb,0x75,0xa4,0xf6}, {0xe6,0x7e,0xaa,0xff}, {0xf1,0x63,0xb8,0xe4}, {0xfc,0x68,0xb6,0xed}, | ||
810 | {0x67,0xb1,0x0c,0x0a}, {0x6a,0xba,0x02,0x03}, {0x7d,0xa7,0x10,0x18}, {0x70,0xac,0x1e,0x11}, | ||
811 | {0x53,0x9d,0x34,0x2e}, {0x5e,0x96,0x3a,0x27}, {0x49,0x8b,0x28,0x3c}, {0x44,0x80,0x26,0x35}, | ||
812 | {0x0f,0xe9,0x7c,0x42}, {0x02,0xe2,0x72,0x4b}, {0x15,0xff,0x60,0x50}, {0x18,0xf4,0x6e,0x59}, | ||
813 | {0x3b,0xc5,0x44,0x66}, {0x36,0xce,0x4a,0x6f}, {0x21,0xd3,0x58,0x74}, {0x2c,0xd8,0x56,0x7d}, | ||
814 | {0x0c,0x7a,0x37,0xa1}, {0x01,0x71,0x39,0xa8}, {0x16,0x6c,0x2b,0xb3}, {0x1b,0x67,0x25,0xba}, | ||
815 | {0x38,0x56,0x0f,0x85}, {0x35,0x5d,0x01,0x8c}, {0x22,0x40,0x13,0x97}, {0x2f,0x4b,0x1d,0x9e}, | ||
816 | {0x64,0x22,0x47,0xe9}, {0x69,0x29,0x49,0xe0}, {0x7e,0x34,0x5b,0xfb}, {0x73,0x3f,0x55,0xf2}, | ||
817 | {0x50,0x0e,0x7f,0xcd}, {0x5d,0x05,0x71,0xc4}, {0x4a,0x18,0x63,0xdf}, {0x47,0x13,0x6d,0xd6}, | ||
818 | {0xdc,0xca,0xd7,0x31}, {0xd1,0xc1,0xd9,0x38}, {0xc6,0xdc,0xcb,0x23}, {0xcb,0xd7,0xc5,0x2a}, | ||
819 | {0xe8,0xe6,0xef,0x15}, {0xe5,0xed,0xe1,0x1c}, {0xf2,0xf0,0xf3,0x07}, {0xff,0xfb,0xfd,0x0e}, | ||
820 | {0xb4,0x92,0xa7,0x79}, {0xb9,0x99,0xa9,0x70}, {0xae,0x84,0xbb,0x6b}, {0xa3,0x8f,0xb5,0x62}, | ||
821 | {0x80,0xbe,0x9f,0x5d}, {0x8d,0xb5,0x91,0x54}, {0x9a,0xa8,0x83,0x4f}, {0x97,0xa3,0x8d,0x46} | ||
822 | }; | ||
823 | |||
824 | static const u_int8_t U4[256][4] = { | ||
825 | {0x00,0x00,0x00,0x00}, {0x09,0x0d,0x0b,0x0e}, {0x12,0x1a,0x16,0x1c}, {0x1b,0x17,0x1d,0x12}, | ||
826 | {0x24,0x34,0x2c,0x38}, {0x2d,0x39,0x27,0x36}, {0x36,0x2e,0x3a,0x24}, {0x3f,0x23,0x31,0x2a}, | ||
827 | {0x48,0x68,0x58,0x70}, {0x41,0x65,0x53,0x7e}, {0x5a,0x72,0x4e,0x6c}, {0x53,0x7f,0x45,0x62}, | ||
828 | {0x6c,0x5c,0x74,0x48}, {0x65,0x51,0x7f,0x46}, {0x7e,0x46,0x62,0x54}, {0x77,0x4b,0x69,0x5a}, | ||
829 | {0x90,0xd0,0xb0,0xe0}, {0x99,0xdd,0xbb,0xee}, {0x82,0xca,0xa6,0xfc}, {0x8b,0xc7,0xad,0xf2}, | ||
830 | {0xb4,0xe4,0x9c,0xd8}, {0xbd,0xe9,0x97,0xd6}, {0xa6,0xfe,0x8a,0xc4}, {0xaf,0xf3,0x81,0xca}, | ||
831 | {0xd8,0xb8,0xe8,0x90}, {0xd1,0xb5,0xe3,0x9e}, {0xca,0xa2,0xfe,0x8c}, {0xc3,0xaf,0xf5,0x82}, | ||
832 | {0xfc,0x8c,0xc4,0xa8}, {0xf5,0x81,0xcf,0xa6}, {0xee,0x96,0xd2,0xb4}, {0xe7,0x9b,0xd9,0xba}, | ||
833 | {0x3b,0xbb,0x7b,0xdb}, {0x32,0xb6,0x70,0xd5}, {0x29,0xa1,0x6d,0xc7}, {0x20,0xac,0x66,0xc9}, | ||
834 | {0x1f,0x8f,0x57,0xe3}, {0x16,0x82,0x5c,0xed}, {0x0d,0x95,0x41,0xff}, {0x04,0x98,0x4a,0xf1}, | ||
835 | {0x73,0xd3,0x23,0xab}, {0x7a,0xde,0x28,0xa5}, {0x61,0xc9,0x35,0xb7}, {0x68,0xc4,0x3e,0xb9}, | ||
836 | {0x57,0xe7,0x0f,0x93}, {0x5e,0xea,0x04,0x9d}, {0x45,0xfd,0x19,0x8f}, {0x4c,0xf0,0x12,0x81}, | ||
837 | {0xab,0x6b,0xcb,0x3b}, {0xa2,0x66,0xc0,0x35}, {0xb9,0x71,0xdd,0x27}, {0xb0,0x7c,0xd6,0x29}, | ||
838 | {0x8f,0x5f,0xe7,0x03}, {0x86,0x52,0xec,0x0d}, {0x9d,0x45,0xf1,0x1f}, {0x94,0x48,0xfa,0x11}, | ||
839 | {0xe3,0x03,0x93,0x4b}, {0xea,0x0e,0x98,0x45}, {0xf1,0x19,0x85,0x57}, {0xf8,0x14,0x8e,0x59}, | ||
840 | {0xc7,0x37,0xbf,0x73}, {0xce,0x3a,0xb4,0x7d}, {0xd5,0x2d,0xa9,0x6f}, {0xdc,0x20,0xa2,0x61}, | ||
841 | {0x76,0x6d,0xf6,0xad}, {0x7f,0x60,0xfd,0xa3}, {0x64,0x77,0xe0,0xb1}, {0x6d,0x7a,0xeb,0xbf}, | ||
842 | {0x52,0x59,0xda,0x95}, {0x5b,0x54,0xd1,0x9b}, {0x40,0x43,0xcc,0x89}, {0x49,0x4e,0xc7,0x87}, | ||
843 | {0x3e,0x05,0xae,0xdd}, {0x37,0x08,0xa5,0xd3}, {0x2c,0x1f,0xb8,0xc1}, {0x25,0x12,0xb3,0xcf}, | ||
844 | {0x1a,0x31,0x82,0xe5}, {0x13,0x3c,0x89,0xeb}, {0x08,0x2b,0x94,0xf9}, {0x01,0x26,0x9f,0xf7}, | ||
845 | {0xe6,0xbd,0x46,0x4d}, {0xef,0xb0,0x4d,0x43}, {0xf4,0xa7,0x50,0x51}, {0xfd,0xaa,0x5b,0x5f}, | ||
846 | {0xc2,0x89,0x6a,0x75}, {0xcb,0x84,0x61,0x7b}, {0xd0,0x93,0x7c,0x69}, {0xd9,0x9e,0x77,0x67}, | ||
847 | {0xae,0xd5,0x1e,0x3d}, {0xa7,0xd8,0x15,0x33}, {0xbc,0xcf,0x08,0x21}, {0xb5,0xc2,0x03,0x2f}, | ||
848 | {0x8a,0xe1,0x32,0x05}, {0x83,0xec,0x39,0x0b}, {0x98,0xfb,0x24,0x19}, {0x91,0xf6,0x2f,0x17}, | ||
849 | {0x4d,0xd6,0x8d,0x76}, {0x44,0xdb,0x86,0x78}, {0x5f,0xcc,0x9b,0x6a}, {0x56,0xc1,0x90,0x64}, | ||
850 | {0x69,0xe2,0xa1,0x4e}, {0x60,0xef,0xaa,0x40}, {0x7b,0xf8,0xb7,0x52}, {0x72,0xf5,0xbc,0x5c}, | ||
851 | {0x05,0xbe,0xd5,0x06}, {0x0c,0xb3,0xde,0x08}, {0x17,0xa4,0xc3,0x1a}, {0x1e,0xa9,0xc8,0x14}, | ||
852 | {0x21,0x8a,0xf9,0x3e}, {0x28,0x87,0xf2,0x30}, {0x33,0x90,0xef,0x22}, {0x3a,0x9d,0xe4,0x2c}, | ||
853 | {0xdd,0x06,0x3d,0x96}, {0xd4,0x0b,0x36,0x98}, {0xcf,0x1c,0x2b,0x8a}, {0xc6,0x11,0x20,0x84}, | ||
854 | {0xf9,0x32,0x11,0xae}, {0xf0,0x3f,0x1a,0xa0}, {0xeb,0x28,0x07,0xb2}, {0xe2,0x25,0x0c,0xbc}, | ||
855 | {0x95,0x6e,0x65,0xe6}, {0x9c,0x63,0x6e,0xe8}, {0x87,0x74,0x73,0xfa}, {0x8e,0x79,0x78,0xf4}, | ||
856 | {0xb1,0x5a,0x49,0xde}, {0xb8,0x57,0x42,0xd0}, {0xa3,0x40,0x5f,0xc2}, {0xaa,0x4d,0x54,0xcc}, | ||
857 | {0xec,0xda,0xf7,0x41}, {0xe5,0xd7,0xfc,0x4f}, {0xfe,0xc0,0xe1,0x5d}, {0xf7,0xcd,0xea,0x53}, | ||
858 | {0xc8,0xee,0xdb,0x79}, {0xc1,0xe3,0xd0,0x77}, {0xda,0xf4,0xcd,0x65}, {0xd3,0xf9,0xc6,0x6b}, | ||
859 | {0xa4,0xb2,0xaf,0x31}, {0xad,0xbf,0xa4,0x3f}, {0xb6,0xa8,0xb9,0x2d}, {0xbf,0xa5,0xb2,0x23}, | ||
860 | {0x80,0x86,0x83,0x09}, {0x89,0x8b,0x88,0x07}, {0x92,0x9c,0x95,0x15}, {0x9b,0x91,0x9e,0x1b}, | ||
861 | {0x7c,0x0a,0x47,0xa1}, {0x75,0x07,0x4c,0xaf}, {0x6e,0x10,0x51,0xbd}, {0x67,0x1d,0x5a,0xb3}, | ||
862 | {0x58,0x3e,0x6b,0x99}, {0x51,0x33,0x60,0x97}, {0x4a,0x24,0x7d,0x85}, {0x43,0x29,0x76,0x8b}, | ||
863 | {0x34,0x62,0x1f,0xd1}, {0x3d,0x6f,0x14,0xdf}, {0x26,0x78,0x09,0xcd}, {0x2f,0x75,0x02,0xc3}, | ||
864 | {0x10,0x56,0x33,0xe9}, {0x19,0x5b,0x38,0xe7}, {0x02,0x4c,0x25,0xf5}, {0x0b,0x41,0x2e,0xfb}, | ||
865 | {0xd7,0x61,0x8c,0x9a}, {0xde,0x6c,0x87,0x94}, {0xc5,0x7b,0x9a,0x86}, {0xcc,0x76,0x91,0x88}, | ||
866 | {0xf3,0x55,0xa0,0xa2}, {0xfa,0x58,0xab,0xac}, {0xe1,0x4f,0xb6,0xbe}, {0xe8,0x42,0xbd,0xb0}, | ||
867 | {0x9f,0x09,0xd4,0xea}, {0x96,0x04,0xdf,0xe4}, {0x8d,0x13,0xc2,0xf6}, {0x84,0x1e,0xc9,0xf8}, | ||
868 | {0xbb,0x3d,0xf8,0xd2}, {0xb2,0x30,0xf3,0xdc}, {0xa9,0x27,0xee,0xce}, {0xa0,0x2a,0xe5,0xc0}, | ||
869 | {0x47,0xb1,0x3c,0x7a}, {0x4e,0xbc,0x37,0x74}, {0x55,0xab,0x2a,0x66}, {0x5c,0xa6,0x21,0x68}, | ||
870 | {0x63,0x85,0x10,0x42}, {0x6a,0x88,0x1b,0x4c}, {0x71,0x9f,0x06,0x5e}, {0x78,0x92,0x0d,0x50}, | ||
871 | {0x0f,0xd9,0x64,0x0a}, {0x06,0xd4,0x6f,0x04}, {0x1d,0xc3,0x72,0x16}, {0x14,0xce,0x79,0x18}, | ||
872 | {0x2b,0xed,0x48,0x32}, {0x22,0xe0,0x43,0x3c}, {0x39,0xf7,0x5e,0x2e}, {0x30,0xfa,0x55,0x20}, | ||
873 | {0x9a,0xb7,0x01,0xec}, {0x93,0xba,0x0a,0xe2}, {0x88,0xad,0x17,0xf0}, {0x81,0xa0,0x1c,0xfe}, | ||
874 | {0xbe,0x83,0x2d,0xd4}, {0xb7,0x8e,0x26,0xda}, {0xac,0x99,0x3b,0xc8}, {0xa5,0x94,0x30,0xc6}, | ||
875 | {0xd2,0xdf,0x59,0x9c}, {0xdb,0xd2,0x52,0x92}, {0xc0,0xc5,0x4f,0x80}, {0xc9,0xc8,0x44,0x8e}, | ||
876 | {0xf6,0xeb,0x75,0xa4}, {0xff,0xe6,0x7e,0xaa}, {0xe4,0xf1,0x63,0xb8}, {0xed,0xfc,0x68,0xb6}, | ||
877 | {0x0a,0x67,0xb1,0x0c}, {0x03,0x6a,0xba,0x02}, {0x18,0x7d,0xa7,0x10}, {0x11,0x70,0xac,0x1e}, | ||
878 | {0x2e,0x53,0x9d,0x34}, {0x27,0x5e,0x96,0x3a}, {0x3c,0x49,0x8b,0x28}, {0x35,0x44,0x80,0x26}, | ||
879 | {0x42,0x0f,0xe9,0x7c}, {0x4b,0x02,0xe2,0x72}, {0x50,0x15,0xff,0x60}, {0x59,0x18,0xf4,0x6e}, | ||
880 | {0x66,0x3b,0xc5,0x44}, {0x6f,0x36,0xce,0x4a}, {0x74,0x21,0xd3,0x58}, {0x7d,0x2c,0xd8,0x56}, | ||
881 | {0xa1,0x0c,0x7a,0x37}, {0xa8,0x01,0x71,0x39}, {0xb3,0x16,0x6c,0x2b}, {0xba,0x1b,0x67,0x25}, | ||
882 | {0x85,0x38,0x56,0x0f}, {0x8c,0x35,0x5d,0x01}, {0x97,0x22,0x40,0x13}, {0x9e,0x2f,0x4b,0x1d}, | ||
883 | {0xe9,0x64,0x22,0x47}, {0xe0,0x69,0x29,0x49}, {0xfb,0x7e,0x34,0x5b}, {0xf2,0x73,0x3f,0x55}, | ||
884 | {0xcd,0x50,0x0e,0x7f}, {0xc4,0x5d,0x05,0x71}, {0xdf,0x4a,0x18,0x63}, {0xd6,0x47,0x13,0x6d}, | ||
885 | {0x31,0xdc,0xca,0xd7}, {0x38,0xd1,0xc1,0xd9}, {0x23,0xc6,0xdc,0xcb}, {0x2a,0xcb,0xd7,0xc5}, | ||
886 | {0x15,0xe8,0xe6,0xef}, {0x1c,0xe5,0xed,0xe1}, {0x07,0xf2,0xf0,0xf3}, {0x0e,0xff,0xfb,0xfd}, | ||
887 | {0x79,0xb4,0x92,0xa7}, {0x70,0xb9,0x99,0xa9}, {0x6b,0xae,0x84,0xbb}, {0x62,0xa3,0x8f,0xb5}, | ||
888 | {0x5d,0x80,0xbe,0x9f}, {0x54,0x8d,0xb5,0x91}, {0x4f,0x9a,0xa8,0x83}, {0x46,0x97,0xa3,0x8d} | ||
889 | }; | ||
890 | |||
891 | static const u_int32_t rcon[30] = { | ||
892 | 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, | ||
893 | 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91 | ||
894 | }; | ||