author | Giulio Cesare Solaroli <giulio.cesare@clipperz.com> | 2011-10-02 23:56:18 (UTC) |
---|---|---|
committer | Giulio Cesare Solaroli <giulio.cesare@clipperz.com> | 2011-10-02 23:56:18 (UTC) |
commit | ef68436ac04da078ffdcacd7e1f785473a303d45 (patch) (unidiff) | |
tree | c403752d66a2c4775f00affd4fa8431b29c5b68c /frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js | |
parent | 597ecfbc0249d83e1b856cbd558340c01237a360 (diff) | |
download | clipperz-ef68436ac04da078ffdcacd7e1f785473a303d45.zip clipperz-ef68436ac04da078ffdcacd7e1f785473a303d45.tar.gz clipperz-ef68436ac04da078ffdcacd7e1f785473a303d45.tar.bz2 |
First version of the newly restructured repository
Diffstat (limited to 'frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js') (more/less context) (show whitespace changes)
-rw-r--r-- | frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js | 526 |
1 files changed, 526 insertions, 0 deletions
diff --git a/frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js b/frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js new file mode 100644 index 0000000..a649c9f --- a/dev/null +++ b/frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js | |||
@@ -0,0 +1,526 @@ | |||
1 | /* | ||
2 | |||
3 | Copyright 2008-2011 Clipperz Srl | ||
4 | |||
5 | This file is part of Clipperz's Javascript Crypto Library. | ||
6 | Javascript Crypto Library provides web developers with an extensive | ||
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | ||
11 | refer to http://www.clipperz.com | ||
12 | |||
13 | * Javascript Crypto Library is free software: you can redistribute | ||
14 | it and/or modify it under the terms of the GNU Affero General Public | ||
15 | License as published by the Free Software Foundation, either version | ||
16 | 3 of the License, or (at your option) any later version. | ||
17 | |||
18 | * Javascript Crypto Library is distributed in the hope that it will | ||
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | ||
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
21 | See the GNU Affero General Public License for more details. | ||
22 | |||
23 | * You should have received a copy of the GNU Affero General Public | ||
24 | License along with Javascript Crypto Library. If not, see | ||
25 | <http://www.gnu.org/licenses/>. | ||
26 | |||
27 | */ | ||
28 | |||
29 | //try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { | ||
30 | //throw "Clipperz.Crypto.ECC depends on Clipperz.ByteArray!"; | ||
31 | //} | ||
32 | if (typeof(Clipperz.Crypto.ECC) == 'undefined') { Clipperz.Crypto.ECC = {}; } | ||
33 | if (typeof(Clipperz.Crypto.ECC.BinaryField) == 'undefined') { Clipperz.Crypto.ECC.BinaryField = {}; } | ||
34 | |||
35 | Clipperz.Crypto.ECC.BinaryField.FiniteField = function(args) { | ||
36 | args = args || {}; | ||
37 | this._modulus = args.modulus; | ||
38 | |||
39 | return this; | ||
40 | } | ||
41 | |||
42 | Clipperz.Crypto.ECC.BinaryField.FiniteField.prototype = MochiKit.Base.update(null, { | ||
43 | |||
44 | 'asString': function() { | ||
45 | return "Clipperz.Crypto.ECC.BinaryField.FiniteField (" + this.modulus().asString() + ")"; | ||
46 | }, | ||
47 | |||
48 | //----------------------------------------------------------------------------- | ||
49 | |||
50 | 'modulus': function() { | ||
51 | return this._modulus; | ||
52 | }, | ||
53 | |||
54 | //----------------------------------------------------------------------------- | ||
55 | |||
56 | '_module': function(aValue) { | ||
57 | varresult; | ||
58 | var modulusComparison; | ||
59 | //console.log(">>> binaryField.finiteField.(standard)module"); | ||
60 | |||
61 | modulusComparison = Clipperz.Crypto.ECC.BinaryField.Value._compare(aValue, this.modulus()._value); | ||
62 | |||
63 | if (modulusComparison < 0) { | ||
64 | result = aValue; | ||
65 | } else if (modulusComparison == 0) { | ||
66 | result = [0]; | ||
67 | } else { | ||
68 | var modulusBitSize; | ||
69 | var resultBitSize; | ||
70 | |||
71 | result = aValue; | ||
72 | |||
73 | modulusBitSize = this.modulus().bitSize(); | ||
74 | resultBitSize = Clipperz.Crypto.ECC.BinaryField.Value._bitSize(result); | ||
75 | while (resultBitSize >= modulusBitSize) { | ||
76 | Clipperz.Crypto.ECC.BinaryField.Value._overwriteXor(result, Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft(this.modulus()._value, resultBitSize - modulusBitSize)); | ||
77 | resultBitSize = Clipperz.Crypto.ECC.BinaryField.Value._bitSize(result); | ||
78 | } | ||
79 | } | ||
80 | //console.log("<<< binaryField.finiteField.(standard)module"); | ||
81 | |||
82 | return result; | ||
83 | }, | ||
84 | |||
85 | 'module': function(aValue) { | ||
86 | return new Clipperz.Crypto.ECC.BinaryField.Value(this._module(aValue._value.slice(0))); | ||
87 | }, | ||
88 | |||
89 | //----------------------------------------------------------------------------- | ||
90 | |||
91 | '_add': function(a, b) { | ||
92 | return Clipperz.Crypto.ECC.BinaryField.Value._xor(a, b); | ||
93 | }, | ||
94 | |||
95 | '_overwriteAdd': function(a, b) { | ||
96 | Clipperz.Crypto.ECC.BinaryField.Value._overwriteXor(a, b); | ||
97 | }, | ||
98 | |||
99 | 'add': function(a, b) { | ||
100 | return new Clipperz.Crypto.ECC.BinaryField.Value(this._add(a._value, b._value)); | ||
101 | }, | ||
102 | |||
103 | //----------------------------------------------------------------------------- | ||
104 | |||
105 | 'negate': function(aValue) { | ||
106 | return aValue.clone(); | ||
107 | }, | ||
108 | |||
109 | //----------------------------------------------------------------------------- | ||
110 | |||
111 | '_multiply': function(a, b) { | ||
112 | var result; | ||
113 | var valueToXor; | ||
114 | var i,c; | ||
115 | |||
116 | result = [0]; | ||
117 | valueToXor = b; | ||
118 | c = Clipperz.Crypto.ECC.BinaryField.Value._bitSize(a); | ||
119 | for (i=0; i<c; i++) { | ||
120 | if (Clipperz.Crypto.ECC.BinaryField.Value._isBitSet(a, i) === true) { | ||
121 | Clipperz.Crypto.ECC.BinaryField.Value._overwriteXor(result, valueToXor); | ||
122 | } | ||
123 | valueToXor = Clipperz.Crypto.ECC.BinaryField.Value._overwriteShiftLeft(valueToXor, 1); | ||
124 | } | ||
125 | result = this._module(result); | ||
126 | |||
127 | return result; | ||
128 | }, | ||
129 | |||
130 | 'multiply': function(a, b) { | ||
131 | return new Clipperz.Crypto.ECC.BinaryField.Value(this._multiply(a._value, b._value)); | ||
132 | }, | ||
133 | |||
134 | //----------------------------------------------------------------------------- | ||
135 | |||
136 | '_fastMultiply': function(a, b) { | ||
137 | var result; | ||
138 | var B; | ||
139 | var i,c; | ||
140 | |||
141 | result = [0]; | ||
142 | B = b.slice(0); //Is this array copy avoidable? | ||
143 | c = 32; | ||
144 | for (i=0; i<c; i++) { | ||
145 | var ii, cc; | ||
146 | |||
147 | cc = a.length; | ||
148 | for (ii=0; ii<cc; ii++) { | ||
149 | if (((a[ii] >>> i) & 0x01) == 1) { | ||
150 | Clipperz.Crypto.ECC.BinaryField.Value._overwriteXor(result, B, ii); | ||
151 | } | ||
152 | } | ||
153 | |||
154 | if (i < (c-1)) { | ||
155 | B = Clipperz.Crypto.ECC.BinaryField.Value._overwriteShiftLeft(B, 1); | ||
156 | } | ||
157 | } | ||
158 | result = this._module(result); | ||
159 | |||
160 | return result; | ||
161 | }, | ||
162 | |||
163 | 'fastMultiply': function(a, b) { | ||
164 | return new Clipperz.Crypto.ECC.BinaryField.Value(this._fastMultiply(a._value, b._value)); | ||
165 | }, | ||
166 | |||
167 | //----------------------------------------------------------------------------- | ||
168 | // | ||
169 | //Guide to Elliptic Curve Cryptography | ||
170 | //Darrel Hankerson, Alfred Menezes, Scott Vanstone | ||
171 | //- Pag: 49, Alorithm 2.34 | ||
172 | // | ||
173 | //----------------------------------------------------------------------------- | ||
174 | |||
175 | '_square': function(aValue) { | ||
176 | var result; | ||
177 | var value; | ||
178 | var c,i; | ||
179 | var precomputedValues; | ||
180 | |||
181 | value = aValue; | ||
182 | result = new Array(value.length * 2); | ||
183 | precomputedValues = Clipperz.Crypto.ECC.BinaryField.FiniteField.squarePrecomputedBytes; | ||
184 | |||
185 | c = value.length; | ||
186 | for (i=0; i<c; i++) { | ||
187 | result[i*2] = precomputedValues[(value[i] & 0x000000ff)]; | ||
188 | result[i*2] |= ((precomputedValues[(value[i] & 0x0000ff00) >>> 8]) << 16); | ||
189 | |||
190 | result[i*2 + 1] = precomputedValues[(value[i] & 0x00ff0000) >>> 16]; | ||
191 | result[i*2 + 1] |= ((precomputedValues[(value[i] & 0xff000000) >>> 24]) << 16); | ||
192 | } | ||
193 | |||
194 | return this._module(result); | ||
195 | }, | ||
196 | |||
197 | 'square': function(aValue) { | ||
198 | return new Clipperz.Crypto.ECC.BinaryField.Value(this._square(aValue._value)); | ||
199 | }, | ||
200 | |||
201 | //----------------------------------------------------------------------------- | ||
202 | |||
203 | '_inverse': function(aValue) { | ||
204 | varresult; | ||
205 | var b, c; | ||
206 | var u, v; | ||
207 | |||
208 | // b = Clipperz.Crypto.ECC.BinaryField.Value.I._value; | ||
209 | b = [1]; | ||
210 | // c = Clipperz.Crypto.ECC.BinaryField.Value.O._value; | ||
211 | c = [0]; | ||
212 | u = this._module(aValue); | ||
213 | v = this.modulus()._value.slice(0); | ||
214 | |||
215 | while (Clipperz.Crypto.ECC.BinaryField.Value._bitSize(u) > 1) { | ||
216 | varbitDifferenceSize; | ||
217 | |||
218 | bitDifferenceSize = Clipperz.Crypto.ECC.BinaryField.Value._bitSize(u) - Clipperz.Crypto.ECC.BinaryField.Value._bitSize(v); | ||
219 | if (bitDifferenceSize < 0) { | ||
220 | var swap; | ||
221 | |||
222 | swap = u; | ||
223 | u = v; | ||
224 | v = swap; | ||
225 | |||
226 | swap = c; | ||
227 | c = b; | ||
228 | b = swap; | ||
229 | |||
230 | bitDifferenceSize = -bitDifferenceSize; | ||
231 | } | ||
232 | |||
233 | u = this._add(u, Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft(v, bitDifferenceSize)); | ||
234 | b = this._add(b, Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft(c, bitDifferenceSize)); | ||
235 | // this._overwriteAdd(u, Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft(v, bitDifferenceSize)); | ||
236 | // this._overwriteAdd(b, Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft(c, bitDifferenceSize)); | ||
237 | } | ||
238 | |||
239 | result = this._module(b); | ||
240 | |||
241 | return result; | ||
242 | }, | ||
243 | |||
244 | 'inverse': function(aValue) { | ||
245 | return new Clipperz.Crypto.ECC.BinaryField.Value(this._inverse(aValue._value)); | ||
246 | }, | ||
247 | |||
248 | //----------------------------------------------------------------------------- | ||
249 | __syntaxFix__: "syntax fix" | ||
250 | }); | ||
251 | |||
252 | |||
253 | Clipperz.Crypto.ECC.BinaryField.FiniteField.squarePrecomputedBytes = [ | ||
254 | 0x0000, // 0 = 0000 0000 -> 0000 0000 0000 0000 | ||
255 | 0x0001, // 1 = 0000 0001 -> 0000 0000 0000 0001 | ||
256 | 0x0004, // 2 = 0000 0010 -> 0000 0000 0000 0100 | ||
257 | 0x0005, // 3 = 0000 0011 -> 0000 0000 0000 0101 | ||
258 | 0x0010, // 4 = 0000 0100 -> 0000 0000 0001 0000 | ||
259 | 0x0011, // 5 = 0000 0101 -> 0000 0000 0001 0001 | ||
260 | 0x0014, // 6 = 0000 0110 -> 0000 0000 0001 0100 | ||
261 | 0x0015, // 7 = 0000 0111 -> 0000 0000 0001 0101 | ||
262 | 0x0040, // 8 = 0000 1000 -> 0000 0000 0100 0000 | ||
263 | 0x0041, // 9 = 0000 1001 -> 0000 0000 0100 0001 | ||
264 | 0x0044, // 10 = 0000 1010 -> 0000 0000 0100 0100 | ||
265 | 0x0045, // 11 = 0000 1011 -> 0000 0000 0100 0101 | ||
266 | 0x0050, // 12 = 0000 1100 -> 0000 0000 0101 0000 | ||
267 | 0x0051, // 13 = 0000 1101 -> 0000 0000 0101 0001 | ||
268 | 0x0054, // 14 = 0000 1110 -> 0000 0000 0101 0100 | ||
269 | 0x0055, // 15 = 0000 1111 -> 0000 0000 0101 0101 | ||
270 | |||
271 | 0x0100, // 16 = 0001 0000 -> 0000 0001 0000 0000 | ||
272 | 0x0101, // 17 = 0001 0001 -> 0000 0001 0000 0001 | ||
273 | 0x0104, // 18 = 0001 0010 -> 0000 0001 0000 0100 | ||
274 | 0x0105, // 19 = 0001 0011 -> 0000 0001 0000 0101 | ||
275 | 0x0110, // 20 = 0001 0100 -> 0000 0001 0001 0000 | ||
276 | 0x0111, // 21 = 0001 0101 -> 0000 0001 0001 0001 | ||
277 | 0x0114, // 22 = 0001 0110 -> 0000 0001 0001 0100 | ||
278 | 0x0115, // 23 = 0001 0111 -> 0000 0001 0001 0101 | ||
279 | 0x0140, // 24 = 0001 1000 -> 0000 0001 0100 0000 | ||
280 | 0x0141, // 25 = 0001 1001 -> 0000 0001 0100 0001 | ||
281 | 0x0144, // 26 = 0001 1010 -> 0000 0001 0100 0100 | ||
282 | 0x0145, // 27 = 0001 1011 -> 0000 0001 0100 0101 | ||
283 | 0x0150, // 28 = 0001 1100 -> 0000 0001 0101 0000 | ||
284 | 0x0151, // 28 = 0001 1101 -> 0000 0001 0101 0001 | ||
285 | 0x0154, // 30 = 0001 1110 -> 0000 0001 0101 0100 | ||
286 | 0x0155, // 31 = 0001 1111 -> 0000 0001 0101 0101 | ||
287 | |||
288 | 0x0400, // 32 = 0010 0000 -> 0000 0100 0000 0000 | ||
289 | 0x0401, // 33 = 0010 0001 -> 0000 0100 0000 0001 | ||
290 | 0x0404, // 34 = 0010 0010 -> 0000 0100 0000 0100 | ||
291 | 0x0405, // 35 = 0010 0011 -> 0000 0100 0000 0101 | ||
292 | 0x0410, // 36 = 0010 0100 -> 0000 0100 0001 0000 | ||
293 | 0x0411, // 37 = 0010 0101 -> 0000 0100 0001 0001 | ||
294 | 0x0414, // 38 = 0010 0110 -> 0000 0100 0001 0100 | ||
295 | 0x0415, // 39 = 0010 0111 -> 0000 0100 0001 0101 | ||
296 | 0x0440, // 40 = 0010 1000 -> 0000 0100 0100 0000 | ||
297 | 0x0441, // 41 = 0010 1001 -> 0000 0100 0100 0001 | ||
298 | 0x0444, // 42 = 0010 1010 -> 0000 0100 0100 0100 | ||
299 | 0x0445, // 43 = 0010 1011 -> 0000 0100 0100 0101 | ||
300 | 0x0450, // 44 = 0010 1100 -> 0000 0100 0101 0000 | ||
301 | 0x0451, // 45 = 0010 1101 -> 0000 0100 0101 0001 | ||
302 | 0x0454, // 46 = 0010 1110 -> 0000 0100 0101 0100 | ||
303 | 0x0455, // 47 = 0010 1111 -> 0000 0100 0101 0101 | ||
304 | |||
305 | 0x0500, // 48 = 0011 0000 -> 0000 0101 0000 0000 | ||
306 | 0x0501, // 49 = 0011 0001 -> 0000 0101 0000 0001 | ||
307 | 0x0504, // 50 = 0011 0010 -> 0000 0101 0000 0100 | ||
308 | 0x0505, // 51 = 0011 0011 -> 0000 0101 0000 0101 | ||
309 | 0x0510, // 52 = 0011 0100 -> 0000 0101 0001 0000 | ||
310 | 0x0511, // 53 = 0011 0101 -> 0000 0101 0001 0001 | ||
311 | 0x0514, // 54 = 0011 0110 -> 0000 0101 0001 0100 | ||
312 | 0x0515, // 55 = 0011 0111 -> 0000 0101 0001 0101 | ||
313 | 0x0540, // 56 = 0011 1000 -> 0000 0101 0100 0000 | ||
314 | 0x0541, // 57 = 0011 1001 -> 0000 0101 0100 0001 | ||
315 | 0x0544, // 58 = 0011 1010 -> 0000 0101 0100 0100 | ||
316 | 0x0545, // 59 = 0011 1011 -> 0000 0101 0100 0101 | ||
317 | 0x0550, // 60 = 0011 1100 -> 0000 0101 0101 0000 | ||
318 | 0x0551, // 61 = 0011 1101 -> 0000 0101 0101 0001 | ||
319 | 0x0554, // 62 = 0011 1110 -> 0000 0101 0101 0100 | ||
320 | 0x0555, // 63 = 0011 1111 -> 0000 0101 0101 0101 | ||
321 | |||
322 | 0x1000, // 64 = 0100 0000 -> 0001 0000 0000 0000 | ||
323 | 0x1001, // 65 = 0100 0001 -> 0001 0000 0000 0001 | ||
324 | 0x1004, // 66 = 0100 0010 -> 0001 0000 0000 0100 | ||
325 | 0x1005, // 67 = 0100 0011 -> 0001 0000 0000 0101 | ||
326 | 0x1010, // 68 = 0100 0100 -> 0001 0000 0001 0000 | ||
327 | 0x1011, // 69 = 0100 0101 -> 0001 0000 0001 0001 | ||
328 | 0x1014, // 70 = 0100 0110 -> 0001 0000 0001 0100 | ||
329 | 0x1015, // 71 = 0100 0111 -> 0001 0000 0001 0101 | ||
330 | 0x1040, // 72 = 0100 1000 -> 0001 0000 0100 0000 | ||
331 | 0x1041, // 73 = 0100 1001 -> 0001 0000 0100 0001 | ||
332 | 0x1044, // 74 = 0100 1010 -> 0001 0000 0100 0100 | ||
333 | 0x1045, // 75 = 0100 1011 -> 0001 0000 0100 0101 | ||
334 | 0x1050, // 76 = 0100 1100 -> 0001 0000 0101 0000 | ||
335 | 0x1051, // 77 = 0100 1101 -> 0001 0000 0101 0001 | ||
336 | 0x1054, // 78 = 0100 1110 -> 0001 0000 0101 0100 | ||
337 | 0x1055, // 79 = 0100 1111 -> 0001 0000 0101 0101 | ||
338 | |||
339 | 0x1100, // 80 = 0101 0000 -> 0001 0001 0000 0000 | ||
340 | 0x1101, // 81 = 0101 0001 -> 0001 0001 0000 0001 | ||
341 | 0x1104, // 82 = 0101 0010 -> 0001 0001 0000 0100 | ||
342 | 0x1105, // 83 = 0101 0011 -> 0001 0001 0000 0101 | ||
343 | 0x1110, // 84 = 0101 0100 -> 0001 0001 0001 0000 | ||
344 | 0x1111, // 85 = 0101 0101 -> 0001 0001 0001 0001 | ||
345 | 0x1114, // 86 = 0101 0110 -> 0001 0001 0001 0100 | ||
346 | 0x1115, // 87 = 0101 0111 -> 0001 0001 0001 0101 | ||
347 | 0x1140, // 88 = 0101 1000 -> 0001 0001 0100 0000 | ||
348 | 0x1141, // 89 = 0101 1001 -> 0001 0001 0100 0001 | ||
349 | 0x1144, // 90 = 0101 1010 -> 0001 0001 0100 0100 | ||
350 | 0x1145, // 91 = 0101 1011 -> 0001 0001 0100 0101 | ||
351 | 0x1150, // 92 = 0101 1100 -> 0001 0001 0101 0000 | ||
352 | 0x1151, // 93 = 0101 1101 -> 0001 0001 0101 0001 | ||
353 | 0x1154, // 94 = 0101 1110 -> 0001 0001 0101 0100 | ||
354 | 0x1155, // 95 = 0101 1111 -> 0001 0001 0101 0101 | ||
355 | |||
356 | 0x1400, // 96 = 0110 0000 -> 0001 0100 0000 0000 | ||
357 | 0x1401, // 97 = 0110 0001 -> 0001 0100 0000 0001 | ||
358 | 0x1404, // 98 = 0110 0010 -> 0001 0100 0000 0100 | ||
359 | 0x1405, // 99 = 0110 0011 -> 0001 0100 0000 0101 | ||
360 | 0x1410, //100 = 0110 0100 -> 0001 0100 0001 0000 | ||
361 | 0x1411, //101 = 0110 0101 -> 0001 0100 0001 0001 | ||
362 | 0x1414, //102 = 0110 0110 -> 0001 0100 0001 0100 | ||
363 | 0x1415, //103 = 0110 0111 -> 0001 0100 0001 0101 | ||
364 | 0x1440, //104 = 0110 1000 -> 0001 0100 0100 0000 | ||
365 | 0x1441, //105 = 0110 1001 -> 0001 0100 0100 0001 | ||
366 | 0x1444, //106 = 0110 1010 -> 0001 0100 0100 0100 | ||
367 | 0x1445, //107 = 0110 1011 -> 0001 0100 0100 0101 | ||
368 | 0x1450, //108 = 0110 1100 -> 0001 0100 0101 0000 | ||
369 | 0x1451, //109 = 0110 1101 -> 0001 0100 0101 0001 | ||
370 | 0x1454, //110 = 0110 1110 -> 0001 0100 0101 0100 | ||
371 | 0x1455, //111 = 0110 1111 -> 0001 0100 0101 0101 | ||
372 | |||
373 | 0x1500, //112 = 0111 0000 -> 0001 0101 0000 0000 | ||
374 | 0x1501, //113 = 0111 0001 -> 0001 0101 0000 0001 | ||
375 | 0x1504, //114 = 0111 0010 -> 0001 0101 0000 0100 | ||
376 | 0x1505, //115 = 0111 0011 -> 0001 0101 0000 0101 | ||
377 | 0x1510, //116 = 0111 0100 -> 0001 0101 0001 0000 | ||
378 | 0x1511, //117 = 0111 0101 -> 0001 0101 0001 0001 | ||
379 | 0x1514, //118 = 0111 0110 -> 0001 0101 0001 0100 | ||
380 | 0x1515, //119 = 0111 0111 -> 0001 0101 0001 0101 | ||
381 | 0x1540, //120 = 0111 1000 -> 0001 0101 0100 0000 | ||
382 | 0x1541, //121 = 0111 1001 -> 0001 0101 0100 0001 | ||
383 | 0x1544, //122 = 0111 1010 -> 0001 0101 0100 0100 | ||
384 | 0x1545, //123 = 0111 1011 -> 0001 0101 0100 0101 | ||
385 | 0x1550, //124 = 0111 1100 -> 0001 0101 0101 0000 | ||
386 | 0x1551, //125 = 0111 1101 -> 0001 0101 0101 0001 | ||
387 | 0x1554, //126 = 0111 1110 -> 0001 0101 0101 0100 | ||
388 | 0x1555, //127 = 0111 1111 -> 0001 0101 0101 0101 | ||
389 | |||
390 | 0x4000, //128 = 1000 0000 -> 0100 0000 0000 0000 | ||
391 | 0x4001, //129 = 1000 0001 -> 0100 0000 0000 0001 | ||
392 | 0x4004, //130 = 1000 0010 -> 0100 0000 0000 0100 | ||
393 | 0x4005, //131 = 1000 0011 -> 0100 0000 0000 0101 | ||
394 | 0x4010, //132 = 1000 0100 -> 0100 0000 0001 0000 | ||
395 | 0x4011, //133 = 1000 0101 -> 0100 0000 0001 0001 | ||
396 | 0x4014, //134 = 1000 0110 -> 0100 0000 0001 0100 | ||
397 | 0x4015, //135 = 1000 0111 -> 0100 0000 0001 0101 | ||
398 | 0x4040, //136 = 1000 1000 -> 0100 0000 0100 0000 | ||
399 | 0x4041, //137 = 1000 1001 -> 0100 0000 0100 0001 | ||
400 | 0x4044, //138 = 1000 1010 -> 0100 0000 0100 0100 | ||
401 | 0x4045, //139 = 1000 1011 -> 0100 0000 0100 0101 | ||
402 | 0x4050, //140 = 1000 1100 -> 0100 0000 0101 0000 | ||
403 | 0x4051, //141 = 1000 1101 -> 0100 0000 0101 0001 | ||
404 | 0x4054, //142 = 1000 1110 -> 0100 0000 0101 0100 | ||
405 | 0x4055, //143 = 1000 1111 -> 0100 0000 0101 0101 | ||
406 | |||
407 | 0x4100, //144 = 1001 0000 -> 0100 0001 0000 0000 | ||
408 | 0x4101, //145 = 1001 0001 -> 0100 0001 0000 0001 | ||
409 | 0x4104, //146 = 1001 0010 -> 0100 0001 0000 0100 | ||
410 | 0x4105, //147 = 1001 0011 -> 0100 0001 0000 0101 | ||
411 | 0x4110, //148 = 1001 0100 -> 0100 0001 0001 0000 | ||
412 | 0x4111, //149 = 1001 0101 -> 0100 0001 0001 0001 | ||
413 | 0x4114, //150 = 1001 0110 -> 0100 0001 0001 0100 | ||
414 | 0x4115, //151 = 1001 0111 -> 0100 0001 0001 0101 | ||
415 | 0x4140, //152 = 1001 1000 -> 0100 0001 0100 0000 | ||
416 | 0x4141, //153 = 1001 1001 -> 0100 0001 0100 0001 | ||
417 | 0x4144, //154 = 1001 1010 -> 0100 0001 0100 0100 | ||
418 | 0x4145, //155 = 1001 1011 -> 0100 0001 0100 0101 | ||
419 | 0x4150, //156 = 1001 1100 -> 0100 0001 0101 0000 | ||
420 | 0x4151, //157 = 1001 1101 -> 0100 0001 0101 0001 | ||
421 | 0x4154, //158 = 1001 1110 -> 0100 0001 0101 0100 | ||
422 | 0x4155, //159 = 1001 1111 -> 0100 0001 0101 0101 | ||
423 | |||
424 | 0x4400, //160 = 1010 0000 -> 0100 0100 0000 0000 | ||
425 | 0x4401, //161 = 1010 0001 -> 0100 0100 0000 0001 | ||
426 | 0x4404, //162 = 1010 0010 -> 0100 0100 0000 0100 | ||
427 | 0x4405, //163 = 1010 0011 -> 0100 0100 0000 0101 | ||
428 | 0x4410, //164 = 1010 0100 -> 0100 0100 0001 0000 | ||
429 | 0x4411, //165 = 1010 0101 -> 0100 0100 0001 0001 | ||
430 | 0x4414, //166 = 1010 0110 -> 0100 0100 0001 0100 | ||
431 | 0x4415, //167 = 1010 0111 -> 0100 0100 0001 0101 | ||
432 | 0x4440, //168 = 1010 1000 -> 0100 0100 0100 0000 | ||
433 | 0x4441, //169 = 1010 1001 -> 0100 0100 0100 0001 | ||
434 | 0x4444, //170 = 1010 1010 -> 0100 0100 0100 0100 | ||
435 | 0x4445, //171 = 1010 1011 -> 0100 0100 0100 0101 | ||
436 | 0x4450, //172 = 1010 1100 -> 0100 0100 0101 0000 | ||
437 | 0x4451, //173 = 1010 1101 -> 0100 0100 0101 0001 | ||
438 | 0x4454, //174 = 1010 1110 -> 0100 0100 0101 0100 | ||
439 | 0x4455, //175 = 1010 1111 -> 0100 0100 0101 0101 | ||
440 | |||
441 | 0x4500, //176 = 1011 0000 -> 0100 0101 0000 0000 | ||
442 | 0x4501, //177 = 1011 0001 -> 0100 0101 0000 0001 | ||
443 | 0x4504, //178 = 1011 0010 -> 0100 0101 0000 0100 | ||
444 | 0x4505, //179 = 1011 0011 -> 0100 0101 0000 0101 | ||
445 | 0x4510, //180 = 1011 0100 -> 0100 0101 0001 0000 | ||
446 | 0x4511, //181 = 1011 0101 -> 0100 0101 0001 0001 | ||
447 | 0x4514, //182 = 1011 0110 -> 0100 0101 0001 0100 | ||
448 | 0x4515, //183 = 1011 0111 -> 0100 0101 0001 0101 | ||
449 | 0x4540, //184 = 1011 1000 -> 0100 0101 0100 0000 | ||
450 | 0x4541, //185 = 1011 1001 -> 0100 0101 0100 0001 | ||
451 | 0x4544, //186 = 1011 1010 -> 0100 0101 0100 0100 | ||
452 | 0x4545, //187 = 1011 1011 -> 0100 0101 0100 0101 | ||
453 | 0x4550, //188 = 1011 1100 -> 0100 0101 0101 0000 | ||
454 | 0x4551, //189 = 1011 1101 -> 0100 0101 0101 0001 | ||
455 | 0x4554, //190 = 1011 1110 -> 0100 0101 0101 0100 | ||
456 | 0x4555, //191 = 1011 1111 -> 0100 0101 0101 0101 | ||
457 | |||
458 | 0x5000, //192 = 1100 0000 -> 0101 0000 0000 0000 | ||
459 | 0x5001, //193 = 1100 0001 -> 0101 0000 0000 0001 | ||
460 | 0x5004, //194 = 1100 0010 -> 0101 0000 0000 0100 | ||
461 | 0x5005, //195 = 1100 0011 -> 0101 0000 0000 0101 | ||
462 | 0x5010, //196 = 1100 0100 -> 0101 0000 0001 0000 | ||
463 | 0x5011, //197 = 1100 0101 -> 0101 0000 0001 0001 | ||
464 | 0x5014, //198 = 1100 0110 -> 0101 0000 0001 0100 | ||
465 | 0x5015, //199 = 1100 0111 -> 0101 0000 0001 0101 | ||
466 | 0x5040, //200 = 1100 1000 -> 0101 0000 0100 0000 | ||
467 | 0x5041, //201 = 1100 1001 -> 0101 0000 0100 0001 | ||
468 | 0x5044, //202 = 1100 1010 -> 0101 0000 0100 0100 | ||
469 | 0x5045, //203 = 1100 1011 -> 0101 0000 0100 0101 | ||
470 | 0x5050, //204 = 1100 1100 -> 0101 0000 0101 0000 | ||
471 | 0x5051, //205 = 1100 1101 -> 0101 0000 0101 0001 | ||
472 | 0x5054, //206 = 1100 1110 -> 0101 0000 0101 0100 | ||
473 | 0x5055, //207 = 1100 1111 -> 0101 0000 0101 0101 | ||
474 | |||
475 | 0x5100, //208 = 1101 0000 -> 0101 0001 0000 0000 | ||
476 | 0x5101, //209 = 1101 0001 -> 0101 0001 0000 0001 | ||
477 | 0x5104, //210 = 1101 0010 -> 0101 0001 0000 0100 | ||
478 | 0x5105, //211 = 1101 0011 -> 0101 0001 0000 0101 | ||
479 | 0x5110, //212 = 1101 0100 -> 0101 0001 0001 0000 | ||
480 | 0x5111, //213 = 1101 0101 -> 0101 0001 0001 0001 | ||
481 | 0x5114, //214 = 1101 0110 -> 0101 0001 0001 0100 | ||
482 | 0x5115, //215 = 1101 0111 -> 0101 0001 0001 0101 | ||
483 | 0x5140, //216 = 1101 1000 -> 0101 0001 0100 0000 | ||
484 | 0x5141, //217 = 1101 1001 -> 0101 0001 0100 0001 | ||
485 | 0x5144, //218 = 1101 1010 -> 0101 0001 0100 0100 | ||
486 | 0x5145, //219 = 1101 1011 -> 0101 0001 0100 0101 | ||
487 | 0x5150, //220 = 1101 1100 -> 0101 0001 0101 0000 | ||
488 | 0x5151, //221 = 1101 1101 -> 0101 0001 0101 0001 | ||
489 | 0x5154, //222 = 1101 1110 -> 0101 0001 0101 0100 | ||
490 | 0x5155, //223 = 1101 1111 -> 0101 0001 0101 0101 | ||
491 | |||
492 | 0x5400, //224 = 1110 0000 -> 0101 0100 0000 0000 | ||
493 | 0x5401, //225 = 1110 0001 -> 0101 0100 0000 0001 | ||
494 | 0x5404, //226 = 1110 0010 -> 0101 0100 0000 0100 | ||
495 | 0x5405, //227 = 1110 0011 -> 0101 0100 0000 0101 | ||
496 | 0x5410, //228 = 1110 0100 -> 0101 0100 0001 0000 | ||
497 | 0x5411, //229 = 1110 0101 -> 0101 0100 0001 0001 | ||
498 | 0x5414, //230 = 1110 0110 -> 0101 0100 0001 0100 | ||
499 | 0x5415, //231 = 1110 0111 -> 0101 0100 0001 0101 | ||
500 | 0x5440, //232 = 1110 1000 -> 0101 0100 0100 0000 | ||
501 | 0x5441, //233 = 1110 1001 -> 0101 0100 0100 0001 | ||
502 | 0x5444, //234 = 1110 1010 -> 0101 0100 0100 0100 | ||
503 | 0x5445, //235 = 1110 1011 -> 0101 0100 0100 0101 | ||
504 | 0x5450, //236 = 1110 1100 -> 0101 0100 0101 0000 | ||
505 | 0x5451, //237 = 1110 1101 -> 0101 0100 0101 0001 | ||
506 | 0x5454, //238 = 1110 1110 -> 0101 0100 0101 0100 | ||
507 | 0x5455, //239 = 1110 1111 -> 0101 0100 0101 0101 | ||
508 | |||
509 | 0x5500, //240 = 1111 0000 -> 0101 0101 0000 0000 | ||
510 | 0x5501, //241 = 1111 0001 -> 0101 0101 0000 0001 | ||
511 | 0x5504, //242 = 1111 0010 -> 0101 0101 0000 0100 | ||
512 | 0x5505, //243 = 1111 0011 -> 0101 0101 0000 0101 | ||
513 | 0x5510, //244 = 1111 0100 -> 0101 0101 0001 0000 | ||
514 | 0x5511, //245 = 1111 0101 -> 0101 0101 0001 0001 | ||
515 | 0x5514, //246 = 1111 0110 -> 0101 0101 0001 0100 | ||
516 | 0x5515, //247 = 1111 0111 -> 0101 0101 0001 0101 | ||
517 | 0x5540, //248 = 1111 1000 -> 0101 0101 0100 0000 | ||
518 | 0x5541, //249 = 1111 1001 -> 0101 0101 0100 0001 | ||
519 | 0x5544, //250 = 1111 1010 -> 0101 0101 0100 0100 | ||
520 | 0x5545, //251 = 1111 1011 -> 0101 0101 0100 0101 | ||
521 | 0x5550, //252 = 1111 1100 -> 0101 0101 0101 0000 | ||
522 | 0x5551, //253 = 1111 1101 -> 0101 0101 0101 0001 | ||
523 | 0x5554, //254 = 1111 1110 -> 0101 0101 0101 0100 | ||
524 | 0x5555 //255 = 1111 1111 -> 0101 0101 0101 0101 | ||
525 | |||
526 | ] | ||