VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Resources/Icons/VeraCrypt-48x48.xpm
blob: 7debeb8d606f94e8fa3f7db2ba34ff1ce065ae30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #336699 } /* Name.Attribute */
.highlight .nb { color: #003388 } /* Name.Builtin */
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555555 } /* Name.Decorator */
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
.highlight .py { color: #336699; font-weight: bold } /* Name.Property */
.highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #336699 } /* Name.Variable */
.highlight .ow { color: #008800 } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
.highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
.highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
.highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */
.highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
.highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */
.highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */
.highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */
.highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */
.highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */
.highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */
.highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */
.highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */
.highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */
.highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */
.highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */
.highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */
.highlight .vc { color: #336699 } /* Name.Variable.Class */
.highlight .vg { color: #dd7700 } /* Name.Variable.Global */
.highlight .vi { color: #3333bb } /* Name.Variable.Instance */
.highlight .vm { color: #336699 } /* Name.Variable.Magic */
.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/*
* Serpent
* (C) 1999-2007 Jack Lloyd
*
* Botan is released under the Simplified BSD License (see license.txt)
*/

#include "SerpentFast.h"
#include "SerpentFast_sbox.h"
#include "Common/Endian.h"
#if !defined(_UEFI)
#include <memory.h>
#include <stdlib.h>
#endif
#include "cpu.h"
#include "misc.h"

#if BYTE_ORDER == BIG_ENDIAN

#define BOTAN_ENDIAN_N2B(x) (x)
#define BOTAN_ENDIAN_B2N(x) (x)

#define BOTAN_ENDIAN_N2L(x) bswap_32(x)
#define BOTAN_ENDIAN_L2N(x) bswap_32(x)

#elif  BYTE_ORDER == LITTLE_ENDIAN

#define BOTAN_ENDIAN_N2L(x) (x)
#define BOTAN_ENDIAN_L2N(x) (x)

#define BOTAN_ENDIAN_N2B(x) bswap_32(x)
#define BOTAN_ENDIAN_B2N(x) bswap_32(x)

#endif

#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE
extern void serpent_simd_encrypt_blocks_4(const unsigned __int8 in[], unsigned __int8 out[], unsigned __int32* round_key);
extern void serpent_simd_decrypt_blocks_4(const unsigned __int8 in[], unsigned __int8 out[], unsigned __int32* round_key);
#endif

/*
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #336699 } /* Name.Attribute */
.highlight .nb { color: #003388 } /* Name.Builtin */
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555555 } /* Name.Decorator */
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
.highlight .py { color: #336699; font-weight: bold } /* Name.Property */
.highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #336699 } /* Name.Variable */
.highlight .ow { color: #008800 } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
.highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
.highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
.highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */
.highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
.highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */
.highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */
.highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */
.highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */
.highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */
.highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */
.highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */
.highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */
.highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */
.highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */
.highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */
.highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */
.highlight .vc { color: #336699 } /* Name.Variable.Class */
.highlight .vg { color: #dd7700 } /* Name.Variable.Global */
.highlight .vi { color: #3333bb } /* Name.Variable.Instance */
.highlight .vm { color: #336699 } /* Name.Variable.Magic */
.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/* XPM */
static const char *VeraCryptIcon48x48[] = {
"48 48 435 2",
"  	c None",
". 	c #FFFFFF",
"+ 	c #FEFFFF",
"@ 	c #FDFEFF",
"# 	c #FEFEFE",
"$ 	c #FEFFFE",
"% 	c #EFF9FC",
"& 	c #CDEEF7",
"* 	c #D5F1F8",
"= 	c #D3F0F8",
"- 	c #D1EFF8",
"; 	c #DBF2F9",
"> 	c #FDFEFE",
", 	c #E7F5F1",
"' 	c #E4F3EF",
") 	c #E5F4EF",
"! 	c #E4F3EE",
"~ 	c #EAF6F2",
"{ 	c #EDF6F3",
"] 	c #ECF6F3",
"^ 	c #EAF5F1",
"/ 	c #F8FCFA",
"( 	c #EAF8FC",
"_ 	c #1CB1DB",
": 	c #01A8D7",
"< 	c #07ABD8",
"[ 	c #04AAD8",
"} 	c #0DA8D5",
"| 	c #CFEDF6",
"1 	c #CFECE4",
"2 	c #5ABA9D",
"3 	c #6CBFA4",
"4 	c #69BEA3",
"5 	c #8ACAB3",
"6 	c #96CFBA",
"7 	c #95CEB9",
"8 	c #93CEB8",
"9 	c #9BD2BE",
"0 	c #F4FAF8",
"a 	c #FCFEFE",
"b 	c #99DCEF",
"c 	c #00A5D5",
"d 	c #0BADD9",
"e 	c #0DABD8",
"f 	c #00A1D0",
"g 	c #4EBEDF",
"h 	c #73C6AE",
"i 	c #4AB696",
"j 	c #6ABFA4",
"k 	c #6ABEA3",
"l 	c #7EC5AD",
"m 	c #86C9B2",
"n 	c #92CDB8",
"o 	c #99D0BC",
"p 	c #8FCCB5",
"q 	c #D0EAE0",
"r 	c #3ABBE0",
"s 	c #00A8D7",
"t 	c #10A8D5",
"u 	c #12A7D3",
"v 	c #01A1D1",
"w 	c #AEE1F0",
"x 	c #B7E2D5",
"y 	c #46B494",
"z 	c #53BA9C",
"A 	c #5ABB9E",
"B 	c #6CBFA5",
"C 	c #74C2A9",
"D 	c #88C9B3",
"E 	c #85C8B1",
"F 	c #8BCBB5",
"G 	c #A8D7C6",
"H 	c #FCFEFF",
"I 	c #BCE8F5",
"J 	c #03A6D5",
"K 	c #0FA7D3",
"L 	c #05A3D2",
"M 	c #2FB3D9",
"N 	c #F6FCFD",
"O 	c #F1F9F7",
"P 	c #61BFA3",
"Q 	c #4FB899",
"R 	c #54B99C",
"S 	c #53B99B",
"T 	c #5FBC9F",
"U 	c #7CC4AB",
"V 	c #80C5AE",
"W 	c #7FC5AD",
"X 	c #88C9B2",
"Y 	c #E1F1EB",
"Z 	c #63BFE1",
"` 	c #0898CF",
" .	c #1AA0D3",
"..	c #1BA1D3",
"+.	c #0697CE",
"@.	c #91CBE7",
"#.	c #FCFDFE",
"$.	c #91D5C4",
"%.	c #3BB392",
"&.	c #4BB99C",
"*.	c #4BB99B",
"=.	c #3CB393",
"-.	c #8DD2BF",
";.	c #E8F4EF",
">.	c #DBEFE8",
",.	c #DDF0E9",
"'.	c #DCEFE8",
").	c #E2F2EC",
"!.	c #DDF0F8",
"~.	c #209ED2",
"{.	c #199AD1",
"].	c #1C9DD2",
"^.	c #1C94CF",
"/.	c #2C90CF",
"(.	c #E3F1F9",
"_.	c #FEFEFF",
":.	c #D9F1EB",
"<.	c #31B394",
"[.	c #3EB697",
"}.	c #46B89A",
"|.	c #40B697",
"1.	c #4FBB9F",
"2.	c #EDF8F5",
"3.	c #89CCE7",
"4.	c #0995CE",
"5.	c #1E9DD1",
"6.	c #2690CE",
"7.	c #1585CA",
"8.	c #72B6DF",
"9.	c #6CC7B1",
"0.	c #26AD8D",
"a.	c #38B495",
"b.	c #47B799",
"c.	c #37B291",
"d.	c #ACDFD2",
"e.	c #FAFDFD",
"f.	c #F4FAFD",
"g.	c #34A9D7",
"h.	c #1891CE",
"i.	c #268DCD",
"j.	c #248ECD",
"k.	c #1C8ACC",
"l.	c #C8E3F3",
"m.	c #BEEAE0",
"n.	c #2AB493",
"o.	c #37B999",
"p.	c #34B899",
"q.	c #36B797",
"r.	c #67C5AC",
"s.	c #FBFDFD",
"t.	c #ADD9ED",
"u.	c #1785C8",
"v.	c #288CCC",
"w.	c #1A85C9",
"x.	c #54A3D6",
"y.	c #F9FCFD",
"z.	c #4DA991",
"A.	c #26987A",
"B.	c #2F9C7F",
"C.	c #249779",
"D.	c #BCE2D8",
"E.	c #FCFEFD",
"F.	c #5CA2D4",
"G.	c #1D80C4",
"H.	c #2B87C8",
"I.	c #2C89C8",
"J.	c #1575BC",
"K.	c #A8C9E4",
"L.	c #9DD8DE",
"M.	c #177A73",
"N.	c #236046",
"O.	c #20654D",
"P.	c #22614A",
"Q.	c #196F54",
"R.	c #7FC5B3",
"S.	c #CEE4F2",
"T.	c #2384C6",
"U.	c #2987C8",
"V.	c #2884C6",
"W.	c #1A73BA",
"X.	c #3684C2",
"Y.	c #EFF6FA",
"Z.	c #E6F4F5",
"`.	c #37A9B2",
" +	c #2AA2AA",
".+	c #246F5B",
"++	c #21664D",
"@+	c #226951",
"#+	c #2E997C",
"$+	c #289E7F",
"%+	c #CCE7E0",
"&+	c #7BB4DC",
"*+	c #1A7FC4",
"=+	c #267DC0",
"-+	c #2378BC",
";+	c #106DB7",
">+	c #83B4DA",
",+	c #79C4CB",
"'+	c #1E9DA6",
")+	c #31AAB5",
"!+	c #29908D",
"~+	c #215F45",
"{+	c #288469",
"]+	c #33A586",
"^+	c #24997A",
"/+	c #5EB59E",
"(+	c #E8F3FA",
"_+	c #3187C6",
":+	c #1C74BB",
"<+	c #2278BD",
"[+	c #1D75BB",
"}+	c #2C7CC0",
"|+	c #ABD5E3",
"1+	c #2FA6AD",
"2+	c #2CA3AD",
"3+	c #2DA4AD",
"4+	c #2EA5AF",
"5+	c #1E7B6A",
"6+	c #2E9A7B",
"7+	c #30A082",
"8+	c #32A083",
"9+	c #229979",
"0+	c #B1DBD0",
"a+	c #F9FCFB",
"b+	c #FCFDFD",
"c+	c #FDFDFD",
"d+	c #9BBBDC",
"e+	c #1960AD",
"f+	c #2D6EB4",
"g+	c #296CB3",
"h+	c #2768B1",
"i+	c #1A7798",
"j+	c #2F9DAF",
"k+	c #2F99AF",
"l+	c #309AAF",
"m+	c #2B98B0",
"n+	c #81C2C3",
"o+	c #329374",
"p+	c #298E72",
"q+	c #2C8F72",
"r+	c #298E71",
"s+	c #309174",
"t+	c #4DA78F",
"u+	c #4AA78E",
"v+	c #4BA88F",
"w+	c #49A58C",
"x+	c #4FB098",
"y+	c #E3F5F1",
"z+	c #FAFBFD",
"A+	c #4C80BD",
"B+	c #2263AD",
"C+	c #2E6AB5",
"D+	c #21689E",
"E+	c #0B6274",
"F+	c #278AA2",
"G+	c #349CB3",
"H+	c #2492AA",
"I+	c #5BADBF",
"J+	c #77B6A3",
"K+	c #1B8466",
"L+	c #2D8E72",
"M+	c #2A8C6F",
"N+	c #258565",
"O+	c #238D6E",
"P+	c #28987A",
"Q+	c #279577",
"R+	c #2A987B",
"S+	c #17A282",
"T+	c #77CAB8",
"U+	c #BCD0E6",
"V+	c #2062AE",
"W+	c #2F6DB2",
"X+	c #156983",
"Y+	c #0F6578",
"Z+	c #187187",
"`+	c #349CB2",
" @	c #2995AD",
".@	c #CBE5EB",
"+@	c #E3F0ED",
"@@	c #329276",
"#@	c #2A8D71",
"$@	c #2D8C6E",
"%@	c #2B896A",
"&@	c #2C8A6C",
"*@	c #329A7E",
"=@	c #339A7E",
"-@	c #32A68A",
";@	c #31B094",
">@	c #29AB8D",
",@	c #CDEBE5",
"'@	c #6894CB",
")@	c #005487",
"!@	c #015C6D",
"~@	c #015B72",
"{@	c #01586E",
"]@	c #04728B",
"^@	c #7DC1D0",
"/@	c #F9FCFC",
"(@	c #99C9BB",
"_@	c #0E7D5B",
":@	c #197F5E",
"<@	c #177E5D",
"[@	c #177D5C",
"}@	c #1A8463",
"|@	c #1E9778",
"1@	c #1CA687",
"2@	c #1FA788",
"3@	c #12A282",
"4@	c #49B89F",
"5@	c #FCFCFC",
"6@	c #DDE7F1",
"7@	c #79A9B8",
"8@	c #7EADB7",
"9@	c #7EACB7",
"0@	c #7DABB6",
"a@	c #7DAEBA",
"b@	c #E5F2F4",
"c@	c #F3F9F7",
"d@	c #91C3B3",
"e@	c #89BDAD",
"f@	c #8CBEAE",
"g@	c #8BBEAE",
"h@	c #8BBDAD",
"i@	c #8DCDBD",
"j@	c #8DD3C4",
"k@	c #8CD1C2",
"l@	c #8FD3C4",
"m@	c #86D0BF",
"n@	c #E2F4EF",
"o@	c #FCFCFB",
"p@	c #C5C5C4",
"q@	c #949493",
"r@	c #989897",
"s@	c #C4C4C4",
"t@	c #F8F9F9",
"u@	c #A5A5A5",
"v@	c #8E8E8D",
"w@	c #CBCBCB",
"x@	c #FAFCFC",
"y@	c #FAFCFB",
"z@	c #F0F1F0",
"A@	c #FBFEFD",
"B@	c #D2D2D2",
"C@	c #323230",
"D@	c #F0F0EF",
"E@	c #3A3A38",
"F@	c #CCCCCC",
"G@	c #A8A8A7",
"H@	c #ABABAB",
"I@	c #EEEEEE",
"J@	c #A3A3A3",
"K@	c #ACACAB",
"L@	c #C1C1C0",
"M@	c #898988",
"N@	c #E6E6E6",
"O@	c #A5A5A4",
"P@	c #F5F5F5",
"Q@	c #C0C0BF",
"R@	c #B6B6B5",
"S@	c #CACAC9",
"T@	c #FBFBFB",
"U@	c #C9C9C8",
"V@	c #A6A6A6",
"W@	c #BFBFBE",
"X@	c #D3D3D2",
"Y@	c #5D5D5C",
"Z@	c #E7E7E7",
"`@	c #5A5A58",
" #	c #7D7D7C",
".#	c #717170",
"+#	c #969695",
"@#	c #4B4B49",
"##	c #434342",
"$#	c #959594",
"%#	c #2C2C2A",
"&#	c #AAAAAA",
"*#	c #B5B5B4",
"=#	c #393938",
"-#	c #646463",
";#	c #8A8A89",
">#	c #E2E2E1",
",#	c #666664",
"'#	c #DCDCDC",
")#	c #8B8B8A",
"!#	c #B7B7B7",
"~#	c #9C9C9B",
"{#	c #80807F",
"]#	c #CDCDCD",
"^#	c #979796",
"/#	c #888887",
"(#	c #010100",
"_#	c #B7B7B6",
":#	c #8D8D8C",
"<#	c #3B3B39",
"[#	c #939392",
"}#	c #AFAFAE",
"|#	c #444442",
"1#	c #F3F3F3",
"2#	c #474746",
"3#	c #626261",
"4#	c #585856",
"5#	c #A1A1A0",
"6#	c #A4A4A3",
"7#	c #555553",
"8#	c #E1E1E1",
"9#	c #8C8C8B",
"0#	c #EFEFEF",
"a#	c #A4A4A4",
"b#	c #A9A9A8",
"c#	c #929291",
"d#	c #E0E0E0",
"e#	c #6F6F6D",
"f#	c #ECECEC",
"g#	c #F1F1F1",
"h#	c #818180",
"i#	c #DADADA",
"j#	c #7E7E7D",
"k#	c #9F9F9E",
"l#	c #9C9C9C",
"m#	c #8F8F8E",
"n#	c #CACACA",
"o#	c #BCBCBC",
"p#	c #E5E5E5",
"q#	c #6A6A69",
"r#	c #7C7C7B",
"s#	c #A7A7A6",
"t#	c #D8D8D8",
"u#	c #9A9A99",
"v#	c #CDCDCC",
"w#	c #A0A09F",
"x#	c #F0F0F0",
"y#	c #FFFFFE",
"z#	c #FDFDFC",
"A#	c #FEFEFD",
"B#	c #F6F6F6",
"                                                                                                ",
"                                                                                                ",
"                                                                                                ",
"                          .                                                                     ",
"                        . . . . . . . . . . . . . . . . . . . . . . . .                         ",
"                      . . . . . . . . . . . . . . . . . . . . . . . . . .                       ",
"                    . . . . . . . . . . . . . . . . . . . . . . . . . . . .                     ",
"                    . . . . . . . . . . . . . . . . . . . . . . . . . . . .                     ",
"                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                   ",
"                  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                   ",
"                + @ @ @ @ @ . . . . . . . . . . . . . . . # # # # # $ $ $ $ $ .                 ",
"                . . . . . . + . . . . . . . . . . . . . $ . . . . . . . . . . .                 ",
"              . % & * = - ; + . . . . . . . . . . . . . > , ' ) ) ! ~ { ] { ^ / .               ",
"            @ . ( _ : < [ } | . @ . . . . . . . . . > . 1 2 3 4 4 3 5 6 7 8 9 0 . $             ",
"            . a . b c d e f g . @ . . . . . . . . . . $ h i j 3 k l m n o p q . # .             ",
"          . . . . + r s t u v w . a . . . . . . . > . x y z A B C D E F 8 G > . . . .           ",
"          . . . H . I J K K L M N . + . . . . . + . O P Q R S T U V W l X Y . # . . .           ",
"        . . . . . a . Z `  ...+.@.. #.. . . . . a . $.%.&.*.=.-.;.>.,.'.).$ . . . . . .         ",
"        . . . . . @ . !.~.{.].^./.(.. _.. . . > . :.<.[.}.|.1.2.. $ . . . + . . . . . .         ",
"      . . . . . . . a . 3.4.5.6.7.8.. a . . . > . 9.0.a.b.c.d.. e.> > > # . . . . . . . .       ",
"    . . . . . . . . + . f.g.h.i.j.k.l.. @ . > . m.n.o.p.q.r.s.. . . . . . . . . . . . . . .     ",
"    . . . . . . . . . a . t.u.v.v.w.x.. + + . y.z.A.B.B.C.D.. E.. . . . . . . . . . . . . .     ",
"  . . . . . . . . . . . _.. F.G.H.I.J.K.. y.. L.M.N.O.P.Q.R.. > . . . . . . . . . . . . . . .   ",
"  . . . . . . . . . . . > . S.T.U.V.W.X.Y.. Z.`. +.+++@+#+$+%+. > + + + + . . . . . . . . . .   ",
"  . . . . . . . . . . . . #.. &+*+=+-+;+>+. ,+'+)+!+~+{+]+^+/+. . . . . + + . . . . . . . . .   ",
"  . . . . . . . . . . . . _.. (+_+:+<+[+}+|+1+2+3+4+5+6+7+8+9+0+. a+b+b+c+$ . . . . . . . . .   ",
"    . . . . . . . . . . . . #.. d+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+y+. # . . . . . .     ",
"    . . . . . . . . . . . . . . z+A+B+C+D+E+F+G+H+I+. J+K+L+M+N+O+P+Q+R+S+T+. a . . . . . .     ",
"      . . . . . . . . . . . . #.. U+V+W+X+Y+Z+`+ @.@. +@@@#@$@%@&@*@=@-@;@>@,@. > . . . .       ",
"        . . . . . . . . . . . . > . '@)@!@~@{@]@^@. /@. (@_@:@<@[@}@|@1@2@3@4@> . + . .         ",
"        . . . . . . # 5@. c+# . # . 6@7@8@9@0@a@b@. c+. c@d@e@f@g@h@i@j@k@l@m@n@. # . .         ",
"          . . . . . . . # . . o@5@# 5@. . . . . . . . 5@5@. . . . . . . . . . . . . .           ",
"          . . . c+. p@q@. r@s@. c+. . _.# . + t@u@v@w@. c+> x@> $ . . y@z@+ A@+ . . .           ",
"            . . c+. B@C@D@E@F@G@H@I@J@K@L@M@N@G@O@. P@Q@R@S@T@U@w@V@W@X@Y@Z@. # . .             ",
"            . . . # . `@ #.#+#@###$#%#&#*#=#-#;#>#. c+,#'#)#!#~#{#]#^#G@/#T@. . . .             ",
"              . . T@. r@(#_#:#<#[#}#|#1#2#3#4#5#6#. I@ #. w@7#8#9#0#a#b#c#. c+. .               ",
"                . # . d#e#f#g#h#9#i#[#c+q@j#k#T@l#m#n#o#. p#q#. r#/#s#. +#t#. #                 ",
"                . . . # . # . . . . . . . . . # . . . # . u#v#. w#x#. # . . . .                 ",
"                  . . # 5@y## 5@c+# z#. 5@5@z#. 5@# # A## B## . . # c+# c+. .                   ",
"                  . . . . . . . . . . . . . . . . . . . . # # . # . . . . . .                   ",
"                    . . . . . . . . . . . . . . . . . . . . . . . . . . . .                     ",
"                    . . . . . . . . . . . . . . . . . . . . . . . . . . . .                     ",
"                      . . . . . . . . . . . . . . . . . . . . . . . . . .                       ",
"                        . . . . . . . . . . . . . . . . . . . . . . . .                         ",
"                                                                    .                           ",
"                                                                                                ",
"                                                                                                ",
"                                                                                                "};
">); transform(B0,B1,B2,B3); key_xor(17,B0,B1,B2,B3); SBoxE2(unsigned __int32,B0,B1,B2,B3); transform(B0,B1,B2,B3); key_xor(18,B0,B1,B2,B3); SBoxE3(unsigned __int32,B0,B1,B2,B3); transform(B0,B1,B2,B3); key_xor(19,B0,B1,B2,B3); SBoxE4(unsigned __int32,B0,B1,B2,B3); transform(B0,B1,B2,B3); key_xor(20,B0,B1,B2,B3); SBoxE5(unsigned __int32,B0,B1,B2,B3); transform(B0,B1,B2,B3); key_xor(21,B0,B1,B2,B3); SBoxE6(unsigned __int32,B0,B1,B2,B3); transform(B0,B1,B2,B3); key_xor(22,B0,B1,B2,B3); SBoxE7(unsigned __int32,B0,B1,B2,B3); transform(B0,B1,B2,B3); key_xor(23,B0,B1,B2,B3); SBoxE8(unsigned __int32,B0,B1,B2,B3); transform(B0,B1,B2,B3); key_xor(24,B0,B1,B2,B3); SBoxE1(unsigned __int32,B0,B1,B2,B3); transform(B0,B1,B2,B3); key_xor(25,B0,B1,B2,B3); SBoxE2(unsigned __int32,B0,B1,B2,B3); transform(B0,B1,B2,B3); key_xor(26,B0,B1,B2,B3); SBoxE3(unsigned __int32,B0,B1,B2,B3); transform(B0,B1,B2,B3); key_xor(27,B0,B1,B2,B3); SBoxE4(unsigned __int32,B0,B1,B2,B3); transform(B0,B1,B2,B3); key_xor(28,B0,B1,B2,B3); SBoxE5(unsigned __int32,B0,B1,B2,B3); transform(B0,B1,B2,B3); key_xor(29,B0,B1,B2,B3); SBoxE6(unsigned __int32,B0,B1,B2,B3); transform(B0,B1,B2,B3); key_xor(30,B0,B1,B2,B3); SBoxE7(unsigned __int32,B0,B1,B2,B3); transform(B0,B1,B2,B3); key_xor(31,B0,B1,B2,B3); SBoxE8(unsigned __int32,B0,B1,B2,B3); key_xor(32,B0,B1,B2,B3); B0 = BOTAN_ENDIAN_L2N(B0); B1 = BOTAN_ENDIAN_L2N(B1); B2 = BOTAN_ENDIAN_L2N(B2); B3 = BOTAN_ENDIAN_L2N(B3); memcpy(out + 0, &B0, 4); memcpy(out + 4, &B1, 4); memcpy(out + 8, &B2, 4); memcpy(out + 12, &B3, 4); in += 16; out += 16; } } /* * Serpent Decryption */ void serpent_decrypt_blocks(const unsigned __int8* in, unsigned __int8* out, size_t blocks, unsigned __int8 *ks) { unsigned __int32 B0, B1, B2, B3; unsigned __int32* round_key = ((unsigned __int32*) ks) + 8; size_t i; #if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE && (!defined (DEBUG) || !defined (TC_WINDOWS_DRIVER)) if(HasSSE2() && (blocks >= 4)) { while(blocks >= 4) { serpent_simd_decrypt_blocks_4(in, out, round_key); in += 4 * 16; out += 4 * 16; blocks -= 4; } } #endif for(i = 0; i != blocks; ++i) { memcpy (&B0, in + 0, 4); memcpy (&B1, in + 4, 4); memcpy (&B2, in + 8, 4); memcpy (&B3, in + 12, 4); B0 = BOTAN_ENDIAN_N2L (B0); B1 = BOTAN_ENDIAN_N2L (B1); B2 = BOTAN_ENDIAN_N2L (B2); B3 = BOTAN_ENDIAN_N2L (B3); key_xor(32,B0,B1,B2,B3); SBoxD8(unsigned __int32,B0,B1,B2,B3); key_xor(31,B0,B1,B2,B3); i_transform(B0,B1,B2,B3); SBoxD7(unsigned __int32,B0,B1,B2,B3); key_xor(30,B0,B1,B2,B3); i_transform(B0,B1,B2,B3); SBoxD6(unsigned __int32,B0,B1,B2,B3); key_xor(29,B0,B1,B2,B3); i_transform(B0,B1,B2,B3); SBoxD5(unsigned __int32,B0,B1,B2,B3); key_xor(28,B0,B1,B2,B3); i_transform(B0,B1,B2,B3); SBoxD4(unsigned __int32,B0,B1,B2,B3); key_xor(27,B0,B1,B2,B3); i_transform(B0,B1,B2,B3); SBoxD3(unsigned __int32,B0,B1,B2,B3); key_xor(26,B0,B1,B2,B3); i_transform(B0,B1,B2,B3); SBoxD2(unsigned __int32,B0,B1,B2,B3); key_xor(25,B0,B1,B2,B3); i_transform(B0,B1,B2,B3); SBoxD1(unsigned __int32,B0,B1,B2,B3); key_xor(24,B0,B1,B2,B3); i_transform(B0,B1,B2,B3); SBoxD8(unsigned __int32,B0,B1,B2,B3); key_xor(23,B0,B1,B2,B3); i_transform(B0,B1,B2,B3); SBoxD7(unsigned __int32,B0,B1,B2,B3); key_xor(22,B0,B1,B2,B3); i_transform(B0,B1,B2,B3); SBoxD6(unsigned __int32,B0,B1,B2,B3); key_xor(21,B0,B1,B2,B3); i_transform(B0,B1,B2,B3); SBoxD5(unsigned __int32,B0,B1,B2,B3); key_xor(20,B0,B1,B2,B3); i_transform(B0,B1,B2,B3); SBoxD4(unsigned __int32,B0,B1,B2,B3); key_xor(19,B0,B1,B2,B3); i_transform(B0,B1,B2,B3); SBoxD3(unsigned __int32,B0,B1,B2,B3); key_xor(18,B0,B1,B2,B3); i_transform(B0,B1,B2,B3); SBoxD2(unsigned __int32,B0,B1,B2,B3); key_xor(17,B0,B1,B2,B3); i_transform(B0,B1,B2,B3); SBoxD1(unsigned __int32,B0,B1,B2,B3); key_xor(16,B0,B1,B2,B3); i_transform(B0,B1,B2,B3); SBoxD8(unsigned __int32,B0,B1,B2,B3); key_xor(15,B0,B1,B2,B3); i_transform(B0,B1,B2,B3); SBoxD7(unsigned __int32,B0,B1,B2,B3); key_xor(14,B0,B1,B2,B3); i_transform(B0,B1,B2,B3); SBoxD6(unsigned __int32,B0,B1,B2,B3); key_xor(13,B0,B1,B2,B3); i_transform(B0,B1,B2,B3); SBoxD5(unsigned __int32,B0,B1,B2,B3); key_xor(12,B0,B1,B2,B3); i_transform(B0,B1,B2,B3); SBoxD4(unsigned __int32,B0,B1,B2,B3); key_xor(11,B0,B1,B2,B3); i_transform(B0,B1,B2,B3); SBoxD3(unsigned __int32,B0,B1,B2,B3); key_xor(10,B0,B1,B2,B3); i_transform(B0,B1,B2,B3); SBoxD2(unsigned __int32,B0,B1,B2,B3); key_xor( 9,B0,B1,B2,B3); i_transform(B0,B1,B2,B3); SBoxD1(unsigned __int32,B0,B1,B2,B3); key_xor( 8,B0,B1,B2,B3); i_transform(B0,B1,B2,B3); SBoxD8(unsigned __int32,B0,B1,B2,B3); key_xor( 7,B0,B1,B2,B3); i_transform(B0,B1,B2,B3); SBoxD7(unsigned __int32,B0,B1,B2,B3); key_xor( 6,B0,B1,B2,B3); i_transform(B0,B1,B2,B3); SBoxD6(unsigned __int32,B0,B1,B2,B3); key_xor( 5,B0,B1,B2,B3); i_transform(B0,B1,B2,B3); SBoxD5(unsigned __int32,B0,B1,B2,B3); key_xor( 4,B0,B1,B2,B3); i_transform(B0,B1,B2,B3); SBoxD4(unsigned __int32,B0,B1,B2,B3); key_xor( 3,B0,B1,B2,B3); i_transform(B0,B1,B2,B3); SBoxD3(unsigned __int32,B0,B1,B2,B3); key_xor( 2,B0,B1,B2,B3); i_transform(B0,B1,B2,B3); SBoxD2(unsigned __int32,B0,B1,B2,B3); key_xor( 1,B0,B1,B2,B3); i_transform(B0,B1,B2,B3); SBoxD1(unsigned __int32,B0,B1,B2,B3); key_xor( 0,B0,B1,B2,B3); B0 = BOTAN_ENDIAN_L2N(B0); B1 = BOTAN_ENDIAN_L2N(B1); B2 = BOTAN_ENDIAN_L2N(B2); B3 = BOTAN_ENDIAN_L2N(B3); memcpy(out + 0, &B0, 4); memcpy(out + 4, &B1, 4); memcpy(out + 8, &B2, 4); memcpy(out + 12, &B3, 4); in += 16; out += 16; } } #undef key_xor #undef transform #undef i_transform /* * Serpent Key Schedule */ void serpent_set_key(const unsigned __int8 userKey[], unsigned __int8 *ks) { const unsigned __int32 PHI = 0x9E3779B9; unsigned __int32* W = (unsigned __int32*) ks; int i; for(i = 0; i != 8; ++i) { memcpy (W + i, userKey + (i*4), 4); W[i] = BOTAN_ENDIAN_N2L(W[i]); } for(i = 8; i != 140; ++i) { unsigned __int32 wi = W[i-8] ^ W[i-5] ^ W[i-3] ^ W[i-1] ^ PHI ^ (unsigned __int32)(i-8); W[i] = rotl32(wi, 11); } SBoxE4(unsigned __int32,W[ 8],W[ 9],W[ 10],W[ 11]); SBoxE3(unsigned __int32,W[ 12],W[ 13],W[ 14],W[ 15]); SBoxE2(unsigned __int32,W[ 16],W[ 17],W[ 18],W[ 19]); SBoxE1(unsigned __int32,W[ 20],W[ 21],W[ 22],W[ 23]); SBoxE8(unsigned __int32,W[ 24],W[ 25],W[ 26],W[ 27]); SBoxE7(unsigned __int32,W[ 28],W[ 29],W[ 30],W[ 31]); SBoxE6(unsigned __int32,W[ 32],W[ 33],W[ 34],W[ 35]); SBoxE5(unsigned __int32,W[ 36],W[ 37],W[ 38],W[ 39]); SBoxE4(unsigned __int32,W[ 40],W[ 41],W[ 42],W[ 43]); SBoxE3(unsigned __int32,W[ 44],W[ 45],W[ 46],W[ 47]); SBoxE2(unsigned __int32,W[ 48],W[ 49],W[ 50],W[ 51]); SBoxE1(unsigned __int32,W[ 52],W[ 53],W[ 54],W[ 55]); SBoxE8(unsigned __int32,W[ 56],W[ 57],W[ 58],W[ 59]); SBoxE7(unsigned __int32,W[ 60],W[ 61],W[ 62],W[ 63]); SBoxE6(unsigned __int32,W[ 64],W[ 65],W[ 66],W[ 67]); SBoxE5(unsigned __int32,W[ 68],W[ 69],W[ 70],W[ 71]); SBoxE4(unsigned __int32,W[ 72],W[ 73],W[ 74],W[ 75]); SBoxE3(unsigned __int32,W[ 76],W[ 77],W[ 78],W[ 79]); SBoxE2(unsigned __int32,W[ 80],W[ 81],W[ 82],W[ 83]); SBoxE1(unsigned __int32,W[ 84],W[ 85],W[ 86],W[ 87]); SBoxE8(unsigned __int32,W[ 88],W[ 89],W[ 90],W[ 91]); SBoxE7(unsigned __int32,W[ 92],W[ 93],W[ 94],W[ 95]); SBoxE6(unsigned __int32,W[ 96],W[ 97],W[ 98],W[ 99]); SBoxE5(unsigned __int32,W[100],W[101],W[102],W[103]); SBoxE4(unsigned __int32,W[104],W[105],W[106],W[107]); SBoxE3(unsigned __int32,W[108],W[109],W[110],W[111]); SBoxE2(unsigned __int32,W[112],W[113],W[114],W[115]); SBoxE1(unsigned __int32,W[116],W[117],W[118],W[119]); SBoxE8(unsigned __int32,W[120],W[121],W[122],W[123]); SBoxE7(unsigned __int32,W[124],W[125],W[126],W[127]); SBoxE6(unsigned __int32,W[128],W[129],W[130],W[131]); SBoxE5(unsigned __int32,W[132],W[133],W[134],W[135]); SBoxE4(unsigned __int32,W[136],W[137],W[138],W[139]); }