xref: /optee_os/core/lib/libtomcrypt/src/ciphers/des.c (revision 8411e6ad673d20c4742ed30c785e3f5cdea54dfa)
1*8411e6adSJerome Forissier /* LibTomCrypt, modular cryptographic library -- Tom St Denis */
2*8411e6adSJerome Forissier /* SPDX-License-Identifier: Unlicense */
35a913ee7SJerome Forissier #include "tomcrypt_private.h"
4b0104773SPascal Brand 
5b0104773SPascal Brand /**
6b0104773SPascal Brand   @file des.c
75a913ee7SJerome Forissier   DES code submitted by Dobes Vandermeer
8b0104773SPascal Brand */
9b0104773SPascal Brand 
10b0104773SPascal Brand #ifdef LTC_DES
11b0104773SPascal Brand 
12b0104773SPascal Brand #define EN0 0
13b0104773SPascal Brand #define DE1 1
14b0104773SPascal Brand 
15b0104773SPascal Brand const struct ltc_cipher_descriptor des_desc =
16b0104773SPascal Brand {
17b0104773SPascal Brand     "des",
18b0104773SPascal Brand     13,
19b0104773SPascal Brand     8, 8, 8, 16,
20b0104773SPascal Brand     &des_setup,
21b0104773SPascal Brand     &des_ecb_encrypt,
22b0104773SPascal Brand     &des_ecb_decrypt,
23b0104773SPascal Brand     &des_test,
24b0104773SPascal Brand     &des_done,
25b0104773SPascal Brand     &des_keysize,
26a50cb361SMatt Ma     NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
27b0104773SPascal Brand };
28b0104773SPascal Brand 
29b0104773SPascal Brand const struct ltc_cipher_descriptor des3_desc =
30b0104773SPascal Brand {
31b0104773SPascal Brand     "3des",
32b0104773SPascal Brand     14,
335a913ee7SJerome Forissier     16, 24, 8, 16,
34b0104773SPascal Brand     &des3_setup,
35b0104773SPascal Brand     &des3_ecb_encrypt,
36b0104773SPascal Brand     &des3_ecb_decrypt,
37b0104773SPascal Brand     &des3_test,
38b0104773SPascal Brand     &des3_done,
39b0104773SPascal Brand     &des3_keysize,
40a50cb361SMatt Ma     NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
41b0104773SPascal Brand };
42b0104773SPascal Brand 
43b0104773SPascal Brand static const ulong32 bytebit[8] =
44b0104773SPascal Brand {
45b0104773SPascal Brand     0200, 0100, 040, 020, 010, 04, 02, 01
46b0104773SPascal Brand };
47b0104773SPascal Brand 
48b0104773SPascal Brand static const ulong32 bigbyte[24] =
49b0104773SPascal Brand {
50b0104773SPascal Brand     0x800000UL,  0x400000UL,  0x200000UL,  0x100000UL,
51b0104773SPascal Brand     0x80000UL,   0x40000UL,   0x20000UL,   0x10000UL,
52b0104773SPascal Brand     0x8000UL,    0x4000UL,    0x2000UL,    0x1000UL,
53b0104773SPascal Brand     0x800UL,     0x400UL,     0x200UL,     0x100UL,
54b0104773SPascal Brand     0x80UL,      0x40UL,      0x20UL,      0x10UL,
55b0104773SPascal Brand     0x8UL,       0x4UL,       0x2UL,       0x1L
56b0104773SPascal Brand };
57b0104773SPascal Brand 
58b0104773SPascal Brand /* Use the key schedule specific in the standard (ANSI X3.92-1981) */
59b0104773SPascal Brand 
60b0104773SPascal Brand static const unsigned char pc1[56] = {
61b0104773SPascal Brand     56, 48, 40, 32, 24, 16,  8,  0, 57, 49, 41, 33, 25, 17,
62b0104773SPascal Brand      9,  1, 58, 50, 42, 34, 26, 18, 10,  2, 59, 51, 43, 35,
63b0104773SPascal Brand     62, 54, 46, 38, 30, 22, 14,  6, 61, 53, 45, 37, 29, 21,
64b0104773SPascal Brand     13,  5, 60, 52, 44, 36, 28, 20, 12,  4, 27, 19, 11,  3
65b0104773SPascal Brand };
66b0104773SPascal Brand 
67b0104773SPascal Brand static const unsigned char totrot[16] = {
68b0104773SPascal Brand     1,   2,  4,  6,
69b0104773SPascal Brand     8,  10, 12, 14,
70b0104773SPascal Brand     15, 17, 19, 21,
71b0104773SPascal Brand     23, 25, 27, 28
72b0104773SPascal Brand };
73b0104773SPascal Brand 
74b0104773SPascal Brand static const unsigned char pc2[48] = {
75b0104773SPascal Brand     13, 16, 10, 23,  0,  4,      2, 27, 14,  5, 20,  9,
76b0104773SPascal Brand     22, 18, 11,  3, 25,  7,     15,  6, 26, 19, 12,  1,
77b0104773SPascal Brand     40, 51, 30, 36, 46, 54,     29, 39, 50, 44, 32, 47,
78b0104773SPascal Brand     43, 48, 38, 55, 33, 52,     45, 41, 49, 35, 28, 31
79b0104773SPascal Brand };
80b0104773SPascal Brand 
81b0104773SPascal Brand 
82b0104773SPascal Brand static const ulong32 SP1[64] =
83b0104773SPascal Brand {
84b0104773SPascal Brand     0x01010400UL, 0x00000000UL, 0x00010000UL, 0x01010404UL,
85b0104773SPascal Brand     0x01010004UL, 0x00010404UL, 0x00000004UL, 0x00010000UL,
86b0104773SPascal Brand     0x00000400UL, 0x01010400UL, 0x01010404UL, 0x00000400UL,
87b0104773SPascal Brand     0x01000404UL, 0x01010004UL, 0x01000000UL, 0x00000004UL,
88b0104773SPascal Brand     0x00000404UL, 0x01000400UL, 0x01000400UL, 0x00010400UL,
89b0104773SPascal Brand     0x00010400UL, 0x01010000UL, 0x01010000UL, 0x01000404UL,
90b0104773SPascal Brand     0x00010004UL, 0x01000004UL, 0x01000004UL, 0x00010004UL,
91b0104773SPascal Brand     0x00000000UL, 0x00000404UL, 0x00010404UL, 0x01000000UL,
92b0104773SPascal Brand     0x00010000UL, 0x01010404UL, 0x00000004UL, 0x01010000UL,
93b0104773SPascal Brand     0x01010400UL, 0x01000000UL, 0x01000000UL, 0x00000400UL,
94b0104773SPascal Brand     0x01010004UL, 0x00010000UL, 0x00010400UL, 0x01000004UL,
95b0104773SPascal Brand     0x00000400UL, 0x00000004UL, 0x01000404UL, 0x00010404UL,
96b0104773SPascal Brand     0x01010404UL, 0x00010004UL, 0x01010000UL, 0x01000404UL,
97b0104773SPascal Brand     0x01000004UL, 0x00000404UL, 0x00010404UL, 0x01010400UL,
98b0104773SPascal Brand     0x00000404UL, 0x01000400UL, 0x01000400UL, 0x00000000UL,
99b0104773SPascal Brand     0x00010004UL, 0x00010400UL, 0x00000000UL, 0x01010004UL
100b0104773SPascal Brand };
101b0104773SPascal Brand 
102b0104773SPascal Brand static const ulong32 SP2[64] =
103b0104773SPascal Brand {
104b0104773SPascal Brand     0x80108020UL, 0x80008000UL, 0x00008000UL, 0x00108020UL,
105b0104773SPascal Brand     0x00100000UL, 0x00000020UL, 0x80100020UL, 0x80008020UL,
106b0104773SPascal Brand     0x80000020UL, 0x80108020UL, 0x80108000UL, 0x80000000UL,
107b0104773SPascal Brand     0x80008000UL, 0x00100000UL, 0x00000020UL, 0x80100020UL,
108b0104773SPascal Brand     0x00108000UL, 0x00100020UL, 0x80008020UL, 0x00000000UL,
109b0104773SPascal Brand     0x80000000UL, 0x00008000UL, 0x00108020UL, 0x80100000UL,
110b0104773SPascal Brand     0x00100020UL, 0x80000020UL, 0x00000000UL, 0x00108000UL,
111b0104773SPascal Brand     0x00008020UL, 0x80108000UL, 0x80100000UL, 0x00008020UL,
112b0104773SPascal Brand     0x00000000UL, 0x00108020UL, 0x80100020UL, 0x00100000UL,
113b0104773SPascal Brand     0x80008020UL, 0x80100000UL, 0x80108000UL, 0x00008000UL,
114b0104773SPascal Brand     0x80100000UL, 0x80008000UL, 0x00000020UL, 0x80108020UL,
115b0104773SPascal Brand     0x00108020UL, 0x00000020UL, 0x00008000UL, 0x80000000UL,
116b0104773SPascal Brand     0x00008020UL, 0x80108000UL, 0x00100000UL, 0x80000020UL,
117b0104773SPascal Brand     0x00100020UL, 0x80008020UL, 0x80000020UL, 0x00100020UL,
118b0104773SPascal Brand     0x00108000UL, 0x00000000UL, 0x80008000UL, 0x00008020UL,
119b0104773SPascal Brand     0x80000000UL, 0x80100020UL, 0x80108020UL, 0x00108000UL
120b0104773SPascal Brand };
121b0104773SPascal Brand 
122b0104773SPascal Brand static const ulong32 SP3[64] =
123b0104773SPascal Brand {
124b0104773SPascal Brand     0x00000208UL, 0x08020200UL, 0x00000000UL, 0x08020008UL,
125b0104773SPascal Brand     0x08000200UL, 0x00000000UL, 0x00020208UL, 0x08000200UL,
126b0104773SPascal Brand     0x00020008UL, 0x08000008UL, 0x08000008UL, 0x00020000UL,
127b0104773SPascal Brand     0x08020208UL, 0x00020008UL, 0x08020000UL, 0x00000208UL,
128b0104773SPascal Brand     0x08000000UL, 0x00000008UL, 0x08020200UL, 0x00000200UL,
129b0104773SPascal Brand     0x00020200UL, 0x08020000UL, 0x08020008UL, 0x00020208UL,
130b0104773SPascal Brand     0x08000208UL, 0x00020200UL, 0x00020000UL, 0x08000208UL,
131b0104773SPascal Brand     0x00000008UL, 0x08020208UL, 0x00000200UL, 0x08000000UL,
132b0104773SPascal Brand     0x08020200UL, 0x08000000UL, 0x00020008UL, 0x00000208UL,
133b0104773SPascal Brand     0x00020000UL, 0x08020200UL, 0x08000200UL, 0x00000000UL,
134b0104773SPascal Brand     0x00000200UL, 0x00020008UL, 0x08020208UL, 0x08000200UL,
135b0104773SPascal Brand     0x08000008UL, 0x00000200UL, 0x00000000UL, 0x08020008UL,
136b0104773SPascal Brand     0x08000208UL, 0x00020000UL, 0x08000000UL, 0x08020208UL,
137b0104773SPascal Brand     0x00000008UL, 0x00020208UL, 0x00020200UL, 0x08000008UL,
138b0104773SPascal Brand     0x08020000UL, 0x08000208UL, 0x00000208UL, 0x08020000UL,
139b0104773SPascal Brand     0x00020208UL, 0x00000008UL, 0x08020008UL, 0x00020200UL
140b0104773SPascal Brand };
141b0104773SPascal Brand 
142b0104773SPascal Brand static const ulong32 SP4[64] =
143b0104773SPascal Brand {
144b0104773SPascal Brand     0x00802001UL, 0x00002081UL, 0x00002081UL, 0x00000080UL,
145b0104773SPascal Brand     0x00802080UL, 0x00800081UL, 0x00800001UL, 0x00002001UL,
146b0104773SPascal Brand     0x00000000UL, 0x00802000UL, 0x00802000UL, 0x00802081UL,
147b0104773SPascal Brand     0x00000081UL, 0x00000000UL, 0x00800080UL, 0x00800001UL,
148b0104773SPascal Brand     0x00000001UL, 0x00002000UL, 0x00800000UL, 0x00802001UL,
149b0104773SPascal Brand     0x00000080UL, 0x00800000UL, 0x00002001UL, 0x00002080UL,
150b0104773SPascal Brand     0x00800081UL, 0x00000001UL, 0x00002080UL, 0x00800080UL,
151b0104773SPascal Brand     0x00002000UL, 0x00802080UL, 0x00802081UL, 0x00000081UL,
152b0104773SPascal Brand     0x00800080UL, 0x00800001UL, 0x00802000UL, 0x00802081UL,
153b0104773SPascal Brand     0x00000081UL, 0x00000000UL, 0x00000000UL, 0x00802000UL,
154b0104773SPascal Brand     0x00002080UL, 0x00800080UL, 0x00800081UL, 0x00000001UL,
155b0104773SPascal Brand     0x00802001UL, 0x00002081UL, 0x00002081UL, 0x00000080UL,
156b0104773SPascal Brand     0x00802081UL, 0x00000081UL, 0x00000001UL, 0x00002000UL,
157b0104773SPascal Brand     0x00800001UL, 0x00002001UL, 0x00802080UL, 0x00800081UL,
158b0104773SPascal Brand     0x00002001UL, 0x00002080UL, 0x00800000UL, 0x00802001UL,
159b0104773SPascal Brand     0x00000080UL, 0x00800000UL, 0x00002000UL, 0x00802080UL
160b0104773SPascal Brand };
161b0104773SPascal Brand 
162b0104773SPascal Brand static const ulong32 SP5[64] =
163b0104773SPascal Brand {
164b0104773SPascal Brand     0x00000100UL, 0x02080100UL, 0x02080000UL, 0x42000100UL,
165b0104773SPascal Brand     0x00080000UL, 0x00000100UL, 0x40000000UL, 0x02080000UL,
166b0104773SPascal Brand     0x40080100UL, 0x00080000UL, 0x02000100UL, 0x40080100UL,
167b0104773SPascal Brand     0x42000100UL, 0x42080000UL, 0x00080100UL, 0x40000000UL,
168b0104773SPascal Brand     0x02000000UL, 0x40080000UL, 0x40080000UL, 0x00000000UL,
169b0104773SPascal Brand     0x40000100UL, 0x42080100UL, 0x42080100UL, 0x02000100UL,
170b0104773SPascal Brand     0x42080000UL, 0x40000100UL, 0x00000000UL, 0x42000000UL,
171b0104773SPascal Brand     0x02080100UL, 0x02000000UL, 0x42000000UL, 0x00080100UL,
172b0104773SPascal Brand     0x00080000UL, 0x42000100UL, 0x00000100UL, 0x02000000UL,
173b0104773SPascal Brand     0x40000000UL, 0x02080000UL, 0x42000100UL, 0x40080100UL,
174b0104773SPascal Brand     0x02000100UL, 0x40000000UL, 0x42080000UL, 0x02080100UL,
175b0104773SPascal Brand     0x40080100UL, 0x00000100UL, 0x02000000UL, 0x42080000UL,
176b0104773SPascal Brand     0x42080100UL, 0x00080100UL, 0x42000000UL, 0x42080100UL,
177b0104773SPascal Brand     0x02080000UL, 0x00000000UL, 0x40080000UL, 0x42000000UL,
178b0104773SPascal Brand     0x00080100UL, 0x02000100UL, 0x40000100UL, 0x00080000UL,
179b0104773SPascal Brand     0x00000000UL, 0x40080000UL, 0x02080100UL, 0x40000100UL
180b0104773SPascal Brand };
181b0104773SPascal Brand 
182b0104773SPascal Brand static const ulong32 SP6[64] =
183b0104773SPascal Brand {
184b0104773SPascal Brand     0x20000010UL, 0x20400000UL, 0x00004000UL, 0x20404010UL,
185b0104773SPascal Brand     0x20400000UL, 0x00000010UL, 0x20404010UL, 0x00400000UL,
186b0104773SPascal Brand     0x20004000UL, 0x00404010UL, 0x00400000UL, 0x20000010UL,
187b0104773SPascal Brand     0x00400010UL, 0x20004000UL, 0x20000000UL, 0x00004010UL,
188b0104773SPascal Brand     0x00000000UL, 0x00400010UL, 0x20004010UL, 0x00004000UL,
189b0104773SPascal Brand     0x00404000UL, 0x20004010UL, 0x00000010UL, 0x20400010UL,
190b0104773SPascal Brand     0x20400010UL, 0x00000000UL, 0x00404010UL, 0x20404000UL,
191b0104773SPascal Brand     0x00004010UL, 0x00404000UL, 0x20404000UL, 0x20000000UL,
192b0104773SPascal Brand     0x20004000UL, 0x00000010UL, 0x20400010UL, 0x00404000UL,
193b0104773SPascal Brand     0x20404010UL, 0x00400000UL, 0x00004010UL, 0x20000010UL,
194b0104773SPascal Brand     0x00400000UL, 0x20004000UL, 0x20000000UL, 0x00004010UL,
195b0104773SPascal Brand     0x20000010UL, 0x20404010UL, 0x00404000UL, 0x20400000UL,
196b0104773SPascal Brand     0x00404010UL, 0x20404000UL, 0x00000000UL, 0x20400010UL,
197b0104773SPascal Brand     0x00000010UL, 0x00004000UL, 0x20400000UL, 0x00404010UL,
198b0104773SPascal Brand     0x00004000UL, 0x00400010UL, 0x20004010UL, 0x00000000UL,
199b0104773SPascal Brand     0x20404000UL, 0x20000000UL, 0x00400010UL, 0x20004010UL
200b0104773SPascal Brand };
201b0104773SPascal Brand 
202b0104773SPascal Brand static const ulong32 SP7[64] =
203b0104773SPascal Brand {
204b0104773SPascal Brand     0x00200000UL, 0x04200002UL, 0x04000802UL, 0x00000000UL,
205b0104773SPascal Brand     0x00000800UL, 0x04000802UL, 0x00200802UL, 0x04200800UL,
206b0104773SPascal Brand     0x04200802UL, 0x00200000UL, 0x00000000UL, 0x04000002UL,
207b0104773SPascal Brand     0x00000002UL, 0x04000000UL, 0x04200002UL, 0x00000802UL,
208b0104773SPascal Brand     0x04000800UL, 0x00200802UL, 0x00200002UL, 0x04000800UL,
209b0104773SPascal Brand     0x04000002UL, 0x04200000UL, 0x04200800UL, 0x00200002UL,
210b0104773SPascal Brand     0x04200000UL, 0x00000800UL, 0x00000802UL, 0x04200802UL,
211b0104773SPascal Brand     0x00200800UL, 0x00000002UL, 0x04000000UL, 0x00200800UL,
212b0104773SPascal Brand     0x04000000UL, 0x00200800UL, 0x00200000UL, 0x04000802UL,
213b0104773SPascal Brand     0x04000802UL, 0x04200002UL, 0x04200002UL, 0x00000002UL,
214b0104773SPascal Brand     0x00200002UL, 0x04000000UL, 0x04000800UL, 0x00200000UL,
215b0104773SPascal Brand     0x04200800UL, 0x00000802UL, 0x00200802UL, 0x04200800UL,
216b0104773SPascal Brand     0x00000802UL, 0x04000002UL, 0x04200802UL, 0x04200000UL,
217b0104773SPascal Brand     0x00200800UL, 0x00000000UL, 0x00000002UL, 0x04200802UL,
218b0104773SPascal Brand     0x00000000UL, 0x00200802UL, 0x04200000UL, 0x00000800UL,
219b0104773SPascal Brand     0x04000002UL, 0x04000800UL, 0x00000800UL, 0x00200002UL
220b0104773SPascal Brand };
221b0104773SPascal Brand 
222b0104773SPascal Brand static const ulong32 SP8[64] =
223b0104773SPascal Brand {
224b0104773SPascal Brand     0x10001040UL, 0x00001000UL, 0x00040000UL, 0x10041040UL,
225b0104773SPascal Brand     0x10000000UL, 0x10001040UL, 0x00000040UL, 0x10000000UL,
226b0104773SPascal Brand     0x00040040UL, 0x10040000UL, 0x10041040UL, 0x00041000UL,
227b0104773SPascal Brand     0x10041000UL, 0x00041040UL, 0x00001000UL, 0x00000040UL,
228b0104773SPascal Brand     0x10040000UL, 0x10000040UL, 0x10001000UL, 0x00001040UL,
229b0104773SPascal Brand     0x00041000UL, 0x00040040UL, 0x10040040UL, 0x10041000UL,
230b0104773SPascal Brand     0x00001040UL, 0x00000000UL, 0x00000000UL, 0x10040040UL,
231b0104773SPascal Brand     0x10000040UL, 0x10001000UL, 0x00041040UL, 0x00040000UL,
232b0104773SPascal Brand     0x00041040UL, 0x00040000UL, 0x10041000UL, 0x00001000UL,
233b0104773SPascal Brand     0x00000040UL, 0x10040040UL, 0x00001000UL, 0x00041040UL,
234b0104773SPascal Brand     0x10001000UL, 0x00000040UL, 0x10000040UL, 0x10040000UL,
235b0104773SPascal Brand     0x10040040UL, 0x10000000UL, 0x00040000UL, 0x10001040UL,
236b0104773SPascal Brand     0x00000000UL, 0x10041040UL, 0x00040040UL, 0x10000040UL,
237b0104773SPascal Brand     0x10040000UL, 0x10001000UL, 0x10001040UL, 0x00000000UL,
238b0104773SPascal Brand     0x10041040UL, 0x00041000UL, 0x00041000UL, 0x00001040UL,
239b0104773SPascal Brand     0x00001040UL, 0x00040040UL, 0x10000000UL, 0x10041000UL
240b0104773SPascal Brand };
241b0104773SPascal Brand 
242b0104773SPascal Brand #ifndef LTC_SMALL_CODE
243b0104773SPascal Brand 
244b0104773SPascal Brand static const ulong64 des_ip[8][256] = {
245b0104773SPascal Brand 
246b0104773SPascal Brand { CONST64(0x0000000000000000), CONST64(0x0000001000000000), CONST64(0x0000000000000010), CONST64(0x0000001000000010),
247b0104773SPascal Brand   CONST64(0x0000100000000000), CONST64(0x0000101000000000), CONST64(0x0000100000000010), CONST64(0x0000101000000010),
248b0104773SPascal Brand   CONST64(0x0000000000001000), CONST64(0x0000001000001000), CONST64(0x0000000000001010), CONST64(0x0000001000001010),
249b0104773SPascal Brand   CONST64(0x0000100000001000), CONST64(0x0000101000001000), CONST64(0x0000100000001010), CONST64(0x0000101000001010),
250b0104773SPascal Brand   CONST64(0x0010000000000000), CONST64(0x0010001000000000), CONST64(0x0010000000000010), CONST64(0x0010001000000010),
251b0104773SPascal Brand   CONST64(0x0010100000000000), CONST64(0x0010101000000000), CONST64(0x0010100000000010), CONST64(0x0010101000000010),
252b0104773SPascal Brand   CONST64(0x0010000000001000), CONST64(0x0010001000001000), CONST64(0x0010000000001010), CONST64(0x0010001000001010),
253b0104773SPascal Brand   CONST64(0x0010100000001000), CONST64(0x0010101000001000), CONST64(0x0010100000001010), CONST64(0x0010101000001010),
254b0104773SPascal Brand   CONST64(0x0000000000100000), CONST64(0x0000001000100000), CONST64(0x0000000000100010), CONST64(0x0000001000100010),
255b0104773SPascal Brand   CONST64(0x0000100000100000), CONST64(0x0000101000100000), CONST64(0x0000100000100010), CONST64(0x0000101000100010),
256b0104773SPascal Brand   CONST64(0x0000000000101000), CONST64(0x0000001000101000), CONST64(0x0000000000101010), CONST64(0x0000001000101010),
257b0104773SPascal Brand   CONST64(0x0000100000101000), CONST64(0x0000101000101000), CONST64(0x0000100000101010), CONST64(0x0000101000101010),
258b0104773SPascal Brand   CONST64(0x0010000000100000), CONST64(0x0010001000100000), CONST64(0x0010000000100010), CONST64(0x0010001000100010),
259b0104773SPascal Brand   CONST64(0x0010100000100000), CONST64(0x0010101000100000), CONST64(0x0010100000100010), CONST64(0x0010101000100010),
260b0104773SPascal Brand   CONST64(0x0010000000101000), CONST64(0x0010001000101000), CONST64(0x0010000000101010), CONST64(0x0010001000101010),
261b0104773SPascal Brand   CONST64(0x0010100000101000), CONST64(0x0010101000101000), CONST64(0x0010100000101010), CONST64(0x0010101000101010),
262b0104773SPascal Brand   CONST64(0x1000000000000000), CONST64(0x1000001000000000), CONST64(0x1000000000000010), CONST64(0x1000001000000010),
263b0104773SPascal Brand   CONST64(0x1000100000000000), CONST64(0x1000101000000000), CONST64(0x1000100000000010), CONST64(0x1000101000000010),
264b0104773SPascal Brand   CONST64(0x1000000000001000), CONST64(0x1000001000001000), CONST64(0x1000000000001010), CONST64(0x1000001000001010),
265b0104773SPascal Brand   CONST64(0x1000100000001000), CONST64(0x1000101000001000), CONST64(0x1000100000001010), CONST64(0x1000101000001010),
266b0104773SPascal Brand   CONST64(0x1010000000000000), CONST64(0x1010001000000000), CONST64(0x1010000000000010), CONST64(0x1010001000000010),
267b0104773SPascal Brand   CONST64(0x1010100000000000), CONST64(0x1010101000000000), CONST64(0x1010100000000010), CONST64(0x1010101000000010),
268b0104773SPascal Brand   CONST64(0x1010000000001000), CONST64(0x1010001000001000), CONST64(0x1010000000001010), CONST64(0x1010001000001010),
269b0104773SPascal Brand   CONST64(0x1010100000001000), CONST64(0x1010101000001000), CONST64(0x1010100000001010), CONST64(0x1010101000001010),
270b0104773SPascal Brand   CONST64(0x1000000000100000), CONST64(0x1000001000100000), CONST64(0x1000000000100010), CONST64(0x1000001000100010),
271b0104773SPascal Brand   CONST64(0x1000100000100000), CONST64(0x1000101000100000), CONST64(0x1000100000100010), CONST64(0x1000101000100010),
272b0104773SPascal Brand   CONST64(0x1000000000101000), CONST64(0x1000001000101000), CONST64(0x1000000000101010), CONST64(0x1000001000101010),
273b0104773SPascal Brand   CONST64(0x1000100000101000), CONST64(0x1000101000101000), CONST64(0x1000100000101010), CONST64(0x1000101000101010),
274b0104773SPascal Brand   CONST64(0x1010000000100000), CONST64(0x1010001000100000), CONST64(0x1010000000100010), CONST64(0x1010001000100010),
275b0104773SPascal Brand   CONST64(0x1010100000100000), CONST64(0x1010101000100000), CONST64(0x1010100000100010), CONST64(0x1010101000100010),
276b0104773SPascal Brand   CONST64(0x1010000000101000), CONST64(0x1010001000101000), CONST64(0x1010000000101010), CONST64(0x1010001000101010),
277b0104773SPascal Brand   CONST64(0x1010100000101000), CONST64(0x1010101000101000), CONST64(0x1010100000101010), CONST64(0x1010101000101010),
278b0104773SPascal Brand   CONST64(0x0000000010000000), CONST64(0x0000001010000000), CONST64(0x0000000010000010), CONST64(0x0000001010000010),
279b0104773SPascal Brand   CONST64(0x0000100010000000), CONST64(0x0000101010000000), CONST64(0x0000100010000010), CONST64(0x0000101010000010),
280b0104773SPascal Brand   CONST64(0x0000000010001000), CONST64(0x0000001010001000), CONST64(0x0000000010001010), CONST64(0x0000001010001010),
281b0104773SPascal Brand   CONST64(0x0000100010001000), CONST64(0x0000101010001000), CONST64(0x0000100010001010), CONST64(0x0000101010001010),
282b0104773SPascal Brand   CONST64(0x0010000010000000), CONST64(0x0010001010000000), CONST64(0x0010000010000010), CONST64(0x0010001010000010),
283b0104773SPascal Brand   CONST64(0x0010100010000000), CONST64(0x0010101010000000), CONST64(0x0010100010000010), CONST64(0x0010101010000010),
284b0104773SPascal Brand   CONST64(0x0010000010001000), CONST64(0x0010001010001000), CONST64(0x0010000010001010), CONST64(0x0010001010001010),
285b0104773SPascal Brand   CONST64(0x0010100010001000), CONST64(0x0010101010001000), CONST64(0x0010100010001010), CONST64(0x0010101010001010),
286b0104773SPascal Brand   CONST64(0x0000000010100000), CONST64(0x0000001010100000), CONST64(0x0000000010100010), CONST64(0x0000001010100010),
287b0104773SPascal Brand   CONST64(0x0000100010100000), CONST64(0x0000101010100000), CONST64(0x0000100010100010), CONST64(0x0000101010100010),
288b0104773SPascal Brand   CONST64(0x0000000010101000), CONST64(0x0000001010101000), CONST64(0x0000000010101010), CONST64(0x0000001010101010),
289b0104773SPascal Brand   CONST64(0x0000100010101000), CONST64(0x0000101010101000), CONST64(0x0000100010101010), CONST64(0x0000101010101010),
290b0104773SPascal Brand   CONST64(0x0010000010100000), CONST64(0x0010001010100000), CONST64(0x0010000010100010), CONST64(0x0010001010100010),
291b0104773SPascal Brand   CONST64(0x0010100010100000), CONST64(0x0010101010100000), CONST64(0x0010100010100010), CONST64(0x0010101010100010),
292b0104773SPascal Brand   CONST64(0x0010000010101000), CONST64(0x0010001010101000), CONST64(0x0010000010101010), CONST64(0x0010001010101010),
293b0104773SPascal Brand   CONST64(0x0010100010101000), CONST64(0x0010101010101000), CONST64(0x0010100010101010), CONST64(0x0010101010101010),
294b0104773SPascal Brand   CONST64(0x1000000010000000), CONST64(0x1000001010000000), CONST64(0x1000000010000010), CONST64(0x1000001010000010),
295b0104773SPascal Brand   CONST64(0x1000100010000000), CONST64(0x1000101010000000), CONST64(0x1000100010000010), CONST64(0x1000101010000010),
296b0104773SPascal Brand   CONST64(0x1000000010001000), CONST64(0x1000001010001000), CONST64(0x1000000010001010), CONST64(0x1000001010001010),
297b0104773SPascal Brand   CONST64(0x1000100010001000), CONST64(0x1000101010001000), CONST64(0x1000100010001010), CONST64(0x1000101010001010),
298b0104773SPascal Brand   CONST64(0x1010000010000000), CONST64(0x1010001010000000), CONST64(0x1010000010000010), CONST64(0x1010001010000010),
299b0104773SPascal Brand   CONST64(0x1010100010000000), CONST64(0x1010101010000000), CONST64(0x1010100010000010), CONST64(0x1010101010000010),
300b0104773SPascal Brand   CONST64(0x1010000010001000), CONST64(0x1010001010001000), CONST64(0x1010000010001010), CONST64(0x1010001010001010),
301b0104773SPascal Brand   CONST64(0x1010100010001000), CONST64(0x1010101010001000), CONST64(0x1010100010001010), CONST64(0x1010101010001010),
302b0104773SPascal Brand   CONST64(0x1000000010100000), CONST64(0x1000001010100000), CONST64(0x1000000010100010), CONST64(0x1000001010100010),
303b0104773SPascal Brand   CONST64(0x1000100010100000), CONST64(0x1000101010100000), CONST64(0x1000100010100010), CONST64(0x1000101010100010),
304b0104773SPascal Brand   CONST64(0x1000000010101000), CONST64(0x1000001010101000), CONST64(0x1000000010101010), CONST64(0x1000001010101010),
305b0104773SPascal Brand   CONST64(0x1000100010101000), CONST64(0x1000101010101000), CONST64(0x1000100010101010), CONST64(0x1000101010101010),
306b0104773SPascal Brand   CONST64(0x1010000010100000), CONST64(0x1010001010100000), CONST64(0x1010000010100010), CONST64(0x1010001010100010),
307b0104773SPascal Brand   CONST64(0x1010100010100000), CONST64(0x1010101010100000), CONST64(0x1010100010100010), CONST64(0x1010101010100010),
308b0104773SPascal Brand   CONST64(0x1010000010101000), CONST64(0x1010001010101000), CONST64(0x1010000010101010), CONST64(0x1010001010101010),
309b0104773SPascal Brand   CONST64(0x1010100010101000), CONST64(0x1010101010101000), CONST64(0x1010100010101010), CONST64(0x1010101010101010)
310b0104773SPascal Brand   },
311b0104773SPascal Brand { CONST64(0x0000000000000000), CONST64(0x0000000800000000), CONST64(0x0000000000000008), CONST64(0x0000000800000008),
312b0104773SPascal Brand   CONST64(0x0000080000000000), CONST64(0x0000080800000000), CONST64(0x0000080000000008), CONST64(0x0000080800000008),
313b0104773SPascal Brand   CONST64(0x0000000000000800), CONST64(0x0000000800000800), CONST64(0x0000000000000808), CONST64(0x0000000800000808),
314b0104773SPascal Brand   CONST64(0x0000080000000800), CONST64(0x0000080800000800), CONST64(0x0000080000000808), CONST64(0x0000080800000808),
315b0104773SPascal Brand   CONST64(0x0008000000000000), CONST64(0x0008000800000000), CONST64(0x0008000000000008), CONST64(0x0008000800000008),
316b0104773SPascal Brand   CONST64(0x0008080000000000), CONST64(0x0008080800000000), CONST64(0x0008080000000008), CONST64(0x0008080800000008),
317b0104773SPascal Brand   CONST64(0x0008000000000800), CONST64(0x0008000800000800), CONST64(0x0008000000000808), CONST64(0x0008000800000808),
318b0104773SPascal Brand   CONST64(0x0008080000000800), CONST64(0x0008080800000800), CONST64(0x0008080000000808), CONST64(0x0008080800000808),
319b0104773SPascal Brand   CONST64(0x0000000000080000), CONST64(0x0000000800080000), CONST64(0x0000000000080008), CONST64(0x0000000800080008),
320b0104773SPascal Brand   CONST64(0x0000080000080000), CONST64(0x0000080800080000), CONST64(0x0000080000080008), CONST64(0x0000080800080008),
321b0104773SPascal Brand   CONST64(0x0000000000080800), CONST64(0x0000000800080800), CONST64(0x0000000000080808), CONST64(0x0000000800080808),
322b0104773SPascal Brand   CONST64(0x0000080000080800), CONST64(0x0000080800080800), CONST64(0x0000080000080808), CONST64(0x0000080800080808),
323b0104773SPascal Brand   CONST64(0x0008000000080000), CONST64(0x0008000800080000), CONST64(0x0008000000080008), CONST64(0x0008000800080008),
324b0104773SPascal Brand   CONST64(0x0008080000080000), CONST64(0x0008080800080000), CONST64(0x0008080000080008), CONST64(0x0008080800080008),
325b0104773SPascal Brand   CONST64(0x0008000000080800), CONST64(0x0008000800080800), CONST64(0x0008000000080808), CONST64(0x0008000800080808),
326b0104773SPascal Brand   CONST64(0x0008080000080800), CONST64(0x0008080800080800), CONST64(0x0008080000080808), CONST64(0x0008080800080808),
327b0104773SPascal Brand   CONST64(0x0800000000000000), CONST64(0x0800000800000000), CONST64(0x0800000000000008), CONST64(0x0800000800000008),
328b0104773SPascal Brand   CONST64(0x0800080000000000), CONST64(0x0800080800000000), CONST64(0x0800080000000008), CONST64(0x0800080800000008),
329b0104773SPascal Brand   CONST64(0x0800000000000800), CONST64(0x0800000800000800), CONST64(0x0800000000000808), CONST64(0x0800000800000808),
330b0104773SPascal Brand   CONST64(0x0800080000000800), CONST64(0x0800080800000800), CONST64(0x0800080000000808), CONST64(0x0800080800000808),
331b0104773SPascal Brand   CONST64(0x0808000000000000), CONST64(0x0808000800000000), CONST64(0x0808000000000008), CONST64(0x0808000800000008),
332b0104773SPascal Brand   CONST64(0x0808080000000000), CONST64(0x0808080800000000), CONST64(0x0808080000000008), CONST64(0x0808080800000008),
333b0104773SPascal Brand   CONST64(0x0808000000000800), CONST64(0x0808000800000800), CONST64(0x0808000000000808), CONST64(0x0808000800000808),
334b0104773SPascal Brand   CONST64(0x0808080000000800), CONST64(0x0808080800000800), CONST64(0x0808080000000808), CONST64(0x0808080800000808),
335b0104773SPascal Brand   CONST64(0x0800000000080000), CONST64(0x0800000800080000), CONST64(0x0800000000080008), CONST64(0x0800000800080008),
336b0104773SPascal Brand   CONST64(0x0800080000080000), CONST64(0x0800080800080000), CONST64(0x0800080000080008), CONST64(0x0800080800080008),
337b0104773SPascal Brand   CONST64(0x0800000000080800), CONST64(0x0800000800080800), CONST64(0x0800000000080808), CONST64(0x0800000800080808),
338b0104773SPascal Brand   CONST64(0x0800080000080800), CONST64(0x0800080800080800), CONST64(0x0800080000080808), CONST64(0x0800080800080808),
339b0104773SPascal Brand   CONST64(0x0808000000080000), CONST64(0x0808000800080000), CONST64(0x0808000000080008), CONST64(0x0808000800080008),
340b0104773SPascal Brand   CONST64(0x0808080000080000), CONST64(0x0808080800080000), CONST64(0x0808080000080008), CONST64(0x0808080800080008),
341b0104773SPascal Brand   CONST64(0x0808000000080800), CONST64(0x0808000800080800), CONST64(0x0808000000080808), CONST64(0x0808000800080808),
342b0104773SPascal Brand   CONST64(0x0808080000080800), CONST64(0x0808080800080800), CONST64(0x0808080000080808), CONST64(0x0808080800080808),
343b0104773SPascal Brand   CONST64(0x0000000008000000), CONST64(0x0000000808000000), CONST64(0x0000000008000008), CONST64(0x0000000808000008),
344b0104773SPascal Brand   CONST64(0x0000080008000000), CONST64(0x0000080808000000), CONST64(0x0000080008000008), CONST64(0x0000080808000008),
345b0104773SPascal Brand   CONST64(0x0000000008000800), CONST64(0x0000000808000800), CONST64(0x0000000008000808), CONST64(0x0000000808000808),
346b0104773SPascal Brand   CONST64(0x0000080008000800), CONST64(0x0000080808000800), CONST64(0x0000080008000808), CONST64(0x0000080808000808),
347b0104773SPascal Brand   CONST64(0x0008000008000000), CONST64(0x0008000808000000), CONST64(0x0008000008000008), CONST64(0x0008000808000008),
348b0104773SPascal Brand   CONST64(0x0008080008000000), CONST64(0x0008080808000000), CONST64(0x0008080008000008), CONST64(0x0008080808000008),
349b0104773SPascal Brand   CONST64(0x0008000008000800), CONST64(0x0008000808000800), CONST64(0x0008000008000808), CONST64(0x0008000808000808),
350b0104773SPascal Brand   CONST64(0x0008080008000800), CONST64(0x0008080808000800), CONST64(0x0008080008000808), CONST64(0x0008080808000808),
351b0104773SPascal Brand   CONST64(0x0000000008080000), CONST64(0x0000000808080000), CONST64(0x0000000008080008), CONST64(0x0000000808080008),
352b0104773SPascal Brand   CONST64(0x0000080008080000), CONST64(0x0000080808080000), CONST64(0x0000080008080008), CONST64(0x0000080808080008),
353b0104773SPascal Brand   CONST64(0x0000000008080800), CONST64(0x0000000808080800), CONST64(0x0000000008080808), CONST64(0x0000000808080808),
354b0104773SPascal Brand   CONST64(0x0000080008080800), CONST64(0x0000080808080800), CONST64(0x0000080008080808), CONST64(0x0000080808080808),
355b0104773SPascal Brand   CONST64(0x0008000008080000), CONST64(0x0008000808080000), CONST64(0x0008000008080008), CONST64(0x0008000808080008),
356b0104773SPascal Brand   CONST64(0x0008080008080000), CONST64(0x0008080808080000), CONST64(0x0008080008080008), CONST64(0x0008080808080008),
357b0104773SPascal Brand   CONST64(0x0008000008080800), CONST64(0x0008000808080800), CONST64(0x0008000008080808), CONST64(0x0008000808080808),
358b0104773SPascal Brand   CONST64(0x0008080008080800), CONST64(0x0008080808080800), CONST64(0x0008080008080808), CONST64(0x0008080808080808),
359b0104773SPascal Brand   CONST64(0x0800000008000000), CONST64(0x0800000808000000), CONST64(0x0800000008000008), CONST64(0x0800000808000008),
360b0104773SPascal Brand   CONST64(0x0800080008000000), CONST64(0x0800080808000000), CONST64(0x0800080008000008), CONST64(0x0800080808000008),
361b0104773SPascal Brand   CONST64(0x0800000008000800), CONST64(0x0800000808000800), CONST64(0x0800000008000808), CONST64(0x0800000808000808),
362b0104773SPascal Brand   CONST64(0x0800080008000800), CONST64(0x0800080808000800), CONST64(0x0800080008000808), CONST64(0x0800080808000808),
363b0104773SPascal Brand   CONST64(0x0808000008000000), CONST64(0x0808000808000000), CONST64(0x0808000008000008), CONST64(0x0808000808000008),
364b0104773SPascal Brand   CONST64(0x0808080008000000), CONST64(0x0808080808000000), CONST64(0x0808080008000008), CONST64(0x0808080808000008),
365b0104773SPascal Brand   CONST64(0x0808000008000800), CONST64(0x0808000808000800), CONST64(0x0808000008000808), CONST64(0x0808000808000808),
366b0104773SPascal Brand   CONST64(0x0808080008000800), CONST64(0x0808080808000800), CONST64(0x0808080008000808), CONST64(0x0808080808000808),
367b0104773SPascal Brand   CONST64(0x0800000008080000), CONST64(0x0800000808080000), CONST64(0x0800000008080008), CONST64(0x0800000808080008),
368b0104773SPascal Brand   CONST64(0x0800080008080000), CONST64(0x0800080808080000), CONST64(0x0800080008080008), CONST64(0x0800080808080008),
369b0104773SPascal Brand   CONST64(0x0800000008080800), CONST64(0x0800000808080800), CONST64(0x0800000008080808), CONST64(0x0800000808080808),
370b0104773SPascal Brand   CONST64(0x0800080008080800), CONST64(0x0800080808080800), CONST64(0x0800080008080808), CONST64(0x0800080808080808),
371b0104773SPascal Brand   CONST64(0x0808000008080000), CONST64(0x0808000808080000), CONST64(0x0808000008080008), CONST64(0x0808000808080008),
372b0104773SPascal Brand   CONST64(0x0808080008080000), CONST64(0x0808080808080000), CONST64(0x0808080008080008), CONST64(0x0808080808080008),
373b0104773SPascal Brand   CONST64(0x0808000008080800), CONST64(0x0808000808080800), CONST64(0x0808000008080808), CONST64(0x0808000808080808),
374b0104773SPascal Brand   CONST64(0x0808080008080800), CONST64(0x0808080808080800), CONST64(0x0808080008080808), CONST64(0x0808080808080808)
375b0104773SPascal Brand   },
376b0104773SPascal Brand { CONST64(0x0000000000000000), CONST64(0x0000000400000000), CONST64(0x0000000000000004), CONST64(0x0000000400000004),
377b0104773SPascal Brand   CONST64(0x0000040000000000), CONST64(0x0000040400000000), CONST64(0x0000040000000004), CONST64(0x0000040400000004),
378b0104773SPascal Brand   CONST64(0x0000000000000400), CONST64(0x0000000400000400), CONST64(0x0000000000000404), CONST64(0x0000000400000404),
379b0104773SPascal Brand   CONST64(0x0000040000000400), CONST64(0x0000040400000400), CONST64(0x0000040000000404), CONST64(0x0000040400000404),
380b0104773SPascal Brand   CONST64(0x0004000000000000), CONST64(0x0004000400000000), CONST64(0x0004000000000004), CONST64(0x0004000400000004),
381b0104773SPascal Brand   CONST64(0x0004040000000000), CONST64(0x0004040400000000), CONST64(0x0004040000000004), CONST64(0x0004040400000004),
382b0104773SPascal Brand   CONST64(0x0004000000000400), CONST64(0x0004000400000400), CONST64(0x0004000000000404), CONST64(0x0004000400000404),
383b0104773SPascal Brand   CONST64(0x0004040000000400), CONST64(0x0004040400000400), CONST64(0x0004040000000404), CONST64(0x0004040400000404),
384b0104773SPascal Brand   CONST64(0x0000000000040000), CONST64(0x0000000400040000), CONST64(0x0000000000040004), CONST64(0x0000000400040004),
385b0104773SPascal Brand   CONST64(0x0000040000040000), CONST64(0x0000040400040000), CONST64(0x0000040000040004), CONST64(0x0000040400040004),
386b0104773SPascal Brand   CONST64(0x0000000000040400), CONST64(0x0000000400040400), CONST64(0x0000000000040404), CONST64(0x0000000400040404),
387b0104773SPascal Brand   CONST64(0x0000040000040400), CONST64(0x0000040400040400), CONST64(0x0000040000040404), CONST64(0x0000040400040404),
388b0104773SPascal Brand   CONST64(0x0004000000040000), CONST64(0x0004000400040000), CONST64(0x0004000000040004), CONST64(0x0004000400040004),
389b0104773SPascal Brand   CONST64(0x0004040000040000), CONST64(0x0004040400040000), CONST64(0x0004040000040004), CONST64(0x0004040400040004),
390b0104773SPascal Brand   CONST64(0x0004000000040400), CONST64(0x0004000400040400), CONST64(0x0004000000040404), CONST64(0x0004000400040404),
391b0104773SPascal Brand   CONST64(0x0004040000040400), CONST64(0x0004040400040400), CONST64(0x0004040000040404), CONST64(0x0004040400040404),
392b0104773SPascal Brand   CONST64(0x0400000000000000), CONST64(0x0400000400000000), CONST64(0x0400000000000004), CONST64(0x0400000400000004),
393b0104773SPascal Brand   CONST64(0x0400040000000000), CONST64(0x0400040400000000), CONST64(0x0400040000000004), CONST64(0x0400040400000004),
394b0104773SPascal Brand   CONST64(0x0400000000000400), CONST64(0x0400000400000400), CONST64(0x0400000000000404), CONST64(0x0400000400000404),
395b0104773SPascal Brand   CONST64(0x0400040000000400), CONST64(0x0400040400000400), CONST64(0x0400040000000404), CONST64(0x0400040400000404),
396b0104773SPascal Brand   CONST64(0x0404000000000000), CONST64(0x0404000400000000), CONST64(0x0404000000000004), CONST64(0x0404000400000004),
397b0104773SPascal Brand   CONST64(0x0404040000000000), CONST64(0x0404040400000000), CONST64(0x0404040000000004), CONST64(0x0404040400000004),
398b0104773SPascal Brand   CONST64(0x0404000000000400), CONST64(0x0404000400000400), CONST64(0x0404000000000404), CONST64(0x0404000400000404),
399b0104773SPascal Brand   CONST64(0x0404040000000400), CONST64(0x0404040400000400), CONST64(0x0404040000000404), CONST64(0x0404040400000404),
400b0104773SPascal Brand   CONST64(0x0400000000040000), CONST64(0x0400000400040000), CONST64(0x0400000000040004), CONST64(0x0400000400040004),
401b0104773SPascal Brand   CONST64(0x0400040000040000), CONST64(0x0400040400040000), CONST64(0x0400040000040004), CONST64(0x0400040400040004),
402b0104773SPascal Brand   CONST64(0x0400000000040400), CONST64(0x0400000400040400), CONST64(0x0400000000040404), CONST64(0x0400000400040404),
403b0104773SPascal Brand   CONST64(0x0400040000040400), CONST64(0x0400040400040400), CONST64(0x0400040000040404), CONST64(0x0400040400040404),
404b0104773SPascal Brand   CONST64(0x0404000000040000), CONST64(0x0404000400040000), CONST64(0x0404000000040004), CONST64(0x0404000400040004),
405b0104773SPascal Brand   CONST64(0x0404040000040000), CONST64(0x0404040400040000), CONST64(0x0404040000040004), CONST64(0x0404040400040004),
406b0104773SPascal Brand   CONST64(0x0404000000040400), CONST64(0x0404000400040400), CONST64(0x0404000000040404), CONST64(0x0404000400040404),
407b0104773SPascal Brand   CONST64(0x0404040000040400), CONST64(0x0404040400040400), CONST64(0x0404040000040404), CONST64(0x0404040400040404),
408b0104773SPascal Brand   CONST64(0x0000000004000000), CONST64(0x0000000404000000), CONST64(0x0000000004000004), CONST64(0x0000000404000004),
409b0104773SPascal Brand   CONST64(0x0000040004000000), CONST64(0x0000040404000000), CONST64(0x0000040004000004), CONST64(0x0000040404000004),
410b0104773SPascal Brand   CONST64(0x0000000004000400), CONST64(0x0000000404000400), CONST64(0x0000000004000404), CONST64(0x0000000404000404),
411b0104773SPascal Brand   CONST64(0x0000040004000400), CONST64(0x0000040404000400), CONST64(0x0000040004000404), CONST64(0x0000040404000404),
412b0104773SPascal Brand   CONST64(0x0004000004000000), CONST64(0x0004000404000000), CONST64(0x0004000004000004), CONST64(0x0004000404000004),
413b0104773SPascal Brand   CONST64(0x0004040004000000), CONST64(0x0004040404000000), CONST64(0x0004040004000004), CONST64(0x0004040404000004),
414b0104773SPascal Brand   CONST64(0x0004000004000400), CONST64(0x0004000404000400), CONST64(0x0004000004000404), CONST64(0x0004000404000404),
415b0104773SPascal Brand   CONST64(0x0004040004000400), CONST64(0x0004040404000400), CONST64(0x0004040004000404), CONST64(0x0004040404000404),
416b0104773SPascal Brand   CONST64(0x0000000004040000), CONST64(0x0000000404040000), CONST64(0x0000000004040004), CONST64(0x0000000404040004),
417b0104773SPascal Brand   CONST64(0x0000040004040000), CONST64(0x0000040404040000), CONST64(0x0000040004040004), CONST64(0x0000040404040004),
418b0104773SPascal Brand   CONST64(0x0000000004040400), CONST64(0x0000000404040400), CONST64(0x0000000004040404), CONST64(0x0000000404040404),
419b0104773SPascal Brand   CONST64(0x0000040004040400), CONST64(0x0000040404040400), CONST64(0x0000040004040404), CONST64(0x0000040404040404),
420b0104773SPascal Brand   CONST64(0x0004000004040000), CONST64(0x0004000404040000), CONST64(0x0004000004040004), CONST64(0x0004000404040004),
421b0104773SPascal Brand   CONST64(0x0004040004040000), CONST64(0x0004040404040000), CONST64(0x0004040004040004), CONST64(0x0004040404040004),
422b0104773SPascal Brand   CONST64(0x0004000004040400), CONST64(0x0004000404040400), CONST64(0x0004000004040404), CONST64(0x0004000404040404),
423b0104773SPascal Brand   CONST64(0x0004040004040400), CONST64(0x0004040404040400), CONST64(0x0004040004040404), CONST64(0x0004040404040404),
424b0104773SPascal Brand   CONST64(0x0400000004000000), CONST64(0x0400000404000000), CONST64(0x0400000004000004), CONST64(0x0400000404000004),
425b0104773SPascal Brand   CONST64(0x0400040004000000), CONST64(0x0400040404000000), CONST64(0x0400040004000004), CONST64(0x0400040404000004),
426b0104773SPascal Brand   CONST64(0x0400000004000400), CONST64(0x0400000404000400), CONST64(0x0400000004000404), CONST64(0x0400000404000404),
427b0104773SPascal Brand   CONST64(0x0400040004000400), CONST64(0x0400040404000400), CONST64(0x0400040004000404), CONST64(0x0400040404000404),
428b0104773SPascal Brand   CONST64(0x0404000004000000), CONST64(0x0404000404000000), CONST64(0x0404000004000004), CONST64(0x0404000404000004),
429b0104773SPascal Brand   CONST64(0x0404040004000000), CONST64(0x0404040404000000), CONST64(0x0404040004000004), CONST64(0x0404040404000004),
430b0104773SPascal Brand   CONST64(0x0404000004000400), CONST64(0x0404000404000400), CONST64(0x0404000004000404), CONST64(0x0404000404000404),
431b0104773SPascal Brand   CONST64(0x0404040004000400), CONST64(0x0404040404000400), CONST64(0x0404040004000404), CONST64(0x0404040404000404),
432b0104773SPascal Brand   CONST64(0x0400000004040000), CONST64(0x0400000404040000), CONST64(0x0400000004040004), CONST64(0x0400000404040004),
433b0104773SPascal Brand   CONST64(0x0400040004040000), CONST64(0x0400040404040000), CONST64(0x0400040004040004), CONST64(0x0400040404040004),
434b0104773SPascal Brand   CONST64(0x0400000004040400), CONST64(0x0400000404040400), CONST64(0x0400000004040404), CONST64(0x0400000404040404),
435b0104773SPascal Brand   CONST64(0x0400040004040400), CONST64(0x0400040404040400), CONST64(0x0400040004040404), CONST64(0x0400040404040404),
436b0104773SPascal Brand   CONST64(0x0404000004040000), CONST64(0x0404000404040000), CONST64(0x0404000004040004), CONST64(0x0404000404040004),
437b0104773SPascal Brand   CONST64(0x0404040004040000), CONST64(0x0404040404040000), CONST64(0x0404040004040004), CONST64(0x0404040404040004),
438b0104773SPascal Brand   CONST64(0x0404000004040400), CONST64(0x0404000404040400), CONST64(0x0404000004040404), CONST64(0x0404000404040404),
439b0104773SPascal Brand   CONST64(0x0404040004040400), CONST64(0x0404040404040400), CONST64(0x0404040004040404), CONST64(0x0404040404040404)
440b0104773SPascal Brand   },
441b0104773SPascal Brand { CONST64(0x0000000000000000), CONST64(0x0000000200000000), CONST64(0x0000000000000002), CONST64(0x0000000200000002),
442b0104773SPascal Brand   CONST64(0x0000020000000000), CONST64(0x0000020200000000), CONST64(0x0000020000000002), CONST64(0x0000020200000002),
443b0104773SPascal Brand   CONST64(0x0000000000000200), CONST64(0x0000000200000200), CONST64(0x0000000000000202), CONST64(0x0000000200000202),
444b0104773SPascal Brand   CONST64(0x0000020000000200), CONST64(0x0000020200000200), CONST64(0x0000020000000202), CONST64(0x0000020200000202),
445b0104773SPascal Brand   CONST64(0x0002000000000000), CONST64(0x0002000200000000), CONST64(0x0002000000000002), CONST64(0x0002000200000002),
446b0104773SPascal Brand   CONST64(0x0002020000000000), CONST64(0x0002020200000000), CONST64(0x0002020000000002), CONST64(0x0002020200000002),
447b0104773SPascal Brand   CONST64(0x0002000000000200), CONST64(0x0002000200000200), CONST64(0x0002000000000202), CONST64(0x0002000200000202),
448b0104773SPascal Brand   CONST64(0x0002020000000200), CONST64(0x0002020200000200), CONST64(0x0002020000000202), CONST64(0x0002020200000202),
449b0104773SPascal Brand   CONST64(0x0000000000020000), CONST64(0x0000000200020000), CONST64(0x0000000000020002), CONST64(0x0000000200020002),
450b0104773SPascal Brand   CONST64(0x0000020000020000), CONST64(0x0000020200020000), CONST64(0x0000020000020002), CONST64(0x0000020200020002),
451b0104773SPascal Brand   CONST64(0x0000000000020200), CONST64(0x0000000200020200), CONST64(0x0000000000020202), CONST64(0x0000000200020202),
452b0104773SPascal Brand   CONST64(0x0000020000020200), CONST64(0x0000020200020200), CONST64(0x0000020000020202), CONST64(0x0000020200020202),
453b0104773SPascal Brand   CONST64(0x0002000000020000), CONST64(0x0002000200020000), CONST64(0x0002000000020002), CONST64(0x0002000200020002),
454b0104773SPascal Brand   CONST64(0x0002020000020000), CONST64(0x0002020200020000), CONST64(0x0002020000020002), CONST64(0x0002020200020002),
455b0104773SPascal Brand   CONST64(0x0002000000020200), CONST64(0x0002000200020200), CONST64(0x0002000000020202), CONST64(0x0002000200020202),
456b0104773SPascal Brand   CONST64(0x0002020000020200), CONST64(0x0002020200020200), CONST64(0x0002020000020202), CONST64(0x0002020200020202),
457b0104773SPascal Brand   CONST64(0x0200000000000000), CONST64(0x0200000200000000), CONST64(0x0200000000000002), CONST64(0x0200000200000002),
458b0104773SPascal Brand   CONST64(0x0200020000000000), CONST64(0x0200020200000000), CONST64(0x0200020000000002), CONST64(0x0200020200000002),
459b0104773SPascal Brand   CONST64(0x0200000000000200), CONST64(0x0200000200000200), CONST64(0x0200000000000202), CONST64(0x0200000200000202),
460b0104773SPascal Brand   CONST64(0x0200020000000200), CONST64(0x0200020200000200), CONST64(0x0200020000000202), CONST64(0x0200020200000202),
461b0104773SPascal Brand   CONST64(0x0202000000000000), CONST64(0x0202000200000000), CONST64(0x0202000000000002), CONST64(0x0202000200000002),
462b0104773SPascal Brand   CONST64(0x0202020000000000), CONST64(0x0202020200000000), CONST64(0x0202020000000002), CONST64(0x0202020200000002),
463b0104773SPascal Brand   CONST64(0x0202000000000200), CONST64(0x0202000200000200), CONST64(0x0202000000000202), CONST64(0x0202000200000202),
464b0104773SPascal Brand   CONST64(0x0202020000000200), CONST64(0x0202020200000200), CONST64(0x0202020000000202), CONST64(0x0202020200000202),
465b0104773SPascal Brand   CONST64(0x0200000000020000), CONST64(0x0200000200020000), CONST64(0x0200000000020002), CONST64(0x0200000200020002),
466b0104773SPascal Brand   CONST64(0x0200020000020000), CONST64(0x0200020200020000), CONST64(0x0200020000020002), CONST64(0x0200020200020002),
467b0104773SPascal Brand   CONST64(0x0200000000020200), CONST64(0x0200000200020200), CONST64(0x0200000000020202), CONST64(0x0200000200020202),
468b0104773SPascal Brand   CONST64(0x0200020000020200), CONST64(0x0200020200020200), CONST64(0x0200020000020202), CONST64(0x0200020200020202),
469b0104773SPascal Brand   CONST64(0x0202000000020000), CONST64(0x0202000200020000), CONST64(0x0202000000020002), CONST64(0x0202000200020002),
470b0104773SPascal Brand   CONST64(0x0202020000020000), CONST64(0x0202020200020000), CONST64(0x0202020000020002), CONST64(0x0202020200020002),
471b0104773SPascal Brand   CONST64(0x0202000000020200), CONST64(0x0202000200020200), CONST64(0x0202000000020202), CONST64(0x0202000200020202),
472b0104773SPascal Brand   CONST64(0x0202020000020200), CONST64(0x0202020200020200), CONST64(0x0202020000020202), CONST64(0x0202020200020202),
473b0104773SPascal Brand   CONST64(0x0000000002000000), CONST64(0x0000000202000000), CONST64(0x0000000002000002), CONST64(0x0000000202000002),
474b0104773SPascal Brand   CONST64(0x0000020002000000), CONST64(0x0000020202000000), CONST64(0x0000020002000002), CONST64(0x0000020202000002),
475b0104773SPascal Brand   CONST64(0x0000000002000200), CONST64(0x0000000202000200), CONST64(0x0000000002000202), CONST64(0x0000000202000202),
476b0104773SPascal Brand   CONST64(0x0000020002000200), CONST64(0x0000020202000200), CONST64(0x0000020002000202), CONST64(0x0000020202000202),
477b0104773SPascal Brand   CONST64(0x0002000002000000), CONST64(0x0002000202000000), CONST64(0x0002000002000002), CONST64(0x0002000202000002),
478b0104773SPascal Brand   CONST64(0x0002020002000000), CONST64(0x0002020202000000), CONST64(0x0002020002000002), CONST64(0x0002020202000002),
479b0104773SPascal Brand   CONST64(0x0002000002000200), CONST64(0x0002000202000200), CONST64(0x0002000002000202), CONST64(0x0002000202000202),
480b0104773SPascal Brand   CONST64(0x0002020002000200), CONST64(0x0002020202000200), CONST64(0x0002020002000202), CONST64(0x0002020202000202),
481b0104773SPascal Brand   CONST64(0x0000000002020000), CONST64(0x0000000202020000), CONST64(0x0000000002020002), CONST64(0x0000000202020002),
482b0104773SPascal Brand   CONST64(0x0000020002020000), CONST64(0x0000020202020000), CONST64(0x0000020002020002), CONST64(0x0000020202020002),
483b0104773SPascal Brand   CONST64(0x0000000002020200), CONST64(0x0000000202020200), CONST64(0x0000000002020202), CONST64(0x0000000202020202),
484b0104773SPascal Brand   CONST64(0x0000020002020200), CONST64(0x0000020202020200), CONST64(0x0000020002020202), CONST64(0x0000020202020202),
485b0104773SPascal Brand   CONST64(0x0002000002020000), CONST64(0x0002000202020000), CONST64(0x0002000002020002), CONST64(0x0002000202020002),
486b0104773SPascal Brand   CONST64(0x0002020002020000), CONST64(0x0002020202020000), CONST64(0x0002020002020002), CONST64(0x0002020202020002),
487b0104773SPascal Brand   CONST64(0x0002000002020200), CONST64(0x0002000202020200), CONST64(0x0002000002020202), CONST64(0x0002000202020202),
488b0104773SPascal Brand   CONST64(0x0002020002020200), CONST64(0x0002020202020200), CONST64(0x0002020002020202), CONST64(0x0002020202020202),
489b0104773SPascal Brand   CONST64(0x0200000002000000), CONST64(0x0200000202000000), CONST64(0x0200000002000002), CONST64(0x0200000202000002),
490b0104773SPascal Brand   CONST64(0x0200020002000000), CONST64(0x0200020202000000), CONST64(0x0200020002000002), CONST64(0x0200020202000002),
491b0104773SPascal Brand   CONST64(0x0200000002000200), CONST64(0x0200000202000200), CONST64(0x0200000002000202), CONST64(0x0200000202000202),
492b0104773SPascal Brand   CONST64(0x0200020002000200), CONST64(0x0200020202000200), CONST64(0x0200020002000202), CONST64(0x0200020202000202),
493b0104773SPascal Brand   CONST64(0x0202000002000000), CONST64(0x0202000202000000), CONST64(0x0202000002000002), CONST64(0x0202000202000002),
494b0104773SPascal Brand   CONST64(0x0202020002000000), CONST64(0x0202020202000000), CONST64(0x0202020002000002), CONST64(0x0202020202000002),
495b0104773SPascal Brand   CONST64(0x0202000002000200), CONST64(0x0202000202000200), CONST64(0x0202000002000202), CONST64(0x0202000202000202),
496b0104773SPascal Brand   CONST64(0x0202020002000200), CONST64(0x0202020202000200), CONST64(0x0202020002000202), CONST64(0x0202020202000202),
497b0104773SPascal Brand   CONST64(0x0200000002020000), CONST64(0x0200000202020000), CONST64(0x0200000002020002), CONST64(0x0200000202020002),
498b0104773SPascal Brand   CONST64(0x0200020002020000), CONST64(0x0200020202020000), CONST64(0x0200020002020002), CONST64(0x0200020202020002),
499b0104773SPascal Brand   CONST64(0x0200000002020200), CONST64(0x0200000202020200), CONST64(0x0200000002020202), CONST64(0x0200000202020202),
500b0104773SPascal Brand   CONST64(0x0200020002020200), CONST64(0x0200020202020200), CONST64(0x0200020002020202), CONST64(0x0200020202020202),
501b0104773SPascal Brand   CONST64(0x0202000002020000), CONST64(0x0202000202020000), CONST64(0x0202000002020002), CONST64(0x0202000202020002),
502b0104773SPascal Brand   CONST64(0x0202020002020000), CONST64(0x0202020202020000), CONST64(0x0202020002020002), CONST64(0x0202020202020002),
503b0104773SPascal Brand   CONST64(0x0202000002020200), CONST64(0x0202000202020200), CONST64(0x0202000002020202), CONST64(0x0202000202020202),
504b0104773SPascal Brand   CONST64(0x0202020002020200), CONST64(0x0202020202020200), CONST64(0x0202020002020202), CONST64(0x0202020202020202)
505b0104773SPascal Brand   },
506b0104773SPascal Brand { CONST64(0x0000000000000000), CONST64(0x0000010000000000), CONST64(0x0000000000000100), CONST64(0x0000010000000100),
507b0104773SPascal Brand   CONST64(0x0001000000000000), CONST64(0x0001010000000000), CONST64(0x0001000000000100), CONST64(0x0001010000000100),
508b0104773SPascal Brand   CONST64(0x0000000000010000), CONST64(0x0000010000010000), CONST64(0x0000000000010100), CONST64(0x0000010000010100),
509b0104773SPascal Brand   CONST64(0x0001000000010000), CONST64(0x0001010000010000), CONST64(0x0001000000010100), CONST64(0x0001010000010100),
510b0104773SPascal Brand   CONST64(0x0100000000000000), CONST64(0x0100010000000000), CONST64(0x0100000000000100), CONST64(0x0100010000000100),
511b0104773SPascal Brand   CONST64(0x0101000000000000), CONST64(0x0101010000000000), CONST64(0x0101000000000100), CONST64(0x0101010000000100),
512b0104773SPascal Brand   CONST64(0x0100000000010000), CONST64(0x0100010000010000), CONST64(0x0100000000010100), CONST64(0x0100010000010100),
513b0104773SPascal Brand   CONST64(0x0101000000010000), CONST64(0x0101010000010000), CONST64(0x0101000000010100), CONST64(0x0101010000010100),
514b0104773SPascal Brand   CONST64(0x0000000001000000), CONST64(0x0000010001000000), CONST64(0x0000000001000100), CONST64(0x0000010001000100),
515b0104773SPascal Brand   CONST64(0x0001000001000000), CONST64(0x0001010001000000), CONST64(0x0001000001000100), CONST64(0x0001010001000100),
516b0104773SPascal Brand   CONST64(0x0000000001010000), CONST64(0x0000010001010000), CONST64(0x0000000001010100), CONST64(0x0000010001010100),
517b0104773SPascal Brand   CONST64(0x0001000001010000), CONST64(0x0001010001010000), CONST64(0x0001000001010100), CONST64(0x0001010001010100),
518b0104773SPascal Brand   CONST64(0x0100000001000000), CONST64(0x0100010001000000), CONST64(0x0100000001000100), CONST64(0x0100010001000100),
519b0104773SPascal Brand   CONST64(0x0101000001000000), CONST64(0x0101010001000000), CONST64(0x0101000001000100), CONST64(0x0101010001000100),
520b0104773SPascal Brand   CONST64(0x0100000001010000), CONST64(0x0100010001010000), CONST64(0x0100000001010100), CONST64(0x0100010001010100),
521b0104773SPascal Brand   CONST64(0x0101000001010000), CONST64(0x0101010001010000), CONST64(0x0101000001010100), CONST64(0x0101010001010100),
522b0104773SPascal Brand   CONST64(0x0000000100000000), CONST64(0x0000010100000000), CONST64(0x0000000100000100), CONST64(0x0000010100000100),
523b0104773SPascal Brand   CONST64(0x0001000100000000), CONST64(0x0001010100000000), CONST64(0x0001000100000100), CONST64(0x0001010100000100),
524b0104773SPascal Brand   CONST64(0x0000000100010000), CONST64(0x0000010100010000), CONST64(0x0000000100010100), CONST64(0x0000010100010100),
525b0104773SPascal Brand   CONST64(0x0001000100010000), CONST64(0x0001010100010000), CONST64(0x0001000100010100), CONST64(0x0001010100010100),
526b0104773SPascal Brand   CONST64(0x0100000100000000), CONST64(0x0100010100000000), CONST64(0x0100000100000100), CONST64(0x0100010100000100),
527b0104773SPascal Brand   CONST64(0x0101000100000000), CONST64(0x0101010100000000), CONST64(0x0101000100000100), CONST64(0x0101010100000100),
528b0104773SPascal Brand   CONST64(0x0100000100010000), CONST64(0x0100010100010000), CONST64(0x0100000100010100), CONST64(0x0100010100010100),
529b0104773SPascal Brand   CONST64(0x0101000100010000), CONST64(0x0101010100010000), CONST64(0x0101000100010100), CONST64(0x0101010100010100),
530b0104773SPascal Brand   CONST64(0x0000000101000000), CONST64(0x0000010101000000), CONST64(0x0000000101000100), CONST64(0x0000010101000100),
531b0104773SPascal Brand   CONST64(0x0001000101000000), CONST64(0x0001010101000000), CONST64(0x0001000101000100), CONST64(0x0001010101000100),
532b0104773SPascal Brand   CONST64(0x0000000101010000), CONST64(0x0000010101010000), CONST64(0x0000000101010100), CONST64(0x0000010101010100),
533b0104773SPascal Brand   CONST64(0x0001000101010000), CONST64(0x0001010101010000), CONST64(0x0001000101010100), CONST64(0x0001010101010100),
534b0104773SPascal Brand   CONST64(0x0100000101000000), CONST64(0x0100010101000000), CONST64(0x0100000101000100), CONST64(0x0100010101000100),
535b0104773SPascal Brand   CONST64(0x0101000101000000), CONST64(0x0101010101000000), CONST64(0x0101000101000100), CONST64(0x0101010101000100),
536b0104773SPascal Brand   CONST64(0x0100000101010000), CONST64(0x0100010101010000), CONST64(0x0100000101010100), CONST64(0x0100010101010100),
537b0104773SPascal Brand   CONST64(0x0101000101010000), CONST64(0x0101010101010000), CONST64(0x0101000101010100), CONST64(0x0101010101010100),
538b0104773SPascal Brand   CONST64(0x0000000000000001), CONST64(0x0000010000000001), CONST64(0x0000000000000101), CONST64(0x0000010000000101),
539b0104773SPascal Brand   CONST64(0x0001000000000001), CONST64(0x0001010000000001), CONST64(0x0001000000000101), CONST64(0x0001010000000101),
540b0104773SPascal Brand   CONST64(0x0000000000010001), CONST64(0x0000010000010001), CONST64(0x0000000000010101), CONST64(0x0000010000010101),
541b0104773SPascal Brand   CONST64(0x0001000000010001), CONST64(0x0001010000010001), CONST64(0x0001000000010101), CONST64(0x0001010000010101),
542b0104773SPascal Brand   CONST64(0x0100000000000001), CONST64(0x0100010000000001), CONST64(0x0100000000000101), CONST64(0x0100010000000101),
543b0104773SPascal Brand   CONST64(0x0101000000000001), CONST64(0x0101010000000001), CONST64(0x0101000000000101), CONST64(0x0101010000000101),
544b0104773SPascal Brand   CONST64(0x0100000000010001), CONST64(0x0100010000010001), CONST64(0x0100000000010101), CONST64(0x0100010000010101),
545b0104773SPascal Brand   CONST64(0x0101000000010001), CONST64(0x0101010000010001), CONST64(0x0101000000010101), CONST64(0x0101010000010101),
546b0104773SPascal Brand   CONST64(0x0000000001000001), CONST64(0x0000010001000001), CONST64(0x0000000001000101), CONST64(0x0000010001000101),
547b0104773SPascal Brand   CONST64(0x0001000001000001), CONST64(0x0001010001000001), CONST64(0x0001000001000101), CONST64(0x0001010001000101),
548b0104773SPascal Brand   CONST64(0x0000000001010001), CONST64(0x0000010001010001), CONST64(0x0000000001010101), CONST64(0x0000010001010101),
549b0104773SPascal Brand   CONST64(0x0001000001010001), CONST64(0x0001010001010001), CONST64(0x0001000001010101), CONST64(0x0001010001010101),
550b0104773SPascal Brand   CONST64(0x0100000001000001), CONST64(0x0100010001000001), CONST64(0x0100000001000101), CONST64(0x0100010001000101),
551b0104773SPascal Brand   CONST64(0x0101000001000001), CONST64(0x0101010001000001), CONST64(0x0101000001000101), CONST64(0x0101010001000101),
552b0104773SPascal Brand   CONST64(0x0100000001010001), CONST64(0x0100010001010001), CONST64(0x0100000001010101), CONST64(0x0100010001010101),
553b0104773SPascal Brand   CONST64(0x0101000001010001), CONST64(0x0101010001010001), CONST64(0x0101000001010101), CONST64(0x0101010001010101),
554b0104773SPascal Brand   CONST64(0x0000000100000001), CONST64(0x0000010100000001), CONST64(0x0000000100000101), CONST64(0x0000010100000101),
555b0104773SPascal Brand   CONST64(0x0001000100000001), CONST64(0x0001010100000001), CONST64(0x0001000100000101), CONST64(0x0001010100000101),
556b0104773SPascal Brand   CONST64(0x0000000100010001), CONST64(0x0000010100010001), CONST64(0x0000000100010101), CONST64(0x0000010100010101),
557b0104773SPascal Brand   CONST64(0x0001000100010001), CONST64(0x0001010100010001), CONST64(0x0001000100010101), CONST64(0x0001010100010101),
558b0104773SPascal Brand   CONST64(0x0100000100000001), CONST64(0x0100010100000001), CONST64(0x0100000100000101), CONST64(0x0100010100000101),
559b0104773SPascal Brand   CONST64(0x0101000100000001), CONST64(0x0101010100000001), CONST64(0x0101000100000101), CONST64(0x0101010100000101),
560b0104773SPascal Brand   CONST64(0x0100000100010001), CONST64(0x0100010100010001), CONST64(0x0100000100010101), CONST64(0x0100010100010101),
561b0104773SPascal Brand   CONST64(0x0101000100010001), CONST64(0x0101010100010001), CONST64(0x0101000100010101), CONST64(0x0101010100010101),
562b0104773SPascal Brand   CONST64(0x0000000101000001), CONST64(0x0000010101000001), CONST64(0x0000000101000101), CONST64(0x0000010101000101),
563b0104773SPascal Brand   CONST64(0x0001000101000001), CONST64(0x0001010101000001), CONST64(0x0001000101000101), CONST64(0x0001010101000101),
564b0104773SPascal Brand   CONST64(0x0000000101010001), CONST64(0x0000010101010001), CONST64(0x0000000101010101), CONST64(0x0000010101010101),
565b0104773SPascal Brand   CONST64(0x0001000101010001), CONST64(0x0001010101010001), CONST64(0x0001000101010101), CONST64(0x0001010101010101),
566b0104773SPascal Brand   CONST64(0x0100000101000001), CONST64(0x0100010101000001), CONST64(0x0100000101000101), CONST64(0x0100010101000101),
567b0104773SPascal Brand   CONST64(0x0101000101000001), CONST64(0x0101010101000001), CONST64(0x0101000101000101), CONST64(0x0101010101000101),
568b0104773SPascal Brand   CONST64(0x0100000101010001), CONST64(0x0100010101010001), CONST64(0x0100000101010101), CONST64(0x0100010101010101),
569b0104773SPascal Brand   CONST64(0x0101000101010001), CONST64(0x0101010101010001), CONST64(0x0101000101010101), CONST64(0x0101010101010101)
570b0104773SPascal Brand   },
571b0104773SPascal Brand { CONST64(0x0000000000000000), CONST64(0x0000008000000000), CONST64(0x0000000000000080), CONST64(0x0000008000000080),
572b0104773SPascal Brand   CONST64(0x0000800000000000), CONST64(0x0000808000000000), CONST64(0x0000800000000080), CONST64(0x0000808000000080),
573b0104773SPascal Brand   CONST64(0x0000000000008000), CONST64(0x0000008000008000), CONST64(0x0000000000008080), CONST64(0x0000008000008080),
574b0104773SPascal Brand   CONST64(0x0000800000008000), CONST64(0x0000808000008000), CONST64(0x0000800000008080), CONST64(0x0000808000008080),
575b0104773SPascal Brand   CONST64(0x0080000000000000), CONST64(0x0080008000000000), CONST64(0x0080000000000080), CONST64(0x0080008000000080),
576b0104773SPascal Brand   CONST64(0x0080800000000000), CONST64(0x0080808000000000), CONST64(0x0080800000000080), CONST64(0x0080808000000080),
577b0104773SPascal Brand   CONST64(0x0080000000008000), CONST64(0x0080008000008000), CONST64(0x0080000000008080), CONST64(0x0080008000008080),
578b0104773SPascal Brand   CONST64(0x0080800000008000), CONST64(0x0080808000008000), CONST64(0x0080800000008080), CONST64(0x0080808000008080),
579b0104773SPascal Brand   CONST64(0x0000000000800000), CONST64(0x0000008000800000), CONST64(0x0000000000800080), CONST64(0x0000008000800080),
580b0104773SPascal Brand   CONST64(0x0000800000800000), CONST64(0x0000808000800000), CONST64(0x0000800000800080), CONST64(0x0000808000800080),
581b0104773SPascal Brand   CONST64(0x0000000000808000), CONST64(0x0000008000808000), CONST64(0x0000000000808080), CONST64(0x0000008000808080),
582b0104773SPascal Brand   CONST64(0x0000800000808000), CONST64(0x0000808000808000), CONST64(0x0000800000808080), CONST64(0x0000808000808080),
583b0104773SPascal Brand   CONST64(0x0080000000800000), CONST64(0x0080008000800000), CONST64(0x0080000000800080), CONST64(0x0080008000800080),
584b0104773SPascal Brand   CONST64(0x0080800000800000), CONST64(0x0080808000800000), CONST64(0x0080800000800080), CONST64(0x0080808000800080),
585b0104773SPascal Brand   CONST64(0x0080000000808000), CONST64(0x0080008000808000), CONST64(0x0080000000808080), CONST64(0x0080008000808080),
586b0104773SPascal Brand   CONST64(0x0080800000808000), CONST64(0x0080808000808000), CONST64(0x0080800000808080), CONST64(0x0080808000808080),
587b0104773SPascal Brand   CONST64(0x8000000000000000), CONST64(0x8000008000000000), CONST64(0x8000000000000080), CONST64(0x8000008000000080),
588b0104773SPascal Brand   CONST64(0x8000800000000000), CONST64(0x8000808000000000), CONST64(0x8000800000000080), CONST64(0x8000808000000080),
589b0104773SPascal Brand   CONST64(0x8000000000008000), CONST64(0x8000008000008000), CONST64(0x8000000000008080), CONST64(0x8000008000008080),
590b0104773SPascal Brand   CONST64(0x8000800000008000), CONST64(0x8000808000008000), CONST64(0x8000800000008080), CONST64(0x8000808000008080),
591b0104773SPascal Brand   CONST64(0x8080000000000000), CONST64(0x8080008000000000), CONST64(0x8080000000000080), CONST64(0x8080008000000080),
592b0104773SPascal Brand   CONST64(0x8080800000000000), CONST64(0x8080808000000000), CONST64(0x8080800000000080), CONST64(0x8080808000000080),
593b0104773SPascal Brand   CONST64(0x8080000000008000), CONST64(0x8080008000008000), CONST64(0x8080000000008080), CONST64(0x8080008000008080),
594b0104773SPascal Brand   CONST64(0x8080800000008000), CONST64(0x8080808000008000), CONST64(0x8080800000008080), CONST64(0x8080808000008080),
595b0104773SPascal Brand   CONST64(0x8000000000800000), CONST64(0x8000008000800000), CONST64(0x8000000000800080), CONST64(0x8000008000800080),
596b0104773SPascal Brand   CONST64(0x8000800000800000), CONST64(0x8000808000800000), CONST64(0x8000800000800080), CONST64(0x8000808000800080),
597b0104773SPascal Brand   CONST64(0x8000000000808000), CONST64(0x8000008000808000), CONST64(0x8000000000808080), CONST64(0x8000008000808080),
598b0104773SPascal Brand   CONST64(0x8000800000808000), CONST64(0x8000808000808000), CONST64(0x8000800000808080), CONST64(0x8000808000808080),
599b0104773SPascal Brand   CONST64(0x8080000000800000), CONST64(0x8080008000800000), CONST64(0x8080000000800080), CONST64(0x8080008000800080),
600b0104773SPascal Brand   CONST64(0x8080800000800000), CONST64(0x8080808000800000), CONST64(0x8080800000800080), CONST64(0x8080808000800080),
601b0104773SPascal Brand   CONST64(0x8080000000808000), CONST64(0x8080008000808000), CONST64(0x8080000000808080), CONST64(0x8080008000808080),
602b0104773SPascal Brand   CONST64(0x8080800000808000), CONST64(0x8080808000808000), CONST64(0x8080800000808080), CONST64(0x8080808000808080),
603b0104773SPascal Brand   CONST64(0x0000000080000000), CONST64(0x0000008080000000), CONST64(0x0000000080000080), CONST64(0x0000008080000080),
604b0104773SPascal Brand   CONST64(0x0000800080000000), CONST64(0x0000808080000000), CONST64(0x0000800080000080), CONST64(0x0000808080000080),
605b0104773SPascal Brand   CONST64(0x0000000080008000), CONST64(0x0000008080008000), CONST64(0x0000000080008080), CONST64(0x0000008080008080),
606b0104773SPascal Brand   CONST64(0x0000800080008000), CONST64(0x0000808080008000), CONST64(0x0000800080008080), CONST64(0x0000808080008080),
607b0104773SPascal Brand   CONST64(0x0080000080000000), CONST64(0x0080008080000000), CONST64(0x0080000080000080), CONST64(0x0080008080000080),
608b0104773SPascal Brand   CONST64(0x0080800080000000), CONST64(0x0080808080000000), CONST64(0x0080800080000080), CONST64(0x0080808080000080),
609b0104773SPascal Brand   CONST64(0x0080000080008000), CONST64(0x0080008080008000), CONST64(0x0080000080008080), CONST64(0x0080008080008080),
610b0104773SPascal Brand   CONST64(0x0080800080008000), CONST64(0x0080808080008000), CONST64(0x0080800080008080), CONST64(0x0080808080008080),
611b0104773SPascal Brand   CONST64(0x0000000080800000), CONST64(0x0000008080800000), CONST64(0x0000000080800080), CONST64(0x0000008080800080),
612b0104773SPascal Brand   CONST64(0x0000800080800000), CONST64(0x0000808080800000), CONST64(0x0000800080800080), CONST64(0x0000808080800080),
613b0104773SPascal Brand   CONST64(0x0000000080808000), CONST64(0x0000008080808000), CONST64(0x0000000080808080), CONST64(0x0000008080808080),
614b0104773SPascal Brand   CONST64(0x0000800080808000), CONST64(0x0000808080808000), CONST64(0x0000800080808080), CONST64(0x0000808080808080),
615b0104773SPascal Brand   CONST64(0x0080000080800000), CONST64(0x0080008080800000), CONST64(0x0080000080800080), CONST64(0x0080008080800080),
616b0104773SPascal Brand   CONST64(0x0080800080800000), CONST64(0x0080808080800000), CONST64(0x0080800080800080), CONST64(0x0080808080800080),
617b0104773SPascal Brand   CONST64(0x0080000080808000), CONST64(0x0080008080808000), CONST64(0x0080000080808080), CONST64(0x0080008080808080),
618b0104773SPascal Brand   CONST64(0x0080800080808000), CONST64(0x0080808080808000), CONST64(0x0080800080808080), CONST64(0x0080808080808080),
619b0104773SPascal Brand   CONST64(0x8000000080000000), CONST64(0x8000008080000000), CONST64(0x8000000080000080), CONST64(0x8000008080000080),
620b0104773SPascal Brand   CONST64(0x8000800080000000), CONST64(0x8000808080000000), CONST64(0x8000800080000080), CONST64(0x8000808080000080),
621b0104773SPascal Brand   CONST64(0x8000000080008000), CONST64(0x8000008080008000), CONST64(0x8000000080008080), CONST64(0x8000008080008080),
622b0104773SPascal Brand   CONST64(0x8000800080008000), CONST64(0x8000808080008000), CONST64(0x8000800080008080), CONST64(0x8000808080008080),
623b0104773SPascal Brand   CONST64(0x8080000080000000), CONST64(0x8080008080000000), CONST64(0x8080000080000080), CONST64(0x8080008080000080),
624b0104773SPascal Brand   CONST64(0x8080800080000000), CONST64(0x8080808080000000), CONST64(0x8080800080000080), CONST64(0x8080808080000080),
625b0104773SPascal Brand   CONST64(0x8080000080008000), CONST64(0x8080008080008000), CONST64(0x8080000080008080), CONST64(0x8080008080008080),
626b0104773SPascal Brand   CONST64(0x8080800080008000), CONST64(0x8080808080008000), CONST64(0x8080800080008080), CONST64(0x8080808080008080),
627b0104773SPascal Brand   CONST64(0x8000000080800000), CONST64(0x8000008080800000), CONST64(0x8000000080800080), CONST64(0x8000008080800080),
628b0104773SPascal Brand   CONST64(0x8000800080800000), CONST64(0x8000808080800000), CONST64(0x8000800080800080), CONST64(0x8000808080800080),
629b0104773SPascal Brand   CONST64(0x8000000080808000), CONST64(0x8000008080808000), CONST64(0x8000000080808080), CONST64(0x8000008080808080),
630b0104773SPascal Brand   CONST64(0x8000800080808000), CONST64(0x8000808080808000), CONST64(0x8000800080808080), CONST64(0x8000808080808080),
631b0104773SPascal Brand   CONST64(0x8080000080800000), CONST64(0x8080008080800000), CONST64(0x8080000080800080), CONST64(0x8080008080800080),
632b0104773SPascal Brand   CONST64(0x8080800080800000), CONST64(0x8080808080800000), CONST64(0x8080800080800080), CONST64(0x8080808080800080),
633b0104773SPascal Brand   CONST64(0x8080000080808000), CONST64(0x8080008080808000), CONST64(0x8080000080808080), CONST64(0x8080008080808080),
634b0104773SPascal Brand   CONST64(0x8080800080808000), CONST64(0x8080808080808000), CONST64(0x8080800080808080), CONST64(0x8080808080808080)
635b0104773SPascal Brand   },
636b0104773SPascal Brand { CONST64(0x0000000000000000), CONST64(0x0000004000000000), CONST64(0x0000000000000040), CONST64(0x0000004000000040),
637b0104773SPascal Brand   CONST64(0x0000400000000000), CONST64(0x0000404000000000), CONST64(0x0000400000000040), CONST64(0x0000404000000040),
638b0104773SPascal Brand   CONST64(0x0000000000004000), CONST64(0x0000004000004000), CONST64(0x0000000000004040), CONST64(0x0000004000004040),
639b0104773SPascal Brand   CONST64(0x0000400000004000), CONST64(0x0000404000004000), CONST64(0x0000400000004040), CONST64(0x0000404000004040),
640b0104773SPascal Brand   CONST64(0x0040000000000000), CONST64(0x0040004000000000), CONST64(0x0040000000000040), CONST64(0x0040004000000040),
641b0104773SPascal Brand   CONST64(0x0040400000000000), CONST64(0x0040404000000000), CONST64(0x0040400000000040), CONST64(0x0040404000000040),
642b0104773SPascal Brand   CONST64(0x0040000000004000), CONST64(0x0040004000004000), CONST64(0x0040000000004040), CONST64(0x0040004000004040),
643b0104773SPascal Brand   CONST64(0x0040400000004000), CONST64(0x0040404000004000), CONST64(0x0040400000004040), CONST64(0x0040404000004040),
644b0104773SPascal Brand   CONST64(0x0000000000400000), CONST64(0x0000004000400000), CONST64(0x0000000000400040), CONST64(0x0000004000400040),
645b0104773SPascal Brand   CONST64(0x0000400000400000), CONST64(0x0000404000400000), CONST64(0x0000400000400040), CONST64(0x0000404000400040),
646b0104773SPascal Brand   CONST64(0x0000000000404000), CONST64(0x0000004000404000), CONST64(0x0000000000404040), CONST64(0x0000004000404040),
647b0104773SPascal Brand   CONST64(0x0000400000404000), CONST64(0x0000404000404000), CONST64(0x0000400000404040), CONST64(0x0000404000404040),
648b0104773SPascal Brand   CONST64(0x0040000000400000), CONST64(0x0040004000400000), CONST64(0x0040000000400040), CONST64(0x0040004000400040),
649b0104773SPascal Brand   CONST64(0x0040400000400000), CONST64(0x0040404000400000), CONST64(0x0040400000400040), CONST64(0x0040404000400040),
650b0104773SPascal Brand   CONST64(0x0040000000404000), CONST64(0x0040004000404000), CONST64(0x0040000000404040), CONST64(0x0040004000404040),
651b0104773SPascal Brand   CONST64(0x0040400000404000), CONST64(0x0040404000404000), CONST64(0x0040400000404040), CONST64(0x0040404000404040),
652b0104773SPascal Brand   CONST64(0x4000000000000000), CONST64(0x4000004000000000), CONST64(0x4000000000000040), CONST64(0x4000004000000040),
653b0104773SPascal Brand   CONST64(0x4000400000000000), CONST64(0x4000404000000000), CONST64(0x4000400000000040), CONST64(0x4000404000000040),
654b0104773SPascal Brand   CONST64(0x4000000000004000), CONST64(0x4000004000004000), CONST64(0x4000000000004040), CONST64(0x4000004000004040),
655b0104773SPascal Brand   CONST64(0x4000400000004000), CONST64(0x4000404000004000), CONST64(0x4000400000004040), CONST64(0x4000404000004040),
656b0104773SPascal Brand   CONST64(0x4040000000000000), CONST64(0x4040004000000000), CONST64(0x4040000000000040), CONST64(0x4040004000000040),
657b0104773SPascal Brand   CONST64(0x4040400000000000), CONST64(0x4040404000000000), CONST64(0x4040400000000040), CONST64(0x4040404000000040),
658b0104773SPascal Brand   CONST64(0x4040000000004000), CONST64(0x4040004000004000), CONST64(0x4040000000004040), CONST64(0x4040004000004040),
659b0104773SPascal Brand   CONST64(0x4040400000004000), CONST64(0x4040404000004000), CONST64(0x4040400000004040), CONST64(0x4040404000004040),
660b0104773SPascal Brand   CONST64(0x4000000000400000), CONST64(0x4000004000400000), CONST64(0x4000000000400040), CONST64(0x4000004000400040),
661b0104773SPascal Brand   CONST64(0x4000400000400000), CONST64(0x4000404000400000), CONST64(0x4000400000400040), CONST64(0x4000404000400040),
662b0104773SPascal Brand   CONST64(0x4000000000404000), CONST64(0x4000004000404000), CONST64(0x4000000000404040), CONST64(0x4000004000404040),
663b0104773SPascal Brand   CONST64(0x4000400000404000), CONST64(0x4000404000404000), CONST64(0x4000400000404040), CONST64(0x4000404000404040),
664b0104773SPascal Brand   CONST64(0x4040000000400000), CONST64(0x4040004000400000), CONST64(0x4040000000400040), CONST64(0x4040004000400040),
665b0104773SPascal Brand   CONST64(0x4040400000400000), CONST64(0x4040404000400000), CONST64(0x4040400000400040), CONST64(0x4040404000400040),
666b0104773SPascal Brand   CONST64(0x4040000000404000), CONST64(0x4040004000404000), CONST64(0x4040000000404040), CONST64(0x4040004000404040),
667b0104773SPascal Brand   CONST64(0x4040400000404000), CONST64(0x4040404000404000), CONST64(0x4040400000404040), CONST64(0x4040404000404040),
668b0104773SPascal Brand   CONST64(0x0000000040000000), CONST64(0x0000004040000000), CONST64(0x0000000040000040), CONST64(0x0000004040000040),
669b0104773SPascal Brand   CONST64(0x0000400040000000), CONST64(0x0000404040000000), CONST64(0x0000400040000040), CONST64(0x0000404040000040),
670b0104773SPascal Brand   CONST64(0x0000000040004000), CONST64(0x0000004040004000), CONST64(0x0000000040004040), CONST64(0x0000004040004040),
671b0104773SPascal Brand   CONST64(0x0000400040004000), CONST64(0x0000404040004000), CONST64(0x0000400040004040), CONST64(0x0000404040004040),
672b0104773SPascal Brand   CONST64(0x0040000040000000), CONST64(0x0040004040000000), CONST64(0x0040000040000040), CONST64(0x0040004040000040),
673b0104773SPascal Brand   CONST64(0x0040400040000000), CONST64(0x0040404040000000), CONST64(0x0040400040000040), CONST64(0x0040404040000040),
674b0104773SPascal Brand   CONST64(0x0040000040004000), CONST64(0x0040004040004000), CONST64(0x0040000040004040), CONST64(0x0040004040004040),
675b0104773SPascal Brand   CONST64(0x0040400040004000), CONST64(0x0040404040004000), CONST64(0x0040400040004040), CONST64(0x0040404040004040),
676b0104773SPascal Brand   CONST64(0x0000000040400000), CONST64(0x0000004040400000), CONST64(0x0000000040400040), CONST64(0x0000004040400040),
677b0104773SPascal Brand   CONST64(0x0000400040400000), CONST64(0x0000404040400000), CONST64(0x0000400040400040), CONST64(0x0000404040400040),
678b0104773SPascal Brand   CONST64(0x0000000040404000), CONST64(0x0000004040404000), CONST64(0x0000000040404040), CONST64(0x0000004040404040),
679b0104773SPascal Brand   CONST64(0x0000400040404000), CONST64(0x0000404040404000), CONST64(0x0000400040404040), CONST64(0x0000404040404040),
680b0104773SPascal Brand   CONST64(0x0040000040400000), CONST64(0x0040004040400000), CONST64(0x0040000040400040), CONST64(0x0040004040400040),
681b0104773SPascal Brand   CONST64(0x0040400040400000), CONST64(0x0040404040400000), CONST64(0x0040400040400040), CONST64(0x0040404040400040),
682b0104773SPascal Brand   CONST64(0x0040000040404000), CONST64(0x0040004040404000), CONST64(0x0040000040404040), CONST64(0x0040004040404040),
683b0104773SPascal Brand   CONST64(0x0040400040404000), CONST64(0x0040404040404000), CONST64(0x0040400040404040), CONST64(0x0040404040404040),
684b0104773SPascal Brand   CONST64(0x4000000040000000), CONST64(0x4000004040000000), CONST64(0x4000000040000040), CONST64(0x4000004040000040),
685b0104773SPascal Brand   CONST64(0x4000400040000000), CONST64(0x4000404040000000), CONST64(0x4000400040000040), CONST64(0x4000404040000040),
686b0104773SPascal Brand   CONST64(0x4000000040004000), CONST64(0x4000004040004000), CONST64(0x4000000040004040), CONST64(0x4000004040004040),
687b0104773SPascal Brand   CONST64(0x4000400040004000), CONST64(0x4000404040004000), CONST64(0x4000400040004040), CONST64(0x4000404040004040),
688b0104773SPascal Brand   CONST64(0x4040000040000000), CONST64(0x4040004040000000), CONST64(0x4040000040000040), CONST64(0x4040004040000040),
689b0104773SPascal Brand   CONST64(0x4040400040000000), CONST64(0x4040404040000000), CONST64(0x4040400040000040), CONST64(0x4040404040000040),
690b0104773SPascal Brand   CONST64(0x4040000040004000), CONST64(0x4040004040004000), CONST64(0x4040000040004040), CONST64(0x4040004040004040),
691b0104773SPascal Brand   CONST64(0x4040400040004000), CONST64(0x4040404040004000), CONST64(0x4040400040004040), CONST64(0x4040404040004040),
692b0104773SPascal Brand   CONST64(0x4000000040400000), CONST64(0x4000004040400000), CONST64(0x4000000040400040), CONST64(0x4000004040400040),
693b0104773SPascal Brand   CONST64(0x4000400040400000), CONST64(0x4000404040400000), CONST64(0x4000400040400040), CONST64(0x4000404040400040),
694b0104773SPascal Brand   CONST64(0x4000000040404000), CONST64(0x4000004040404000), CONST64(0x4000000040404040), CONST64(0x4000004040404040),
695b0104773SPascal Brand   CONST64(0x4000400040404000), CONST64(0x4000404040404000), CONST64(0x4000400040404040), CONST64(0x4000404040404040),
696b0104773SPascal Brand   CONST64(0x4040000040400000), CONST64(0x4040004040400000), CONST64(0x4040000040400040), CONST64(0x4040004040400040),
697b0104773SPascal Brand   CONST64(0x4040400040400000), CONST64(0x4040404040400000), CONST64(0x4040400040400040), CONST64(0x4040404040400040),
698b0104773SPascal Brand   CONST64(0x4040000040404000), CONST64(0x4040004040404000), CONST64(0x4040000040404040), CONST64(0x4040004040404040),
699b0104773SPascal Brand   CONST64(0x4040400040404000), CONST64(0x4040404040404000), CONST64(0x4040400040404040), CONST64(0x4040404040404040)
700b0104773SPascal Brand   },
701b0104773SPascal Brand { CONST64(0x0000000000000000), CONST64(0x0000002000000000), CONST64(0x0000000000000020), CONST64(0x0000002000000020),
702b0104773SPascal Brand   CONST64(0x0000200000000000), CONST64(0x0000202000000000), CONST64(0x0000200000000020), CONST64(0x0000202000000020),
703b0104773SPascal Brand   CONST64(0x0000000000002000), CONST64(0x0000002000002000), CONST64(0x0000000000002020), CONST64(0x0000002000002020),
704b0104773SPascal Brand   CONST64(0x0000200000002000), CONST64(0x0000202000002000), CONST64(0x0000200000002020), CONST64(0x0000202000002020),
705b0104773SPascal Brand   CONST64(0x0020000000000000), CONST64(0x0020002000000000), CONST64(0x0020000000000020), CONST64(0x0020002000000020),
706b0104773SPascal Brand   CONST64(0x0020200000000000), CONST64(0x0020202000000000), CONST64(0x0020200000000020), CONST64(0x0020202000000020),
707b0104773SPascal Brand   CONST64(0x0020000000002000), CONST64(0x0020002000002000), CONST64(0x0020000000002020), CONST64(0x0020002000002020),
708b0104773SPascal Brand   CONST64(0x0020200000002000), CONST64(0x0020202000002000), CONST64(0x0020200000002020), CONST64(0x0020202000002020),
709b0104773SPascal Brand   CONST64(0x0000000000200000), CONST64(0x0000002000200000), CONST64(0x0000000000200020), CONST64(0x0000002000200020),
710b0104773SPascal Brand   CONST64(0x0000200000200000), CONST64(0x0000202000200000), CONST64(0x0000200000200020), CONST64(0x0000202000200020),
711b0104773SPascal Brand   CONST64(0x0000000000202000), CONST64(0x0000002000202000), CONST64(0x0000000000202020), CONST64(0x0000002000202020),
712b0104773SPascal Brand   CONST64(0x0000200000202000), CONST64(0x0000202000202000), CONST64(0x0000200000202020), CONST64(0x0000202000202020),
713b0104773SPascal Brand   CONST64(0x0020000000200000), CONST64(0x0020002000200000), CONST64(0x0020000000200020), CONST64(0x0020002000200020),
714b0104773SPascal Brand   CONST64(0x0020200000200000), CONST64(0x0020202000200000), CONST64(0x0020200000200020), CONST64(0x0020202000200020),
715b0104773SPascal Brand   CONST64(0x0020000000202000), CONST64(0x0020002000202000), CONST64(0x0020000000202020), CONST64(0x0020002000202020),
716b0104773SPascal Brand   CONST64(0x0020200000202000), CONST64(0x0020202000202000), CONST64(0x0020200000202020), CONST64(0x0020202000202020),
717b0104773SPascal Brand   CONST64(0x2000000000000000), CONST64(0x2000002000000000), CONST64(0x2000000000000020), CONST64(0x2000002000000020),
718b0104773SPascal Brand   CONST64(0x2000200000000000), CONST64(0x2000202000000000), CONST64(0x2000200000000020), CONST64(0x2000202000000020),
719b0104773SPascal Brand   CONST64(0x2000000000002000), CONST64(0x2000002000002000), CONST64(0x2000000000002020), CONST64(0x2000002000002020),
720b0104773SPascal Brand   CONST64(0x2000200000002000), CONST64(0x2000202000002000), CONST64(0x2000200000002020), CONST64(0x2000202000002020),
721b0104773SPascal Brand   CONST64(0x2020000000000000), CONST64(0x2020002000000000), CONST64(0x2020000000000020), CONST64(0x2020002000000020),
722b0104773SPascal Brand   CONST64(0x2020200000000000), CONST64(0x2020202000000000), CONST64(0x2020200000000020), CONST64(0x2020202000000020),
723b0104773SPascal Brand   CONST64(0x2020000000002000), CONST64(0x2020002000002000), CONST64(0x2020000000002020), CONST64(0x2020002000002020),
724b0104773SPascal Brand   CONST64(0x2020200000002000), CONST64(0x2020202000002000), CONST64(0x2020200000002020), CONST64(0x2020202000002020),
725b0104773SPascal Brand   CONST64(0x2000000000200000), CONST64(0x2000002000200000), CONST64(0x2000000000200020), CONST64(0x2000002000200020),
726b0104773SPascal Brand   CONST64(0x2000200000200000), CONST64(0x2000202000200000), CONST64(0x2000200000200020), CONST64(0x2000202000200020),
727b0104773SPascal Brand   CONST64(0x2000000000202000), CONST64(0x2000002000202000), CONST64(0x2000000000202020), CONST64(0x2000002000202020),
728b0104773SPascal Brand   CONST64(0x2000200000202000), CONST64(0x2000202000202000), CONST64(0x2000200000202020), CONST64(0x2000202000202020),
729b0104773SPascal Brand   CONST64(0x2020000000200000), CONST64(0x2020002000200000), CONST64(0x2020000000200020), CONST64(0x2020002000200020),
730b0104773SPascal Brand   CONST64(0x2020200000200000), CONST64(0x2020202000200000), CONST64(0x2020200000200020), CONST64(0x2020202000200020),
731b0104773SPascal Brand   CONST64(0x2020000000202000), CONST64(0x2020002000202000), CONST64(0x2020000000202020), CONST64(0x2020002000202020),
732b0104773SPascal Brand   CONST64(0x2020200000202000), CONST64(0x2020202000202000), CONST64(0x2020200000202020), CONST64(0x2020202000202020),
733b0104773SPascal Brand   CONST64(0x0000000020000000), CONST64(0x0000002020000000), CONST64(0x0000000020000020), CONST64(0x0000002020000020),
734b0104773SPascal Brand   CONST64(0x0000200020000000), CONST64(0x0000202020000000), CONST64(0x0000200020000020), CONST64(0x0000202020000020),
735b0104773SPascal Brand   CONST64(0x0000000020002000), CONST64(0x0000002020002000), CONST64(0x0000000020002020), CONST64(0x0000002020002020),
736b0104773SPascal Brand   CONST64(0x0000200020002000), CONST64(0x0000202020002000), CONST64(0x0000200020002020), CONST64(0x0000202020002020),
737b0104773SPascal Brand   CONST64(0x0020000020000000), CONST64(0x0020002020000000), CONST64(0x0020000020000020), CONST64(0x0020002020000020),
738b0104773SPascal Brand   CONST64(0x0020200020000000), CONST64(0x0020202020000000), CONST64(0x0020200020000020), CONST64(0x0020202020000020),
739b0104773SPascal Brand   CONST64(0x0020000020002000), CONST64(0x0020002020002000), CONST64(0x0020000020002020), CONST64(0x0020002020002020),
740b0104773SPascal Brand   CONST64(0x0020200020002000), CONST64(0x0020202020002000), CONST64(0x0020200020002020), CONST64(0x0020202020002020),
741b0104773SPascal Brand   CONST64(0x0000000020200000), CONST64(0x0000002020200000), CONST64(0x0000000020200020), CONST64(0x0000002020200020),
742b0104773SPascal Brand   CONST64(0x0000200020200000), CONST64(0x0000202020200000), CONST64(0x0000200020200020), CONST64(0x0000202020200020),
743b0104773SPascal Brand   CONST64(0x0000000020202000), CONST64(0x0000002020202000), CONST64(0x0000000020202020), CONST64(0x0000002020202020),
744b0104773SPascal Brand   CONST64(0x0000200020202000), CONST64(0x0000202020202000), CONST64(0x0000200020202020), CONST64(0x0000202020202020),
745b0104773SPascal Brand   CONST64(0x0020000020200000), CONST64(0x0020002020200000), CONST64(0x0020000020200020), CONST64(0x0020002020200020),
746b0104773SPascal Brand   CONST64(0x0020200020200000), CONST64(0x0020202020200000), CONST64(0x0020200020200020), CONST64(0x0020202020200020),
747b0104773SPascal Brand   CONST64(0x0020000020202000), CONST64(0x0020002020202000), CONST64(0x0020000020202020), CONST64(0x0020002020202020),
748b0104773SPascal Brand   CONST64(0x0020200020202000), CONST64(0x0020202020202000), CONST64(0x0020200020202020), CONST64(0x0020202020202020),
749b0104773SPascal Brand   CONST64(0x2000000020000000), CONST64(0x2000002020000000), CONST64(0x2000000020000020), CONST64(0x2000002020000020),
750b0104773SPascal Brand   CONST64(0x2000200020000000), CONST64(0x2000202020000000), CONST64(0x2000200020000020), CONST64(0x2000202020000020),
751b0104773SPascal Brand   CONST64(0x2000000020002000), CONST64(0x2000002020002000), CONST64(0x2000000020002020), CONST64(0x2000002020002020),
752b0104773SPascal Brand   CONST64(0x2000200020002000), CONST64(0x2000202020002000), CONST64(0x2000200020002020), CONST64(0x2000202020002020),
753b0104773SPascal Brand   CONST64(0x2020000020000000), CONST64(0x2020002020000000), CONST64(0x2020000020000020), CONST64(0x2020002020000020),
754b0104773SPascal Brand   CONST64(0x2020200020000000), CONST64(0x2020202020000000), CONST64(0x2020200020000020), CONST64(0x2020202020000020),
755b0104773SPascal Brand   CONST64(0x2020000020002000), CONST64(0x2020002020002000), CONST64(0x2020000020002020), CONST64(0x2020002020002020),
756b0104773SPascal Brand   CONST64(0x2020200020002000), CONST64(0x2020202020002000), CONST64(0x2020200020002020), CONST64(0x2020202020002020),
757b0104773SPascal Brand   CONST64(0x2000000020200000), CONST64(0x2000002020200000), CONST64(0x2000000020200020), CONST64(0x2000002020200020),
758b0104773SPascal Brand   CONST64(0x2000200020200000), CONST64(0x2000202020200000), CONST64(0x2000200020200020), CONST64(0x2000202020200020),
759b0104773SPascal Brand   CONST64(0x2000000020202000), CONST64(0x2000002020202000), CONST64(0x2000000020202020), CONST64(0x2000002020202020),
760b0104773SPascal Brand   CONST64(0x2000200020202000), CONST64(0x2000202020202000), CONST64(0x2000200020202020), CONST64(0x2000202020202020),
761b0104773SPascal Brand   CONST64(0x2020000020200000), CONST64(0x2020002020200000), CONST64(0x2020000020200020), CONST64(0x2020002020200020),
762b0104773SPascal Brand   CONST64(0x2020200020200000), CONST64(0x2020202020200000), CONST64(0x2020200020200020), CONST64(0x2020202020200020),
763b0104773SPascal Brand   CONST64(0x2020000020202000), CONST64(0x2020002020202000), CONST64(0x2020000020202020), CONST64(0x2020002020202020),
764b0104773SPascal Brand   CONST64(0x2020200020202000), CONST64(0x2020202020202000), CONST64(0x2020200020202020), CONST64(0x2020202020202020)
765b0104773SPascal Brand   }};
766b0104773SPascal Brand 
767b0104773SPascal Brand static const ulong64 des_fp[8][256] = {
768b0104773SPascal Brand 
769b0104773SPascal Brand { CONST64(0x0000000000000000), CONST64(0x0000008000000000), CONST64(0x0000000002000000), CONST64(0x0000008002000000),
770b0104773SPascal Brand   CONST64(0x0000000000020000), CONST64(0x0000008000020000), CONST64(0x0000000002020000), CONST64(0x0000008002020000),
771b0104773SPascal Brand   CONST64(0x0000000000000200), CONST64(0x0000008000000200), CONST64(0x0000000002000200), CONST64(0x0000008002000200),
772b0104773SPascal Brand   CONST64(0x0000000000020200), CONST64(0x0000008000020200), CONST64(0x0000000002020200), CONST64(0x0000008002020200),
773b0104773SPascal Brand   CONST64(0x0000000000000002), CONST64(0x0000008000000002), CONST64(0x0000000002000002), CONST64(0x0000008002000002),
774b0104773SPascal Brand   CONST64(0x0000000000020002), CONST64(0x0000008000020002), CONST64(0x0000000002020002), CONST64(0x0000008002020002),
775b0104773SPascal Brand   CONST64(0x0000000000000202), CONST64(0x0000008000000202), CONST64(0x0000000002000202), CONST64(0x0000008002000202),
776b0104773SPascal Brand   CONST64(0x0000000000020202), CONST64(0x0000008000020202), CONST64(0x0000000002020202), CONST64(0x0000008002020202),
777b0104773SPascal Brand   CONST64(0x0200000000000000), CONST64(0x0200008000000000), CONST64(0x0200000002000000), CONST64(0x0200008002000000),
778b0104773SPascal Brand   CONST64(0x0200000000020000), CONST64(0x0200008000020000), CONST64(0x0200000002020000), CONST64(0x0200008002020000),
779b0104773SPascal Brand   CONST64(0x0200000000000200), CONST64(0x0200008000000200), CONST64(0x0200000002000200), CONST64(0x0200008002000200),
780b0104773SPascal Brand   CONST64(0x0200000000020200), CONST64(0x0200008000020200), CONST64(0x0200000002020200), CONST64(0x0200008002020200),
781b0104773SPascal Brand   CONST64(0x0200000000000002), CONST64(0x0200008000000002), CONST64(0x0200000002000002), CONST64(0x0200008002000002),
782b0104773SPascal Brand   CONST64(0x0200000000020002), CONST64(0x0200008000020002), CONST64(0x0200000002020002), CONST64(0x0200008002020002),
783b0104773SPascal Brand   CONST64(0x0200000000000202), CONST64(0x0200008000000202), CONST64(0x0200000002000202), CONST64(0x0200008002000202),
784b0104773SPascal Brand   CONST64(0x0200000000020202), CONST64(0x0200008000020202), CONST64(0x0200000002020202), CONST64(0x0200008002020202),
785b0104773SPascal Brand   CONST64(0x0002000000000000), CONST64(0x0002008000000000), CONST64(0x0002000002000000), CONST64(0x0002008002000000),
786b0104773SPascal Brand   CONST64(0x0002000000020000), CONST64(0x0002008000020000), CONST64(0x0002000002020000), CONST64(0x0002008002020000),
787b0104773SPascal Brand   CONST64(0x0002000000000200), CONST64(0x0002008000000200), CONST64(0x0002000002000200), CONST64(0x0002008002000200),
788b0104773SPascal Brand   CONST64(0x0002000000020200), CONST64(0x0002008000020200), CONST64(0x0002000002020200), CONST64(0x0002008002020200),
789b0104773SPascal Brand   CONST64(0x0002000000000002), CONST64(0x0002008000000002), CONST64(0x0002000002000002), CONST64(0x0002008002000002),
790b0104773SPascal Brand   CONST64(0x0002000000020002), CONST64(0x0002008000020002), CONST64(0x0002000002020002), CONST64(0x0002008002020002),
791b0104773SPascal Brand   CONST64(0x0002000000000202), CONST64(0x0002008000000202), CONST64(0x0002000002000202), CONST64(0x0002008002000202),
792b0104773SPascal Brand   CONST64(0x0002000000020202), CONST64(0x0002008000020202), CONST64(0x0002000002020202), CONST64(0x0002008002020202),
793b0104773SPascal Brand   CONST64(0x0202000000000000), CONST64(0x0202008000000000), CONST64(0x0202000002000000), CONST64(0x0202008002000000),
794b0104773SPascal Brand   CONST64(0x0202000000020000), CONST64(0x0202008000020000), CONST64(0x0202000002020000), CONST64(0x0202008002020000),
795b0104773SPascal Brand   CONST64(0x0202000000000200), CONST64(0x0202008000000200), CONST64(0x0202000002000200), CONST64(0x0202008002000200),
796b0104773SPascal Brand   CONST64(0x0202000000020200), CONST64(0x0202008000020200), CONST64(0x0202000002020200), CONST64(0x0202008002020200),
797b0104773SPascal Brand   CONST64(0x0202000000000002), CONST64(0x0202008000000002), CONST64(0x0202000002000002), CONST64(0x0202008002000002),
798b0104773SPascal Brand   CONST64(0x0202000000020002), CONST64(0x0202008000020002), CONST64(0x0202000002020002), CONST64(0x0202008002020002),
799b0104773SPascal Brand   CONST64(0x0202000000000202), CONST64(0x0202008000000202), CONST64(0x0202000002000202), CONST64(0x0202008002000202),
800b0104773SPascal Brand   CONST64(0x0202000000020202), CONST64(0x0202008000020202), CONST64(0x0202000002020202), CONST64(0x0202008002020202),
801b0104773SPascal Brand   CONST64(0x0000020000000000), CONST64(0x0000028000000000), CONST64(0x0000020002000000), CONST64(0x0000028002000000),
802b0104773SPascal Brand   CONST64(0x0000020000020000), CONST64(0x0000028000020000), CONST64(0x0000020002020000), CONST64(0x0000028002020000),
803b0104773SPascal Brand   CONST64(0x0000020000000200), CONST64(0x0000028000000200), CONST64(0x0000020002000200), CONST64(0x0000028002000200),
804b0104773SPascal Brand   CONST64(0x0000020000020200), CONST64(0x0000028000020200), CONST64(0x0000020002020200), CONST64(0x0000028002020200),
805b0104773SPascal Brand   CONST64(0x0000020000000002), CONST64(0x0000028000000002), CONST64(0x0000020002000002), CONST64(0x0000028002000002),
806b0104773SPascal Brand   CONST64(0x0000020000020002), CONST64(0x0000028000020002), CONST64(0x0000020002020002), CONST64(0x0000028002020002),
807b0104773SPascal Brand   CONST64(0x0000020000000202), CONST64(0x0000028000000202), CONST64(0x0000020002000202), CONST64(0x0000028002000202),
808b0104773SPascal Brand   CONST64(0x0000020000020202), CONST64(0x0000028000020202), CONST64(0x0000020002020202), CONST64(0x0000028002020202),
809b0104773SPascal Brand   CONST64(0x0200020000000000), CONST64(0x0200028000000000), CONST64(0x0200020002000000), CONST64(0x0200028002000000),
810b0104773SPascal Brand   CONST64(0x0200020000020000), CONST64(0x0200028000020000), CONST64(0x0200020002020000), CONST64(0x0200028002020000),
811b0104773SPascal Brand   CONST64(0x0200020000000200), CONST64(0x0200028000000200), CONST64(0x0200020002000200), CONST64(0x0200028002000200),
812b0104773SPascal Brand   CONST64(0x0200020000020200), CONST64(0x0200028000020200), CONST64(0x0200020002020200), CONST64(0x0200028002020200),
813b0104773SPascal Brand   CONST64(0x0200020000000002), CONST64(0x0200028000000002), CONST64(0x0200020002000002), CONST64(0x0200028002000002),
814b0104773SPascal Brand   CONST64(0x0200020000020002), CONST64(0x0200028000020002), CONST64(0x0200020002020002), CONST64(0x0200028002020002),
815b0104773SPascal Brand   CONST64(0x0200020000000202), CONST64(0x0200028000000202), CONST64(0x0200020002000202), CONST64(0x0200028002000202),
816b0104773SPascal Brand   CONST64(0x0200020000020202), CONST64(0x0200028000020202), CONST64(0x0200020002020202), CONST64(0x0200028002020202),
817b0104773SPascal Brand   CONST64(0x0002020000000000), CONST64(0x0002028000000000), CONST64(0x0002020002000000), CONST64(0x0002028002000000),
818b0104773SPascal Brand   CONST64(0x0002020000020000), CONST64(0x0002028000020000), CONST64(0x0002020002020000), CONST64(0x0002028002020000),
819b0104773SPascal Brand   CONST64(0x0002020000000200), CONST64(0x0002028000000200), CONST64(0x0002020002000200), CONST64(0x0002028002000200),
820b0104773SPascal Brand   CONST64(0x0002020000020200), CONST64(0x0002028000020200), CONST64(0x0002020002020200), CONST64(0x0002028002020200),
821b0104773SPascal Brand   CONST64(0x0002020000000002), CONST64(0x0002028000000002), CONST64(0x0002020002000002), CONST64(0x0002028002000002),
822b0104773SPascal Brand   CONST64(0x0002020000020002), CONST64(0x0002028000020002), CONST64(0x0002020002020002), CONST64(0x0002028002020002),
823b0104773SPascal Brand   CONST64(0x0002020000000202), CONST64(0x0002028000000202), CONST64(0x0002020002000202), CONST64(0x0002028002000202),
824b0104773SPascal Brand   CONST64(0x0002020000020202), CONST64(0x0002028000020202), CONST64(0x0002020002020202), CONST64(0x0002028002020202),
825b0104773SPascal Brand   CONST64(0x0202020000000000), CONST64(0x0202028000000000), CONST64(0x0202020002000000), CONST64(0x0202028002000000),
826b0104773SPascal Brand   CONST64(0x0202020000020000), CONST64(0x0202028000020000), CONST64(0x0202020002020000), CONST64(0x0202028002020000),
827b0104773SPascal Brand   CONST64(0x0202020000000200), CONST64(0x0202028000000200), CONST64(0x0202020002000200), CONST64(0x0202028002000200),
828b0104773SPascal Brand   CONST64(0x0202020000020200), CONST64(0x0202028000020200), CONST64(0x0202020002020200), CONST64(0x0202028002020200),
829b0104773SPascal Brand   CONST64(0x0202020000000002), CONST64(0x0202028000000002), CONST64(0x0202020002000002), CONST64(0x0202028002000002),
830b0104773SPascal Brand   CONST64(0x0202020000020002), CONST64(0x0202028000020002), CONST64(0x0202020002020002), CONST64(0x0202028002020002),
831b0104773SPascal Brand   CONST64(0x0202020000000202), CONST64(0x0202028000000202), CONST64(0x0202020002000202), CONST64(0x0202028002000202),
832b0104773SPascal Brand   CONST64(0x0202020000020202), CONST64(0x0202028000020202), CONST64(0x0202020002020202), CONST64(0x0202028002020202)
833b0104773SPascal Brand   },
834b0104773SPascal Brand { CONST64(0x0000000000000000), CONST64(0x0000000200000000), CONST64(0x0000000008000000), CONST64(0x0000000208000000),
835b0104773SPascal Brand   CONST64(0x0000000000080000), CONST64(0x0000000200080000), CONST64(0x0000000008080000), CONST64(0x0000000208080000),
836b0104773SPascal Brand   CONST64(0x0000000000000800), CONST64(0x0000000200000800), CONST64(0x0000000008000800), CONST64(0x0000000208000800),
837b0104773SPascal Brand   CONST64(0x0000000000080800), CONST64(0x0000000200080800), CONST64(0x0000000008080800), CONST64(0x0000000208080800),
838b0104773SPascal Brand   CONST64(0x0000000000000008), CONST64(0x0000000200000008), CONST64(0x0000000008000008), CONST64(0x0000000208000008),
839b0104773SPascal Brand   CONST64(0x0000000000080008), CONST64(0x0000000200080008), CONST64(0x0000000008080008), CONST64(0x0000000208080008),
840b0104773SPascal Brand   CONST64(0x0000000000000808), CONST64(0x0000000200000808), CONST64(0x0000000008000808), CONST64(0x0000000208000808),
841b0104773SPascal Brand   CONST64(0x0000000000080808), CONST64(0x0000000200080808), CONST64(0x0000000008080808), CONST64(0x0000000208080808),
842b0104773SPascal Brand   CONST64(0x0800000000000000), CONST64(0x0800000200000000), CONST64(0x0800000008000000), CONST64(0x0800000208000000),
843b0104773SPascal Brand   CONST64(0x0800000000080000), CONST64(0x0800000200080000), CONST64(0x0800000008080000), CONST64(0x0800000208080000),
844b0104773SPascal Brand   CONST64(0x0800000000000800), CONST64(0x0800000200000800), CONST64(0x0800000008000800), CONST64(0x0800000208000800),
845b0104773SPascal Brand   CONST64(0x0800000000080800), CONST64(0x0800000200080800), CONST64(0x0800000008080800), CONST64(0x0800000208080800),
846b0104773SPascal Brand   CONST64(0x0800000000000008), CONST64(0x0800000200000008), CONST64(0x0800000008000008), CONST64(0x0800000208000008),
847b0104773SPascal Brand   CONST64(0x0800000000080008), CONST64(0x0800000200080008), CONST64(0x0800000008080008), CONST64(0x0800000208080008),
848b0104773SPascal Brand   CONST64(0x0800000000000808), CONST64(0x0800000200000808), CONST64(0x0800000008000808), CONST64(0x0800000208000808),
849b0104773SPascal Brand   CONST64(0x0800000000080808), CONST64(0x0800000200080808), CONST64(0x0800000008080808), CONST64(0x0800000208080808),
850b0104773SPascal Brand   CONST64(0x0008000000000000), CONST64(0x0008000200000000), CONST64(0x0008000008000000), CONST64(0x0008000208000000),
851b0104773SPascal Brand   CONST64(0x0008000000080000), CONST64(0x0008000200080000), CONST64(0x0008000008080000), CONST64(0x0008000208080000),
852b0104773SPascal Brand   CONST64(0x0008000000000800), CONST64(0x0008000200000800), CONST64(0x0008000008000800), CONST64(0x0008000208000800),
853b0104773SPascal Brand   CONST64(0x0008000000080800), CONST64(0x0008000200080800), CONST64(0x0008000008080800), CONST64(0x0008000208080800),
854b0104773SPascal Brand   CONST64(0x0008000000000008), CONST64(0x0008000200000008), CONST64(0x0008000008000008), CONST64(0x0008000208000008),
855b0104773SPascal Brand   CONST64(0x0008000000080008), CONST64(0x0008000200080008), CONST64(0x0008000008080008), CONST64(0x0008000208080008),
856b0104773SPascal Brand   CONST64(0x0008000000000808), CONST64(0x0008000200000808), CONST64(0x0008000008000808), CONST64(0x0008000208000808),
857b0104773SPascal Brand   CONST64(0x0008000000080808), CONST64(0x0008000200080808), CONST64(0x0008000008080808), CONST64(0x0008000208080808),
858b0104773SPascal Brand   CONST64(0x0808000000000000), CONST64(0x0808000200000000), CONST64(0x0808000008000000), CONST64(0x0808000208000000),
859b0104773SPascal Brand   CONST64(0x0808000000080000), CONST64(0x0808000200080000), CONST64(0x0808000008080000), CONST64(0x0808000208080000),
860b0104773SPascal Brand   CONST64(0x0808000000000800), CONST64(0x0808000200000800), CONST64(0x0808000008000800), CONST64(0x0808000208000800),
861b0104773SPascal Brand   CONST64(0x0808000000080800), CONST64(0x0808000200080800), CONST64(0x0808000008080800), CONST64(0x0808000208080800),
862b0104773SPascal Brand   CONST64(0x0808000000000008), CONST64(0x0808000200000008), CONST64(0x0808000008000008), CONST64(0x0808000208000008),
863b0104773SPascal Brand   CONST64(0x0808000000080008), CONST64(0x0808000200080008), CONST64(0x0808000008080008), CONST64(0x0808000208080008),
864b0104773SPascal Brand   CONST64(0x0808000000000808), CONST64(0x0808000200000808), CONST64(0x0808000008000808), CONST64(0x0808000208000808),
865b0104773SPascal Brand   CONST64(0x0808000000080808), CONST64(0x0808000200080808), CONST64(0x0808000008080808), CONST64(0x0808000208080808),
866b0104773SPascal Brand   CONST64(0x0000080000000000), CONST64(0x0000080200000000), CONST64(0x0000080008000000), CONST64(0x0000080208000000),
867b0104773SPascal Brand   CONST64(0x0000080000080000), CONST64(0x0000080200080000), CONST64(0x0000080008080000), CONST64(0x0000080208080000),
868b0104773SPascal Brand   CONST64(0x0000080000000800), CONST64(0x0000080200000800), CONST64(0x0000080008000800), CONST64(0x0000080208000800),
869b0104773SPascal Brand   CONST64(0x0000080000080800), CONST64(0x0000080200080800), CONST64(0x0000080008080800), CONST64(0x0000080208080800),
870b0104773SPascal Brand   CONST64(0x0000080000000008), CONST64(0x0000080200000008), CONST64(0x0000080008000008), CONST64(0x0000080208000008),
871b0104773SPascal Brand   CONST64(0x0000080000080008), CONST64(0x0000080200080008), CONST64(0x0000080008080008), CONST64(0x0000080208080008),
872b0104773SPascal Brand   CONST64(0x0000080000000808), CONST64(0x0000080200000808), CONST64(0x0000080008000808), CONST64(0x0000080208000808),
873b0104773SPascal Brand   CONST64(0x0000080000080808), CONST64(0x0000080200080808), CONST64(0x0000080008080808), CONST64(0x0000080208080808),
874b0104773SPascal Brand   CONST64(0x0800080000000000), CONST64(0x0800080200000000), CONST64(0x0800080008000000), CONST64(0x0800080208000000),
875b0104773SPascal Brand   CONST64(0x0800080000080000), CONST64(0x0800080200080000), CONST64(0x0800080008080000), CONST64(0x0800080208080000),
876b0104773SPascal Brand   CONST64(0x0800080000000800), CONST64(0x0800080200000800), CONST64(0x0800080008000800), CONST64(0x0800080208000800),
877b0104773SPascal Brand   CONST64(0x0800080000080800), CONST64(0x0800080200080800), CONST64(0x0800080008080800), CONST64(0x0800080208080800),
878b0104773SPascal Brand   CONST64(0x0800080000000008), CONST64(0x0800080200000008), CONST64(0x0800080008000008), CONST64(0x0800080208000008),
879b0104773SPascal Brand   CONST64(0x0800080000080008), CONST64(0x0800080200080008), CONST64(0x0800080008080008), CONST64(0x0800080208080008),
880b0104773SPascal Brand   CONST64(0x0800080000000808), CONST64(0x0800080200000808), CONST64(0x0800080008000808), CONST64(0x0800080208000808),
881b0104773SPascal Brand   CONST64(0x0800080000080808), CONST64(0x0800080200080808), CONST64(0x0800080008080808), CONST64(0x0800080208080808),
882b0104773SPascal Brand   CONST64(0x0008080000000000), CONST64(0x0008080200000000), CONST64(0x0008080008000000), CONST64(0x0008080208000000),
883b0104773SPascal Brand   CONST64(0x0008080000080000), CONST64(0x0008080200080000), CONST64(0x0008080008080000), CONST64(0x0008080208080000),
884b0104773SPascal Brand   CONST64(0x0008080000000800), CONST64(0x0008080200000800), CONST64(0x0008080008000800), CONST64(0x0008080208000800),
885b0104773SPascal Brand   CONST64(0x0008080000080800), CONST64(0x0008080200080800), CONST64(0x0008080008080800), CONST64(0x0008080208080800),
886b0104773SPascal Brand   CONST64(0x0008080000000008), CONST64(0x0008080200000008), CONST64(0x0008080008000008), CONST64(0x0008080208000008),
887b0104773SPascal Brand   CONST64(0x0008080000080008), CONST64(0x0008080200080008), CONST64(0x0008080008080008), CONST64(0x0008080208080008),
888b0104773SPascal Brand   CONST64(0x0008080000000808), CONST64(0x0008080200000808), CONST64(0x0008080008000808), CONST64(0x0008080208000808),
889b0104773SPascal Brand   CONST64(0x0008080000080808), CONST64(0x0008080200080808), CONST64(0x0008080008080808), CONST64(0x0008080208080808),
890b0104773SPascal Brand   CONST64(0x0808080000000000), CONST64(0x0808080200000000), CONST64(0x0808080008000000), CONST64(0x0808080208000000),
891b0104773SPascal Brand   CONST64(0x0808080000080000), CONST64(0x0808080200080000), CONST64(0x0808080008080000), CONST64(0x0808080208080000),
892b0104773SPascal Brand   CONST64(0x0808080000000800), CONST64(0x0808080200000800), CONST64(0x0808080008000800), CONST64(0x0808080208000800),
893b0104773SPascal Brand   CONST64(0x0808080000080800), CONST64(0x0808080200080800), CONST64(0x0808080008080800), CONST64(0x0808080208080800),
894b0104773SPascal Brand   CONST64(0x0808080000000008), CONST64(0x0808080200000008), CONST64(0x0808080008000008), CONST64(0x0808080208000008),
895b0104773SPascal Brand   CONST64(0x0808080000080008), CONST64(0x0808080200080008), CONST64(0x0808080008080008), CONST64(0x0808080208080008),
896b0104773SPascal Brand   CONST64(0x0808080000000808), CONST64(0x0808080200000808), CONST64(0x0808080008000808), CONST64(0x0808080208000808),
897b0104773SPascal Brand   CONST64(0x0808080000080808), CONST64(0x0808080200080808), CONST64(0x0808080008080808), CONST64(0x0808080208080808)
898b0104773SPascal Brand   },
899b0104773SPascal Brand { CONST64(0x0000000000000000), CONST64(0x0000000800000000), CONST64(0x0000000020000000), CONST64(0x0000000820000000),
900b0104773SPascal Brand   CONST64(0x0000000000200000), CONST64(0x0000000800200000), CONST64(0x0000000020200000), CONST64(0x0000000820200000),
901b0104773SPascal Brand   CONST64(0x0000000000002000), CONST64(0x0000000800002000), CONST64(0x0000000020002000), CONST64(0x0000000820002000),
902b0104773SPascal Brand   CONST64(0x0000000000202000), CONST64(0x0000000800202000), CONST64(0x0000000020202000), CONST64(0x0000000820202000),
903b0104773SPascal Brand   CONST64(0x0000000000000020), CONST64(0x0000000800000020), CONST64(0x0000000020000020), CONST64(0x0000000820000020),
904b0104773SPascal Brand   CONST64(0x0000000000200020), CONST64(0x0000000800200020), CONST64(0x0000000020200020), CONST64(0x0000000820200020),
905b0104773SPascal Brand   CONST64(0x0000000000002020), CONST64(0x0000000800002020), CONST64(0x0000000020002020), CONST64(0x0000000820002020),
906b0104773SPascal Brand   CONST64(0x0000000000202020), CONST64(0x0000000800202020), CONST64(0x0000000020202020), CONST64(0x0000000820202020),
907b0104773SPascal Brand   CONST64(0x2000000000000000), CONST64(0x2000000800000000), CONST64(0x2000000020000000), CONST64(0x2000000820000000),
908b0104773SPascal Brand   CONST64(0x2000000000200000), CONST64(0x2000000800200000), CONST64(0x2000000020200000), CONST64(0x2000000820200000),
909b0104773SPascal Brand   CONST64(0x2000000000002000), CONST64(0x2000000800002000), CONST64(0x2000000020002000), CONST64(0x2000000820002000),
910b0104773SPascal Brand   CONST64(0x2000000000202000), CONST64(0x2000000800202000), CONST64(0x2000000020202000), CONST64(0x2000000820202000),
911b0104773SPascal Brand   CONST64(0x2000000000000020), CONST64(0x2000000800000020), CONST64(0x2000000020000020), CONST64(0x2000000820000020),
912b0104773SPascal Brand   CONST64(0x2000000000200020), CONST64(0x2000000800200020), CONST64(0x2000000020200020), CONST64(0x2000000820200020),
913b0104773SPascal Brand   CONST64(0x2000000000002020), CONST64(0x2000000800002020), CONST64(0x2000000020002020), CONST64(0x2000000820002020),
914b0104773SPascal Brand   CONST64(0x2000000000202020), CONST64(0x2000000800202020), CONST64(0x2000000020202020), CONST64(0x2000000820202020),
915b0104773SPascal Brand   CONST64(0x0020000000000000), CONST64(0x0020000800000000), CONST64(0x0020000020000000), CONST64(0x0020000820000000),
916b0104773SPascal Brand   CONST64(0x0020000000200000), CONST64(0x0020000800200000), CONST64(0x0020000020200000), CONST64(0x0020000820200000),
917b0104773SPascal Brand   CONST64(0x0020000000002000), CONST64(0x0020000800002000), CONST64(0x0020000020002000), CONST64(0x0020000820002000),
918b0104773SPascal Brand   CONST64(0x0020000000202000), CONST64(0x0020000800202000), CONST64(0x0020000020202000), CONST64(0x0020000820202000),
919b0104773SPascal Brand   CONST64(0x0020000000000020), CONST64(0x0020000800000020), CONST64(0x0020000020000020), CONST64(0x0020000820000020),
920b0104773SPascal Brand   CONST64(0x0020000000200020), CONST64(0x0020000800200020), CONST64(0x0020000020200020), CONST64(0x0020000820200020),
921b0104773SPascal Brand   CONST64(0x0020000000002020), CONST64(0x0020000800002020), CONST64(0x0020000020002020), CONST64(0x0020000820002020),
922b0104773SPascal Brand   CONST64(0x0020000000202020), CONST64(0x0020000800202020), CONST64(0x0020000020202020), CONST64(0x0020000820202020),
923b0104773SPascal Brand   CONST64(0x2020000000000000), CONST64(0x2020000800000000), CONST64(0x2020000020000000), CONST64(0x2020000820000000),
924b0104773SPascal Brand   CONST64(0x2020000000200000), CONST64(0x2020000800200000), CONST64(0x2020000020200000), CONST64(0x2020000820200000),
925b0104773SPascal Brand   CONST64(0x2020000000002000), CONST64(0x2020000800002000), CONST64(0x2020000020002000), CONST64(0x2020000820002000),
926b0104773SPascal Brand   CONST64(0x2020000000202000), CONST64(0x2020000800202000), CONST64(0x2020000020202000), CONST64(0x2020000820202000),
927b0104773SPascal Brand   CONST64(0x2020000000000020), CONST64(0x2020000800000020), CONST64(0x2020000020000020), CONST64(0x2020000820000020),
928b0104773SPascal Brand   CONST64(0x2020000000200020), CONST64(0x2020000800200020), CONST64(0x2020000020200020), CONST64(0x2020000820200020),
929b0104773SPascal Brand   CONST64(0x2020000000002020), CONST64(0x2020000800002020), CONST64(0x2020000020002020), CONST64(0x2020000820002020),
930b0104773SPascal Brand   CONST64(0x2020000000202020), CONST64(0x2020000800202020), CONST64(0x2020000020202020), CONST64(0x2020000820202020),
931b0104773SPascal Brand   CONST64(0x0000200000000000), CONST64(0x0000200800000000), CONST64(0x0000200020000000), CONST64(0x0000200820000000),
932b0104773SPascal Brand   CONST64(0x0000200000200000), CONST64(0x0000200800200000), CONST64(0x0000200020200000), CONST64(0x0000200820200000),
933b0104773SPascal Brand   CONST64(0x0000200000002000), CONST64(0x0000200800002000), CONST64(0x0000200020002000), CONST64(0x0000200820002000),
934b0104773SPascal Brand   CONST64(0x0000200000202000), CONST64(0x0000200800202000), CONST64(0x0000200020202000), CONST64(0x0000200820202000),
935b0104773SPascal Brand   CONST64(0x0000200000000020), CONST64(0x0000200800000020), CONST64(0x0000200020000020), CONST64(0x0000200820000020),
936b0104773SPascal Brand   CONST64(0x0000200000200020), CONST64(0x0000200800200020), CONST64(0x0000200020200020), CONST64(0x0000200820200020),
937b0104773SPascal Brand   CONST64(0x0000200000002020), CONST64(0x0000200800002020), CONST64(0x0000200020002020), CONST64(0x0000200820002020),
938b0104773SPascal Brand   CONST64(0x0000200000202020), CONST64(0x0000200800202020), CONST64(0x0000200020202020), CONST64(0x0000200820202020),
939b0104773SPascal Brand   CONST64(0x2000200000000000), CONST64(0x2000200800000000), CONST64(0x2000200020000000), CONST64(0x2000200820000000),
940b0104773SPascal Brand   CONST64(0x2000200000200000), CONST64(0x2000200800200000), CONST64(0x2000200020200000), CONST64(0x2000200820200000),
941b0104773SPascal Brand   CONST64(0x2000200000002000), CONST64(0x2000200800002000), CONST64(0x2000200020002000), CONST64(0x2000200820002000),
942b0104773SPascal Brand   CONST64(0x2000200000202000), CONST64(0x2000200800202000), CONST64(0x2000200020202000), CONST64(0x2000200820202000),
943b0104773SPascal Brand   CONST64(0x2000200000000020), CONST64(0x2000200800000020), CONST64(0x2000200020000020), CONST64(0x2000200820000020),
944b0104773SPascal Brand   CONST64(0x2000200000200020), CONST64(0x2000200800200020), CONST64(0x2000200020200020), CONST64(0x2000200820200020),
945b0104773SPascal Brand   CONST64(0x2000200000002020), CONST64(0x2000200800002020), CONST64(0x2000200020002020), CONST64(0x2000200820002020),
946b0104773SPascal Brand   CONST64(0x2000200000202020), CONST64(0x2000200800202020), CONST64(0x2000200020202020), CONST64(0x2000200820202020),
947b0104773SPascal Brand   CONST64(0x0020200000000000), CONST64(0x0020200800000000), CONST64(0x0020200020000000), CONST64(0x0020200820000000),
948b0104773SPascal Brand   CONST64(0x0020200000200000), CONST64(0x0020200800200000), CONST64(0x0020200020200000), CONST64(0x0020200820200000),
949b0104773SPascal Brand   CONST64(0x0020200000002000), CONST64(0x0020200800002000), CONST64(0x0020200020002000), CONST64(0x0020200820002000),
950b0104773SPascal Brand   CONST64(0x0020200000202000), CONST64(0x0020200800202000), CONST64(0x0020200020202000), CONST64(0x0020200820202000),
951b0104773SPascal Brand   CONST64(0x0020200000000020), CONST64(0x0020200800000020), CONST64(0x0020200020000020), CONST64(0x0020200820000020),
952b0104773SPascal Brand   CONST64(0x0020200000200020), CONST64(0x0020200800200020), CONST64(0x0020200020200020), CONST64(0x0020200820200020),
953b0104773SPascal Brand   CONST64(0x0020200000002020), CONST64(0x0020200800002020), CONST64(0x0020200020002020), CONST64(0x0020200820002020),
954b0104773SPascal Brand   CONST64(0x0020200000202020), CONST64(0x0020200800202020), CONST64(0x0020200020202020), CONST64(0x0020200820202020),
955b0104773SPascal Brand   CONST64(0x2020200000000000), CONST64(0x2020200800000000), CONST64(0x2020200020000000), CONST64(0x2020200820000000),
956b0104773SPascal Brand   CONST64(0x2020200000200000), CONST64(0x2020200800200000), CONST64(0x2020200020200000), CONST64(0x2020200820200000),
957b0104773SPascal Brand   CONST64(0x2020200000002000), CONST64(0x2020200800002000), CONST64(0x2020200020002000), CONST64(0x2020200820002000),
958b0104773SPascal Brand   CONST64(0x2020200000202000), CONST64(0x2020200800202000), CONST64(0x2020200020202000), CONST64(0x2020200820202000),
959b0104773SPascal Brand   CONST64(0x2020200000000020), CONST64(0x2020200800000020), CONST64(0x2020200020000020), CONST64(0x2020200820000020),
960b0104773SPascal Brand   CONST64(0x2020200000200020), CONST64(0x2020200800200020), CONST64(0x2020200020200020), CONST64(0x2020200820200020),
961b0104773SPascal Brand   CONST64(0x2020200000002020), CONST64(0x2020200800002020), CONST64(0x2020200020002020), CONST64(0x2020200820002020),
962b0104773SPascal Brand   CONST64(0x2020200000202020), CONST64(0x2020200800202020), CONST64(0x2020200020202020), CONST64(0x2020200820202020)
963b0104773SPascal Brand   },
964b0104773SPascal Brand { CONST64(0x0000000000000000), CONST64(0x0000002000000000), CONST64(0x0000000080000000), CONST64(0x0000002080000000),
965b0104773SPascal Brand   CONST64(0x0000000000800000), CONST64(0x0000002000800000), CONST64(0x0000000080800000), CONST64(0x0000002080800000),
966b0104773SPascal Brand   CONST64(0x0000000000008000), CONST64(0x0000002000008000), CONST64(0x0000000080008000), CONST64(0x0000002080008000),
967b0104773SPascal Brand   CONST64(0x0000000000808000), CONST64(0x0000002000808000), CONST64(0x0000000080808000), CONST64(0x0000002080808000),
968b0104773SPascal Brand   CONST64(0x0000000000000080), CONST64(0x0000002000000080), CONST64(0x0000000080000080), CONST64(0x0000002080000080),
969b0104773SPascal Brand   CONST64(0x0000000000800080), CONST64(0x0000002000800080), CONST64(0x0000000080800080), CONST64(0x0000002080800080),
970b0104773SPascal Brand   CONST64(0x0000000000008080), CONST64(0x0000002000008080), CONST64(0x0000000080008080), CONST64(0x0000002080008080),
971b0104773SPascal Brand   CONST64(0x0000000000808080), CONST64(0x0000002000808080), CONST64(0x0000000080808080), CONST64(0x0000002080808080),
972b0104773SPascal Brand   CONST64(0x8000000000000000), CONST64(0x8000002000000000), CONST64(0x8000000080000000), CONST64(0x8000002080000000),
973b0104773SPascal Brand   CONST64(0x8000000000800000), CONST64(0x8000002000800000), CONST64(0x8000000080800000), CONST64(0x8000002080800000),
974b0104773SPascal Brand   CONST64(0x8000000000008000), CONST64(0x8000002000008000), CONST64(0x8000000080008000), CONST64(0x8000002080008000),
975b0104773SPascal Brand   CONST64(0x8000000000808000), CONST64(0x8000002000808000), CONST64(0x8000000080808000), CONST64(0x8000002080808000),
976b0104773SPascal Brand   CONST64(0x8000000000000080), CONST64(0x8000002000000080), CONST64(0x8000000080000080), CONST64(0x8000002080000080),
977b0104773SPascal Brand   CONST64(0x8000000000800080), CONST64(0x8000002000800080), CONST64(0x8000000080800080), CONST64(0x8000002080800080),
978b0104773SPascal Brand   CONST64(0x8000000000008080), CONST64(0x8000002000008080), CONST64(0x8000000080008080), CONST64(0x8000002080008080),
979b0104773SPascal Brand   CONST64(0x8000000000808080), CONST64(0x8000002000808080), CONST64(0x8000000080808080), CONST64(0x8000002080808080),
980b0104773SPascal Brand   CONST64(0x0080000000000000), CONST64(0x0080002000000000), CONST64(0x0080000080000000), CONST64(0x0080002080000000),
981b0104773SPascal Brand   CONST64(0x0080000000800000), CONST64(0x0080002000800000), CONST64(0x0080000080800000), CONST64(0x0080002080800000),
982b0104773SPascal Brand   CONST64(0x0080000000008000), CONST64(0x0080002000008000), CONST64(0x0080000080008000), CONST64(0x0080002080008000),
983b0104773SPascal Brand   CONST64(0x0080000000808000), CONST64(0x0080002000808000), CONST64(0x0080000080808000), CONST64(0x0080002080808000),
984b0104773SPascal Brand   CONST64(0x0080000000000080), CONST64(0x0080002000000080), CONST64(0x0080000080000080), CONST64(0x0080002080000080),
985b0104773SPascal Brand   CONST64(0x0080000000800080), CONST64(0x0080002000800080), CONST64(0x0080000080800080), CONST64(0x0080002080800080),
986b0104773SPascal Brand   CONST64(0x0080000000008080), CONST64(0x0080002000008080), CONST64(0x0080000080008080), CONST64(0x0080002080008080),
987b0104773SPascal Brand   CONST64(0x0080000000808080), CONST64(0x0080002000808080), CONST64(0x0080000080808080), CONST64(0x0080002080808080),
988b0104773SPascal Brand   CONST64(0x8080000000000000), CONST64(0x8080002000000000), CONST64(0x8080000080000000), CONST64(0x8080002080000000),
989b0104773SPascal Brand   CONST64(0x8080000000800000), CONST64(0x8080002000800000), CONST64(0x8080000080800000), CONST64(0x8080002080800000),
990b0104773SPascal Brand   CONST64(0x8080000000008000), CONST64(0x8080002000008000), CONST64(0x8080000080008000), CONST64(0x8080002080008000),
991b0104773SPascal Brand   CONST64(0x8080000000808000), CONST64(0x8080002000808000), CONST64(0x8080000080808000), CONST64(0x8080002080808000),
992b0104773SPascal Brand   CONST64(0x8080000000000080), CONST64(0x8080002000000080), CONST64(0x8080000080000080), CONST64(0x8080002080000080),
993b0104773SPascal Brand   CONST64(0x8080000000800080), CONST64(0x8080002000800080), CONST64(0x8080000080800080), CONST64(0x8080002080800080),
994b0104773SPascal Brand   CONST64(0x8080000000008080), CONST64(0x8080002000008080), CONST64(0x8080000080008080), CONST64(0x8080002080008080),
995b0104773SPascal Brand   CONST64(0x8080000000808080), CONST64(0x8080002000808080), CONST64(0x8080000080808080), CONST64(0x8080002080808080),
996b0104773SPascal Brand   CONST64(0x0000800000000000), CONST64(0x0000802000000000), CONST64(0x0000800080000000), CONST64(0x0000802080000000),
997b0104773SPascal Brand   CONST64(0x0000800000800000), CONST64(0x0000802000800000), CONST64(0x0000800080800000), CONST64(0x0000802080800000),
998b0104773SPascal Brand   CONST64(0x0000800000008000), CONST64(0x0000802000008000), CONST64(0x0000800080008000), CONST64(0x0000802080008000),
999b0104773SPascal Brand   CONST64(0x0000800000808000), CONST64(0x0000802000808000), CONST64(0x0000800080808000), CONST64(0x0000802080808000),
1000b0104773SPascal Brand   CONST64(0x0000800000000080), CONST64(0x0000802000000080), CONST64(0x0000800080000080), CONST64(0x0000802080000080),
1001b0104773SPascal Brand   CONST64(0x0000800000800080), CONST64(0x0000802000800080), CONST64(0x0000800080800080), CONST64(0x0000802080800080),
1002b0104773SPascal Brand   CONST64(0x0000800000008080), CONST64(0x0000802000008080), CONST64(0x0000800080008080), CONST64(0x0000802080008080),
1003b0104773SPascal Brand   CONST64(0x0000800000808080), CONST64(0x0000802000808080), CONST64(0x0000800080808080), CONST64(0x0000802080808080),
1004b0104773SPascal Brand   CONST64(0x8000800000000000), CONST64(0x8000802000000000), CONST64(0x8000800080000000), CONST64(0x8000802080000000),
1005b0104773SPascal Brand   CONST64(0x8000800000800000), CONST64(0x8000802000800000), CONST64(0x8000800080800000), CONST64(0x8000802080800000),
1006b0104773SPascal Brand   CONST64(0x8000800000008000), CONST64(0x8000802000008000), CONST64(0x8000800080008000), CONST64(0x8000802080008000),
1007b0104773SPascal Brand   CONST64(0x8000800000808000), CONST64(0x8000802000808000), CONST64(0x8000800080808000), CONST64(0x8000802080808000),
1008b0104773SPascal Brand   CONST64(0x8000800000000080), CONST64(0x8000802000000080), CONST64(0x8000800080000080), CONST64(0x8000802080000080),
1009b0104773SPascal Brand   CONST64(0x8000800000800080), CONST64(0x8000802000800080), CONST64(0x8000800080800080), CONST64(0x8000802080800080),
1010b0104773SPascal Brand   CONST64(0x8000800000008080), CONST64(0x8000802000008080), CONST64(0x8000800080008080), CONST64(0x8000802080008080),
1011b0104773SPascal Brand   CONST64(0x8000800000808080), CONST64(0x8000802000808080), CONST64(0x8000800080808080), CONST64(0x8000802080808080),
1012b0104773SPascal Brand   CONST64(0x0080800000000000), CONST64(0x0080802000000000), CONST64(0x0080800080000000), CONST64(0x0080802080000000),
1013b0104773SPascal Brand   CONST64(0x0080800000800000), CONST64(0x0080802000800000), CONST64(0x0080800080800000), CONST64(0x0080802080800000),
1014b0104773SPascal Brand   CONST64(0x0080800000008000), CONST64(0x0080802000008000), CONST64(0x0080800080008000), CONST64(0x0080802080008000),
1015b0104773SPascal Brand   CONST64(0x0080800000808000), CONST64(0x0080802000808000), CONST64(0x0080800080808000), CONST64(0x0080802080808000),
1016b0104773SPascal Brand   CONST64(0x0080800000000080), CONST64(0x0080802000000080), CONST64(0x0080800080000080), CONST64(0x0080802080000080),
1017b0104773SPascal Brand   CONST64(0x0080800000800080), CONST64(0x0080802000800080), CONST64(0x0080800080800080), CONST64(0x0080802080800080),
1018b0104773SPascal Brand   CONST64(0x0080800000008080), CONST64(0x0080802000008080), CONST64(0x0080800080008080), CONST64(0x0080802080008080),
1019b0104773SPascal Brand   CONST64(0x0080800000808080), CONST64(0x0080802000808080), CONST64(0x0080800080808080), CONST64(0x0080802080808080),
1020b0104773SPascal Brand   CONST64(0x8080800000000000), CONST64(0x8080802000000000), CONST64(0x8080800080000000), CONST64(0x8080802080000000),
1021b0104773SPascal Brand   CONST64(0x8080800000800000), CONST64(0x8080802000800000), CONST64(0x8080800080800000), CONST64(0x8080802080800000),
1022b0104773SPascal Brand   CONST64(0x8080800000008000), CONST64(0x8080802000008000), CONST64(0x8080800080008000), CONST64(0x8080802080008000),
1023b0104773SPascal Brand   CONST64(0x8080800000808000), CONST64(0x8080802000808000), CONST64(0x8080800080808000), CONST64(0x8080802080808000),
1024b0104773SPascal Brand   CONST64(0x8080800000000080), CONST64(0x8080802000000080), CONST64(0x8080800080000080), CONST64(0x8080802080000080),
1025b0104773SPascal Brand   CONST64(0x8080800000800080), CONST64(0x8080802000800080), CONST64(0x8080800080800080), CONST64(0x8080802080800080),
1026b0104773SPascal Brand   CONST64(0x8080800000008080), CONST64(0x8080802000008080), CONST64(0x8080800080008080), CONST64(0x8080802080008080),
1027b0104773SPascal Brand   CONST64(0x8080800000808080), CONST64(0x8080802000808080), CONST64(0x8080800080808080), CONST64(0x8080802080808080)
1028b0104773SPascal Brand   },
1029b0104773SPascal Brand { CONST64(0x0000000000000000), CONST64(0x0000004000000000), CONST64(0x0000000001000000), CONST64(0x0000004001000000),
1030b0104773SPascal Brand   CONST64(0x0000000000010000), CONST64(0x0000004000010000), CONST64(0x0000000001010000), CONST64(0x0000004001010000),
1031b0104773SPascal Brand   CONST64(0x0000000000000100), CONST64(0x0000004000000100), CONST64(0x0000000001000100), CONST64(0x0000004001000100),
1032b0104773SPascal Brand   CONST64(0x0000000000010100), CONST64(0x0000004000010100), CONST64(0x0000000001010100), CONST64(0x0000004001010100),
1033b0104773SPascal Brand   CONST64(0x0000000000000001), CONST64(0x0000004000000001), CONST64(0x0000000001000001), CONST64(0x0000004001000001),
1034b0104773SPascal Brand   CONST64(0x0000000000010001), CONST64(0x0000004000010001), CONST64(0x0000000001010001), CONST64(0x0000004001010001),
1035b0104773SPascal Brand   CONST64(0x0000000000000101), CONST64(0x0000004000000101), CONST64(0x0000000001000101), CONST64(0x0000004001000101),
1036b0104773SPascal Brand   CONST64(0x0000000000010101), CONST64(0x0000004000010101), CONST64(0x0000000001010101), CONST64(0x0000004001010101),
1037b0104773SPascal Brand   CONST64(0x0100000000000000), CONST64(0x0100004000000000), CONST64(0x0100000001000000), CONST64(0x0100004001000000),
1038b0104773SPascal Brand   CONST64(0x0100000000010000), CONST64(0x0100004000010000), CONST64(0x0100000001010000), CONST64(0x0100004001010000),
1039b0104773SPascal Brand   CONST64(0x0100000000000100), CONST64(0x0100004000000100), CONST64(0x0100000001000100), CONST64(0x0100004001000100),
1040b0104773SPascal Brand   CONST64(0x0100000000010100), CONST64(0x0100004000010100), CONST64(0x0100000001010100), CONST64(0x0100004001010100),
1041b0104773SPascal Brand   CONST64(0x0100000000000001), CONST64(0x0100004000000001), CONST64(0x0100000001000001), CONST64(0x0100004001000001),
1042b0104773SPascal Brand   CONST64(0x0100000000010001), CONST64(0x0100004000010001), CONST64(0x0100000001010001), CONST64(0x0100004001010001),
1043b0104773SPascal Brand   CONST64(0x0100000000000101), CONST64(0x0100004000000101), CONST64(0x0100000001000101), CONST64(0x0100004001000101),
1044b0104773SPascal Brand   CONST64(0x0100000000010101), CONST64(0x0100004000010101), CONST64(0x0100000001010101), CONST64(0x0100004001010101),
1045b0104773SPascal Brand   CONST64(0x0001000000000000), CONST64(0x0001004000000000), CONST64(0x0001000001000000), CONST64(0x0001004001000000),
1046b0104773SPascal Brand   CONST64(0x0001000000010000), CONST64(0x0001004000010000), CONST64(0x0001000001010000), CONST64(0x0001004001010000),
1047b0104773SPascal Brand   CONST64(0x0001000000000100), CONST64(0x0001004000000100), CONST64(0x0001000001000100), CONST64(0x0001004001000100),
1048b0104773SPascal Brand   CONST64(0x0001000000010100), CONST64(0x0001004000010100), CONST64(0x0001000001010100), CONST64(0x0001004001010100),
1049b0104773SPascal Brand   CONST64(0x0001000000000001), CONST64(0x0001004000000001), CONST64(0x0001000001000001), CONST64(0x0001004001000001),
1050b0104773SPascal Brand   CONST64(0x0001000000010001), CONST64(0x0001004000010001), CONST64(0x0001000001010001), CONST64(0x0001004001010001),
1051b0104773SPascal Brand   CONST64(0x0001000000000101), CONST64(0x0001004000000101), CONST64(0x0001000001000101), CONST64(0x0001004001000101),
1052b0104773SPascal Brand   CONST64(0x0001000000010101), CONST64(0x0001004000010101), CONST64(0x0001000001010101), CONST64(0x0001004001010101),
1053b0104773SPascal Brand   CONST64(0x0101000000000000), CONST64(0x0101004000000000), CONST64(0x0101000001000000), CONST64(0x0101004001000000),
1054b0104773SPascal Brand   CONST64(0x0101000000010000), CONST64(0x0101004000010000), CONST64(0x0101000001010000), CONST64(0x0101004001010000),
1055b0104773SPascal Brand   CONST64(0x0101000000000100), CONST64(0x0101004000000100), CONST64(0x0101000001000100), CONST64(0x0101004001000100),
1056b0104773SPascal Brand   CONST64(0x0101000000010100), CONST64(0x0101004000010100), CONST64(0x0101000001010100), CONST64(0x0101004001010100),
1057b0104773SPascal Brand   CONST64(0x0101000000000001), CONST64(0x0101004000000001), CONST64(0x0101000001000001), CONST64(0x0101004001000001),
1058b0104773SPascal Brand   CONST64(0x0101000000010001), CONST64(0x0101004000010001), CONST64(0x0101000001010001), CONST64(0x0101004001010001),
1059b0104773SPascal Brand   CONST64(0x0101000000000101), CONST64(0x0101004000000101), CONST64(0x0101000001000101), CONST64(0x0101004001000101),
1060b0104773SPascal Brand   CONST64(0x0101000000010101), CONST64(0x0101004000010101), CONST64(0x0101000001010101), CONST64(0x0101004001010101),
1061b0104773SPascal Brand   CONST64(0x0000010000000000), CONST64(0x0000014000000000), CONST64(0x0000010001000000), CONST64(0x0000014001000000),
1062b0104773SPascal Brand   CONST64(0x0000010000010000), CONST64(0x0000014000010000), CONST64(0x0000010001010000), CONST64(0x0000014001010000),
1063b0104773SPascal Brand   CONST64(0x0000010000000100), CONST64(0x0000014000000100), CONST64(0x0000010001000100), CONST64(0x0000014001000100),
1064b0104773SPascal Brand   CONST64(0x0000010000010100), CONST64(0x0000014000010100), CONST64(0x0000010001010100), CONST64(0x0000014001010100),
1065b0104773SPascal Brand   CONST64(0x0000010000000001), CONST64(0x0000014000000001), CONST64(0x0000010001000001), CONST64(0x0000014001000001),
1066b0104773SPascal Brand   CONST64(0x0000010000010001), CONST64(0x0000014000010001), CONST64(0x0000010001010001), CONST64(0x0000014001010001),
1067b0104773SPascal Brand   CONST64(0x0000010000000101), CONST64(0x0000014000000101), CONST64(0x0000010001000101), CONST64(0x0000014001000101),
1068b0104773SPascal Brand   CONST64(0x0000010000010101), CONST64(0x0000014000010101), CONST64(0x0000010001010101), CONST64(0x0000014001010101),
1069b0104773SPascal Brand   CONST64(0x0100010000000000), CONST64(0x0100014000000000), CONST64(0x0100010001000000), CONST64(0x0100014001000000),
1070b0104773SPascal Brand   CONST64(0x0100010000010000), CONST64(0x0100014000010000), CONST64(0x0100010001010000), CONST64(0x0100014001010000),
1071b0104773SPascal Brand   CONST64(0x0100010000000100), CONST64(0x0100014000000100), CONST64(0x0100010001000100), CONST64(0x0100014001000100),
1072b0104773SPascal Brand   CONST64(0x0100010000010100), CONST64(0x0100014000010100), CONST64(0x0100010001010100), CONST64(0x0100014001010100),
1073b0104773SPascal Brand   CONST64(0x0100010000000001), CONST64(0x0100014000000001), CONST64(0x0100010001000001), CONST64(0x0100014001000001),
1074b0104773SPascal Brand   CONST64(0x0100010000010001), CONST64(0x0100014000010001), CONST64(0x0100010001010001), CONST64(0x0100014001010001),
1075b0104773SPascal Brand   CONST64(0x0100010000000101), CONST64(0x0100014000000101), CONST64(0x0100010001000101), CONST64(0x0100014001000101),
1076b0104773SPascal Brand   CONST64(0x0100010000010101), CONST64(0x0100014000010101), CONST64(0x0100010001010101), CONST64(0x0100014001010101),
1077b0104773SPascal Brand   CONST64(0x0001010000000000), CONST64(0x0001014000000000), CONST64(0x0001010001000000), CONST64(0x0001014001000000),
1078b0104773SPascal Brand   CONST64(0x0001010000010000), CONST64(0x0001014000010000), CONST64(0x0001010001010000), CONST64(0x0001014001010000),
1079b0104773SPascal Brand   CONST64(0x0001010000000100), CONST64(0x0001014000000100), CONST64(0x0001010001000100), CONST64(0x0001014001000100),
1080b0104773SPascal Brand   CONST64(0x0001010000010100), CONST64(0x0001014000010100), CONST64(0x0001010001010100), CONST64(0x0001014001010100),
1081b0104773SPascal Brand   CONST64(0x0001010000000001), CONST64(0x0001014000000001), CONST64(0x0001010001000001), CONST64(0x0001014001000001),
1082b0104773SPascal Brand   CONST64(0x0001010000010001), CONST64(0x0001014000010001), CONST64(0x0001010001010001), CONST64(0x0001014001010001),
1083b0104773SPascal Brand   CONST64(0x0001010000000101), CONST64(0x0001014000000101), CONST64(0x0001010001000101), CONST64(0x0001014001000101),
1084b0104773SPascal Brand   CONST64(0x0001010000010101), CONST64(0x0001014000010101), CONST64(0x0001010001010101), CONST64(0x0001014001010101),
1085b0104773SPascal Brand   CONST64(0x0101010000000000), CONST64(0x0101014000000000), CONST64(0x0101010001000000), CONST64(0x0101014001000000),
1086b0104773SPascal Brand   CONST64(0x0101010000010000), CONST64(0x0101014000010000), CONST64(0x0101010001010000), CONST64(0x0101014001010000),
1087b0104773SPascal Brand   CONST64(0x0101010000000100), CONST64(0x0101014000000100), CONST64(0x0101010001000100), CONST64(0x0101014001000100),
1088b0104773SPascal Brand   CONST64(0x0101010000010100), CONST64(0x0101014000010100), CONST64(0x0101010001010100), CONST64(0x0101014001010100),
1089b0104773SPascal Brand   CONST64(0x0101010000000001), CONST64(0x0101014000000001), CONST64(0x0101010001000001), CONST64(0x0101014001000001),
1090b0104773SPascal Brand   CONST64(0x0101010000010001), CONST64(0x0101014000010001), CONST64(0x0101010001010001), CONST64(0x0101014001010001),
1091b0104773SPascal Brand   CONST64(0x0101010000000101), CONST64(0x0101014000000101), CONST64(0x0101010001000101), CONST64(0x0101014001000101),
1092b0104773SPascal Brand   CONST64(0x0101010000010101), CONST64(0x0101014000010101), CONST64(0x0101010001010101), CONST64(0x0101014001010101)
1093b0104773SPascal Brand   },
1094b0104773SPascal Brand { CONST64(0x0000000000000000), CONST64(0x0000000100000000), CONST64(0x0000000004000000), CONST64(0x0000000104000000),
1095b0104773SPascal Brand   CONST64(0x0000000000040000), CONST64(0x0000000100040000), CONST64(0x0000000004040000), CONST64(0x0000000104040000),
1096b0104773SPascal Brand   CONST64(0x0000000000000400), CONST64(0x0000000100000400), CONST64(0x0000000004000400), CONST64(0x0000000104000400),
1097b0104773SPascal Brand   CONST64(0x0000000000040400), CONST64(0x0000000100040400), CONST64(0x0000000004040400), CONST64(0x0000000104040400),
1098b0104773SPascal Brand   CONST64(0x0000000000000004), CONST64(0x0000000100000004), CONST64(0x0000000004000004), CONST64(0x0000000104000004),
1099b0104773SPascal Brand   CONST64(0x0000000000040004), CONST64(0x0000000100040004), CONST64(0x0000000004040004), CONST64(0x0000000104040004),
1100b0104773SPascal Brand   CONST64(0x0000000000000404), CONST64(0x0000000100000404), CONST64(0x0000000004000404), CONST64(0x0000000104000404),
1101b0104773SPascal Brand   CONST64(0x0000000000040404), CONST64(0x0000000100040404), CONST64(0x0000000004040404), CONST64(0x0000000104040404),
1102b0104773SPascal Brand   CONST64(0x0400000000000000), CONST64(0x0400000100000000), CONST64(0x0400000004000000), CONST64(0x0400000104000000),
1103b0104773SPascal Brand   CONST64(0x0400000000040000), CONST64(0x0400000100040000), CONST64(0x0400000004040000), CONST64(0x0400000104040000),
1104b0104773SPascal Brand   CONST64(0x0400000000000400), CONST64(0x0400000100000400), CONST64(0x0400000004000400), CONST64(0x0400000104000400),
1105b0104773SPascal Brand   CONST64(0x0400000000040400), CONST64(0x0400000100040400), CONST64(0x0400000004040400), CONST64(0x0400000104040400),
1106b0104773SPascal Brand   CONST64(0x0400000000000004), CONST64(0x0400000100000004), CONST64(0x0400000004000004), CONST64(0x0400000104000004),
1107b0104773SPascal Brand   CONST64(0x0400000000040004), CONST64(0x0400000100040004), CONST64(0x0400000004040004), CONST64(0x0400000104040004),
1108b0104773SPascal Brand   CONST64(0x0400000000000404), CONST64(0x0400000100000404), CONST64(0x0400000004000404), CONST64(0x0400000104000404),
1109b0104773SPascal Brand   CONST64(0x0400000000040404), CONST64(0x0400000100040404), CONST64(0x0400000004040404), CONST64(0x0400000104040404),
1110b0104773SPascal Brand   CONST64(0x0004000000000000), CONST64(0x0004000100000000), CONST64(0x0004000004000000), CONST64(0x0004000104000000),
1111b0104773SPascal Brand   CONST64(0x0004000000040000), CONST64(0x0004000100040000), CONST64(0x0004000004040000), CONST64(0x0004000104040000),
1112b0104773SPascal Brand   CONST64(0x0004000000000400), CONST64(0x0004000100000400), CONST64(0x0004000004000400), CONST64(0x0004000104000400),
1113b0104773SPascal Brand   CONST64(0x0004000000040400), CONST64(0x0004000100040400), CONST64(0x0004000004040400), CONST64(0x0004000104040400),
1114b0104773SPascal Brand   CONST64(0x0004000000000004), CONST64(0x0004000100000004), CONST64(0x0004000004000004), CONST64(0x0004000104000004),
1115b0104773SPascal Brand   CONST64(0x0004000000040004), CONST64(0x0004000100040004), CONST64(0x0004000004040004), CONST64(0x0004000104040004),
1116b0104773SPascal Brand   CONST64(0x0004000000000404), CONST64(0x0004000100000404), CONST64(0x0004000004000404), CONST64(0x0004000104000404),
1117b0104773SPascal Brand   CONST64(0x0004000000040404), CONST64(0x0004000100040404), CONST64(0x0004000004040404), CONST64(0x0004000104040404),
1118b0104773SPascal Brand   CONST64(0x0404000000000000), CONST64(0x0404000100000000), CONST64(0x0404000004000000), CONST64(0x0404000104000000),
1119b0104773SPascal Brand   CONST64(0x0404000000040000), CONST64(0x0404000100040000), CONST64(0x0404000004040000), CONST64(0x0404000104040000),
1120b0104773SPascal Brand   CONST64(0x0404000000000400), CONST64(0x0404000100000400), CONST64(0x0404000004000400), CONST64(0x0404000104000400),
1121b0104773SPascal Brand   CONST64(0x0404000000040400), CONST64(0x0404000100040400), CONST64(0x0404000004040400), CONST64(0x0404000104040400),
1122b0104773SPascal Brand   CONST64(0x0404000000000004), CONST64(0x0404000100000004), CONST64(0x0404000004000004), CONST64(0x0404000104000004),
1123b0104773SPascal Brand   CONST64(0x0404000000040004), CONST64(0x0404000100040004), CONST64(0x0404000004040004), CONST64(0x0404000104040004),
1124b0104773SPascal Brand   CONST64(0x0404000000000404), CONST64(0x0404000100000404), CONST64(0x0404000004000404), CONST64(0x0404000104000404),
1125b0104773SPascal Brand   CONST64(0x0404000000040404), CONST64(0x0404000100040404), CONST64(0x0404000004040404), CONST64(0x0404000104040404),
1126b0104773SPascal Brand   CONST64(0x0000040000000000), CONST64(0x0000040100000000), CONST64(0x0000040004000000), CONST64(0x0000040104000000),
1127b0104773SPascal Brand   CONST64(0x0000040000040000), CONST64(0x0000040100040000), CONST64(0x0000040004040000), CONST64(0x0000040104040000),
1128b0104773SPascal Brand   CONST64(0x0000040000000400), CONST64(0x0000040100000400), CONST64(0x0000040004000400), CONST64(0x0000040104000400),
1129b0104773SPascal Brand   CONST64(0x0000040000040400), CONST64(0x0000040100040400), CONST64(0x0000040004040400), CONST64(0x0000040104040400),
1130b0104773SPascal Brand   CONST64(0x0000040000000004), CONST64(0x0000040100000004), CONST64(0x0000040004000004), CONST64(0x0000040104000004),
1131b0104773SPascal Brand   CONST64(0x0000040000040004), CONST64(0x0000040100040004), CONST64(0x0000040004040004), CONST64(0x0000040104040004),
1132b0104773SPascal Brand   CONST64(0x0000040000000404), CONST64(0x0000040100000404), CONST64(0x0000040004000404), CONST64(0x0000040104000404),
1133b0104773SPascal Brand   CONST64(0x0000040000040404), CONST64(0x0000040100040404), CONST64(0x0000040004040404), CONST64(0x0000040104040404),
1134b0104773SPascal Brand   CONST64(0x0400040000000000), CONST64(0x0400040100000000), CONST64(0x0400040004000000), CONST64(0x0400040104000000),
1135b0104773SPascal Brand   CONST64(0x0400040000040000), CONST64(0x0400040100040000), CONST64(0x0400040004040000), CONST64(0x0400040104040000),
1136b0104773SPascal Brand   CONST64(0x0400040000000400), CONST64(0x0400040100000400), CONST64(0x0400040004000400), CONST64(0x0400040104000400),
1137b0104773SPascal Brand   CONST64(0x0400040000040400), CONST64(0x0400040100040400), CONST64(0x0400040004040400), CONST64(0x0400040104040400),
1138b0104773SPascal Brand   CONST64(0x0400040000000004), CONST64(0x0400040100000004), CONST64(0x0400040004000004), CONST64(0x0400040104000004),
1139b0104773SPascal Brand   CONST64(0x0400040000040004), CONST64(0x0400040100040004), CONST64(0x0400040004040004), CONST64(0x0400040104040004),
1140b0104773SPascal Brand   CONST64(0x0400040000000404), CONST64(0x0400040100000404), CONST64(0x0400040004000404), CONST64(0x0400040104000404),
1141b0104773SPascal Brand   CONST64(0x0400040000040404), CONST64(0x0400040100040404), CONST64(0x0400040004040404), CONST64(0x0400040104040404),
1142b0104773SPascal Brand   CONST64(0x0004040000000000), CONST64(0x0004040100000000), CONST64(0x0004040004000000), CONST64(0x0004040104000000),
1143b0104773SPascal Brand   CONST64(0x0004040000040000), CONST64(0x0004040100040000), CONST64(0x0004040004040000), CONST64(0x0004040104040000),
1144b0104773SPascal Brand   CONST64(0x0004040000000400), CONST64(0x0004040100000400), CONST64(0x0004040004000400), CONST64(0x0004040104000400),
1145b0104773SPascal Brand   CONST64(0x0004040000040400), CONST64(0x0004040100040400), CONST64(0x0004040004040400), CONST64(0x0004040104040400),
1146b0104773SPascal Brand   CONST64(0x0004040000000004), CONST64(0x0004040100000004), CONST64(0x0004040004000004), CONST64(0x0004040104000004),
1147b0104773SPascal Brand   CONST64(0x0004040000040004), CONST64(0x0004040100040004), CONST64(0x0004040004040004), CONST64(0x0004040104040004),
1148b0104773SPascal Brand   CONST64(0x0004040000000404), CONST64(0x0004040100000404), CONST64(0x0004040004000404), CONST64(0x0004040104000404),
1149b0104773SPascal Brand   CONST64(0x0004040000040404), CONST64(0x0004040100040404), CONST64(0x0004040004040404), CONST64(0x0004040104040404),
1150b0104773SPascal Brand   CONST64(0x0404040000000000), CONST64(0x0404040100000000), CONST64(0x0404040004000000), CONST64(0x0404040104000000),
1151b0104773SPascal Brand   CONST64(0x0404040000040000), CONST64(0x0404040100040000), CONST64(0x0404040004040000), CONST64(0x0404040104040000),
1152b0104773SPascal Brand   CONST64(0x0404040000000400), CONST64(0x0404040100000400), CONST64(0x0404040004000400), CONST64(0x0404040104000400),
1153b0104773SPascal Brand   CONST64(0x0404040000040400), CONST64(0x0404040100040400), CONST64(0x0404040004040400), CONST64(0x0404040104040400),
1154b0104773SPascal Brand   CONST64(0x0404040000000004), CONST64(0x0404040100000004), CONST64(0x0404040004000004), CONST64(0x0404040104000004),
1155b0104773SPascal Brand   CONST64(0x0404040000040004), CONST64(0x0404040100040004), CONST64(0x0404040004040004), CONST64(0x0404040104040004),
1156b0104773SPascal Brand   CONST64(0x0404040000000404), CONST64(0x0404040100000404), CONST64(0x0404040004000404), CONST64(0x0404040104000404),
1157b0104773SPascal Brand   CONST64(0x0404040000040404), CONST64(0x0404040100040404), CONST64(0x0404040004040404), CONST64(0x0404040104040404)
1158b0104773SPascal Brand   },
1159b0104773SPascal Brand { CONST64(0x0000000000000000), CONST64(0x0000000400000000), CONST64(0x0000000010000000), CONST64(0x0000000410000000),
1160b0104773SPascal Brand   CONST64(0x0000000000100000), CONST64(0x0000000400100000), CONST64(0x0000000010100000), CONST64(0x0000000410100000),
1161b0104773SPascal Brand   CONST64(0x0000000000001000), CONST64(0x0000000400001000), CONST64(0x0000000010001000), CONST64(0x0000000410001000),
1162b0104773SPascal Brand   CONST64(0x0000000000101000), CONST64(0x0000000400101000), CONST64(0x0000000010101000), CONST64(0x0000000410101000),
1163b0104773SPascal Brand   CONST64(0x0000000000000010), CONST64(0x0000000400000010), CONST64(0x0000000010000010), CONST64(0x0000000410000010),
1164b0104773SPascal Brand   CONST64(0x0000000000100010), CONST64(0x0000000400100010), CONST64(0x0000000010100010), CONST64(0x0000000410100010),
1165b0104773SPascal Brand   CONST64(0x0000000000001010), CONST64(0x0000000400001010), CONST64(0x0000000010001010), CONST64(0x0000000410001010),
1166b0104773SPascal Brand   CONST64(0x0000000000101010), CONST64(0x0000000400101010), CONST64(0x0000000010101010), CONST64(0x0000000410101010),
1167b0104773SPascal Brand   CONST64(0x1000000000000000), CONST64(0x1000000400000000), CONST64(0x1000000010000000), CONST64(0x1000000410000000),
1168b0104773SPascal Brand   CONST64(0x1000000000100000), CONST64(0x1000000400100000), CONST64(0x1000000010100000), CONST64(0x1000000410100000),
1169b0104773SPascal Brand   CONST64(0x1000000000001000), CONST64(0x1000000400001000), CONST64(0x1000000010001000), CONST64(0x1000000410001000),
1170b0104773SPascal Brand   CONST64(0x1000000000101000), CONST64(0x1000000400101000), CONST64(0x1000000010101000), CONST64(0x1000000410101000),
1171b0104773SPascal Brand   CONST64(0x1000000000000010), CONST64(0x1000000400000010), CONST64(0x1000000010000010), CONST64(0x1000000410000010),
1172b0104773SPascal Brand   CONST64(0x1000000000100010), CONST64(0x1000000400100010), CONST64(0x1000000010100010), CONST64(0x1000000410100010),
1173b0104773SPascal Brand   CONST64(0x1000000000001010), CONST64(0x1000000400001010), CONST64(0x1000000010001010), CONST64(0x1000000410001010),
1174b0104773SPascal Brand   CONST64(0x1000000000101010), CONST64(0x1000000400101010), CONST64(0x1000000010101010), CONST64(0x1000000410101010),
1175b0104773SPascal Brand   CONST64(0x0010000000000000), CONST64(0x0010000400000000), CONST64(0x0010000010000000), CONST64(0x0010000410000000),
1176b0104773SPascal Brand   CONST64(0x0010000000100000), CONST64(0x0010000400100000), CONST64(0x0010000010100000), CONST64(0x0010000410100000),
1177b0104773SPascal Brand   CONST64(0x0010000000001000), CONST64(0x0010000400001000), CONST64(0x0010000010001000), CONST64(0x0010000410001000),
1178b0104773SPascal Brand   CONST64(0x0010000000101000), CONST64(0x0010000400101000), CONST64(0x0010000010101000), CONST64(0x0010000410101000),
1179b0104773SPascal Brand   CONST64(0x0010000000000010), CONST64(0x0010000400000010), CONST64(0x0010000010000010), CONST64(0x0010000410000010),
1180b0104773SPascal Brand   CONST64(0x0010000000100010), CONST64(0x0010000400100010), CONST64(0x0010000010100010), CONST64(0x0010000410100010),
1181b0104773SPascal Brand   CONST64(0x0010000000001010), CONST64(0x0010000400001010), CONST64(0x0010000010001010), CONST64(0x0010000410001010),
1182b0104773SPascal Brand   CONST64(0x0010000000101010), CONST64(0x0010000400101010), CONST64(0x0010000010101010), CONST64(0x0010000410101010),
1183b0104773SPascal Brand   CONST64(0x1010000000000000), CONST64(0x1010000400000000), CONST64(0x1010000010000000), CONST64(0x1010000410000000),
1184b0104773SPascal Brand   CONST64(0x1010000000100000), CONST64(0x1010000400100000), CONST64(0x1010000010100000), CONST64(0x1010000410100000),
1185b0104773SPascal Brand   CONST64(0x1010000000001000), CONST64(0x1010000400001000), CONST64(0x1010000010001000), CONST64(0x1010000410001000),
1186b0104773SPascal Brand   CONST64(0x1010000000101000), CONST64(0x1010000400101000), CONST64(0x1010000010101000), CONST64(0x1010000410101000),
1187b0104773SPascal Brand   CONST64(0x1010000000000010), CONST64(0x1010000400000010), CONST64(0x1010000010000010), CONST64(0x1010000410000010),
1188b0104773SPascal Brand   CONST64(0x1010000000100010), CONST64(0x1010000400100010), CONST64(0x1010000010100010), CONST64(0x1010000410100010),
1189b0104773SPascal Brand   CONST64(0x1010000000001010), CONST64(0x1010000400001010), CONST64(0x1010000010001010), CONST64(0x1010000410001010),
1190b0104773SPascal Brand   CONST64(0x1010000000101010), CONST64(0x1010000400101010), CONST64(0x1010000010101010), CONST64(0x1010000410101010),
1191b0104773SPascal Brand   CONST64(0x0000100000000000), CONST64(0x0000100400000000), CONST64(0x0000100010000000), CONST64(0x0000100410000000),
1192b0104773SPascal Brand   CONST64(0x0000100000100000), CONST64(0x0000100400100000), CONST64(0x0000100010100000), CONST64(0x0000100410100000),
1193b0104773SPascal Brand   CONST64(0x0000100000001000), CONST64(0x0000100400001000), CONST64(0x0000100010001000), CONST64(0x0000100410001000),
1194b0104773SPascal Brand   CONST64(0x0000100000101000), CONST64(0x0000100400101000), CONST64(0x0000100010101000), CONST64(0x0000100410101000),
1195b0104773SPascal Brand   CONST64(0x0000100000000010), CONST64(0x0000100400000010), CONST64(0x0000100010000010), CONST64(0x0000100410000010),
1196b0104773SPascal Brand   CONST64(0x0000100000100010), CONST64(0x0000100400100010), CONST64(0x0000100010100010), CONST64(0x0000100410100010),
1197b0104773SPascal Brand   CONST64(0x0000100000001010), CONST64(0x0000100400001010), CONST64(0x0000100010001010), CONST64(0x0000100410001010),
1198b0104773SPascal Brand   CONST64(0x0000100000101010), CONST64(0x0000100400101010), CONST64(0x0000100010101010), CONST64(0x0000100410101010),
1199b0104773SPascal Brand   CONST64(0x1000100000000000), CONST64(0x1000100400000000), CONST64(0x1000100010000000), CONST64(0x1000100410000000),
1200b0104773SPascal Brand   CONST64(0x1000100000100000), CONST64(0x1000100400100000), CONST64(0x1000100010100000), CONST64(0x1000100410100000),
1201b0104773SPascal Brand   CONST64(0x1000100000001000), CONST64(0x1000100400001000), CONST64(0x1000100010001000), CONST64(0x1000100410001000),
1202b0104773SPascal Brand   CONST64(0x1000100000101000), CONST64(0x1000100400101000), CONST64(0x1000100010101000), CONST64(0x1000100410101000),
1203b0104773SPascal Brand   CONST64(0x1000100000000010), CONST64(0x1000100400000010), CONST64(0x1000100010000010), CONST64(0x1000100410000010),
1204b0104773SPascal Brand   CONST64(0x1000100000100010), CONST64(0x1000100400100010), CONST64(0x1000100010100010), CONST64(0x1000100410100010),
1205b0104773SPascal Brand   CONST64(0x1000100000001010), CONST64(0x1000100400001010), CONST64(0x1000100010001010), CONST64(0x1000100410001010),
1206b0104773SPascal Brand   CONST64(0x1000100000101010), CONST64(0x1000100400101010), CONST64(0x1000100010101010), CONST64(0x1000100410101010),
1207b0104773SPascal Brand   CONST64(0x0010100000000000), CONST64(0x0010100400000000), CONST64(0x0010100010000000), CONST64(0x0010100410000000),
1208b0104773SPascal Brand   CONST64(0x0010100000100000), CONST64(0x0010100400100000), CONST64(0x0010100010100000), CONST64(0x0010100410100000),
1209b0104773SPascal Brand   CONST64(0x0010100000001000), CONST64(0x0010100400001000), CONST64(0x0010100010001000), CONST64(0x0010100410001000),
1210b0104773SPascal Brand   CONST64(0x0010100000101000), CONST64(0x0010100400101000), CONST64(0x0010100010101000), CONST64(0x0010100410101000),
1211b0104773SPascal Brand   CONST64(0x0010100000000010), CONST64(0x0010100400000010), CONST64(0x0010100010000010), CONST64(0x0010100410000010),
1212b0104773SPascal Brand   CONST64(0x0010100000100010), CONST64(0x0010100400100010), CONST64(0x0010100010100010), CONST64(0x0010100410100010),
1213b0104773SPascal Brand   CONST64(0x0010100000001010), CONST64(0x0010100400001010), CONST64(0x0010100010001010), CONST64(0x0010100410001010),
1214b0104773SPascal Brand   CONST64(0x0010100000101010), CONST64(0x0010100400101010), CONST64(0x0010100010101010), CONST64(0x0010100410101010),
1215b0104773SPascal Brand   CONST64(0x1010100000000000), CONST64(0x1010100400000000), CONST64(0x1010100010000000), CONST64(0x1010100410000000),
1216b0104773SPascal Brand   CONST64(0x1010100000100000), CONST64(0x1010100400100000), CONST64(0x1010100010100000), CONST64(0x1010100410100000),
1217b0104773SPascal Brand   CONST64(0x1010100000001000), CONST64(0x1010100400001000), CONST64(0x1010100010001000), CONST64(0x1010100410001000),
1218b0104773SPascal Brand   CONST64(0x1010100000101000), CONST64(0x1010100400101000), CONST64(0x1010100010101000), CONST64(0x1010100410101000),
1219b0104773SPascal Brand   CONST64(0x1010100000000010), CONST64(0x1010100400000010), CONST64(0x1010100010000010), CONST64(0x1010100410000010),
1220b0104773SPascal Brand   CONST64(0x1010100000100010), CONST64(0x1010100400100010), CONST64(0x1010100010100010), CONST64(0x1010100410100010),
1221b0104773SPascal Brand   CONST64(0x1010100000001010), CONST64(0x1010100400001010), CONST64(0x1010100010001010), CONST64(0x1010100410001010),
1222b0104773SPascal Brand   CONST64(0x1010100000101010), CONST64(0x1010100400101010), CONST64(0x1010100010101010), CONST64(0x1010100410101010)
1223b0104773SPascal Brand   },
1224b0104773SPascal Brand { CONST64(0x0000000000000000), CONST64(0x0000001000000000), CONST64(0x0000000040000000), CONST64(0x0000001040000000),
1225b0104773SPascal Brand   CONST64(0x0000000000400000), CONST64(0x0000001000400000), CONST64(0x0000000040400000), CONST64(0x0000001040400000),
1226b0104773SPascal Brand   CONST64(0x0000000000004000), CONST64(0x0000001000004000), CONST64(0x0000000040004000), CONST64(0x0000001040004000),
1227b0104773SPascal Brand   CONST64(0x0000000000404000), CONST64(0x0000001000404000), CONST64(0x0000000040404000), CONST64(0x0000001040404000),
1228b0104773SPascal Brand   CONST64(0x0000000000000040), CONST64(0x0000001000000040), CONST64(0x0000000040000040), CONST64(0x0000001040000040),
1229b0104773SPascal Brand   CONST64(0x0000000000400040), CONST64(0x0000001000400040), CONST64(0x0000000040400040), CONST64(0x0000001040400040),
1230b0104773SPascal Brand   CONST64(0x0000000000004040), CONST64(0x0000001000004040), CONST64(0x0000000040004040), CONST64(0x0000001040004040),
1231b0104773SPascal Brand   CONST64(0x0000000000404040), CONST64(0x0000001000404040), CONST64(0x0000000040404040), CONST64(0x0000001040404040),
1232b0104773SPascal Brand   CONST64(0x4000000000000000), CONST64(0x4000001000000000), CONST64(0x4000000040000000), CONST64(0x4000001040000000),
1233b0104773SPascal Brand   CONST64(0x4000000000400000), CONST64(0x4000001000400000), CONST64(0x4000000040400000), CONST64(0x4000001040400000),
1234b0104773SPascal Brand   CONST64(0x4000000000004000), CONST64(0x4000001000004000), CONST64(0x4000000040004000), CONST64(0x4000001040004000),
1235b0104773SPascal Brand   CONST64(0x4000000000404000), CONST64(0x4000001000404000), CONST64(0x4000000040404000), CONST64(0x4000001040404000),
1236b0104773SPascal Brand   CONST64(0x4000000000000040), CONST64(0x4000001000000040), CONST64(0x4000000040000040), CONST64(0x4000001040000040),
1237b0104773SPascal Brand   CONST64(0x4000000000400040), CONST64(0x4000001000400040), CONST64(0x4000000040400040), CONST64(0x4000001040400040),
1238b0104773SPascal Brand   CONST64(0x4000000000004040), CONST64(0x4000001000004040), CONST64(0x4000000040004040), CONST64(0x4000001040004040),
1239b0104773SPascal Brand   CONST64(0x4000000000404040), CONST64(0x4000001000404040), CONST64(0x4000000040404040), CONST64(0x4000001040404040),
1240b0104773SPascal Brand   CONST64(0x0040000000000000), CONST64(0x0040001000000000), CONST64(0x0040000040000000), CONST64(0x0040001040000000),
1241b0104773SPascal Brand   CONST64(0x0040000000400000), CONST64(0x0040001000400000), CONST64(0x0040000040400000), CONST64(0x0040001040400000),
1242b0104773SPascal Brand   CONST64(0x0040000000004000), CONST64(0x0040001000004000), CONST64(0x0040000040004000), CONST64(0x0040001040004000),
1243b0104773SPascal Brand   CONST64(0x0040000000404000), CONST64(0x0040001000404000), CONST64(0x0040000040404000), CONST64(0x0040001040404000),
1244b0104773SPascal Brand   CONST64(0x0040000000000040), CONST64(0x0040001000000040), CONST64(0x0040000040000040), CONST64(0x0040001040000040),
1245b0104773SPascal Brand   CONST64(0x0040000000400040), CONST64(0x0040001000400040), CONST64(0x0040000040400040), CONST64(0x0040001040400040),
1246b0104773SPascal Brand   CONST64(0x0040000000004040), CONST64(0x0040001000004040), CONST64(0x0040000040004040), CONST64(0x0040001040004040),
1247b0104773SPascal Brand   CONST64(0x0040000000404040), CONST64(0x0040001000404040), CONST64(0x0040000040404040), CONST64(0x0040001040404040),
1248b0104773SPascal Brand   CONST64(0x4040000000000000), CONST64(0x4040001000000000), CONST64(0x4040000040000000), CONST64(0x4040001040000000),
1249b0104773SPascal Brand   CONST64(0x4040000000400000), CONST64(0x4040001000400000), CONST64(0x4040000040400000), CONST64(0x4040001040400000),
1250b0104773SPascal Brand   CONST64(0x4040000000004000), CONST64(0x4040001000004000), CONST64(0x4040000040004000), CONST64(0x4040001040004000),
1251b0104773SPascal Brand   CONST64(0x4040000000404000), CONST64(0x4040001000404000), CONST64(0x4040000040404000), CONST64(0x4040001040404000),
1252b0104773SPascal Brand   CONST64(0x4040000000000040), CONST64(0x4040001000000040), CONST64(0x4040000040000040), CONST64(0x4040001040000040),
1253b0104773SPascal Brand   CONST64(0x4040000000400040), CONST64(0x4040001000400040), CONST64(0x4040000040400040), CONST64(0x4040001040400040),
1254b0104773SPascal Brand   CONST64(0x4040000000004040), CONST64(0x4040001000004040), CONST64(0x4040000040004040), CONST64(0x4040001040004040),
1255b0104773SPascal Brand   CONST64(0x4040000000404040), CONST64(0x4040001000404040), CONST64(0x4040000040404040), CONST64(0x4040001040404040),
1256b0104773SPascal Brand   CONST64(0x0000400000000000), CONST64(0x0000401000000000), CONST64(0x0000400040000000), CONST64(0x0000401040000000),
1257b0104773SPascal Brand   CONST64(0x0000400000400000), CONST64(0x0000401000400000), CONST64(0x0000400040400000), CONST64(0x0000401040400000),
1258b0104773SPascal Brand   CONST64(0x0000400000004000), CONST64(0x0000401000004000), CONST64(0x0000400040004000), CONST64(0x0000401040004000),
1259b0104773SPascal Brand   CONST64(0x0000400000404000), CONST64(0x0000401000404000), CONST64(0x0000400040404000), CONST64(0x0000401040404000),
1260b0104773SPascal Brand   CONST64(0x0000400000000040), CONST64(0x0000401000000040), CONST64(0x0000400040000040), CONST64(0x0000401040000040),
1261b0104773SPascal Brand   CONST64(0x0000400000400040), CONST64(0x0000401000400040), CONST64(0x0000400040400040), CONST64(0x0000401040400040),
1262b0104773SPascal Brand   CONST64(0x0000400000004040), CONST64(0x0000401000004040), CONST64(0x0000400040004040), CONST64(0x0000401040004040),
1263b0104773SPascal Brand   CONST64(0x0000400000404040), CONST64(0x0000401000404040), CONST64(0x0000400040404040), CONST64(0x0000401040404040),
1264b0104773SPascal Brand   CONST64(0x4000400000000000), CONST64(0x4000401000000000), CONST64(0x4000400040000000), CONST64(0x4000401040000000),
1265b0104773SPascal Brand   CONST64(0x4000400000400000), CONST64(0x4000401000400000), CONST64(0x4000400040400000), CONST64(0x4000401040400000),
1266b0104773SPascal Brand   CONST64(0x4000400000004000), CONST64(0x4000401000004000), CONST64(0x4000400040004000), CONST64(0x4000401040004000),
1267b0104773SPascal Brand   CONST64(0x4000400000404000), CONST64(0x4000401000404000), CONST64(0x4000400040404000), CONST64(0x4000401040404000),
1268b0104773SPascal Brand   CONST64(0x4000400000000040), CONST64(0x4000401000000040), CONST64(0x4000400040000040), CONST64(0x4000401040000040),
1269b0104773SPascal Brand   CONST64(0x4000400000400040), CONST64(0x4000401000400040), CONST64(0x4000400040400040), CONST64(0x4000401040400040),
1270b0104773SPascal Brand   CONST64(0x4000400000004040), CONST64(0x4000401000004040), CONST64(0x4000400040004040), CONST64(0x4000401040004040),
1271b0104773SPascal Brand   CONST64(0x4000400000404040), CONST64(0x4000401000404040), CONST64(0x4000400040404040), CONST64(0x4000401040404040),
1272b0104773SPascal Brand   CONST64(0x0040400000000000), CONST64(0x0040401000000000), CONST64(0x0040400040000000), CONST64(0x0040401040000000),
1273b0104773SPascal Brand   CONST64(0x0040400000400000), CONST64(0x0040401000400000), CONST64(0x0040400040400000), CONST64(0x0040401040400000),
1274b0104773SPascal Brand   CONST64(0x0040400000004000), CONST64(0x0040401000004000), CONST64(0x0040400040004000), CONST64(0x0040401040004000),
1275b0104773SPascal Brand   CONST64(0x0040400000404000), CONST64(0x0040401000404000), CONST64(0x0040400040404000), CONST64(0x0040401040404000),
1276b0104773SPascal Brand   CONST64(0x0040400000000040), CONST64(0x0040401000000040), CONST64(0x0040400040000040), CONST64(0x0040401040000040),
1277b0104773SPascal Brand   CONST64(0x0040400000400040), CONST64(0x0040401000400040), CONST64(0x0040400040400040), CONST64(0x0040401040400040),
1278b0104773SPascal Brand   CONST64(0x0040400000004040), CONST64(0x0040401000004040), CONST64(0x0040400040004040), CONST64(0x0040401040004040),
1279b0104773SPascal Brand   CONST64(0x0040400000404040), CONST64(0x0040401000404040), CONST64(0x0040400040404040), CONST64(0x0040401040404040),
1280b0104773SPascal Brand   CONST64(0x4040400000000000), CONST64(0x4040401000000000), CONST64(0x4040400040000000), CONST64(0x4040401040000000),
1281b0104773SPascal Brand   CONST64(0x4040400000400000), CONST64(0x4040401000400000), CONST64(0x4040400040400000), CONST64(0x4040401040400000),
1282b0104773SPascal Brand   CONST64(0x4040400000004000), CONST64(0x4040401000004000), CONST64(0x4040400040004000), CONST64(0x4040401040004000),
1283b0104773SPascal Brand   CONST64(0x4040400000404000), CONST64(0x4040401000404000), CONST64(0x4040400040404000), CONST64(0x4040401040404000),
1284b0104773SPascal Brand   CONST64(0x4040400000000040), CONST64(0x4040401000000040), CONST64(0x4040400040000040), CONST64(0x4040401040000040),
1285b0104773SPascal Brand   CONST64(0x4040400000400040), CONST64(0x4040401000400040), CONST64(0x4040400040400040), CONST64(0x4040401040400040),
1286b0104773SPascal Brand   CONST64(0x4040400000004040), CONST64(0x4040401000004040), CONST64(0x4040400040004040), CONST64(0x4040401040004040),
1287b0104773SPascal Brand   CONST64(0x4040400000404040), CONST64(0x4040401000404040), CONST64(0x4040400040404040), CONST64(0x4040401040404040)
1288b0104773SPascal Brand   }};
1289b0104773SPascal Brand 
1290b0104773SPascal Brand #endif
1291b0104773SPascal Brand 
1292b0104773SPascal Brand 
1293b0104773SPascal Brand static void cookey(const ulong32 *raw1, ulong32 *keyout);
1294b0104773SPascal Brand 
1295b0104773SPascal Brand #ifdef LTC_CLEAN_STACK
s_deskey(const unsigned char * key,short edf,ulong32 * keyout)1296*8411e6adSJerome Forissier static void s_deskey(const unsigned char *key, short edf, ulong32 *keyout)
1297b0104773SPascal Brand #else
1298b0104773SPascal Brand static void deskey(const unsigned char *key, short edf, ulong32 *keyout)
1299b0104773SPascal Brand #endif
1300b0104773SPascal Brand {
1301b0104773SPascal Brand     ulong32 i, j, l, m, n, kn[32];
1302b0104773SPascal Brand     unsigned char pc1m[56], pcr[56];
1303b0104773SPascal Brand 
1304b0104773SPascal Brand     for (j=0; j < 56; j++) {
1305b0104773SPascal Brand         l = (ulong32)pc1[j];
1306b0104773SPascal Brand         m = l & 7;
1307b0104773SPascal Brand         pc1m[j] = (unsigned char)((key[l >> 3U] & bytebit[m]) == bytebit[m] ? 1 : 0);
1308b0104773SPascal Brand     }
1309b0104773SPascal Brand 
1310b0104773SPascal Brand     for (i=0; i < 16; i++) {
1311b0104773SPascal Brand         if (edf == DE1) {
1312b0104773SPascal Brand            m = (15 - i) << 1;
1313b0104773SPascal Brand         } else {
1314b0104773SPascal Brand            m = i << 1;
1315b0104773SPascal Brand         }
1316b0104773SPascal Brand         n = m + 1;
1317b0104773SPascal Brand         kn[m] = kn[n] = 0L;
1318b0104773SPascal Brand         for (j=0; j < 28; j++) {
1319b0104773SPascal Brand             l = j + (ulong32)totrot[i];
1320b0104773SPascal Brand             if (l < 28) {
1321b0104773SPascal Brand                pcr[j] = pc1m[l];
1322b0104773SPascal Brand             } else {
1323b0104773SPascal Brand                pcr[j] = pc1m[l - 28];
1324b0104773SPascal Brand             }
1325b0104773SPascal Brand         }
1326b0104773SPascal Brand         for (/*j = 28*/; j < 56; j++) {
1327b0104773SPascal Brand             l = j + (ulong32)totrot[i];
1328b0104773SPascal Brand             if (l < 56) {
1329b0104773SPascal Brand                pcr[j] = pc1m[l];
1330b0104773SPascal Brand             } else {
1331b0104773SPascal Brand                pcr[j] = pc1m[l - 28];
1332b0104773SPascal Brand             }
1333b0104773SPascal Brand         }
1334b0104773SPascal Brand         for (j=0; j < 24; j++)  {
1335b0104773SPascal Brand             if ((int)pcr[(int)pc2[j]] != 0) {
1336b0104773SPascal Brand                kn[m] |= bigbyte[j];
1337b0104773SPascal Brand             }
1338b0104773SPascal Brand             if ((int)pcr[(int)pc2[j+24]] != 0) {
1339b0104773SPascal Brand                kn[n] |= bigbyte[j];
1340b0104773SPascal Brand             }
1341b0104773SPascal Brand         }
1342b0104773SPascal Brand     }
1343b0104773SPascal Brand 
1344b0104773SPascal Brand     cookey(kn, keyout);
1345b0104773SPascal Brand }
1346b0104773SPascal Brand 
1347b0104773SPascal Brand #ifdef LTC_CLEAN_STACK
deskey(const unsigned char * key,short edf,ulong32 * keyout)1348b0104773SPascal Brand static void deskey(const unsigned char *key, short edf, ulong32 *keyout)
1349b0104773SPascal Brand {
1350*8411e6adSJerome Forissier    s_deskey(key, edf, keyout);
1351b0104773SPascal Brand    burn_stack(sizeof(int)*5 + sizeof(ulong32)*32 + sizeof(unsigned char)*112);
1352b0104773SPascal Brand }
1353b0104773SPascal Brand #endif
1354b0104773SPascal Brand 
1355b0104773SPascal Brand #ifdef LTC_CLEAN_STACK
s_cookey(const ulong32 * raw1,ulong32 * keyout)1356*8411e6adSJerome Forissier static void s_cookey(const ulong32 *raw1, ulong32 *keyout)
1357b0104773SPascal Brand #else
1358b0104773SPascal Brand static void cookey(const ulong32 *raw1, ulong32 *keyout)
1359b0104773SPascal Brand #endif
1360b0104773SPascal Brand {
1361b0104773SPascal Brand     ulong32 *cook;
1362b0104773SPascal Brand     const ulong32 *raw0;
1363b0104773SPascal Brand     ulong32 dough[32];
1364b0104773SPascal Brand     int i;
1365b0104773SPascal Brand 
1366b0104773SPascal Brand     cook = dough;
1367b0104773SPascal Brand     for(i=0; i < 16; i++, raw1++)
1368b0104773SPascal Brand     {
1369b0104773SPascal Brand         raw0 = raw1++;
1370b0104773SPascal Brand         *cook    = (*raw0 & 0x00fc0000L) << 6;
1371b0104773SPascal Brand         *cook   |= (*raw0 & 0x00000fc0L) << 10;
1372b0104773SPascal Brand         *cook   |= (*raw1 & 0x00fc0000L) >> 10;
1373b0104773SPascal Brand         *cook++ |= (*raw1 & 0x00000fc0L) >> 6;
1374b0104773SPascal Brand         *cook    = (*raw0 & 0x0003f000L) << 12;
1375b0104773SPascal Brand         *cook   |= (*raw0 & 0x0000003fL) << 16;
1376b0104773SPascal Brand         *cook   |= (*raw1 & 0x0003f000L) >> 4;
1377b0104773SPascal Brand         *cook++ |= (*raw1 & 0x0000003fL);
1378b0104773SPascal Brand     }
1379b0104773SPascal Brand 
13805a913ee7SJerome Forissier     XMEMCPY(keyout, dough, sizeof(dough));
1381b0104773SPascal Brand }
1382b0104773SPascal Brand 
1383b0104773SPascal Brand #ifdef LTC_CLEAN_STACK
cookey(const ulong32 * raw1,ulong32 * keyout)1384b0104773SPascal Brand static void cookey(const ulong32 *raw1, ulong32 *keyout)
1385b0104773SPascal Brand {
1386*8411e6adSJerome Forissier    s_cookey(raw1, keyout);
1387b0104773SPascal Brand    burn_stack(sizeof(ulong32 *) * 2 + sizeof(ulong32)*32 + sizeof(int));
1388b0104773SPascal Brand }
1389b0104773SPascal Brand #endif
1390b0104773SPascal Brand 
1391b0104773SPascal Brand #ifndef LTC_CLEAN_STACK
desfunc(ulong32 * block,const ulong32 * keys)1392b0104773SPascal Brand static void desfunc(ulong32 *block, const ulong32 *keys)
1393b0104773SPascal Brand #else
1394*8411e6adSJerome Forissier static void s_desfunc(ulong32 *block, const ulong32 *keys)
1395b0104773SPascal Brand #endif
1396b0104773SPascal Brand {
1397b0104773SPascal Brand     ulong32 work, right, leftt;
1398b0104773SPascal Brand     int cur_round;
1399b0104773SPascal Brand 
1400b0104773SPascal Brand     leftt = block[0];
1401b0104773SPascal Brand     right = block[1];
1402b0104773SPascal Brand 
1403b0104773SPascal Brand #ifdef LTC_SMALL_CODE
1404b0104773SPascal Brand     work = ((leftt >> 4)  ^ right) & 0x0f0f0f0fL;
1405b0104773SPascal Brand     right ^= work;
1406b0104773SPascal Brand     leftt ^= (work << 4);
1407b0104773SPascal Brand 
1408b0104773SPascal Brand     work = ((leftt >> 16) ^ right) & 0x0000ffffL;
1409b0104773SPascal Brand     right ^= work;
1410b0104773SPascal Brand     leftt ^= (work << 16);
1411b0104773SPascal Brand 
1412b0104773SPascal Brand     work = ((right >> 2)  ^ leftt) & 0x33333333L;
1413b0104773SPascal Brand     leftt ^= work;
1414b0104773SPascal Brand     right ^= (work << 2);
1415b0104773SPascal Brand 
1416b0104773SPascal Brand     work = ((right >> 8)  ^ leftt) & 0x00ff00ffL;
1417b0104773SPascal Brand     leftt ^= work;
1418b0104773SPascal Brand     right ^= (work << 8);
1419b0104773SPascal Brand 
1420b0104773SPascal Brand     right = ROLc(right, 1);
1421b0104773SPascal Brand     work = (leftt ^ right) & 0xaaaaaaaaL;
1422b0104773SPascal Brand 
1423b0104773SPascal Brand     leftt ^= work;
1424b0104773SPascal Brand     right ^= work;
1425b0104773SPascal Brand     leftt = ROLc(leftt, 1);
1426b0104773SPascal Brand #else
1427b0104773SPascal Brand    {
1428b0104773SPascal Brand       ulong64 tmp;
14295a913ee7SJerome Forissier       tmp = des_ip[0][LTC_BYTE(leftt, 0)] ^
14305a913ee7SJerome Forissier             des_ip[1][LTC_BYTE(leftt, 1)] ^
14315a913ee7SJerome Forissier             des_ip[2][LTC_BYTE(leftt, 2)] ^
14325a913ee7SJerome Forissier             des_ip[3][LTC_BYTE(leftt, 3)] ^
14335a913ee7SJerome Forissier             des_ip[4][LTC_BYTE(right, 0)] ^
14345a913ee7SJerome Forissier             des_ip[5][LTC_BYTE(right, 1)] ^
14355a913ee7SJerome Forissier             des_ip[6][LTC_BYTE(right, 2)] ^
14365a913ee7SJerome Forissier             des_ip[7][LTC_BYTE(right, 3)];
1437b0104773SPascal Brand       leftt = (ulong32)(tmp >> 32);
1438b0104773SPascal Brand       right = (ulong32)(tmp & 0xFFFFFFFFUL);
1439b0104773SPascal Brand    }
1440b0104773SPascal Brand #endif
1441b0104773SPascal Brand 
1442b0104773SPascal Brand     for (cur_round = 0; cur_round < 8; cur_round++) {
1443b0104773SPascal Brand         work  = RORc(right, 4) ^ *keys++;
1444b0104773SPascal Brand         leftt ^= SP7[work        & 0x3fL]
1445b0104773SPascal Brand               ^  SP5[(work >>  8) & 0x3fL]
1446b0104773SPascal Brand               ^  SP3[(work >> 16) & 0x3fL]
1447b0104773SPascal Brand               ^  SP1[(work >> 24) & 0x3fL];
1448b0104773SPascal Brand         work  = right ^ *keys++;
1449b0104773SPascal Brand         leftt ^= SP8[ work        & 0x3fL]
1450b0104773SPascal Brand               ^  SP6[(work >>  8) & 0x3fL]
1451b0104773SPascal Brand               ^  SP4[(work >> 16) & 0x3fL]
1452b0104773SPascal Brand               ^  SP2[(work >> 24) & 0x3fL];
1453b0104773SPascal Brand 
1454b0104773SPascal Brand         work = RORc(leftt, 4) ^ *keys++;
1455b0104773SPascal Brand         right ^= SP7[ work        & 0x3fL]
1456b0104773SPascal Brand               ^  SP5[(work >>  8) & 0x3fL]
1457b0104773SPascal Brand               ^  SP3[(work >> 16) & 0x3fL]
1458b0104773SPascal Brand               ^  SP1[(work >> 24) & 0x3fL];
1459b0104773SPascal Brand         work  = leftt ^ *keys++;
1460b0104773SPascal Brand         right ^= SP8[ work        & 0x3fL]
1461b0104773SPascal Brand               ^  SP6[(work >>  8) & 0x3fL]
1462b0104773SPascal Brand               ^  SP4[(work >> 16) & 0x3fL]
1463b0104773SPascal Brand               ^  SP2[(work >> 24) & 0x3fL];
1464b0104773SPascal Brand     }
1465b0104773SPascal Brand 
1466b0104773SPascal Brand #ifdef LTC_SMALL_CODE
1467b0104773SPascal Brand     right = RORc(right, 1);
1468b0104773SPascal Brand     work = (leftt ^ right) & 0xaaaaaaaaL;
1469b0104773SPascal Brand     leftt ^= work;
1470b0104773SPascal Brand     right ^= work;
1471b0104773SPascal Brand     leftt = RORc(leftt, 1);
1472b0104773SPascal Brand     work = ((leftt >> 8) ^ right) & 0x00ff00ffL;
1473b0104773SPascal Brand     right ^= work;
1474b0104773SPascal Brand     leftt ^= (work << 8);
1475b0104773SPascal Brand     /* -- */
1476b0104773SPascal Brand     work = ((leftt >> 2) ^ right) & 0x33333333L;
1477b0104773SPascal Brand     right ^= work;
1478b0104773SPascal Brand     leftt ^= (work << 2);
1479b0104773SPascal Brand     work = ((right >> 16) ^ leftt) & 0x0000ffffL;
1480b0104773SPascal Brand     leftt ^= work;
1481b0104773SPascal Brand     right ^= (work << 16);
1482b0104773SPascal Brand     work = ((right >> 4) ^ leftt) & 0x0f0f0f0fL;
1483b0104773SPascal Brand     leftt ^= work;
1484b0104773SPascal Brand     right ^= (work << 4);
1485b0104773SPascal Brand #else
1486b0104773SPascal Brand    {
1487b0104773SPascal Brand       ulong64 tmp;
14885a913ee7SJerome Forissier       tmp = des_fp[0][LTC_BYTE(leftt, 0)] ^
14895a913ee7SJerome Forissier             des_fp[1][LTC_BYTE(leftt, 1)] ^
14905a913ee7SJerome Forissier             des_fp[2][LTC_BYTE(leftt, 2)] ^
14915a913ee7SJerome Forissier             des_fp[3][LTC_BYTE(leftt, 3)] ^
14925a913ee7SJerome Forissier             des_fp[4][LTC_BYTE(right, 0)] ^
14935a913ee7SJerome Forissier             des_fp[5][LTC_BYTE(right, 1)] ^
14945a913ee7SJerome Forissier             des_fp[6][LTC_BYTE(right, 2)] ^
14955a913ee7SJerome Forissier             des_fp[7][LTC_BYTE(right, 3)];
1496b0104773SPascal Brand       leftt = (ulong32)(tmp >> 32);
1497b0104773SPascal Brand       right = (ulong32)(tmp & 0xFFFFFFFFUL);
1498b0104773SPascal Brand    }
1499b0104773SPascal Brand #endif
1500b0104773SPascal Brand 
1501b0104773SPascal Brand     block[0] = right;
1502b0104773SPascal Brand     block[1] = leftt;
1503b0104773SPascal Brand }
1504b0104773SPascal Brand 
1505b0104773SPascal Brand #ifdef LTC_CLEAN_STACK
desfunc(ulong32 * block,const ulong32 * keys)1506b0104773SPascal Brand static void desfunc(ulong32 *block, const ulong32 *keys)
1507b0104773SPascal Brand {
1508*8411e6adSJerome Forissier    s_desfunc(block, keys);
1509b0104773SPascal Brand    burn_stack(sizeof(ulong32) * 4 + sizeof(int));
1510b0104773SPascal Brand }
1511b0104773SPascal Brand #endif
1512b0104773SPascal Brand 
1513b0104773SPascal Brand  /**
1514b0104773SPascal Brand     Initialize the LTC_DES block cipher
1515b0104773SPascal Brand     @param key The symmetric key you wish to pass
1516b0104773SPascal Brand     @param keylen The key length in bytes
1517b0104773SPascal Brand     @param num_rounds The number of rounds desired (0 for default)
1518b0104773SPascal Brand     @param skey The key in as scheduled by this function.
1519b0104773SPascal Brand     @return CRYPT_OK if successful
1520b0104773SPascal Brand  */
des_setup(const unsigned char * key,int keylen,int num_rounds,symmetric_key * skey)1521b0104773SPascal Brand int des_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey)
1522b0104773SPascal Brand {
1523b0104773SPascal Brand     LTC_ARGCHK(key != NULL);
1524b0104773SPascal Brand     LTC_ARGCHK(skey != NULL);
1525b0104773SPascal Brand 
1526b0104773SPascal Brand     if (num_rounds != 0 && num_rounds != 16) {
1527b0104773SPascal Brand         return CRYPT_INVALID_ROUNDS;
1528b0104773SPascal Brand     }
1529b0104773SPascal Brand 
1530b0104773SPascal Brand     if (keylen != 8) {
1531b0104773SPascal Brand         return CRYPT_INVALID_KEYSIZE;
1532b0104773SPascal Brand     }
1533b0104773SPascal Brand 
1534b0104773SPascal Brand     deskey(key, EN0, skey->des.ek);
1535b0104773SPascal Brand     deskey(key, DE1, skey->des.dk);
1536b0104773SPascal Brand 
1537b0104773SPascal Brand     return CRYPT_OK;
1538b0104773SPascal Brand }
1539b0104773SPascal Brand 
1540b0104773SPascal Brand  /**
1541b0104773SPascal Brand     Initialize the 3LTC_DES-EDE block cipher
1542b0104773SPascal Brand     @param key The symmetric key you wish to pass
1543b0104773SPascal Brand     @param keylen The key length in bytes
1544b0104773SPascal Brand     @param num_rounds The number of rounds desired (0 for default)
1545b0104773SPascal Brand     @param skey The key in as scheduled by this function.
1546b0104773SPascal Brand     @return CRYPT_OK if successful
1547b0104773SPascal Brand  */
des3_setup(const unsigned char * key,int keylen,int num_rounds,symmetric_key * skey)1548b0104773SPascal Brand int des3_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey)
1549b0104773SPascal Brand {
1550b0104773SPascal Brand     LTC_ARGCHK(key != NULL);
1551b0104773SPascal Brand     LTC_ARGCHK(skey != NULL);
1552b0104773SPascal Brand 
1553b0104773SPascal Brand     if(num_rounds != 0 && num_rounds != 16) {
1554b0104773SPascal Brand         return CRYPT_INVALID_ROUNDS;
1555b0104773SPascal Brand     }
1556b0104773SPascal Brand 
1557a50cb361SMatt Ma     if (keylen != 24 && keylen != 16) {
1558b0104773SPascal Brand         return CRYPT_INVALID_KEYSIZE;
1559b0104773SPascal Brand     }
1560b0104773SPascal Brand 
1561b0104773SPascal Brand     deskey(key,    EN0, skey->des3.ek[0]);
1562b0104773SPascal Brand     deskey(key+8,  DE1, skey->des3.ek[1]);
1563a50cb361SMatt Ma     if (keylen == 24) {
1564b0104773SPascal Brand         deskey(key+16, EN0, skey->des3.ek[2]);
1565a50cb361SMatt Ma     } else {
1566a50cb361SMatt Ma         /* two-key 3DES: K3=K1 */
1567a50cb361SMatt Ma         deskey(key, EN0, skey->des3.ek[2]);
1568a50cb361SMatt Ma     }
1569b0104773SPascal Brand 
1570b0104773SPascal Brand     deskey(key,    DE1, skey->des3.dk[2]);
1571b0104773SPascal Brand     deskey(key+8,  EN0, skey->des3.dk[1]);
1572a50cb361SMatt Ma     if (keylen == 24) {
1573b0104773SPascal Brand         deskey(key+16, DE1, skey->des3.dk[0]);
1574a50cb361SMatt Ma     } else {
1575a50cb361SMatt Ma         /* two-key 3DES: K3=K1 */
1576a50cb361SMatt Ma         deskey(key, DE1, skey->des3.dk[0]);
1577a50cb361SMatt Ma     }
1578b0104773SPascal Brand 
1579b0104773SPascal Brand     return CRYPT_OK;
1580b0104773SPascal Brand }
1581b0104773SPascal Brand 
1582b0104773SPascal Brand /**
1583b0104773SPascal Brand   Encrypts a block of text with LTC_DES
1584b0104773SPascal Brand   @param pt The input plaintext (8 bytes)
1585b0104773SPascal Brand   @param ct The output ciphertext (8 bytes)
1586b0104773SPascal Brand   @param skey The key as scheduled
1587b0104773SPascal Brand   @return CRYPT_OK if successful
1588b0104773SPascal Brand */
des_ecb_encrypt(const unsigned char * pt,unsigned char * ct,const symmetric_key * skey)15895a913ee7SJerome Forissier int des_ecb_encrypt(const unsigned char *pt, unsigned char *ct, const symmetric_key *skey)
1590b0104773SPascal Brand {
1591b0104773SPascal Brand     ulong32 work[2];
1592b0104773SPascal Brand     LTC_ARGCHK(pt   != NULL);
1593b0104773SPascal Brand     LTC_ARGCHK(ct   != NULL);
1594b0104773SPascal Brand     LTC_ARGCHK(skey != NULL);
1595b0104773SPascal Brand     LOAD32H(work[0], pt+0);
1596b0104773SPascal Brand     LOAD32H(work[1], pt+4);
1597b0104773SPascal Brand     desfunc(work, skey->des.ek);
1598b0104773SPascal Brand     STORE32H(work[0],ct+0);
1599b0104773SPascal Brand     STORE32H(work[1],ct+4);
1600b0104773SPascal Brand     return CRYPT_OK;
1601b0104773SPascal Brand }
1602b0104773SPascal Brand 
1603b0104773SPascal Brand /**
1604b0104773SPascal Brand   Decrypts a block of text with LTC_DES
1605b0104773SPascal Brand   @param ct The input ciphertext (8 bytes)
1606b0104773SPascal Brand   @param pt The output plaintext (8 bytes)
1607b0104773SPascal Brand   @param skey The key as scheduled
1608b0104773SPascal Brand   @return CRYPT_OK if successful
1609b0104773SPascal Brand */
des_ecb_decrypt(const unsigned char * ct,unsigned char * pt,const symmetric_key * skey)16105a913ee7SJerome Forissier int des_ecb_decrypt(const unsigned char *ct, unsigned char *pt, const symmetric_key *skey)
1611b0104773SPascal Brand {
1612b0104773SPascal Brand     ulong32 work[2];
1613b0104773SPascal Brand     LTC_ARGCHK(pt   != NULL);
1614b0104773SPascal Brand     LTC_ARGCHK(ct   != NULL);
1615b0104773SPascal Brand     LTC_ARGCHK(skey != NULL);
1616b0104773SPascal Brand     LOAD32H(work[0], ct+0);
1617b0104773SPascal Brand     LOAD32H(work[1], ct+4);
1618b0104773SPascal Brand     desfunc(work, skey->des.dk);
1619b0104773SPascal Brand     STORE32H(work[0],pt+0);
1620b0104773SPascal Brand     STORE32H(work[1],pt+4);
1621b0104773SPascal Brand     return CRYPT_OK;
1622b0104773SPascal Brand }
1623b0104773SPascal Brand 
1624b0104773SPascal Brand /**
1625b0104773SPascal Brand   Encrypts a block of text with 3LTC_DES-EDE
1626b0104773SPascal Brand   @param pt The input plaintext (8 bytes)
1627b0104773SPascal Brand   @param ct The output ciphertext (8 bytes)
1628b0104773SPascal Brand   @param skey The key as scheduled
1629b0104773SPascal Brand   @return CRYPT_OK if successful
1630b0104773SPascal Brand */
des3_ecb_encrypt(const unsigned char * pt,unsigned char * ct,const symmetric_key * skey)16315a913ee7SJerome Forissier int des3_ecb_encrypt(const unsigned char *pt, unsigned char *ct, const symmetric_key *skey)
1632b0104773SPascal Brand {
1633b0104773SPascal Brand     ulong32 work[2];
1634b0104773SPascal Brand 
1635b0104773SPascal Brand     LTC_ARGCHK(pt   != NULL);
1636b0104773SPascal Brand     LTC_ARGCHK(ct   != NULL);
1637b0104773SPascal Brand     LTC_ARGCHK(skey != NULL);
1638b0104773SPascal Brand     LOAD32H(work[0], pt+0);
1639b0104773SPascal Brand     LOAD32H(work[1], pt+4);
1640b0104773SPascal Brand     desfunc(work, skey->des3.ek[0]);
1641b0104773SPascal Brand     desfunc(work, skey->des3.ek[1]);
1642b0104773SPascal Brand     desfunc(work, skey->des3.ek[2]);
1643b0104773SPascal Brand     STORE32H(work[0],ct+0);
1644b0104773SPascal Brand     STORE32H(work[1],ct+4);
1645b0104773SPascal Brand     return CRYPT_OK;
1646b0104773SPascal Brand }
1647b0104773SPascal Brand 
1648b0104773SPascal Brand /**
1649b0104773SPascal Brand   Decrypts a block of text with 3LTC_DES-EDE
1650b0104773SPascal Brand   @param ct The input ciphertext (8 bytes)
1651b0104773SPascal Brand   @param pt The output plaintext (8 bytes)
1652b0104773SPascal Brand   @param skey The key as scheduled
1653b0104773SPascal Brand   @return CRYPT_OK if successful
1654b0104773SPascal Brand */
des3_ecb_decrypt(const unsigned char * ct,unsigned char * pt,const symmetric_key * skey)16555a913ee7SJerome Forissier int des3_ecb_decrypt(const unsigned char *ct, unsigned char *pt, const symmetric_key *skey)
1656b0104773SPascal Brand {
1657b0104773SPascal Brand     ulong32 work[2];
1658b0104773SPascal Brand     LTC_ARGCHK(pt   != NULL);
1659b0104773SPascal Brand     LTC_ARGCHK(ct   != NULL);
1660b0104773SPascal Brand     LTC_ARGCHK(skey != NULL);
1661b0104773SPascal Brand     LOAD32H(work[0], ct+0);
1662b0104773SPascal Brand     LOAD32H(work[1], ct+4);
1663b0104773SPascal Brand     desfunc(work, skey->des3.dk[0]);
1664b0104773SPascal Brand     desfunc(work, skey->des3.dk[1]);
1665b0104773SPascal Brand     desfunc(work, skey->des3.dk[2]);
1666b0104773SPascal Brand     STORE32H(work[0],pt+0);
1667b0104773SPascal Brand     STORE32H(work[1],pt+4);
1668b0104773SPascal Brand     return CRYPT_OK;
1669b0104773SPascal Brand }
1670b0104773SPascal Brand 
1671b0104773SPascal Brand /**
1672b0104773SPascal Brand   Performs a self-test of the LTC_DES block cipher
1673b0104773SPascal Brand   @return CRYPT_OK if functional, CRYPT_NOP if self-test has been disabled
1674b0104773SPascal Brand */
des_test(void)1675b0104773SPascal Brand int des_test(void)
1676b0104773SPascal Brand {
1677b0104773SPascal Brand  #ifndef LTC_TEST
1678b0104773SPascal Brand     return CRYPT_NOP;
1679b0104773SPascal Brand  #else
1680b0104773SPascal Brand     static const struct des_test_case {
1681b0104773SPascal Brand         unsigned char key[8], txt[8], out[8];
1682b0104773SPascal Brand     } cases[] = {
1683*8411e6adSJerome Forissier         { { 0x10, 0x31, 0x6E, 0x02, 0x8C, 0x8F, 0x3B, 0x4A },
1684b0104773SPascal Brand           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1685b0104773SPascal Brand           { 0x82, 0xDC, 0xBA, 0xFB, 0xDE, 0xAB, 0x66, 0x02 } },
1686*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 },
1687b0104773SPascal Brand           { 0x95, 0xF8, 0xA5, 0xE5, 0xDD, 0x31, 0xD9, 0x00 },
1688b0104773SPascal Brand           { 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } },
1689*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 },
1690b0104773SPascal Brand           { 0xDD, 0x7F, 0x12, 0x1C, 0xA5, 0x01, 0x56, 0x19 },
1691b0104773SPascal Brand           { 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } },
1692*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 },
1693b0104773SPascal Brand           { 0x2E, 0x86, 0x53, 0x10, 0x4F, 0x38, 0x34, 0xEA },
1694b0104773SPascal Brand           { 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } },
1695*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 },
1696b0104773SPascal Brand           { 0x4B, 0xD3, 0x88, 0xFF, 0x6C, 0xD8, 0x1D, 0x4F },
1697b0104773SPascal Brand           { 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } },
1698*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 },
1699b0104773SPascal Brand           { 0x20, 0xB9, 0xE7, 0x67, 0xB2, 0xFB, 0x14, 0x56 },
1700b0104773SPascal Brand           { 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } },
1701*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 },
1702b0104773SPascal Brand           { 0x55, 0x57, 0x93, 0x80, 0xD7, 0x71, 0x38, 0xEF },
1703b0104773SPascal Brand           { 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } },
1704*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 },
1705b0104773SPascal Brand           { 0x6C, 0xC5, 0xDE, 0xFA, 0xAF, 0x04, 0x51, 0x2F },
1706b0104773SPascal Brand           { 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } },
1707*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 },
1708b0104773SPascal Brand           { 0x0D, 0x9F, 0x27, 0x9B, 0xA5, 0xD8, 0x72, 0x60 },
1709b0104773SPascal Brand           { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } },
1710*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 },
1711b0104773SPascal Brand           { 0xD9, 0x03, 0x1B, 0x02, 0x71, 0xBD, 0x5A, 0x0A },
1712b0104773SPascal Brand           { 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } },
1713b0104773SPascal Brand 
1714*8411e6adSJerome Forissier         { { 0x80, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 },
1715a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1716a50cb361SMatt Ma           { 0x95, 0xA8, 0xD7, 0x28, 0x13, 0xDA, 0xA9, 0x4D } },
1717*8411e6adSJerome Forissier         { { 0x40, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 },
1718a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1719a50cb361SMatt Ma           { 0x0E, 0xEC, 0x14, 0x87, 0xDD, 0x8C, 0x26, 0xD5 } },
1720*8411e6adSJerome Forissier         { { 0x20, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 },
1721a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1722a50cb361SMatt Ma           { 0x7A, 0xD1, 0x6F, 0xFB, 0x79, 0xC4, 0x59, 0x26 } },
1723*8411e6adSJerome Forissier         { { 0x10, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 },
1724a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1725a50cb361SMatt Ma           { 0xD3, 0x74, 0x62, 0x94, 0xCA, 0x6A, 0x6C, 0xF3 } },
1726*8411e6adSJerome Forissier         { { 0x08, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 },
1727a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1728a50cb361SMatt Ma           { 0x80, 0x9F, 0x5F, 0x87, 0x3C, 0x1F, 0xD7, 0x61 } },
1729*8411e6adSJerome Forissier         { { 0x04, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 },
1730a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1731a50cb361SMatt Ma           { 0xC0, 0x2F, 0xAF, 0xFE, 0xC9, 0x89, 0xD1, 0xFC } },
1732*8411e6adSJerome Forissier         { { 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 },
1733a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1734a50cb361SMatt Ma           { 0x46, 0x15, 0xAA, 0x1D, 0x33, 0xE7, 0x2F, 0x10 } },
1735*8411e6adSJerome Forissier         { { 0x01, 0x80, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 },
1736a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1737a50cb361SMatt Ma           { 0x20, 0x55, 0x12, 0x33, 0x50, 0xC0, 0x08, 0x58 } },
1738*8411e6adSJerome Forissier         { { 0x01, 0x40, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 },
1739a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1740a50cb361SMatt Ma           { 0xDF, 0x3B, 0x99, 0xD6, 0x57, 0x73, 0x97, 0xC8 } },
1741*8411e6adSJerome Forissier         { { 0x01, 0x20, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 },
1742a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1743a50cb361SMatt Ma           { 0x31, 0xFE, 0x17, 0x36, 0x9B, 0x52, 0x88, 0xC9 } },
1744*8411e6adSJerome Forissier         { { 0x01, 0x10, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 },
1745a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1746a50cb361SMatt Ma           { 0xDF, 0xDD, 0x3C, 0xC6, 0x4D, 0xAE, 0x16, 0x42 } },
1747*8411e6adSJerome Forissier         { { 0x01, 0x08, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 },
1748a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1749a50cb361SMatt Ma           { 0x17, 0x8C, 0x83, 0xCE, 0x2B, 0x39, 0x9D, 0x94 } },
1750*8411e6adSJerome Forissier         { { 0x01, 0x04, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 },
1751a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1752a50cb361SMatt Ma           { 0x50, 0xF6, 0x36, 0x32, 0x4A, 0x9B, 0x7F, 0x80 } },
1753*8411e6adSJerome Forissier         { { 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 },
1754a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1755a50cb361SMatt Ma           { 0xA8, 0x46, 0x8E, 0xE3, 0xBC, 0x18, 0xF0, 0x6D } },
1756*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x80, 0x01, 0x01, 0x01, 0x01, 0x01 },
1757a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1758a50cb361SMatt Ma           { 0xA2, 0xDC, 0x9E, 0x92, 0xFD, 0x3C, 0xDE, 0x92 } },
1759*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x40, 0x01, 0x01, 0x01, 0x01, 0x01 },
1760a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1761a50cb361SMatt Ma           { 0xCA, 0xC0, 0x9F, 0x79, 0x7D, 0x03, 0x12, 0x87 } },
1762*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x20, 0x01, 0x01, 0x01, 0x01, 0x01 },
1763a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1764a50cb361SMatt Ma           { 0x90, 0xBA, 0x68, 0x0B, 0x22, 0xAE, 0xB5, 0x25 } },
1765*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x10, 0x01, 0x01, 0x01, 0x01, 0x01 },
1766a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1767a50cb361SMatt Ma           { 0xCE, 0x7A, 0x24, 0xF3, 0x50, 0xE2, 0x80, 0xB6 } },
1768*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x08, 0x01, 0x01, 0x01, 0x01, 0x01 },
1769a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1770a50cb361SMatt Ma           { 0x88, 0x2B, 0xFF, 0x0A, 0xA0, 0x1A, 0x0B, 0x87 } },
1771*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x04, 0x01, 0x01, 0x01, 0x01, 0x01 },
1772a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1773a50cb361SMatt Ma           { 0x25, 0x61, 0x02, 0x88, 0x92, 0x45, 0x11, 0xC2 } },
1774*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01 },
1775a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1776a50cb361SMatt Ma           { 0xC7, 0x15, 0x16, 0xC2, 0x9C, 0x75, 0xD1, 0x70 } },
1777*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x80, 0x01, 0x01, 0x01, 0x01 },
1778a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1779a50cb361SMatt Ma           { 0x51, 0x99, 0xC2, 0x9A, 0x52, 0xC9, 0xF0, 0x59 } },
1780*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x40, 0x01, 0x01, 0x01, 0x01 },
1781a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1782a50cb361SMatt Ma           { 0xC2, 0x2F, 0x0A, 0x29, 0x4A, 0x71, 0xF2, 0x9F } },
1783*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x20, 0x01, 0x01, 0x01, 0x01 },
1784a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1785a50cb361SMatt Ma           { 0xEE, 0x37, 0x14, 0x83, 0x71, 0x4C, 0x02, 0xEA } },
1786*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x10, 0x01, 0x01, 0x01, 0x01 },
1787a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1788a50cb361SMatt Ma           { 0xA8, 0x1F, 0xBD, 0x44, 0x8F, 0x9E, 0x52, 0x2F } },
1789*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x08, 0x01, 0x01, 0x01, 0x01 },
1790a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1791a50cb361SMatt Ma           { 0x4F, 0x64, 0x4C, 0x92, 0xE1, 0x92, 0xDF, 0xED } },
1792*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x04, 0x01, 0x01, 0x01, 0x01 },
1793a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1794a50cb361SMatt Ma           { 0x1A, 0xFA, 0x9A, 0x66, 0xA6, 0xDF, 0x92, 0xAE } },
1795*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x02, 0x01, 0x01, 0x01, 0x01 },
1796a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1797a50cb361SMatt Ma           { 0xB3, 0xC1, 0xCC, 0x71, 0x5C, 0xB8, 0x79, 0xD8 } },
1798*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x01, 0x80, 0x01, 0x01, 0x01 },
1799a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1800a50cb361SMatt Ma           { 0x19, 0xD0, 0x32, 0xE6, 0x4A, 0xB0, 0xBD, 0x8B } },
1801*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x01, 0x40, 0x01, 0x01, 0x01 },
1802a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1803a50cb361SMatt Ma           { 0x3C, 0xFA, 0xA7, 0xA7, 0xDC, 0x87, 0x20, 0xDC } },
1804*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x01, 0x20, 0x01, 0x01, 0x01 },
1805a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1806a50cb361SMatt Ma           { 0xB7, 0x26, 0x5F, 0x7F, 0x44, 0x7A, 0xC6, 0xF3 } },
1807*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x01, 0x10, 0x01, 0x01, 0x01 },
1808a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1809a50cb361SMatt Ma           { 0x9D, 0xB7, 0x3B, 0x3C, 0x0D, 0x16, 0x3F, 0x54 } },
1810*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x01, 0x08, 0x01, 0x01, 0x01 },
1811a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1812a50cb361SMatt Ma           { 0x81, 0x81, 0xB6, 0x5B, 0xAB, 0xF4, 0xA9, 0x75 } },
1813*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x01, 0x04, 0x01, 0x01, 0x01 },
1814a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1815a50cb361SMatt Ma           { 0x93, 0xC9, 0xB6, 0x40, 0x42, 0xEA, 0xA2, 0x40 } },
1816*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x01, 0x02, 0x01, 0x01, 0x01 },
1817a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1818a50cb361SMatt Ma           { 0x55, 0x70, 0x53, 0x08, 0x29, 0x70, 0x55, 0x92 } },
1819*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x01, 0x01, 0x80, 0x01, 0x01 },
1820a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1821a50cb361SMatt Ma           { 0x86, 0x38, 0x80, 0x9E, 0x87, 0x87, 0x87, 0xA0 } },
1822*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x01, 0x01, 0x40, 0x01, 0x01 },
1823a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1824a50cb361SMatt Ma           { 0x41, 0xB9, 0xA7, 0x9A, 0xF7, 0x9A, 0xC2, 0x08 } },
1825*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x01, 0x01, 0x20, 0x01, 0x01 },
1826a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1827a50cb361SMatt Ma           { 0x7A, 0x9B, 0xE4, 0x2F, 0x20, 0x09, 0xA8, 0x92 } },
1828*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x01, 0x01, 0x10, 0x01, 0x01 },
1829a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1830a50cb361SMatt Ma           { 0x29, 0x03, 0x8D, 0x56, 0xBA, 0x6D, 0x27, 0x45 } },
1831*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x01, 0x01, 0x08, 0x01, 0x01 },
1832a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1833a50cb361SMatt Ma           { 0x54, 0x95, 0xC6, 0xAB, 0xF1, 0xE5, 0xDF, 0x51 } },
1834*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x01, 0x01, 0x04, 0x01, 0x01 },
1835a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1836a50cb361SMatt Ma           { 0xAE, 0x13, 0xDB, 0xD5, 0x61, 0x48, 0x89, 0x33 } },
1837*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x01, 0x01 },
1838a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1839a50cb361SMatt Ma           { 0x02, 0x4D, 0x1F, 0xFA, 0x89, 0x04, 0xE3, 0x89 } },
1840*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x80, 0x01 },
1841a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1842a50cb361SMatt Ma           { 0xD1, 0x39, 0x97, 0x12, 0xF9, 0x9B, 0xF0, 0x2E } },
1843*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x40, 0x01 },
1844a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1845a50cb361SMatt Ma           { 0x14, 0xC1, 0xD7, 0xC1, 0xCF, 0xFE, 0xC7, 0x9E } },
1846*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x20, 0x01 },
1847a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1848a50cb361SMatt Ma           { 0x1D, 0xE5, 0x27, 0x9D, 0xAE, 0x3B, 0xED, 0x6F } },
1849*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x10, 0x01 },
1850a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1851a50cb361SMatt Ma           { 0xE9, 0x41, 0xA3, 0x3F, 0x85, 0x50, 0x13, 0x03 } },
1852*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x08, 0x01 },
1853a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1854a50cb361SMatt Ma           { 0xDA, 0x99, 0xDB, 0xBC, 0x9A, 0x03, 0xF3, 0x79 } },
1855*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x04, 0x01 },
1856a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1857a50cb361SMatt Ma           { 0xB7, 0xFC, 0x92, 0xF9, 0x1D, 0x8E, 0x92, 0xE9 } },
1858*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x01 },
1859a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1860a50cb361SMatt Ma           { 0xAE, 0x8E, 0x5C, 0xAA, 0x3C, 0xA0, 0x4E, 0x85 } },
1861*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x80 },
1862a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1863a50cb361SMatt Ma           { 0x9C, 0xC6, 0x2D, 0xF4, 0x3B, 0x6E, 0xED, 0x74 } },
1864*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x40 },
1865a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1866a50cb361SMatt Ma           { 0xD8, 0x63, 0xDB, 0xB5, 0xC5, 0x9A, 0x91, 0xA0 } },
1867*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x20 },
1868a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1869a50cb361SMatt Ma           { 0xA1, 0xAB, 0x21, 0x90, 0x54, 0x5B, 0x91, 0xD7 } },
1870*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x10 },
1871a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1872a50cb361SMatt Ma           { 0x08, 0x75, 0x04, 0x1E, 0x64, 0xC5, 0x70, 0xF7 } },
1873*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x08 },
1874a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1875a50cb361SMatt Ma           { 0x5A, 0x59, 0x45, 0x28, 0xBE, 0xBE, 0xF1, 0xCC } },
1876*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x04 },
1877a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1878a50cb361SMatt Ma           { 0xFC, 0xDB, 0x32, 0x91, 0xDE, 0x21, 0xF0, 0xC0 } },
1879*8411e6adSJerome Forissier         { { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02 },
1880a50cb361SMatt Ma           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1881a50cb361SMatt Ma           { 0x86, 0x9E, 0xFD, 0x7F, 0x9F, 0x26, 0x5A, 0x09 } },
1882b0104773SPascal Brand 
1883b0104773SPascal Brand         /*** more test cases you could add if you are not convinced (the above test cases aren't really too good):
1884b0104773SPascal Brand 
1885b0104773SPascal Brand                 key              plaintext        ciphertext
1886b0104773SPascal Brand                 0000000000000000 0000000000000000 8CA64DE9C1B123A7
1887b0104773SPascal Brand                 FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFF 7359B2163E4EDC58
1888b0104773SPascal Brand                 3000000000000000 1000000000000001 958E6E627A05557B
1889b0104773SPascal Brand                 1111111111111111 1111111111111111 F40379AB9E0EC533
1890b0104773SPascal Brand                 0123456789ABCDEF 1111111111111111 17668DFC7292532D
1891b0104773SPascal Brand                 1111111111111111 0123456789ABCDEF 8A5AE1F81AB8F2DD
1892b0104773SPascal Brand                 0000000000000000 0000000000000000 8CA64DE9C1B123A7
1893b0104773SPascal Brand                 FEDCBA9876543210 0123456789ABCDEF ED39D950FA74BCC4
1894b0104773SPascal Brand                 7CA110454A1A6E57 01A1D6D039776742 690F5B0D9A26939B
1895b0104773SPascal Brand                 0131D9619DC1376E 5CD54CA83DEF57DA 7A389D10354BD271
1896b0104773SPascal Brand                 07A1133E4A0B2686 0248D43806F67172 868EBB51CAB4599A
1897b0104773SPascal Brand                 3849674C2602319E 51454B582DDF440A 7178876E01F19B2A
1898b0104773SPascal Brand                 04B915BA43FEB5B6 42FD443059577FA2 AF37FB421F8C4095
1899b0104773SPascal Brand                 0113B970FD34F2CE 059B5E0851CF143A 86A560F10EC6D85B
1900b0104773SPascal Brand                 0170F175468FB5E6 0756D8E0774761D2 0CD3DA020021DC09
1901b0104773SPascal Brand                 43297FAD38E373FE 762514B829BF486A EA676B2CB7DB2B7A
1902b0104773SPascal Brand                 07A7137045DA2A16 3BDD119049372802 DFD64A815CAF1A0F
1903b0104773SPascal Brand                 04689104C2FD3B2F 26955F6835AF609A 5C513C9C4886C088
1904b0104773SPascal Brand                 37D06BB516CB7546 164D5E404F275232 0A2AEEAE3FF4AB77
1905b0104773SPascal Brand                 1F08260D1AC2465E 6B056E18759F5CCA EF1BF03E5DFA575A
1906b0104773SPascal Brand                 584023641ABA6176 004BD6EF09176062 88BF0DB6D70DEE56
1907b0104773SPascal Brand                 025816164629B007 480D39006EE762F2 A1F9915541020B56
1908b0104773SPascal Brand                 49793EBC79B3258F 437540C8698F3CFA 6FBF1CAFCFFD0556
1909b0104773SPascal Brand                 4FB05E1515AB73A7 072D43A077075292 2F22E49BAB7CA1AC
1910b0104773SPascal Brand                 49E95D6D4CA229BF 02FE55778117F12A 5A6B612CC26CCE4A
1911b0104773SPascal Brand                 018310DC409B26D6 1D9D5C5018F728C2 5F4C038ED12B2E41
1912b0104773SPascal Brand                 1C587F1C13924FEF 305532286D6F295A 63FAC0D034D9F793
1913b0104773SPascal Brand                 0101010101010101 0123456789ABCDEF 617B3A0CE8F07100
1914b0104773SPascal Brand                 1F1F1F1F0E0E0E0E 0123456789ABCDEF DB958605F8C8C606
1915b0104773SPascal Brand                 E0FEE0FEF1FEF1FE 0123456789ABCDEF EDBFD1C66C29CCC7
1916b0104773SPascal Brand                 0000000000000000 FFFFFFFFFFFFFFFF 355550B2150E2451
1917b0104773SPascal Brand                 FFFFFFFFFFFFFFFF 0000000000000000 CAAAAF4DEAF1DBAE
1918b0104773SPascal Brand                 0123456789ABCDEF 0000000000000000 D5D44FF720683D0D
1919b0104773SPascal Brand                 FEDCBA9876543210 FFFFFFFFFFFFFFFF 2A2BB008DF97C2F2
1920b0104773SPascal Brand 
1921b0104773SPascal Brand             http://www.ecs.soton.ac.uk/~prw99r/ez438/vectors.txt
1922b0104773SPascal Brand         ***/
1923b0104773SPascal Brand     };
1924*8411e6adSJerome Forissier     unsigned char key[8], pt[8], ct[8], tmp[8];
1925*8411e6adSJerome Forissier     symmetric_key skey;
1926*8411e6adSJerome Forissier     int i, err;
1927b0104773SPascal Brand 
1928b0104773SPascal Brand     for (i = 0; i < (int)(sizeof(cases)/sizeof(cases[0])); i++)
1929b0104773SPascal Brand     {
1930*8411e6adSJerome Forissier         if ((err = des_setup(cases[i].key, 8, 0, &skey)) != CRYPT_OK) {
1931b0104773SPascal Brand             return err;
1932b0104773SPascal Brand         }
1933b0104773SPascal Brand 
1934*8411e6adSJerome Forissier         des_ecb_encrypt(cases[i].txt, ct, &skey);
1935*8411e6adSJerome Forissier 
1936*8411e6adSJerome Forissier         if (compare_testvector(ct, sizeof(ct), cases[i].out, 8, "DES Encrypt", i) != 0) {
1937b0104773SPascal Brand             return CRYPT_FAIL_TESTVECTOR;
1938b0104773SPascal Brand         }
1939b0104773SPascal Brand 
1940*8411e6adSJerome Forissier         des_ecb_decrypt(ct, pt, &skey);
1941*8411e6adSJerome Forissier 
1942*8411e6adSJerome Forissier         if (compare_testvector(pt, sizeof(pt), cases[i].txt, 8, "DES Decrypt", i) != 0) {
1943*8411e6adSJerome Forissier             return CRYPT_FAIL_TESTVECTOR;
1944*8411e6adSJerome Forissier         }
1945*8411e6adSJerome Forissier     }
1946*8411e6adSJerome Forissier 
1947*8411e6adSJerome Forissier     /* See if we can encrypt all zero bytes 1000 times, decrypt and come back to where we started */
1948*8411e6adSJerome Forissier 
1949*8411e6adSJerome Forissier     for (i = 0; i < 8; i++) key[i] = i;
1950*8411e6adSJerome Forissier 
1951*8411e6adSJerome Forissier     if ((err = des_setup(key, 8, 0, &skey)) != CRYPT_OK) {
1952*8411e6adSJerome Forissier         return err;
1953*8411e6adSJerome Forissier     }
1954*8411e6adSJerome Forissier 
1955*8411e6adSJerome Forissier     for (i = 0; i < 8; i++) pt[i] = tmp[i] = 0;
1956*8411e6adSJerome Forissier     for (i = 0; i < 1000; i++) des_ecb_encrypt(tmp, tmp, &skey);
1957*8411e6adSJerome Forissier     for (i = 0; i < 1000; i++) des_ecb_decrypt(tmp, tmp, &skey);
1958*8411e6adSJerome Forissier 
1959*8411e6adSJerome Forissier     if (compare_testvector(tmp, 8, pt, 8, "DES", 0) != 0) {
1960*8411e6adSJerome Forissier         return CRYPT_FAIL_TESTVECTOR;
1961b0104773SPascal Brand     }
1962b0104773SPascal Brand 
1963b0104773SPascal Brand     return CRYPT_OK;
1964b0104773SPascal Brand   #endif
1965b0104773SPascal Brand }
1966b0104773SPascal Brand 
des3_test(void)1967b0104773SPascal Brand int des3_test(void)
1968b0104773SPascal Brand {
1969b0104773SPascal Brand  #ifndef LTC_TEST
1970b0104773SPascal Brand     return CRYPT_NOP;
1971b0104773SPascal Brand  #else
1972*8411e6adSJerome Forissier     static const struct des3_test_case {
1973*8411e6adSJerome Forissier         unsigned char key[16], txt[8], out[8];
1974*8411e6adSJerome Forissier     } cases[] = {
1975*8411e6adSJerome Forissier         /*
1976*8411e6adSJerome Forissier            https://www.cosic.esat.kuleuven.be/nessie/testvectors/bc/des/Triple-Des-2-Key-128-64.unverified.test-vectors
1977*8411e6adSJerome Forissier         */
1978*8411e6adSJerome Forissier         { { 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1979*8411e6adSJerome Forissier           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1980*8411e6adSJerome Forissier           { 0xFA, 0xFD, 0x50, 0x84, 0x37, 0x4F, 0xCE, 0x34 } },
1981*8411e6adSJerome Forissier         { { 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1982*8411e6adSJerome Forissier           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1983*8411e6adSJerome Forissier           { 0x60, 0xCC, 0x37, 0xB7, 0xB5, 0x37, 0xA1, 0xDC } },
1984*8411e6adSJerome Forissier         { { 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1985*8411e6adSJerome Forissier           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
1986*8411e6adSJerome Forissier           { 0xBE, 0x3E, 0x73, 0x04, 0xFE, 0x92, 0xC2, 0xBC } },
1987*8411e6adSJerome Forissier         { { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00 },
1988*8411e6adSJerome Forissier           { 0xE5, 0xA9, 0xE3, 0x80, 0x03, 0xA5, 0xA0, 0xFD },
1989*8411e6adSJerome Forissier           { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } },
1990*8411e6adSJerome Forissier         { { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F },
1991*8411e6adSJerome Forissier           { 0xE4, 0xFC, 0x19, 0xD6, 0x94, 0x63, 0xB7, 0x83 },
1992*8411e6adSJerome Forissier           { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77 } },
1993*8411e6adSJerome Forissier     };
1994b0104773SPascal Brand     unsigned char key[24], pt[8], ct[8], tmp[8];
1995b0104773SPascal Brand     symmetric_key skey;
1996*8411e6adSJerome Forissier     int i, err;
1997b0104773SPascal Brand 
1998b0104773SPascal Brand     if ((err = des_test()) != CRYPT_OK) {
1999b0104773SPascal Brand         return err;
2000b0104773SPascal Brand     }
2001b0104773SPascal Brand 
2002*8411e6adSJerome Forissier     for (i = 0; i < (int)(sizeof(cases)/sizeof(cases[0])); i++)
2003*8411e6adSJerome Forissier     {
2004*8411e6adSJerome Forissier         if ((err = des3_setup(cases[i].key, 16, 0, &skey)) != CRYPT_OK) {
2005*8411e6adSJerome Forissier             return err;
2006b0104773SPascal Brand         }
2007b0104773SPascal Brand 
2008*8411e6adSJerome Forissier         des3_ecb_encrypt(cases[i].txt, ct, &skey);
2009*8411e6adSJerome Forissier 
2010*8411e6adSJerome Forissier         if (compare_testvector(ct, sizeof(ct), cases[i].out, 8, "3DES Encrypt", i) != 0) {
2011*8411e6adSJerome Forissier             return CRYPT_FAIL_TESTVECTOR;
2012b0104773SPascal Brand         }
2013b0104773SPascal Brand 
2014*8411e6adSJerome Forissier         des3_ecb_decrypt(ct, pt, &skey);
2015*8411e6adSJerome Forissier 
2016*8411e6adSJerome Forissier         if (compare_testvector(pt, sizeof(pt), cases[i].txt, 8, "3DES Decrypt", i) != 0) {
2017*8411e6adSJerome Forissier             return CRYPT_FAIL_TESTVECTOR;
2018*8411e6adSJerome Forissier         }
2019*8411e6adSJerome Forissier     }
2020*8411e6adSJerome Forissier 
2021*8411e6adSJerome Forissier     /* See if we can encrypt all zero bytes 1000 times, decrypt and come back to where we started */
2022*8411e6adSJerome Forissier 
2023*8411e6adSJerome Forissier     for (i = 0; i < 24; i++) key[i] = i;
2024*8411e6adSJerome Forissier 
2025b0104773SPascal Brand     if ((err = des3_setup(key, 24, 0, &skey)) != CRYPT_OK) {
2026b0104773SPascal Brand         return err;
2027b0104773SPascal Brand     }
2028b0104773SPascal Brand 
2029*8411e6adSJerome Forissier     for (i = 0; i < 8; i++) pt[i] = tmp[i] = 0;
2030*8411e6adSJerome Forissier     for (i = 0; i < 1000; i++) des3_ecb_encrypt(tmp, tmp, &skey);
2031*8411e6adSJerome Forissier     for (i = 0; i < 1000; i++) des3_ecb_decrypt(tmp, tmp, &skey);
2032b0104773SPascal Brand 
2033*8411e6adSJerome Forissier     if (compare_testvector(tmp, 8, pt, 8, "3DES", 0) != 0) {
2034b0104773SPascal Brand         return CRYPT_FAIL_TESTVECTOR;
2035b0104773SPascal Brand     }
2036b0104773SPascal Brand 
2037b0104773SPascal Brand     return CRYPT_OK;
2038b0104773SPascal Brand  #endif
2039b0104773SPascal Brand }
2040b0104773SPascal Brand 
2041b0104773SPascal Brand /** Terminate the context
2042b0104773SPascal Brand    @param skey    The scheduled key
2043b0104773SPascal Brand */
des_done(symmetric_key * skey)2044b0104773SPascal Brand void des_done(symmetric_key *skey)
2045b0104773SPascal Brand {
2046a50cb361SMatt Ma   LTC_UNUSED_PARAM(skey);
2047b0104773SPascal Brand }
2048b0104773SPascal Brand 
2049b0104773SPascal Brand /** Terminate the context
2050b0104773SPascal Brand    @param skey    The scheduled key
2051b0104773SPascal Brand */
des3_done(symmetric_key * skey)2052b0104773SPascal Brand void des3_done(symmetric_key *skey)
2053b0104773SPascal Brand {
2054a50cb361SMatt Ma   LTC_UNUSED_PARAM(skey);
2055b0104773SPascal Brand }
2056b0104773SPascal Brand 
2057b0104773SPascal Brand 
2058b0104773SPascal Brand /**
2059b0104773SPascal Brand   Gets suitable key size
2060b0104773SPascal Brand   @param keysize [in/out] The length of the recommended key (in bytes).  This function will store the suitable size back in this variable.
2061b0104773SPascal Brand   @return CRYPT_OK if the input key size is acceptable.
2062b0104773SPascal Brand */
des_keysize(int * keysize)2063b0104773SPascal Brand int des_keysize(int *keysize)
2064b0104773SPascal Brand {
2065b0104773SPascal Brand     LTC_ARGCHK(keysize != NULL);
2066b0104773SPascal Brand     if(*keysize < 8) {
2067b0104773SPascal Brand         return CRYPT_INVALID_KEYSIZE;
2068b0104773SPascal Brand     }
2069b0104773SPascal Brand     *keysize = 8;
2070b0104773SPascal Brand     return CRYPT_OK;
2071b0104773SPascal Brand }
2072b0104773SPascal Brand 
2073b0104773SPascal Brand /**
2074b0104773SPascal Brand   Gets suitable key size
2075b0104773SPascal Brand   @param keysize [in/out] The length of the recommended key (in bytes).  This function will store the suitable size back in this variable.
2076b0104773SPascal Brand   @return CRYPT_OK if the input key size is acceptable.
2077b0104773SPascal Brand */
des3_keysize(int * keysize)2078b0104773SPascal Brand int des3_keysize(int *keysize)
2079b0104773SPascal Brand {
2080b0104773SPascal Brand     LTC_ARGCHK(keysize != NULL);
20815a913ee7SJerome Forissier     if (*keysize < 16) {
2082b0104773SPascal Brand        return CRYPT_INVALID_KEYSIZE;
2083b0104773SPascal Brand     }
20845a913ee7SJerome Forissier     if (*keysize < 24) {
20855a913ee7SJerome Forissier        *keysize = 16;
20865a913ee7SJerome Forissier        return CRYPT_OK;
20875a913ee7SJerome Forissier     }
2088b0104773SPascal Brand     *keysize = 24;
2089b0104773SPascal Brand     return CRYPT_OK;
2090b0104773SPascal Brand }
2091b0104773SPascal Brand 
2092b0104773SPascal Brand #endif
2093b0104773SPascal Brand 
2094