YAARX: Yet Another ARX Toolkit  0.1
 All Data Structures Files Functions Variables Macros Pages
speck-trails.hh
1 /*
2  * Copyright (c) 2012-2013 Luxembourg University,
3  * Laboratory of Algorithmics, Cryptology and Security (LACS).
4  *
5  * This file is part of the YAARX toolkit. YAARX stands for
6  * Yet Another ARX toolkit for analysis of ARX cryptographic algorithms.
7  *
8  * YAARX is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * YAARX is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with YAARX. If not, see <http://www.gnu.org/licenses/>.
20  */
28 #ifndef SPECK_TRAILS_H
29 #define SPECK_TRAILS_H
30 
31 
32 
33 // {--------------- RESULTS FROM speck-best-diff-search-tests.cc : 20150929 -------------
34 
35 /*
36 
37 Results from fill search (function speck_best_trail_search_full)
38 
39 #--- [./tests/speck-xor-best-search-tests.cc:497] Tests, WORD_SIZE = 4, MASK = F
40 [./tests/speck-xor-best-search-tests.cc:130] ndiffs 2^16
41 [./tests/speck-xor-best-search-tests.cc:131] rconst_1 3 rconst_2 2
42 [./tests/speck-xor-best-search-tests.cc:209] Best trail for 2 rounds (word size 4 bits) p 2^-1.00
43 8 0 -> 8 1.00
44 1 8 -> 9 0.50
45 
46 real 0m0.010s
47 user 0m0.010s
48 sys 0m0.000s
49 
50 #--- [./tests/speck-xor-best-search-tests.cc:509] Tests, WORD_SIZE = 4, MASK = F
51 [./tests/speck-xor-best-search-tests.cc:142] ndiffs 2^20
52 [./tests/speck-xor-best-search-tests.cc:143] rconst_1 3 rconst_2 2
53 [./tests/speck-xor-best-search-tests.cc:221] Best trail for 3 rounds (word size 4 bits) p 2^-3.00
54 8 0 -> 8 1.00
55 1 8 -> 9 0.50
56 3 B -> E 0.25
57 
58 real 0m0.099s
59 user 0m0.099s
60 sys 0m0.000s
61 
62 
63 #--- [./tests/speck-xor-best-search-tests.cc:208] Tests, WORD_SIZE = 4, MASK = F
64 [./tests/speck-xor-best-search-tests.cc:64] ndiffs 2^24
65 [./tests/speck-xor-best-search-tests.cc:142] Best trail for 4 rounds (word size 4 bits) p 2^-4.00
66 8 0 -> 8 1.00
67 1 8 -> 9 0.50
68 3 B -> 6 0.25
69 C 8 -> C 0.50
70 
71 real 0m1.896s
72 user 0m1.896s
73 sys 0m0.000s
74 
75 #--- [./tests/speck-xor-best-search-tests.cc:208] Tests, WORD_SIZE = 4, MASK = F
76 [./tests/speck-xor-best-search-tests.cc:64] ndiffs 2^28
77 [./tests/speck-xor-best-search-tests.cc:142] Best trail for 5 rounds (word size 4 bits) p 2^-6.00
78 F F -> E 0.50
79 D 1 -> 4 0.25
80 8 0 -> 8 1.00
81 1 8 -> 9 0.50
82 3 B -> E 0.25
83 
84 real 0m39.516s
85 user 0m39.525s
86 sys 0m0.000s
87 
88 
89 #--- [./tests/speck-xor-best-search-tests.cc:239] Tests, WORD_SIZE = 4, MASK = F
90 [./tests/speck-xor-best-search-tests.cc:94] ndiffs 2^32
91 [./tests/speck-xor-best-search-tests.cc:95] rconst_1 3 rconst_2 2
92 [./tests/speck-xor-best-search-tests.cc:173] Best trail for 6 rounds (word size 4 bits) p 2^-7.00
93 F F -> E 0.50
94 D 1 -> 4 0.25
95 8 0 -> 8 1.00
96 1 8 -> 9 0.50
97 3 B -> 6 0.25
98 C 8 -> C 0.50
99 
100 real 12m17.662s
101 user 12m17.851s
102 sys 0m0.008s
103 
104 #--- [./tests/speck-xor-best-search-tests.cc:255] Tests, WORD_SIZE = 4, MASK = F
105 [./tests/speck-xor-best-search-tests.cc:110] ndiffs 2^36
106 [./tests/speck-xor-best-search-tests.cc:111] rconst_1 3 rconst_2 2
107 
108 
109 [./tests/speck-xor-best-search-tests.cc:189] Best trail for 7 rounds (word size 4 bits) p 2^-9.00
110 8 8 -> 0 1.00
111 0 2 -> 2 0.50
112 4 A -> 6 0.25
113 C C -> 8 0.50
114 1 B -> A 0.25
115 5 4 -> F 0.25
116 F E -> F 0.50
117 
118 real 234m11.566s
119 user 234m14.864s
120 sys 0m0.108s
121 
122 [./tests/speck-xor-best-search-tests.cc:584] Best trail on 7 rounds (WORD_SIZE 16 bits):
123 [./tests/speck-xor-best-search-tests.cc:294] speck_print_trail()
124  0: C014 4205 -> 211 0.03 -5.00
125  1: 2204 A04 -> 2800 0.06 -4.00
126  2: 50 10 -> 40 0.25 -2.00
127  3: 8000 0 -> 8000 1.00 0.00
128  4: 100 8000 -> 8100 0.50 -1.00
129  5: 102 8102 -> 8000 0.25 -2.00
130  6: 100 840A -> 850A 0.06 -4.00
131 p_trail 0.000004 -18.00
132 
133 real 383m54.665s
134 user 384m1.068s
135 sys 0m0.164s
136 
137 
138 [./tests/speck-xor-best-search-tests.cc:561] Update bound: -15.00 -> -15.00
139 [./tests/speck-xor-best-search-tests.cc:326] speck_print_trail()
140  0: 8202 1202 -> 9000 0.06 -4.00
141  1: 90 10 -> 80 0.25 -2.00
142  2: 80000000 0 -> 80000000 1.00 0.00
143  3: 800000 80000000 -> 80800000 0.50 -1.00
144  4: 808000 80800004 -> 80008004 0.12 -3.00
145  5: 4800080 84008020 -> 808080A0 0.03 -5.00
146 p_trail 0.000031 -15.00
147 
148 [./tests/speck-xor-best-search-tests.cc:561] Update bound: -15.00 -> -15.00
149 [./tests/speck-xor-best-search-tests.cc:326] speck_print_trail()
150  0: 401042 400240 -> 1202 0.03 -5.00
151  1: 2000012 2000002 -> 10 0.12 -3.00
152  2: 10000000 10000000 -> 0 0.50 -1.00
153  3: 0 80000000 -> 80000000 1.00 0.00
154  4: 800000 80000004 -> 80800004 0.25 -2.00
155  5: 4808000 80800020 -> 84008020 0.06 -4.00
156 p_trail 0.000031 -15.00
157 [./tests/speck-xor-best-search-tests.cc:617] Best trail on 6 rounds (WORD_SIZE 32 bits):
158 [./tests/speck-xor-best-search-tests.cc:326] speck_print_trail()
159  0: 401042 400240 -> 1202 0.03 -5.00
160  1: 2000012 2000002 -> 10 0.12 -3.00
161  2: 10000000 10000000 -> 0 0.50 -1.00
162  3: 0 80000000 -> 80000000 1.00 0.00
163  4: 800000 80000004 -> 80800004 0.25 -2.00
164  5: 4808000 80800020 -> 84008020 0.06 -4.00
165 p_trail 0.000031 -15.00
166 
167 real 1721m5.471s
168 user 1721m13.438s
169 sys 0m12.275s
170 
171 vpv@mazirat:~/exper$ time ./speck-xor-best-search-tests-w32-r6.bin
172 #--- [./tests/speck-xor-best-search-tests.cc:613] Tests, WORD_SIZE 32 NROUNDS 6 r1 8 r2 3
173 [./tests/speck-xor-best-search-tests.cc:528] Update bound: -16.00 -> -16.00
174 [./tests/speck-xor-best-search-tests.cc:294] speck_print_trail()
175  0: 82020000 12020000 -> 90000000 0.12 -3.00
176  1: 900000 100000 -> 800000 0.25 -2.00
177  2: 8000 0 -> 8000 0.50 -1.00
178  3: 80 8000 -> 8080 0.25 -2.00
179  4: 80000080 48080 -> 80048000 0.12 -3.00
180  5: 800480 80208400 -> 80A08080 0.03 -5.00
181 p_trail 0.000015 -16.00
182 
183 still running ...
184 
185 
186 [./tests/speck-xor-best-search-tests.cc:741] Best trail on 8 rounds (WORD_SIZE 16 bits):
187 [./tests/speck-xor-best-search-tests.cc:440] speck_print_trail()
188  0: C014 4205 -> 211 0.03 -5.00
189  1: 2204 A04 -> 2800 0.06 -4.00
190  2: 50 10 -> 40 0.25 -2.00
191  3: 8000 0 -> 8000 1.00 0.00
192  4: 100 8000 -> 8100 0.50 -1.00
193  5: 102 8102 -> 8000 0.25 -2.00
194  6: 100 840A -> 850A 0.06 -4.00
195  7: 150A 9520 -> 802A 0.02 -6.00
196 p_trail 0.000000 -24.00
197 
198 real 276m49.878s
199 user 276m52.238s
200 sys 0m1.380s
201 
202 */
203 
204 /*
205 
206 vpv@mazirat:~/exper$ time ./speck-xor-best-search-tests-w16-r9.bin
207 #--- [./tests/speck-xor-best-search-tests.cc:925] Tests, WORD_SIZE 16 NROUNDS 9 r1 7 r2 2
208 [./tests/speck-xor-best-search-tests.cc:710] Update bound: -30.00 -> -30.00
209 [./tests/speck-xor-best-search-tests.cc:458] speck_print_trail()
210  0: A900 A900 -> 0 0.12 -3.00
211  1: 0 A402 -> A402 0.12 -3.00
212  2: 548 3408 -> 50C0 0.00 -8.00
213  3: 80A1 80E0 -> 181 0.06 -4.00
214  4: 203 203 -> C 0.03 -5.00
215  5: 1800 800 -> 2000 0.12 -3.00
216  6: 40 0 -> 40 0.50 -1.00
217  7: 8000 40 -> 8040 0.50 -1.00
218  8: 8100 8140 -> 40 0.25 -2.00
219 p_trail 0.000000 -30.00
220 [./tests/speck-xor-best-search-tests.cc:710] Update bound: -30.00 -> -30.00
221 [./tests/speck-xor-best-search-tests.cc:458] speck_print_trail()
222  0: 90E8 B0F8 -> 1E0 0.03 -5.00
223  1: C003 C202 -> 20F 0.03 -5.00
224  2: 1E04 A04 -> 2800 0.03 -5.00
225  3: 50 10 -> 40 0.25 -2.00
226  4: 8000 0 -> 8000 1.00 0.00
227  5: 100 8000 -> 8100 0.50 -1.00
228  6: 102 8102 -> 8000 0.25 -2.00
229  7: 100 840A -> 850A 0.06 -4.00
230  8: 150A 9520 -> 802A 0.02 -6.00
231 p_trail 0.000000 -30.00
232 [./tests/speck-xor-best-search-tests.cc:710] Update bound: -30.00 -> -30.00
233 [./tests/speck-xor-best-search-tests.cc:458] speck_print_trail()
234  0: B0E8 B0F8 -> 1E0 0.03 -5.00
235  1: C003 C202 -> 20F 0.03 -5.00
236  2: 1E04 A04 -> 2800 0.03 -5.00
237  3: 50 10 -> 40 0.25 -2.00
238  4: 8000 0 -> 8000 1.00 0.00
239  5: 100 8000 -> 8100 0.50 -1.00
240  6: 102 8102 -> 8000 0.25 -2.00
241  7: 100 840A -> 850A 0.06 -4.00
242  8: 150A 9520 -> 802A 0.02 -6.00
243 p_trail 0.000000 -30.00
244 [./tests/speck-xor-best-search-tests.cc:710] Update bound: -30.00 -> -30.00
245 [./tests/speck-xor-best-search-tests.cc:458] speck_print_trail()
246  0: 90F8 B0F8 -> 1E0 0.03 -5.00
247  1: C003 C202 -> 20F 0.03 -5.00
248  2: 1E04 A04 -> 2800 0.03 -5.00
249  3: 50 10 -> 40 0.25 -2.00
250  4: 8000 0 -> 8000 1.00 0.00
251  5: 100 8000 -> 8100 0.50 -1.00
252  6: 102 8102 -> 8000 0.25 -2.00
253  7: 100 840A -> 850A 0.06 -4.00
254  8: 150A 9520 -> 802A 0.02 -6.00
255 p_trail 0.000000 -30.00
256 [./tests/speck-xor-best-search-tests.cc:710] Update bound: -30.00 -> -30.00
257 [./tests/speck-xor-best-search-tests.cc:458] speck_print_trail()
258  0: B0F8 B0F8 -> 1E0 0.03 -5.00
259  1: C003 C202 -> 20F 0.03 -5.00
260  2: 1E04 A04 -> 2800 0.03 -5.00
261  3: 50 10 -> 40 0.25 -2.00
262  4: 8000 0 -> 8000 1.00 0.00
263  5: 100 8000 -> 8100 0.50 -1.00
264  6: 102 8102 -> 8000 0.25 -2.00
265  7: 100 840A -> 850A 0.06 -4.00
266  8: 150A 9520 -> 802A 0.02 -6.00
267 p_trail 0.000000 -30.00
268 [./tests/speck-xor-best-search-tests.cc:710] Update bound: -30.00 -> -30.00
269 [./tests/speck-xor-best-search-tests.cc:458] speck_print_trail()
270  0: 14A8 120 -> 1488 0.02 -6.00
271  1: 1029 1008 -> 21 0.06 -4.00
272  2: 4200 4001 -> 601 0.06 -4.00
273  3: 20C 604 -> 1800 0.02 -6.00
274  4: 30 10 -> 40 0.12 -3.00
275  5: 8000 0 -> 8000 1.00 0.00
276  6: 100 8000 -> 8100 0.50 -1.00
277  7: 102 8102 -> 8000 0.25 -2.00
278  8: 100 840A -> 850A 0.06 -4.00
279 p_trail 0.000000 -30.00
280 [./tests/speck-xor-best-search-tests.cc:710] Update bound: -30.00 -> -30.00
281 [./tests/speck-xor-best-search-tests.cc:458] speck_print_trail()
282  0: 15A8 120 -> 1488 0.02 -6.00
283  1: 1029 1008 -> 21 0.06 -4.00
284  2: 4200 4001 -> 601 0.06 -4.00
285  3: 20C 604 -> 1800 0.02 -6.00
286  4: 30 10 -> 40 0.12 -3.00
287  5: 8000 0 -> 8000 1.00 0.00
288  6: 100 8000 -> 8100 0.50 -1.00
289  7: 102 8102 -> 8000 0.25 -2.00
290  8: 100 840A -> 850A 0.06 -4.00
291 p_trail 0.000000 -30.00
292 [./tests/speck-xor-best-search-tests.cc:710] Update bound: -30.00 -> -30.00
293 [./tests/speck-xor-best-search-tests.cc:458] speck_print_trail()
294  0: 140 508 -> 448 0.06 -4.00
295  1: 9008 1068 -> 80A0 0.03 -5.00
296  2: 4101 C100 -> 207 0.02 -6.00
297  3: E04 604 -> 1800 0.03 -5.00
298  4: 30 10 -> 40 0.12 -3.00
299  5: 8000 0 -> 8000 1.00 0.00
300  6: 100 8000 -> 8100 0.50 -1.00
301  7: 102 8102 -> 8000 0.25 -2.00
302  8: 100 840A -> 850A 0.06 -4.00
303 p_trail 0.000000 -30.00
304 [./tests/speck-xor-best-search-tests.cc:710] Update bound: -30.00 -> -30.00
305 [./tests/speck-xor-best-search-tests.cc:458] speck_print_trail()
306  0: 2204 A04 -> 2800 0.06 -4.00
307  1: 50 10 -> 40 0.25 -2.00
308  2: 8000 0 -> 8000 1.00 0.00
309  3: 100 8000 -> 8100 0.50 -1.00
310  4: 102 8102 -> 8004 0.12 -3.00
311  5: 900 840E -> 8532 0.00 -8.00
312  6: 650A 9508 -> 5002 0.01 -7.00
313  7: 4A0 420 -> 80 0.12 -3.00
314  8: 1 1000 -> 1001 0.25 -2.00
315 p_trail 0.000000 -30.00
316 [./tests/speck-xor-best-search-tests.cc:710] Update bound: -30.00 -> -30.00
317 [./tests/speck-xor-best-search-tests.cc:458] speck_print_trail()
318  0: 814A 12 -> 8148 0.03 -5.00
319  1: 9102 8100 -> 1002 0.12 -3.00
320  2: 420 1400 -> 1060 0.06 -4.00
321  3: C020 4060 -> 180 0.03 -5.00
322  4: 3 1 -> 4 0.12 -3.00
323  5: 800 0 -> 800 0.50 -1.00
324  6: 10 800 -> 810 0.25 -2.00
325  7: 2010 2810 -> 800 0.12 -3.00
326  8: 10 A840 -> A850 0.06 -4.00
327 p_trail 0.000000 -30.00
328 [./tests/speck-xor-best-search-tests.cc:710] Update bound: -30.00 -> -30.00
329 [./tests/speck-xor-best-search-tests.cc:458] speck_print_trail()
330  0: 815A 12 -> 8148 0.03 -5.00
331  1: 9102 8100 -> 1002 0.12 -3.00
332  2: 420 1400 -> 1060 0.06 -4.00
333  3: C020 4060 -> 180 0.03 -5.00
334  4: 3 1 -> 4 0.12 -3.00
335  5: 800 0 -> 800 0.50 -1.00
336  6: 10 800 -> 810 0.25 -2.00
337  7: 2010 2810 -> 800 0.12 -3.00
338  8: 10 A840 -> A850 0.06 -4.00
339 p_trail 0.000000 -30.00
340 [./tests/speck-xor-best-search-tests.cc:710] Update bound: -30.00 -> -30.00
341 [./tests/speck-xor-best-search-tests.cc:458] speck_print_trail()
342  0: 540A 9000 -> 440A 0.03 -5.00
343  1: 1488 408 -> 1080 0.06 -4.00
344  2: 21 A0 -> 83 0.06 -4.00
345  3: 601 203 -> C 0.02 -6.00
346  4: 1800 800 -> 2000 0.12 -3.00
347  5: 40 0 -> 40 0.50 -1.00
348  6: 8000 40 -> 8040 0.50 -1.00
349  7: 8100 8140 -> 40 0.25 -2.00
350  8: 8000 542 -> 8542 0.06 -4.00
351 p_trail 0.000000 -30.00
352 [./tests/speck-xor-best-search-tests.cc:710] Update bound: -30.00 -> -30.00
353 [./tests/speck-xor-best-search-tests.cc:458] speck_print_trail()
354  0: D40A 9000 -> 440A 0.03 -5.00
355  1: 1488 408 -> 1080 0.06 -4.00
356  2: 21 A0 -> 83 0.06 -4.00
357  3: 601 203 -> C 0.02 -6.00
358  4: 1800 800 -> 2000 0.12 -3.00
359  5: 40 0 -> 40 0.50 -1.00
360  6: 8000 40 -> 8040 0.50 -1.00
361  7: 8100 8140 -> 40 0.25 -2.00
362  8: 8000 542 -> 8542 0.06 -4.00
363 p_trail 0.000000 -30.00
364 [./tests/speck-xor-best-search-tests.cc:710] Update bound: -30.00 -> -30.00
365 [./tests/speck-xor-best-search-tests.cc:458] speck_print_trail()
366  0: A000 8402 -> 2402 0.12 -3.00
367  1: 448 3408 -> 50C0 0.01 -7.00
368  2: 80A1 80E0 -> 181 0.06 -4.00
369  3: 203 203 -> C 0.03 -5.00
370  4: 1800 800 -> 2000 0.12 -3.00
371  5: 40 0 -> 40 0.50 -1.00
372  6: 8000 40 -> 8040 0.50 -1.00
373  7: 8100 8140 -> 40 0.25 -2.00
374  8: 8000 542 -> 8542 0.06 -4.00
375 p_trail 0.000000 -30.00
376 [./tests/speck-xor-best-search-tests.cc:710] Update bound: -30.00 -> -30.00
377 [./tests/speck-xor-best-search-tests.cc:458] speck_print_trail()
378  0: 1029 1008 -> 21 0.06 -4.00
379  1: 4200 4001 -> 601 0.06 -4.00
380  2: 20C 604 -> 1800 0.02 -6.00
381  3: 30 10 -> 40 0.12 -3.00
382  4: 8000 0 -> 8000 1.00 0.00
383  5: 100 8000 -> 8100 0.50 -1.00
384  6: 102 8102 -> 8000 0.25 -2.00
385  7: 100 840A -> 850A 0.06 -4.00
386  8: 150A 9520 -> 802A 0.02 -6.00
387 p_trail 0.000000 -30.00
388 [./tests/speck-xor-best-search-tests.cc:766] Best trail on 9 rounds (WORD_SIZE 16 bits):
389 [./tests/speck-xor-best-search-tests.cc:458] speck_print_trail()
390  0: 1029 1008 -> 21 0.06 -4.00
391  1: 4200 4001 -> 601 0.06 -4.00
392  2: 20C 604 -> 1800 0.02 -6.00
393  3: 30 10 -> 40 0.12 -3.00
394  4: 8000 0 -> 8000 1.00 0.00
395  5: 100 8000 -> 8100 0.50 -1.00
396  6: 102 8102 -> 8000 0.25 -2.00
397  7: 100 840A -> 850A 0.06 -4.00
398  8: 150A 9520 -> 802A 0.02 -6.00
399 p_trail 0.000000 -30.00
400 
401 real 1206m6.976s
402 user 1206m30.159s
403 sys 0m0.312s
404 
405 [./tests/speck-xor-best-search-tests.cc:967] Best trail on 7 rounds (WORD_SIZE 24 bits):
406 [./tests/speck-xor-best-search-tests.cc:657] speck_print_trail()
407  0: D24000 504200 -> 820200 0.03 -5.00
408  1: 8202 1202 -> 9000 0.06 -4.00
409  2: 90 10 -> 80 0.25 -2.00
410  3: 800000 0 -> 800000 1.00 0.00
411  4: 8000 800000 -> 808000 0.50 -1.00
412  5: 8080 808004 -> 800084 0.12 -3.00
413  6: 848000 8400A0 -> 80A0 0.06 -4.00
414 p_trail 0.000002 -19.00
415 
416 real 618m13.254s
417 user 618m22.140s
418 sys 0m0.212s
419 
420 */
421 
422 /*
423 
424 [./tests/speck-xor-best-search-tests.cc:986] Best trail on 5 rounds (WORD_SIZE 48 bits):
425 [./tests/speck-xor-best-search-tests.cc:673] speck_print_trail()
426  0: 20000000012 20000000002 -> 10 0.12 -3.00
427  1: 100000000000 100000000000 -> 0 0.50 -1.00
428  2: 0 800000000000 -> 800000000000 1.00 0.00
429  3: 8000000000 800000000004 -> 808000000004 0.25 -2.00
430  4: 48080000000 808000000020 -> 840080000020 0.06 -4.00
431 p_trail 0.000977 -10.00
432 
433 real 7m16.842s
434 user 7m16.938s
435 sys 0m0.008s
436 
437  */
438 
439 
440 
441 /*
442 vpv@mazirat:~/exper$ time ./speck-xor-best-search-tests-w24-r8.bin
443 #--- [./tests/speck-xor-best-search-tests.cc:1184] Tests, WORD_SIZE 24 NROUNDS 8 r1 8 r2 3
444 [./tests/speck-xor-best-search-tests.cc:969] Update bound: -26.00 -> -26.00
445 [./tests/speck-xor-best-search-tests.cc:686] speck_print_trail()
446  0: 524000 504200 -> 820200 0.03 -5.00
447  1: 8202 1202 -> 9000 0.06 -4.00
448  2: 90 10 -> 80 0.25 -2.00
449  3: 800000 0 -> 800000 1.00 0.00
450  4: 8000 800000 -> 808000 0.50 -1.00
451  5: 8080 808004 -> 800084 0.12 -3.00
452  6: 848000 8400A0 -> 80A0 0.06 -4.00
453  7: A00080 2085A4 -> 808424 0.01 -7.00
454 p_trail 0.000000 -26.00
455 [./tests/speck-xor-best-search-tests.cc:969] Update bound: -26.00 -> -26.00
456 [./tests/speck-xor-best-search-tests.cc:686] speck_print_trail()
457  0: 524000 504200 -> 820200 0.03 -5.00
458  1: 8202 1202 -> 9000 0.06 -4.00
459  2: 90 10 -> 80 0.25 -2.00
460  3: 800000 0 -> 800000 1.00 0.00
461  4: 8000 800000 -> 808000 0.50 -1.00
462  5: 8080 808004 -> 800084 0.12 -3.00
463  6: 848000 8400A0 -> 80A0 0.06 -4.00
464  7: A00080 2085A4 -> 808524 0.01 -7.00
465 p_trail 0.000000 -26.00
466 [./tests/speck-xor-best-search-tests.cc:969] Update bound: -26.00 -> -26.00
467 [./tests/speck-xor-best-search-tests.cc:686] speck_print_trail()
468  0: D24000 504200 -> 820200 0.03 -5.00
469  1: 8202 1202 -> 9000 0.06 -4.00
470  2: 90 10 -> 80 0.25 -2.00
471  3: 800000 0 -> 800000 1.00 0.00
472  4: 8000 800000 -> 808000 0.50 -1.00
473  5: 8080 808004 -> 800084 0.12 -3.00
474  6: 848000 8400A0 -> 80A0 0.06 -4.00
475  7: A00080 2085A4 -> 808424 0.01 -7.00
476 p_trail 0.000000 -26.00
477 [./tests/speck-xor-best-search-tests.cc:969] Update bound: -26.00 -> -26.00
478 [./tests/speck-xor-best-search-tests.cc:686] speck_print_trail()
479  0: D24000 504200 -> 820200 0.03 -5.00
480  1: 8202 1202 -> 9000 0.06 -4.00
481  2: 90 10 -> 80 0.25 -2.00
482  3: 800000 0 -> 800000 1.00 0.00
483  4: 8000 800000 -> 808000 0.50 -1.00
484  5: 8080 808004 -> 800084 0.12 -3.00
485  6: 848000 8400A0 -> 80A0 0.06 -4.00
486  7: A00080 2085A4 -> 808524 0.01 -7.00
487 p_trail 0.000000 -26.00
488 [./tests/speck-xor-best-search-tests.cc:969] Update bound: -26.00 -> -26.00
489 [./tests/speck-xor-best-search-tests.cc:686] speck_print_trail()
490  0: 20808 42084A -> 400052 0.01 -7.00
491  1: 524000 504200 -> 820200 0.03 -5.00
492  2: 8202 1202 -> 9000 0.06 -4.00
493  3: 90 10 -> 80 0.25 -2.00
494  4: 800000 0 -> 800000 1.00 0.00
495  5: 8000 800000 -> 808000 0.50 -1.00
496  6: 8080 808004 -> 800084 0.12 -3.00
497  7: 848000 8400A0 -> 80A0 0.06 -4.00
498 p_trail 0.000000 -26.00
499 [./tests/speck-xor-best-search-tests.cc:969] Update bound: -26.00 -> -26.00
500 [./tests/speck-xor-best-search-tests.cc:686] speck_print_trail()
501  0: 820808 42084A -> 400052 0.01 -7.00
502  1: 524000 504200 -> 820200 0.03 -5.00
503  2: 8202 1202 -> 9000 0.06 -4.00
504  3: 90 10 -> 80 0.25 -2.00
505  4: 800000 0 -> 800000 1.00 0.00
506  5: 8000 800000 -> 808000 0.50 -1.00
507  6: 8080 808004 -> 800084 0.12 -3.00
508  7: 848000 8400A0 -> 80A0 0.06 -4.00
509 p_trail 0.000000 -26.00
510 [./tests/speck-xor-best-search-tests.cc:969] Update bound: -26.00 -> -26.00
511 [./tests/speck-xor-best-search-tests.cc:686] speck_print_trail()
512  0: 20818 42084A -> 400052 0.01 -7.00
513  1: 524000 504200 -> 820200 0.03 -5.00
514  2: 8202 1202 -> 9000 0.06 -4.00
515  3: 90 10 -> 80 0.25 -2.00
516  4: 800000 0 -> 800000 1.00 0.00
517  5: 8000 800000 -> 808000 0.50 -1.00
518  6: 8080 808004 -> 800084 0.12 -3.00
519  7: 848000 8400A0 -> 80A0 0.06 -4.00
520 p_trail 0.000000 -26.00
521 [./tests/speck-xor-best-search-tests.cc:969] Update bound: -26.00 -> -26.00
522 [./tests/speck-xor-best-search-tests.cc:686] speck_print_trail()
523  0: 820818 42084A -> 400052 0.01 -7.00
524  1: 524000 504200 -> 820200 0.03 -5.00
525  2: 8202 1202 -> 9000 0.06 -4.00
526  3: 90 10 -> 80 0.25 -2.00
527  4: 800000 0 -> 800000 1.00 0.00
528  5: 8000 800000 -> 808000 0.50 -1.00
529  6: 8080 808004 -> 800084 0.12 -3.00
530  7: 848000 8400A0 -> 80A0 0.06 -4.00
531 p_trail 0.000000 -26.00
532 [./tests/speck-xor-best-search-tests.cc:1025] Best trail on 8 rounds (WORD_SIZE 24 bits):
533 [./tests/speck-xor-best-search-tests.cc:686] speck_print_trail()
534  0: 820818 42084A -> 400052 0.01 -7.00
535  1: 524000 504200 -> 820200 0.03 -5.00
536  2: 8202 1202 -> 9000 0.06 -4.00
537  3: 90 10 -> 80 0.25 -2.00
538  4: 800000 0 -> 800000 1.00 0.00
539  5: 8000 800000 -> 808000 0.50 -1.00
540  6: 8080 808004 -> 800084 0.12 -3.00
541  7: 848000 8400A0 -> 80A0 0.06 -4.00
542 p_trail 0.000000 -26.00
543 
544 real 426m47.487s
545 user 426m52.919s
546 sys 0m0.260s
547 
548 */
549 
550 /*
551 
552 vpv@mazirat:~/exper$ date
553 Mon Sep 28 15:59:46 CEST 2015
554 vpv@mazirat:~/exper$ time ./speck-xor-best-search-tests-w32-r7.bin
555 #--- [./tests/speck-xor-best-search-tests.cc:1168] Tests, WORD_SIZE 32 NROUNDS 7 r1 8 r2 3
556 [./tests/speck-xor-best-search-tests.cc:953] Update bound: -21.00 -> -21.00
557 [./tests/speck-xor-best-search-tests.cc:686] speck_print_trail()
558  0: 40924000 40104200 -> 820200 0.02 -6.00
559  1: 8202 1202 -> 9000 0.06 -4.00
560  2: 90 10 -> 80 0.25 -2.00
561  3: 80000000 0 -> 80000000 1.00 0.00
562  4: 800000 80000000 -> 80800000 0.50 -1.00
563  5: 808000 80800004 -> 80008004 0.12 -3.00
564  6: 4800080 84008020 -> 808080A0 0.03 -5.00
565 p_trail 0.000000 -21.00
566 [./tests/speck-xor-best-search-tests.cc:953] Update bound: -21.00 -> -21.00
567 [./tests/speck-xor-best-search-tests.cc:686] speck_print_trail()
568  0: C0924000 40104200 -> 820200 0.02 -6.00
569  1: 8202 1202 -> 9000 0.06 -4.00
570  2: 90 10 -> 80 0.25 -2.00
571  3: 80000000 0 -> 80000000 1.00 0.00
572  4: 800000 80000000 -> 80800000 0.50 -1.00
573  5: 808000 80800004 -> 80008004 0.12 -3.00
574  6: 4800080 84008020 -> 808080A0 0.03 -5.00
575 p_trail 0.000000 -21.00
576 [./tests/speck-xor-best-search-tests.cc:953] Update bound: -21.00 -> -21.00
577 [./tests/speck-xor-best-search-tests.cc:686] speck_print_trail()
578  0: 92400040 10420040 -> 82020000 0.03 -5.00
579  1: 820200 120200 -> 900000 0.06 -4.00
580  2: 9000 1000 -> 8000 0.25 -2.00
581  3: 80 0 -> 80 0.50 -1.00
582  4: 80000000 80 -> 80000080 0.50 -1.00
583  5: 80800000 80000480 -> 800480 0.12 -3.00
584  6: 80008004 802084 -> 8080A080 0.03 -5.00
585 p_trail 0.000000 -21.00
586 [./tests/speck-xor-best-search-tests.cc:1009] Best trail on 7 rounds (WORD_SIZE 32 bits):
587 [./tests/speck-xor-best-search-tests.cc:686] speck_print_trail()
588  0: 92400040 10420040 -> 82020000 0.03 -5.00
589  1: 820200 120200 -> 900000 0.06 -4.00
590  2: 9000 1000 -> 8000 0.25 -2.00
591  3: 80 0 -> 80 0.50 -1.00
592  4: 80000000 80 -> 80000080 0.50 -1.00
593  5: 80800000 80000480 -> 800480 0.12 -3.00
594  6: 80008004 802084 -> 8080A080 0.03 -5.00
595 p_trail 0.000000 -21.00
596 
597 real 278m46.963s
598 user 278m51.893s
599 sys 0m0.320s
600 
601 
602 */
603 
604 
605 /*
606 vpv@mazirat:~/skcrypto/trunk/work/src/va$ time ./speck-best-diff-search-yann
607 -- Searching for 7 rounds (WORD_SIZE 32 bits):
608 # Update bound: -21 -> -21
609 # 0: 0x40924000 0x40104200 -> 0x00820200 -6
610 # 1: 0x00008202 0x00001202 -> 0x00009000 -4
611 # 2: 0x00000090 0x00000010 -> 0x00000080 -2
612 # 3: 0x80000000 0x00000000 -> 0x80000000 0
613 # 4: 0x00800000 0x80000000 -> 0x80800000 -1
614 # 5: 0x00808000 0x80800004 -> 0x80008004 -3
615 # 6: 0x04800080 0x84008020 -> 0x808080A0 -5
616 # p_trail -21
617 # Update bound: -21 -> -21
618 # 0: 0xC0924000 0x40104200 -> 0x00820200 -6
619 # 1: 0x00008202 0x00001202 -> 0x00009000 -4
620 # 2: 0x00000090 0x00000010 -> 0x00000080 -2
621 # 3: 0x80000000 0x00000000 -> 0x80000000 0
622 # 4: 0x00800000 0x80000000 -> 0x80800000 -1
623 # 5: 0x00808000 0x80800004 -> 0x80008004 -3
624 # 6: 0x04800080 0x84008020 -> 0x808080A0 -5
625 # p_trail -21
626 # Update bound: -21 -> -21
627 # 0: 0x92400040 0x10420040 -> 0x82020000 -5
628 # 1: 0x00820200 0x00120200 -> 0x00900000 -4
629 # 2: 0x00009000 0x00001000 -> 0x00008000 -2
630 # 3: 0x00000080 0x00000000 -> 0x00000080 -1
631 # 4: 0x80000000 0x00000080 -> 0x80000080 -1
632 # 5: 0x80800000 0x80000480 -> 0x00800480 -3
633 # 6: 0x80008004 0x00802084 -> 0x8080A080 -5
634 # p_trail -21
635 --------------------------------------------------------------------------------
636 Best trail on 7 rounds (WORD_SIZE 32 bits):
637 # 0: 0x92400040 0x10420040 -> 0x82020000 -5
638 # 1: 0x00820200 0x00120200 -> 0x00900000 -4
639 # 2: 0x00009000 0x00001000 -> 0x00008000 -2
640 # 3: 0x00000080 0x00000000 -> 0x00000080 -1
641 # 4: 0x80000000 0x00000080 -> 0x80000080 -1
642 # 5: 0x80800000 0x80000480 -> 0x00800480 -3
643 # 6: 0x80008004 0x00802084 -> 0x8080A080 -5
644 # p_trail -21
645 
646 real 2568m58.366s
647 user 2569m58.217s
648 sys 0m0.008s
649 
650 */
651 
652 /*
653 vpv@mazirat:~/exper$ time ./speck-xor-best-search-tests-w48-r6.bin
654 #--- [./tests/speck-xor-best-search-tests.cc:1168] Tests, WORD_SIZE 48 NROUNDS 6 r1 8 r2 3
655 [./tests/speck-xor-best-search-tests.cc:953] Update bound: -15.00 -> -15.00
656 [./tests/speck-xor-best-search-tests.cc:686] speck_print_trail()
657  0: 8202 1202 -> 9000 0.06 -4.00
658  1: 90 10 -> 80 0.25 -2.00
659  2: 800000000000 0 -> 800000000000 1.00 0.00
660  3: 8000000000 800000000000 -> 808000000000 0.50 -1.00
661  4: 8080000000 808000000004 -> 800080000004 0.12 -3.00
662  5: 48000800000 840080000020 -> 808080800020 0.03 -5.00
663 p_trail 0.000031 -15.00
664 [./tests/speck-xor-best-search-tests.cc:953] Update bound: -15.00 -> -15.00
665 [./tests/speck-xor-best-search-tests.cc:686] speck_print_trail()
666  0: 4000001042 4000000240 -> 1202 0.03 -5.00
667  1: 20000000012 20000000002 -> 10 0.12 -3.00
668  2: 100000000000 100000000000 -> 0 0.50 -1.00
669  3: 0 800000000000 -> 800000000000 1.00 0.00
670  4: 8000000000 800000000004 -> 808000000004 0.25 -2.00
671  5: 48080000000 808000000020 -> 840080000020 0.06 -4.00
672 p_trail 0.000031 -15.00
673 [./tests/speck-xor-best-search-tests.cc:1009] Best trail on 6 rounds (WORD_SIZE 48 bits):
674 [./tests/speck-xor-best-search-tests.cc:686] speck_print_trail()
675  0: 4000001042 4000000240 -> 1202 0.03 -5.00
676  1: 20000000012 20000000002 -> 10 0.12 -3.00
677  2: 100000000000 100000000000 -> 0 0.50 -1.00
678  3: 0 800000000000 -> 800000000000 1.00 0.00
679  4: 8000000000 800000000004 -> 808000000004 0.25 -2.00
680  5: 48080000000 808000000020 -> 840080000020 0.06 -4.00
681 p_trail 0.000031 -15.00
682 
683 real 115m53.522s
684 user 115m53.546s
685 sys 0m1.480s
686 
687 */
688 
689 /*
690 
691 vpv@mazirat:~/exper$ date
692 Mon Sep 28 16:22:39 CEST 2015
693 vpv@mazirat:~/exper$ time ./speck-xor-best-search-tests-w64-r6.bin
694 #--- [./tests/speck-xor-best-search-tests.cc:1183] Tests, WORD_SIZE 64 NROUNDS 6 r1 8 r2 3
695 [./tests/speck-xor-best-search-tests.cc:968] Update bound: -15.00 -> -15.00
696 [./tests/speck-xor-best-search-tests.cc:686] speck_print_trail()
697  0: 8202 1202 -> 9000 0.06 -4.00
698  1: 90 10 -> 80 0.25 -2.00
699  2: 8000000000000000 0 -> 8000000000000000 1.00 0.00
700  3: 80000000000000 8000000000000000 -> 8080000000000000 0.50 -1.00
701  4: 80800000000000 8080000000000004 -> 8000800000000004 0.12 -3.00
702  5: 480008000000000 8400800000000020 -> 8080808000000020 0.03 -5.00
703 p_trail 0.000031 -15.00
704 [./tests/speck-xor-best-search-tests.cc:968] Update bound: -15.00 -> -15.00
705 [./tests/speck-xor-best-search-tests.cc:686] speck_print_trail()
706  0: 40000000001042 40000000000240 -> 1202 0.03 -5.00
707  1: 200000000000012 200000000000002 -> 10 0.12 -3.00
708  2: 1000000000000000 1000000000000000 -> 0 0.50 -1.00
709  3: 0 8000000000000000 -> 8000000000000000 1.00 0.00
710  4: 80000000000000 8000000000000004 -> 8080000000000004 0.25 -2.00
711  5: 480800000000000 8080000000000020 -> 8400800000000020 0.06 -4.00
712 p_trail 0.000031 -15.00
713 [./tests/speck-xor-best-search-tests.cc:1024] Best trail on 6 rounds (WORD_SIZE 64 bits):
714 [./tests/speck-xor-best-search-tests.cc:686] speck_print_trail()
715  0: 40000000001042 40000000000240 -> 1202 0.03 -5.00
716  1: 200000000000012 200000000000002 -> 10 0.12 -3.00
717  2: 1000000000000000 1000000000000000 -> 0 0.50 -1.00
718  3: 0 8000000000000000 -> 8000000000000000 1.00 0.00
719  4: 80000000000000 8000000000000004 -> 8080000000000004 0.25 -2.00
720  5: 480800000000000 8080000000000020 -> 8400800000000020 0.06 -4.00
721 p_trail 0.000031 -15.00
722 
723 real 506m39.601s
724 user 506m47.258s
725 sys 0m2.177s
726 
727 */
728 
729 /*
730 
731 vpv@mazirat:~/exper$ date
732 Mit Sep 30 09:50:46 CEST 2015
733 vpv@mazirat:~/exper$ time ./speck-xor-best-search-tests-w24-r9.bin
734 #--- [./tests/speck-xor-best-search-tests.cc:787] Tests, WORD_SIZE 24 NROUNDS 9 r1 8 r2 3
735 [./tests/speck-xor-best-search-tests.cc:572] Update bound: -33.00 -> -33.00
736 [./tests/speck-xor-best-search-tests.cc:287] speck_print_trail()
737  0: 20808 42084A -> 400052 0.01 -7.00
738  1: 524000 504200 -> 820200 0.03 -5.00
739  2: 8202 1202 -> 9000 0.06 -4.00
740  3: 90 10 -> 80 0.25 -2.00
741  4: 800000 0 -> 800000 1.00 0.00
742  5: 8000 800000 -> 808000 0.50 -1.00
743  6: 8080 808004 -> 800084 0.12 -3.00
744  7: 848000 8400A0 -> 80A0 0.06 -4.00
745  8: A00080 2085A4 -> 808424 0.01 -7.00
746 p_trail 0.000000 -33.00
747 [./tests/speck-xor-best-search-tests.cc:572] Update bound: -33.00 -> -33.00
748 [./tests/speck-xor-best-search-tests.cc:287] speck_print_trail()
749  0: 20808 42084A -> 400052 0.01 -7.00
750  1: 524000 504200 -> 820200 0.03 -5.00
751  2: 8202 1202 -> 9000 0.06 -4.00
752  3: 90 10 -> 80 0.25 -2.00
753  4: 800000 0 -> 800000 1.00 0.00
754  5: 8000 800000 -> 808000 0.50 -1.00
755  6: 8080 808004 -> 800084 0.12 -3.00
756  7: 848000 8400A0 -> 80A0 0.06 -4.00
757  8: A00080 2085A4 -> 808524 0.01 -7.00
758 p_trail 0.000000 -33.00
759 [./tests/speck-xor-best-search-tests.cc:572] Update bound: -33.00 -> -33.00
760 [./tests/speck-xor-best-search-tests.cc:287] speck_print_trail()
761  0: 820808 42084A -> 400052 0.01 -7.00
762  1: 524000 504200 -> 820200 0.03 -5.00
763  2: 8202 1202 -> 9000 0.06 -4.00
764  3: 90 10 -> 80 0.25 -2.00
765  4: 800000 0 -> 800000 1.00 0.00
766  5: 8000 800000 -> 808000 0.50 -1.00
767  6: 8080 808004 -> 800084 0.12 -3.00
768  7: 848000 8400A0 -> 80A0 0.06 -4.00
769  8: A00080 2085A4 -> 808424 0.01 -7.00
770 p_trail 0.000000 -33.00
771 [./tests/speck-xor-best-search-tests.cc:572] Update bound: -33.00 -> -33.00
772 [./tests/speck-xor-best-search-tests.cc:287] speck_print_trail()
773  0: 820808 42084A -> 400052 0.01 -7.00
774  1: 524000 504200 -> 820200 0.03 -5.00
775  2: 8202 1202 -> 9000 0.06 -4.00
776  3: 90 10 -> 80 0.25 -2.00
777  4: 800000 0 -> 800000 1.00 0.00
778  5: 8000 800000 -> 808000 0.50 -1.00
779  6: 8080 808004 -> 800084 0.12 -3.00
780  7: 848000 8400A0 -> 80A0 0.06 -4.00
781  8: A00080 2085A4 -> 808524 0.01 -7.00
782 p_trail 0.000000 -33.00
783 [./tests/speck-xor-best-search-tests.cc:572] Update bound: -33.00 -> -33.00
784 [./tests/speck-xor-best-search-tests.cc:287] speck_print_trail()
785  0: 20818 42084A -> 400052 0.01 -7.00
786  1: 524000 504200 -> 820200 0.03 -5.00
787  2: 8202 1202 -> 9000 0.06 -4.00
788  3: 90 10 -> 80 0.25 -2.00
789  4: 800000 0 -> 800000 1.00 0.00
790  5: 8000 800000 -> 808000 0.50 -1.00
791  6: 8080 808004 -> 800084 0.12 -3.00
792  7: 848000 8400A0 -> 80A0 0.06 -4.00
793  8: A00080 2085A4 -> 808424 0.01 -7.00
794 p_trail 0.000000 -33.00
795 [./tests/speck-xor-best-search-tests.cc:572] Update bound: -33.00 -> -33.00
796 [./tests/speck-xor-best-search-tests.cc:287] speck_print_trail()
797  0: 20818 42084A -> 400052 0.01 -7.00
798  1: 524000 504200 -> 820200 0.03 -5.00
799  2: 8202 1202 -> 9000 0.06 -4.00
800  3: 90 10 -> 80 0.25 -2.00
801  4: 800000 0 -> 800000 1.00 0.00
802  5: 8000 800000 -> 808000 0.50 -1.00
803  6: 8080 808004 -> 800084 0.12 -3.00
804  7: 848000 8400A0 -> 80A0 0.06 -4.00
805  8: A00080 2085A4 -> 808524 0.01 -7.00
806 p_trail 0.000000 -33.00
807 [./tests/speck-xor-best-search-tests.cc:572] Update bound: -33.00 -> -33.00
808 [./tests/speck-xor-best-search-tests.cc:287] speck_print_trail()
809  0: 820818 42084A -> 400052 0.01 -7.00
810  1: 524000 504200 -> 820200 0.03 -5.00
811  2: 8202 1202 -> 9000 0.06 -4.00
812  3: 90 10 -> 80 0.25 -2.00
813  4: 800000 0 -> 800000 1.00 0.00
814  5: 8000 800000 -> 808000 0.50 -1.00
815  6: 8080 808004 -> 800084 0.12 -3.00
816  7: 848000 8400A0 -> 80A0 0.06 -4.00
817  8: A00080 2085A4 -> 808424 0.01 -7.00
818 p_trail 0.000000 -33.00
819 [./tests/speck-xor-best-search-tests.cc:572] Update bound: -33.00 -> -33.00
820 [./tests/speck-xor-best-search-tests.cc:287] speck_print_trail()
821  0: 820818 42084A -> 400052 0.01 -7.00
822  1: 524000 504200 -> 820200 0.03 -5.00
823  2: 8202 1202 -> 9000 0.06 -4.00
824  3: 90 10 -> 80 0.25 -2.00
825  4: 800000 0 -> 800000 1.00 0.00
826  5: 8000 800000 -> 808000 0.50 -1.00
827  6: 8080 808004 -> 800084 0.12 -3.00
828  7: 848000 8400A0 -> 80A0 0.06 -4.00
829  8: A00080 2085A4 -> 808524 0.01 -7.00
830 p_trail 0.000000 -33.00
831 [./tests/speck-xor-best-search-tests.cc:572] Update bound: -33.00 -> -33.00
832 [./tests/speck-xor-best-search-tests.cc:287] speck_print_trail()
833  0: 14809 94009 -> 80802 0.01 -7.00
834  1: 20808 42084A -> 400052 0.01 -7.00
835  2: 524000 504200 -> 820200 0.03 -5.00
836  3: 8202 1202 -> 9000 0.06 -4.00
837  4: 90 10 -> 80 0.25 -2.00
838  5: 800000 0 -> 800000 1.00 0.00
839  6: 8000 800000 -> 808000 0.50 -1.00
840  7: 8080 808004 -> 800084 0.12 -3.00
841  8: 848000 8400A0 -> 80A0 0.06 -4.00
842 p_trail 0.000000 -33.00
843 [./tests/speck-xor-best-search-tests.cc:572] Update bound: -33.00 -> -33.00
844 [./tests/speck-xor-best-search-tests.cc:287] speck_print_trail()
845  0: 1480B 94009 -> 80802 0.01 -7.00
846  1: 20808 42084A -> 400052 0.01 -7.00
847  2: 524000 504200 -> 820200 0.03 -5.00
848  3: 8202 1202 -> 9000 0.06 -4.00
849  4: 90 10 -> 80 0.25 -2.00
850  5: 800000 0 -> 800000 1.00 0.00
851  6: 8000 800000 -> 808000 0.50 -1.00
852  7: 8080 808004 -> 800084 0.12 -3.00
853  8: 848000 8400A0 -> 80A0 0.06 -4.00
854 p_trail 0.000000 -33.00
855 [./tests/speck-xor-best-search-tests.cc:628] Best trail on 9 rounds (WORD_SIZE 24 bits):
856 [./tests/speck-xor-best-search-tests.cc:287] speck_print_trail()
857  0: 1480B 94009 -> 80802 0.01 -7.00
858  1: 20808 42084A -> 400052 0.01 -7.00
859  2: 524000 504200 -> 820200 0.03 -5.00
860  3: 8202 1202 -> 9000 0.06 -4.00
861  4: 90 10 -> 80 0.25 -2.00
862  5: 800000 0 -> 800000 1.00 0.00
863  6: 8000 800000 -> 808000 0.50 -1.00
864  7: 8080 808004 -> 800084 0.12 -3.00
865  8: 848000 8400A0 -> 80A0 0.06 -4.00
866 p_trail 0.000000 -33.00
867 
868 real 2641m31.912s
869 user 2641m59.901s
870 sys 0m4.105s
871 
872 
873 */
874 
875 
876 /*
877 
878 vpv@mazirat:~/exper$ time ./speck-xor-best-search-tests-w48-r7.bin
879 #--- [./tests/speck-xor-best-search-tests.cc:785] Tests, WORD_SIZE 48 NROUNDS 7 r1 8 r2 3
880 [./tests/speck-xor-best-search-tests.cc:570] Update bound: -21.00 -> -21.00
881 [./tests/speck-xor-best-search-tests.cc:287] speck_print_trail()
882  0: 400000924000 400000104200 -> 820200 0.02 -6.00
883  1: 8202 1202 -> 9000 0.06 -4.00
884  2: 90 10 -> 80 0.25 -2.00
885  3: 800000000000 0 -> 800000000000 1.00 0.00
886  4: 8000000000 800000000000 -> 808000000000 0.50 -1.00
887  5: 8080000000 808000000004 -> 800080000004 0.12 -3.00
888  6: 48000800000 840080000020 -> 808080800020 0.03 -5.00
889 p_trail 0.000000 -21.00
890 [./tests/speck-xor-best-search-tests.cc:570] Update bound: -21.00 -> -21.00
891 [./tests/speck-xor-best-search-tests.cc:287] speck_print_trail()
892  0: C00000924000 400000104200 -> 820200 0.02 -6.00
893  1: 8202 1202 -> 9000 0.06 -4.00
894  2: 90 10 -> 80 0.25 -2.00
895  3: 800000000000 0 -> 800000000000 1.00 0.00
896  4: 8000000000 800000000000 -> 808000000000 0.50 -1.00
897  5: 8080000000 808000000004 -> 800080000004 0.12 -3.00
898  6: 48000800000 840080000020 -> 808080800020 0.03 -5.00
899 p_trail 0.000000 -21.00
900 
901 [./tests/speck-xor-best-search-tests.cc:626] Best trail on 7 rounds (WORD_SIZE 48 bits):
902 [./tests/speck-xor-best-search-tests.cc:287] speck_print_trail()
903  0: C00000924000 400000104200 -> 820200 0.02 -6.00
904  1: 8202 1202 -> 9000 0.06 -4.00
905  2: 90 10 -> 80 0.25 -2.00
906  3: 800000000000 0 -> 800000000000 1.00 0.00
907  4: 8000000000 800000000000 -> 808000000000 0.50 -1.00
908  5: 8080000000 808000000004 -> 800080000004 0.12 -3.00
909  6: 48000800000 840080000020 -> 808080800020 0.03 -5.00
910 p_trail 0.000000 -21.00
911 
912 real 4804m48.948s
913 user 4805m56.007s
914 sys 0m7.834s
915 vpv@mazirat:~/exper$
916 
917 */
918 
919 /*
920 Mit Sep 30 09:53:44 CEST 2015
921 vpv@mazirat:~/exper$ time ./speck-xor-best-search-tests-w32-r8.bin
922 #--- [./tests/speck-xor-best-search-tests.cc:788] Tests, WORD_SIZE 32 NROUNDS 8 r1 8 r2 3
923 [./tests/speck-xor-best-search-tests.cc:629] Best trail on 8 rounds (WORD_SIZE 32 bits):
924 [./tests/speck-xor-best-search-tests.cc:287] speck_print_trail()
925  0: 0 0 -> 0 0.00 -inf
926 speck-xor-best-search-tests-w32-r8.bin: ./tests/speck-xor-best-search-tests.cc:297: void speck_print_trail(differential_3d_t*): Assertion `p_tmp == T[i].p' failed.
927 Aborted (core dumped)
928 
929 real 9125m27.374s
930 user 9127m26.841s
931 sys 0m23.766s
932 vpv@mazirat:~/exper$
933 
934 */
935 
936 /*
937 [./tests/speck-best-diff-search-tests.cc:616] Best trail on 9 rounds (WORD_SIZE 16 bits):
938 [./tests/speck-best-diff-search-tests.cc:259] speck_print_diff_trail()
939  0: 1029 1008 -> 21 0.06 -4.00
940  1: 4200 4001 -> 601 0.06 -4.00
941  2: 20C 604 -> 1800 0.02 -6.00
942  3: 30 10 -> 40 0.12 -3.00
943  4: 8000 0 -> 8000 1.00 0.00
944  5: 100 8000 -> 8100 0.50 -1.00
945  6: 102 8102 -> 8000 0.25 -2.00
946  7: 100 840A -> 850A 0.06 -4.00
947  8: 150A 9520 -> 802A 0.02 -6.00
948 p_trail 0.000000 -30.00
949 differential_3d_t g_T[NROUNDS] = {
950 { 1029, 1008, 21, (1.0 / (double)(1ULL << 4))},
951 { 4200, 4001, 601, (1.0 / (double)(1ULL << 4))},
952 { 20C, 604, 1800, (1.0 / (double)(1ULL << 6))},
953 { 30, 10, 40, (1.0 / (double)(1ULL << 3))},
954 { 8000, 0, 8000, (1.0 / (double)(1ULL << 0))},
955 { 100, 8000, 8100, (1.0 / (double)(1ULL << 1))},
956 { 102, 8102, 8000, (1.0 / (double)(1ULL << 2))},
957 { 100, 840A, 850A, (1.0 / (double)(1ULL << 4))},
958 { 150A, 9520, 802A, (1.0 / (double)(1ULL << 6))},
959 };
960 real 284m2.608s
961 user 284m7.306s
962 sys 0m0.312s
963 vpv@mazirat:~/exper/speck-bins$
964 
965 */
966 
967 /*
968 [./tests/speck-best-diff-search-tests.cc:616] Best trail on 6 rounds (WORD_SIZE 32 bits):
969 [./tests/speck-best-diff-search-tests.cc:259] speck_print_diff_trail()
970  0: 401042 400240 -> 1202 0.03 -5.00
971  1: 2000012 2000002 -> 10 0.12 -3.00
972  2: 10000000 10000000 -> 0 0.50 -1.00
973  3: 0 80000000 -> 80000000 1.00 0.00
974  4: 800000 80000004 -> 80800004 0.25 -2.00
975  5: 4808000 80800020 -> 84008020 0.06 -4.00
976 p_trail 0.000031 -15.00
977 differential_3d_t g_T[NROUNDS] = {
978 { 401042, 400240, 1202, (1.0 / (double)(1ULL << 5))},
979 { 2000012, 2000002, 10, (1.0 / (double)(1ULL << 3))},
980 {10000000, 10000000, 0, (1.0 / (double)(1ULL << 1))},
981 { 0, 80000000, 80000000, (1.0 / (double)(1ULL << 0))},
982 { 800000, 80000004, 80800004, (1.0 / (double)(1ULL << 2))},
983 { 4808000, 80800020, 84008020, (1.0 / (double)(1ULL << 4))},
984 };
985 real 166m29.172s
986 user 166m31.882s
987 sys 0m0.596s
988 
989 */
990 
991 /*
992 [./tests/speck-best-diff-search-tests.cc:621] Best trail on 5 rounds (WORD_SIZE 48 bits):
993 [./tests/speck-best-diff-search-tests.cc:259] speck_print_diff_trail()
994  0: 20000000012 20000000002 -> 10 0.12 -3.00
995  1: 100000000000 100000000000 -> 0 0.50 -1.00
996  2: 0 800000000000 -> 800000000000 1.00 0.00
997  3: 8000000000 800000000004 -> 808000000004 0.25 -2.00
998  4: 48080000000 808000000020 -> 840080000020 0.06 -4.00
999 p_trail 0.000977 -10.00
1000 differential_3d_t g_T[NROUNDS] = {
1001 { 20000000012, 20000000002, 10, (1.0 / (double)(1ULL << 3))},
1002 { 100000000000, 100000000000, 0, (1.0 / (double)(1ULL << 1))},
1003 { 0, 800000000000, 800000000000, (1.0 / (double)(1ULL << 0))},
1004 { 8000000000, 800000000004, 808000000004, (1.0 / (double)(1ULL << 2))},
1005 { 48080000000, 808000000020, 840080000020, (1.0 / (double)(1ULL << 4))},
1006 };
1007 real 33m9.655s
1008 user 33m10.355s
1009 sys 0m0.020s
1010 
1011 */
1012 
1013 
1014 /*
1015 [./tests/speck-best-diff-search-tests.cc:621] Best trail on 5 rounds (WORD_SIZE 64 bits):
1016 [./tests/speck-best-diff-search-tests.cc:259] speck_print_diff_trail()
1017 [./tests/speck-best-diff-search-tests.cc:259] speck_print_diff_trail()
1018  0: 200000000000012 200000000000002 -> 10 0.12 -3.00
1019  1: 1000000000000000 1000000000000000 -> 0 0.50 -1.00
1020  2: 0 8000000000000000 -> 8000000000000000 1.00 0.00
1021  3: 80000000000000 8000000000000004 -> 8080000000000004 0.25 -2.00
1022  4: 480800000000000 8080000000000020 -> 8400800000000020 0.06 -4.00
1023 p_trail 0.000977 -10.00
1024 differential_3d_t g_T[NROUNDS] = {
1025 { 200000000000012, 200000000000002, 10, (1.0 / (double)(1ULL << 3))},
1026 {1000000000000000, 1000000000000000, 0, (1.0 / (double)(1ULL << 1))},
1027 { 0, 8000000000000000, 8000000000000000, (1.0 / (double)(1ULL << 0))},
1028 { 80000000000000, 8000000000000004, 8080000000000004, (1.0 / (double)(1ULL << 2))},
1029 { 480800000000000, 8080000000000020, 8400800000000020, (1.0 / (double)(1ULL << 4))},
1030 };
1031 real 140m37.539s
1032 user 140m40.701s
1033 sys 0m0.000s
1034 
1035 */
1036 
1037 /*
1038 
1039 [./tests/speck-best-diff-search-tests.cc:621] Best trail on 6 rounds (WORD_SIZE 48 bits):
1040 [./tests/speck-best-diff-search-tests.cc:259] speck_print_diff_trail()
1041 [./tests/speck-best-[./tests/speck-best-diff-search-tests.cc:259] speck_print_diff_trail()
1042  0: 4000001042 4000000240 -> 1202 0.03 -5.00
1043  1: 20000000012 20000000002 -> 10 0.12 -3.00
1044  2: 100000000000 100000000000 -> 0 0.50 -1.00
1045  3: 0 800000000000 -> 800000000000 1.00 0.00
1046  4: 8000000000 800000000004 -> 808000000004 0.25 -2.00
1047  5: 48080000000 808000000020 -> 840080000020 0.06 -4.00
1048 p_trail 0.000031 -15.00
1049 differential_3d_t g_T[NROUNDS] = {
1050 { 4000001042, 4000000240, 1202, (1.0 / (double)(1ULL << 5))},
1051 { 20000000012, 20000000002, 10, (1.0 / (double)(1ULL << 3))},
1052 { 100000000000, 100000000000, 0, (1.0 / (double)(1ULL << 1))},
1053 { 0, 800000000000, 800000000000, (1.0 / (double)(1ULL << 0))},
1054 { 8000000000, 800000000004, 808000000004, (1.0 / (double)(1ULL << 2))},
1055 { 48080000000, 808000000020, 840080000020, (1.0 / (double)(1ULL << 4))},
1056 };
1057 real 2882m25.538s
1058 user 2883m25.673s
1059 sys 0m1.268s
1060 
1061 */
1062 
1063 /*
1064 
1065 vpv@mazirat:~/exper/speck-bins$ time ./speck-best-diff-search-tests-w48-r6.bin
1066 #--- [./tests/speck-best-diff-search-tests.cc:1336] Tests, WORD_SIZE 48 NROUNDS 6 r1 8 r2 3 g_Bn 2^-15.00
1067 # Update bound: -15 -> -15
1068 differential_3d_t g_T[NROUNDS] = {
1069 { 8202, 1202, 9000, (1.0 / (double)(1ULL << 4))},
1070 { 90, 10, 80, (1.0 / (double)(1ULL << 2))},
1071 { 800000000000, 0, 800000000000, (1.0 / (double)(1ULL << 0))},
1072 { 8000000000, 800000000000, 808000000000, (1.0 / (double)(1ULL << 1))},
1073 { 8080000000, 808000000004, 800080000004, (1.0 / (double)(1ULL << 3))},
1074 { 48000800000, 840080000020, 808080800020, (1.0 / (double)(1ULL << 5))},
1075 };
1076 # Update bound: -15 -> -15
1077 differential_3d_t g_T[NROUNDS] = {
1078 { 4000001042, 4000000240, 1202, (1.0 / (double)(1ULL << 5))},
1079 { 20000000012, 20000000002, 10, (1.0 / (double)(1ULL << 3))},
1080 { 100000000000, 100000000000, 0, (1.0 / (double)(1ULL << 1))},
1081 { 0, 800000000000, 800000000000, (1.0 / (double)(1ULL << 0))},
1082 { 8000000000, 800000000004, 808000000004, (1.0 / (double)(1ULL << 2))},
1083 { 48080000000, 808000000020, 840080000020, (1.0 / (double)(1ULL << 4))},
1084 };
1085 [./tests/speck-best-diff-search-tests.cc:1092] Best trail on 6 rounds (WORD_SIZE 48 bits):
1086 
1087 %------------------------trail start----------------------------------------
1088 \begin{table}[ht]
1089 \caption{Best differential trail for word size 48 rounds 6}
1090 \begin{center}
1091 \begin{tabular}{c@{\hspace{0.4cm}}c@{\hspace{0.4cm}}c@{\hspace{0.4cm}}c@{\hspace{0.4cm}}c@{\hspace{0.4cm}}}
1092 \toprule
1093 $r$ & $\alpha$ & $\beta$ & $\gamma$ & $\mathrm{log}_2 p$\\
1094 \midrule
1095 $ 0$ & \texttt{ 4000001042} & \texttt{ 4000000240} & \texttt{ 1202} & $-inf$ \\
1096 $ 1$ & \texttt{ 20000000012} & \texttt{ 20000000002} & \texttt{ 10} & $-inf$ \\
1097 $ 2$ & \texttt{ 100000000000} & \texttt{ 100000000000} & \texttt{ 0} & $-inf$ \\
1098 $ 3$ & \texttt{ 0} & \texttt{ 800000000000} & \texttt{ 800000000000} & $-inf$ \\
1099 $ 4$ & \texttt{ 8000000000} & \texttt{ 800000000004} & \texttt{ 808000000004} & $-inf$ \\
1100 $ 5$ & \texttt{ 48080000000} & \texttt{ 808000000020} & \texttt{ 840080000020} & $-inf$ \\
1101 \bottomrule
1102 \end{tabular}
1103 \end{center}
1104 \end{table}
1105 %------------------------trail end----------------------------------------
1106 
1107 real 1970m38.225s
1108 user 1971m15.429s
1109 sys 0m1.724s
1110 vpv@mazirat:~/exper/speck-bins$
1111 
1112 
1113 */
1114 
1115 /*
1116 vpv@mazirat:~/exper/speck-bins$ time ./speck-best-diff-search-tests-w32-r7-yann.bin
1117 -- Searching for 7 rounds (WORD_SIZE 32 bits):
1118 -- g_Bn = -15 ... no trail found! [0 s] {34944 nodes -> nan nodes/s}
1119 -- g_Bn = -16 ... no trail found! [0 s] {1546616 nodes -> nan nodes/s}
1120 -- g_Bn = -17 ... no trail found! [1 s] {28484303 nodes -> 2.84843e+07 nodes/s}
1121 -- g_Bn = -18 ... no trail found! [7 s] {690371969 nodes -> 9.86246e+07 nodes/s}
1122 -- g_Bn = -19 ... no trail found! [218 s] {21222356510 nodes -> 9.73503e+07 nodes/s}
1123 -- g_Bn = -20 ... no trail found! [7036 s] {622653038087 nodes -> 8.84953e+07 nodes/s}
1124 -- g_Bn = -21 ...
1125 # 0: 0x40924000 0x40104200 -> 0x 820200 -6 <-6>
1126 # 1: 0x 8202 0x 1202 -> 0x 9000 -4 <-10>
1127 # 2: 0x 90 0x 10 -> 0x 80 -2 <-12>
1128 # 3: 0x80000000 0x 0 -> 0x80000000 +0 <-12>
1129 # 4: 0x 800000 0x80000000 -> 0x80800000 -1 <-13>
1130 # 5: 0x 808000 0x80800004 -> 0x80008004 -3 <-16>
1131 # 6: 0x 4800080 0x84008020 -> 0x808080A0 -5 <-21>
1132 # p_trail -21
1133 
1134 real 535m44.166s
1135 user 535m49.257s
1136 sys 0m0.636s
1137 
1138 */
1139 
1140 /*
1141 vpv@mazirat:~/exper/speck-bins$ time ./speck-best-diff-search-tests-w32-r7.bin
1142 #--- [./tests/speck-best-diff-search-tests.cc:1328] Tests, WORD_SIZE 32 NROUNDS 7 r1 8 r2 3 g_Bn 2^-21.00
1143 # Update bound: -21 -> -21
1144 differential_3d_t g_T[NROUNDS] = {
1145 {40924000, 40104200, 820200, (1.0 / (double)(1ULL << 6))},
1146 { 8202, 1202, 9000, (1.0 / (double)(1ULL << 4))},
1147 { 90, 10, 80, (1.0 / (double)(1ULL << 2))},
1148 {80000000, 0, 80000000, (1.0 / (double)(1ULL << 0))},
1149 { 800000, 80000000, 80800000, (1.0 / (double)(1ULL << 1))},
1150 { 808000, 80800004, 80008004, (1.0 / (double)(1ULL << 3))},
1151 { 4800080, 84008020, 808080A0, (1.0 / (double)(1ULL << 5))},
1152 };
1153 # Update bound: -21 -> -21
1154 differential_3d_t g_T[NROUNDS] = {
1155 {C0924000, 40104200, 820200, (1.0 / (double)(1ULL << 6))},
1156 { 8202, 1202, 9000, (1.0 / (double)(1ULL << 4))},
1157 { 90, 10, 80, (1.0 / (double)(1ULL << 2))},
1158 {80000000, 0, 80000000, (1.0 / (double)(1ULL << 0))},
1159 { 800000, 80000000, 80800000, (1.0 / (double)(1ULL << 1))},
1160 { 808000, 80800004, 80008004, (1.0 / (double)(1ULL << 3))},
1161 { 4800080, 84008020, 808080A0, (1.0 / (double)(1ULL << 5))},
1162 };
1163 # Update bound: -21 -> -21
1164 differential_3d_t g_T[NROUNDS] = {
1165 {92400040, 10420040, 82020000, (1.0 / (double)(1ULL << 5))},
1166 { 820200, 120200, 900000, (1.0 / (double)(1ULL << 4))},
1167 { 9000, 1000, 8000, (1.0 / (double)(1ULL << 2))},
1168 { 80, 0, 80, (1.0 / (double)(1ULL << 1))},
1169 {80000000, 80, 80000080, (1.0 / (double)(1ULL << 1))},
1170 {80800000, 80000480, 800480, (1.0 / (double)(1ULL << 3))},
1171 {80008004, 802084, 8080A080, (1.0 / (double)(1ULL << 5))},
1172 };
1173 
1174 */
1175 
1176 
1177 /*
1178 vpv@mazirat:~/exper/speck-bins$ time ./speck-best-diff-search-tests-w32-r7.bin
1179 #--- [./tests/speck-best-diff-search-tests.cc:1328] Tests, WORD_SIZE 32 NROUNDS 7 r1 8 r2 3 g_Bn 2^-21.00
1180 # Update bound: -21 -> -21
1181 differential_3d_t g_T[NROUNDS] = {
1182 {40924000, 40104200, 820200, (1.0 / (double)(1ULL << 6))},
1183 { 8202, 1202, 9000, (1.0 / (double)(1ULL << 4))},
1184 { 90, 10, 80, (1.0 / (double)(1ULL << 2))},
1185 {80000000, 0, 80000000, (1.0 / (double)(1ULL << 0))},
1186 { 800000, 80000000, 80800000, (1.0 / (double)(1ULL << 1))},
1187 { 808000, 80800004, 80008004, (1.0 / (double)(1ULL << 3))},
1188 { 4800080, 84008020, 808080A0, (1.0 / (double)(1ULL << 5))},
1189 };
1190 # Update bound: -21 -> -21
1191 differential_3d_t g_T[NROUNDS] = {
1192 {C0924000, 40104200, 820200, (1.0 / (double)(1ULL << 6))},
1193 { 8202, 1202, 9000, (1.0 / (double)(1ULL << 4))},
1194 { 90, 10, 80, (1.0 / (double)(1ULL << 2))},
1195 {80000000, 0, 80000000, (1.0 / (double)(1ULL << 0))},
1196 { 800000, 80000000, 80800000, (1.0 / (double)(1ULL << 1))},
1197 { 808000, 80800004, 80008004, (1.0 / (double)(1ULL << 3))},
1198 { 4800080, 84008020, 808080A0, (1.0 / (double)(1ULL << 5))},
1199 };
1200 # Update bound: -21 -> -21
1201 differential_3d_t g_T[NROUNDS] = {
1202 {92400040, 10420040, 82020000, (1.0 / (double)(1ULL << 5))},
1203 { 820200, 120200, 900000, (1.0 / (double)(1ULL << 4))},
1204 { 9000, 1000, 8000, (1.0 / (double)(1ULL << 2))},
1205 { 80, 0, 80, (1.0 / (double)(1ULL << 1))},
1206 {80000000, 80, 80000080, (1.0 / (double)(1ULL << 1))},
1207 {80800000, 80000480, 800480, (1.0 / (double)(1ULL << 3))},
1208 {80008004, 802084, 8080A080, (1.0 / (double)(1ULL << 5))},
1209 };
1210 
1211 [./tests/speck-best-diff-search-tests.cc:1084] Best trail on 7 rounds (WORD_SIZE 32 bits):
1212 
1213 %------------------------trail start----------------------------------------
1214 \begin{table}[ht]
1215 \caption{Best differential trail for word size 32 rounds 7}
1216 \begin{center}
1217 \begin{tabular}{c@{\hspace{0.4cm}}c@{\hspace{0.4cm}}c@{\hspace{0.4cm}}c@{\hspace{0.4cm}}c@{\hspace{0.4cm}}}
1218 \toprule
1219 $r$ & $\alpha$ & $\beta$ & $\gamma$ & $\mathrm{log}_2 p$\\
1220 \midrule
1221 $ 0$ & \texttt{92400040} & \texttt{10420040} & \texttt{82020000} & $-5$ \\
1222 $ 1$ & \texttt{ 820200} & \texttt{ 120200} & \texttt{ 900000} & $-4$ \\
1223 $ 2$ & \texttt{ 9000} & \texttt{ 1000} & \texttt{ 8000} & $-2$ \\
1224 $ 3$ & \texttt{ 80} & \texttt{ 0} & \texttt{ 80} & $-1$ \\
1225 $ 4$ & \texttt{80000000} & \texttt{ 80} & \texttt{80000080} & $-1$ \\
1226 $ 5$ & \texttt{80800000} & \texttt{80000480} & \texttt{ 800480} & $-3$ \\
1227 $ 6$ & \texttt{80008004} & \texttt{ 802084} & \texttt{8080A080} & $-5$ \\
1228 \bottomrule
1229 \end{tabular}
1230 \end{center}
1231 \end{table}
1232 %------------------------trail end----------------------------------------
1233 
1234 real 7244m11.529s
1235 user 7246m28.448s
1236 sys 0m4.458s
1237 vpv@mazirat:~/exper/speck-bins$
1238 
1239 */
1240 
1241 /*
1242 
1243 Time to find all trails for all versions: (20151107)
1244 
1245 vpv@mazirat:~/skcrypto/trunk/work/src/va/speck-best-diff-search-opt/build$ time ../scripts/find_all_trails.sh
1246 
1247 real 4829m27.294s
1248 user 10774m31.274s
1249 sys 0m17.942s
1250 vpv@mazirat:~/skcrypto/trunk/work/src/va/speck-best-diff-search-opt/build$
1251 
1252 
1253 */
1254 
1255 
1256 // --------------- RESULTS FROM speck-best-diff-search-tests.cc : 20150929 -------------}
1257 
1258 // {--------------- RESULTS FROM speck-best-linear--search-tests.cc : 20151015 -------------
1259 
1260 /*
1261 linear-search-tests.cc:615] Best linear trail on 3 rounds (WORD_SIZE 24 bits):
1262 [./tests/speck-best-linear-search-tests.cc:98] speck_print_linear_trail()
1263  0: M_LR 2000 34 1.00 2^0.00
1264  1: M_LR 0 20 0.50 2^-1.00 | m_abc 20 30 -> 20 0.50
1265  2: M_LR 100 100 1.00 2^0.00 | m_abc 0 0 -> 0 1.00
1266  3: M_LR 809 808 1.00 2^0.00 | m_abc 1 1 -> 1 1.00
1267 corr_trail 0.500000 -1.00
1268 differential_t g_T[NROUNDS + 1] = {
1269 { 2000, 34, 0, (1.0 / (double)(1ULL << 0))},
1270 { 0, 20, 0, (1.0 / (double)(1ULL << -1))},
1271 { 100, 100, 0, (1.0 / (double)(1ULL << 0))},
1272 { 809, 808, 0, (1.0 / (double)(1ULL << 0))},
1273 };
1274 real 8m34.033s
1275 user 8m34.227s
1276 sys 0m0.000s
1277 
1278 */
1279 
1280 /*
1281 [./tests/speck-best-linear-search-tests.cc:615] Best linear trail on 5 rounds (WORD_SIZE 16 bits):
1282 [./tests/speck-best-linear-search-tests.cc:98] speck_print_linear_trail()
1283  0: M_LR A0 3021 1.00 2^0.00
1284  1: M_LR 80 4081 0.50 2^-1.00 | m_abc 4001 6001 -> 4001 0.50
1285  2: M_LR 200 201 1.00 2^0.00 | m_abc 1 1 -> 1 1.00
1286  3: M_LR 818 81C 0.50 2^-1.00 | m_abc 4 6 -> 4 0.50
1287  4: M_LR 8000 A010 0.25 2^-2.00 | m_abc 3010 2018 -> 2010 0.25
1288  5: M_LR 85C2 8442 0.50 2^-1.00 | m_abc 100 100 -> 180 0.50
1289 corr_trail 0.031250 -5.00
1290 
1291 real 55m1.290s
1292 user 55m2.337s
1293 sys 0m0.036s
1294 
1295 */
1296 
1297 /*
1298 [./tests/speck-best-linear-search-tests.cc:615] Best linear trail on 6 rounds (WORD_SIZE 16 bits):
1299 [./tests/speck-best-linear-search-tests.cc:98] speck_print_linear_trail()
1300  0: M_LR 4080 40C9 1.00 2^0.00
1301  1: M_LR A0 21 0.50 2^-1.00 | m_abc 81 C1 -> 81 0.50
1302  2: M_LR 80 4081 0.25 2^-2.00 | m_abc 4001 5001 -> 4001 0.25
1303  3: M_LR 200 201 1.00 2^0.00 | m_abc 1 1 -> 1 1.00
1304  4: M_LR 818 81C 0.50 2^-1.00 | m_abc 4 6 -> 4 0.50
1305  5: M_LR 8000 A010 0.25 2^-2.00 | m_abc 3010 2018 -> 2010 0.25
1306  6: M_LR 85C2 8442 0.50 2^-1.00 | m_abc 100 100 -> 180 0.50
1307 corr_trail 0.007812 -7.00
1308 differential_t g_T[NROUNDS + 1] = {
1309 { 4080, 40C9, 0, (1.0 / (double)(1ULL << 0))},
1310 { A0, 21, 0, (1.0 / (double)(1ULL << -1))},
1311 { 80, 4081, 0, (1.0 / (double)(1ULL << -2))},
1312 { 200, 201, 0, (1.0 / (double)(1ULL << 0))},
1313 { 818, 81C, 0, (1.0 / (double)(1ULL << -1))},
1314 { 8000, A010, 0, (1.0 / (double)(1ULL << -2))},
1315 { 85C2, 8442, 0, (1.0 / (double)(1ULL << -1))},
1316 };
1317 real 31m24.575s
1318 user 31m25.106s
1319 sys 0m0.024s
1320 
1321 */
1322 
1323 /*
1324 
1325 vpv@mazirat:~/skcrypto/trunk/work/src/yaarx$ time ./bin/speck-best-linear-search-tests
1326 #--- [./tests/speck-best-linear-search-tests.cc:786] Tests, WORD_SIZE 16 NROUNDS 4 r1 7 r2 2 g_Bn 2^-3.00
1327 [./tests/speck-best-linear-search-tests.cc:550] Update bound: -3.00 -> -3.00
1328 [./tests/speck-best-linear-search-tests.cc:98] speck_print_linear_trail()
1329  0: M_LR 3080 5071 1.00 2^0.00
1330  1: M_LR 4080 40C1 0.50 2^-1.00 | m_abc 61 41 -> 41 0.50
1331  2: M_LR 80 1 0.50 2^-1.00 | m_abc 81 C1 -> 81 0.50
1332  3: M_LR 1 0 1.00 2^0.00 | m_abc 1 1 -> 1 1.00
1333  4: M_LR E00 C00 0.50 2^-1.00 | m_abc 200 300 -> 200 0.50
1334 corr_trail 0.125000 -3.00
1335 [./tests/speck-best-linear-search-tests.cc:550] Update bound: -3.00 -> -3.00
1336 [./tests/speck-best-linear-search-tests.cc:98] speck_print_linear_trail()
1337  0: M_LR 3080 5071 1.00 2^0.00
1338  1: M_LR 4080 40C1 0.50 2^-1.00 | m_abc 61 41 -> 41 0.50
1339  2: M_LR 80 1 0.50 2^-1.00 | m_abc 81 C1 -> 81 0.50
1340  3: M_LR 1 0 1.00 2^0.00 | m_abc 1 1 -> 1 1.00
1341  4: M_LR B00 800 0.50 2^-1.00 | m_abc 200 200 -> 300 0.50
1342 corr_trail 0.125000 -3.00
1343 [./tests/speck-best-linear-search-tests.cc:550] Update bound: -3.00 -> -3.00
1344 [./tests/speck-best-linear-search-tests.cc:98] speck_print_linear_trail()
1345  0: M_LR 2080 5051 1.00 2^0.00
1346  1: M_LR 4080 40C1 0.50 2^-1.00 | m_abc 41 61 -> 41 0.50
1347  2: M_LR 80 1 0.50 2^-1.00 | m_abc 81 C1 -> 81 0.50
1348  3: M_LR 1 0 1.00 2^0.00 | m_abc 1 1 -> 1 1.00
1349  4: M_LR E00 C00 0.50 2^-1.00 | m_abc 200 300 -> 200 0.50
1350 corr_trail 0.125000 -3.00
1351 [./tests/speck-best-linear-search-tests.cc:550] Update bound: -3.00 -> -3.00
1352 [./tests/speck-best-linear-search-tests.cc:98] speck_print_linear_trail()
1353  0: M_LR 2080 5051 1.00 2^0.00
1354  1: M_LR 4080 40C1 0.50 2^-1.00 | m_abc 41 61 -> 41 0.50
1355  2: M_LR 80 1 0.50 2^-1.00 | m_abc 81 C1 -> 81 0.50
1356  3: M_LR 1 0 1.00 2^0.00 | m_abc 1 1 -> 1 1.00
1357  4: M_LR B00 800 0.50 2^-1.00 | m_abc 200 200 -> 300 0.50
1358 corr_trail 0.125000 -3.00
1359 [./tests/speck-best-linear-search-tests.cc:550] Update bound: -3.00 -> -3.00
1360 [./tests/speck-best-linear-search-tests.cc:98] speck_print_linear_trail()
1361  0: M_LR 98 7021 1.00 2^0.00
1362  1: M_LR 6080 4081 0.50 2^-1.00 | m_abc 3001 2001 -> 2001 0.50
1363  2: M_LR 80 1 0.50 2^-1.00 | m_abc C1 81 -> 81 0.50
1364  3: M_LR 1 0 1.00 2^0.00 | m_abc 1 1 -> 1 1.00
1365  4: M_LR E00 C00 0.50 2^-1.00 | m_abc 200 300 -> 200 0.50
1366 corr_trail 0.125000 -3.00
1367 [./tests/speck-best-linear-search-tests.cc:550] Update bound: -3.00 -> -3.00
1368 [./tests/speck-best-linear-search-tests.cc:98] speck_print_linear_trail()
1369  0: M_LR 98 7021 1.00 2^0.00
1370  1: M_LR 6080 4081 0.50 2^-1.00 | m_abc 3001 2001 -> 2001 0.50
1371  2: M_LR 80 1 0.50 2^-1.00 | m_abc C1 81 -> 81 0.50
1372  3: M_LR 1 0 1.00 2^0.00 | m_abc 1 1 -> 1 1.00
1373  4: M_LR B00 800 0.50 2^-1.00 | m_abc 200 200 -> 300 0.50
1374 corr_trail 0.125000 -3.00
1375 [./tests/speck-best-linear-search-tests.cc:550] Update bound: -3.00 -> -3.00
1376 [./tests/speck-best-linear-search-tests.cc:98] speck_print_linear_trail()
1377  0: M_LR 90 6021 1.00 2^0.00
1378  1: M_LR 6080 4081 0.50 2^-1.00 | m_abc 2001 3001 -> 2001 0.50
1379  2: M_LR 80 1 0.50 2^-1.00 | m_abc C1 81 -> 81 0.50
1380  3: M_LR 1 0 1.00 2^0.00 | m_abc 1 1 -> 1 1.00
1381  4: M_LR E00 C00 0.50 2^-1.00 | m_abc 200 300 -> 200 0.50
1382 corr_trail 0.125000 -3.00
1383 [./tests/speck-best-linear-search-tests.cc:550] Update bound: -3.00 -> -3.00
1384 [./tests/speck-best-linear-search-tests.cc:98] speck_print_linear_trail()
1385  0: M_LR 90 6021 1.00 2^0.00
1386  1: M_LR 6080 4081 0.50 2^-1.00 | m_abc 2001 3001 -> 2001 0.50
1387  2: M_LR 80 1 0.50 2^-1.00 | m_abc C1 81 -> 81 0.50
1388  3: M_LR 1 0 1.00 2^0.00 | m_abc 1 1 -> 1 1.00
1389  4: M_LR B00 800 0.50 2^-1.00 | m_abc 200 200 -> 300 0.50
1390 corr_trail 0.125000 -3.00
1391 [./tests/speck-best-linear-search-tests.cc:618] Best linear trail on 4 rounds (WORD_SIZE 16 bits):
1392 [./tests/speck-best-linear-search-tests.cc:98] speck_print_linear_trail()
1393  0: M_LR 90 6021 1.00 2^0.00
1394  1: M_LR 6080 4081 0.50 2^-1.00 | m_abc 2001 3001 -> 2001 0.50
1395  2: M_LR 80 1 0.50 2^-1.00 | m_abc C1 81 -> 81 0.50
1396  3: M_LR 1 0 1.00 2^0.00 | m_abc 1 1 -> 1 1.00
1397  4: M_LR B00 800 0.50 2^-1.00 | m_abc 200 200 -> 300 0.50
1398 corr_trail 0.125000 -3.00
1399 differential_t g_T[NROUNDS + 1] = {
1400 { 90, 6021, 0, (1.0 / (double)(1ULL << 0))},
1401 { 6080, 4081, 0, (1.0 / (double)(1ULL << -1))},
1402 { 80, 1, 0, (1.0 / (double)(1ULL << -1))},
1403 { 1, 0, 0, (1.0 / (double)(1ULL << 0))},
1404 { B00, 800, 0, (1.0 / (double)(1ULL << -1))},
1405 };
1406 real 4m51.457s
1407 user 4m51.546s
1408 sys 0m0.004s
1409 
1410 
1411 */
1412 
1413 
1414 // --------------- RESULTS FROM speck-best-linear--search-tests.cc : 20151015 -------------}
1415 
1416 
1417 // ------------------------- SPECK64 14R -60 (new) --------------------------------
1418 
1419 uint32_t g_nrounds_n32_best = 14;//13;
1420 
1421 double g_bounds_n32_best[SPECK_TRAIL_LEN] = {
1422  1.0, // 0: input diff
1423  (1.0 / (double)(1ULL << 0)), // 1
1424  (1.0 / (double)(1ULL << 1)), // 2
1425  (1.0 / (double)(1ULL << 3)), // 3
1426  (1.0 / (double)(1ULL << 7)), // 4
1427  (1.0 / (double)(1ULL << 13)), // 5
1428  (1.0 / (double)(1ULL << 21)), // 6
1429  (1.0 / (double)(1ULL << 27)), // 7
1430  (1.0 / (double)(1ULL << 32)), // 8
1431  (1.0 / (double)(1ULL << 36)), // 9
1432  (1.0 / (double)(1ULL << 40)), // 10
1433  (1.0 / (double)(1ULL << 44)), // 11
1434  (1.0 / (double)(1ULL << 47)), // 12
1435  (1.0 / (double)(1ULL << 52)), // 13
1436  (1.0 / (double)(1ULL << 60)), // 14
1437  0.0 // dummy
1438 };
1439 
1440 differential_t g_trail_n32_best[SPECK_TRAIL_LEN] = {
1441  { 0x9, 0x1000000, 0, 1.000000}, // input difference
1442  { 0x8000000, 0x0, 0, 0.250000}, // (2^-2.000000)
1443  { 0x80000, 0x80000, 0, 0.500000}, // (2^-1.000000)
1444  { 0x80800, 0x480800, 0, 0.250000}, // (2^-2.000000)
1445  { 0x480008, 0x2084008, 0, 0.062500}, // (2^-4.000000)
1446  { 0x6080808, 0x164A0848, 0, 0.007812}, // (2^-7.000000)
1447  {0xF2400040, 0x40104200, 0, 0.000122}, // (2^-13.000000)
1448  { 0x820200, 0x1202, 0, 0.003906}, // (2^-8.000000)
1449  { 0x9000, 0x10, 0, 0.062500}, // (2^-4.000000)
1450  { 0x80, 0x0, 0, 0.250000}, // (2^-2.000000)
1451  {0x80000000, 0x80000000, 0, 1.000000}, // (2^0.000000)
1452  {0x80800000, 0x80800004, 0, 0.500000}, // (2^-1.000000)
1453  {0x80008004, 0x84008020, 0, 0.125000}, // (2^-3.000000)
1454  {0x808080A0, 0xA08481A4, 0, 0.031250}, // (2^-5.000000)
1455  { 0x40024, 0x4200D01, 0, 0.003906}, // (2^-8.000000)
1456  {0, 0, 0, 0.0} // dummy
1457 }; // 2^-60
1458 
1459 
1460 // ------------------------- SPECK32 9R -30, 10R -34 (new) --------------------------------
1461 
1462 /*
1463 Used two tables: 2^32 for the first round and 2^25 HWays for intermediate rounds
1464 
1465 [./tests/speck-xor-threshold-search-tests.cc:1255] WORD_SIZE 16 NROUNDS 10 SPECK_P_THRES 0.007812 2^-7.000000 SPECK_MAX_DIFF_CNT 33554432 2^25.00 SPECK_BACK_TO_HWAY 0 SPECK_GREEDY_SEARCH 0 SPECK_MAX_HW 7 SPECK_CLUSTER_MAX_HW 9 SPECK_EPS 2^-15.00
1466 
1467 real 240m59.465s
1468 user 240m29.450s
1469 sys 0m7.748s
1470 */
1471 
1472 uint32_t g_nrounds_n16_best = 9; // 10
1473 
1474 double g_bounds_n16_best[SPECK_TRAIL_LEN] = {
1475  1.0, // 0: input diff
1476  (1.0 / (double)(1ULL << 0)), // 1
1477  (1.0 / (double)(1ULL << 1)), // 2
1478  (1.0 / (double)(1ULL << 3)), // 3
1479  (1.0 / (double)(1ULL << 5)), // 4
1480  (1.0 / (double)(1ULL << 9)), // 5
1481  (1.0 / (double)(1ULL << 13)), // 6
1482  (1.0 / (double)(1ULL << 18)), // 7
1483  (1.0 / (double)(1ULL << 24)), // 8
1484  (1.0 / (double)(1ULL << 30)), // 9
1485  (1.0 / (double)(1ULL << 34)), // 10
1486  0.0, // dummy
1487  0.0, // dummy
1488  0.0, // dummy
1489  0.0 // dummy
1490 };
1491 
1492 differential_t g_trail_n16_best[SPECK_TRAIL_LEN] = {
1493  {0x8054, 0xA900, 0, 1.000000}, // 0 : input difference, p = 1
1494  { 0x0, 0xA402, 0, 0.125000}, //2^(-3.000000)
1495  {0xA402, 0x3408, 0, 0.125000}, //2^(-3.000000)
1496  {0x50C0, 0x80E0, 0, 0.003906}, //2^(-8.000000)
1497  { 0x181, 0x203, 0, 0.062500}, //2^(-4.000000)
1498  { 0xC, 0x800, 0, 0.031250}, //2^(-5.000000)
1499  {0x2000, 0x0, 0, 0.125000}, //2^(-3.000000)
1500  { 0x40, 0x40, 0, 0.500000}, //2^(-1.000000)
1501  {0x8040, 0x8140, 0, 0.500000}, //2^(-1.000000)
1502  { 0x40, 0x542, 0, 0.250000}, //2^(-2.000000)
1503  {0x8542, 0x904A, 0, 0.062500}, //2^(-4.000000)
1504  {0, 0, 0, 0.0}, // dummy
1505  {0, 0, 0, 0.0}, // dummy
1506  {0, 0, 0, 0.0}, // dummy
1507  {0, 0, 0, 0.0}, // dummy
1508  {0, 0, 0, 0.0} // dummy
1509 };
1510 
1511 
1512 
1513 // ------------------------- SPECK32 9R -31 --------------------------------
1514 
1515 /*
1516 Found with parameters:
1517 [./tests/speck-xor-threshold-search-tests.cc:158] WORD_SIZE 16 NROUNDS 9 SPECK_P_THRES 0.031250 2^-5.000000 SPECK_MAX_DIFF_CNT 1073741824 2^30.00 SPECK_BACK_TO_HWAY 0 SPECK_GREEDY_SEARCH 1 SPECK_MAX_HW 9 SPECK_CLUSTER_MAX_HW 9 SPECK_EPS 2^-15.00
1518 */
1519 //[./src/speck-xor-threshold-search.cc:1148] Found 1 trails:
1520 //[ 1] A60 4205 211 A04 2800 10 40 0 8000 8000 8100 8102 8000 840A 850A 9520 802A D4A8 A8 520B | 2^-31.000000
1521 //Probability of differential: 2^-31.000000
1522 
1523 uint32_t g_nrounds_n16_1 = 9;
1524 
1525 double g_bounds_n16_1[SPECK_TRAIL_LEN] = {
1526  1.0, // 0: input diff
1527  (1.0 / (double)(1ULL << 0)), // 1
1528  (1.0 / (double)(1ULL << 1)), // 2
1529  (1.0 / (double)(1ULL << 3)), // 3
1530  (1.0 / (double)(1ULL << 5)), // 4
1531  (1.0 / (double)(1ULL << 9)), // 5
1532  (1.0 / (double)(1ULL << 13)), // 6
1533  (1.0 / (double)(1ULL << 18)), // 7
1534  (1.0 / (double)(1ULL << 24)), // 8
1535  (1.0 / (double)(1ULL << 31)), // 9
1536  0.0, // dummy
1537  0.0, // dummy
1538  0.0, // dummy
1539  0.0, // dummy
1540  0.0, // dummy
1541  0.0 // dummy
1542 };
1543 
1544 differential_t g_trail_n16_1[SPECK_TRAIL_LEN] = {
1545  { 0xA60, 0x4205, 0, 1.0}, // 0 : input difference, p = 1
1546  { 0x211, 0xA04, 0, 0.031250}, //(2^-5.000000)
1547  {0x2800, 0x10, 0, 0.062500}, //(2^-4.000000)
1548  { 0x40, 0x0, 0, 0.250000}, //(2^-2.000000)
1549  {0x8000, 0x8000, 0, 1.000000}, //(2^0.000000)
1550  {0x8100, 0x8102, 0, 0.500000}, //(2^-1.000000)
1551  {0x8000, 0x840A, 0, 0.250000}, //(2^-2.000000)
1552  {0x850A, 0x9520, 0, 0.062500}, //(2^-4.000000)
1553  {0x802A, 0xD4A8, 0, 0.015625}, //(2^-6.000000)
1554  { 0xA8, 0x520B, 0, 0.007812}, //(2^-7.000000)
1555  {0, 0, 0, 0.0}, // dummy
1556  {0, 0, 0, 0.0}, // dummy
1557  {0, 0, 0, 0.0}, // dummy
1558  {0, 0, 0, 0.0}, // dummy
1559  {0, 0, 0, 0.0}, // dummy
1560  {0, 0, 0, 0.0} // dummy
1561 };
1562 
1563 // ------------------------- SPECK48 10R -45 --------------------------------
1564 
1565 /*
1566 Found with parameters:
1567 
1568 Time: Sat Nov 9 23:51:01 2013
1569 [./tests/speck-xor-threshold-search-tests.cc:158] WORD_SIZE 24 NROUNDS 10 SPECK_P_THRES 0.031250 2^-5.000000 SPECK_MAX_DIFF_CNT 4294967296 2^32.00 SPECK_BACK_TO_HWAY 0 SPECK_GREEDY_SEARCH 1 SPECK_MAX_HW 7 SPECK_CLUSTER_MAX_HW 7 SPECK_EPS 2^-15.00
1570 
1571 [./src/speck-xor-threshold-search.cc:1273] Found 1 trails:
1572 [ 1] 88A 484008 424000 4042 202 20012 10 100080 80 800480 480 2084 802080 8124A0 A480 98184 888020 C48C00 240480 6486 800082 8324B2 | 2^-45.000000
1573 Probability of differential: 2^-45.000000
1574 Probability of differential: 2^-43.873998
1575 [./src/speck-xor-threshold-search.cc:1311] 10 R ( 88A 484008) -> ( 800082 8324B2) : [ 30 trails] 2^-43.873998
1576 
1577 */
1578 uint32_t g_nrounds_n24_1 = 10;
1579 
1580 double g_bounds_n24_1[SPECK_TRAIL_LEN] = {
1581  1.0, // 0: input diff
1582  (1.0 / (double)(1ULL << 0)), // 1
1583  (1.0 / (double)(1ULL << 1)), // 2
1584  (1.0 / (double)(1ULL << 3)), // 3
1585  (1.0 / (double)(1ULL << 6)), // 4
1586  (1.0 / (double)(1ULL << 10)), // 5
1587  (1.0 / (double)(1ULL << 14)), // 6
1588  (1.0 / (double)(1ULL << 19)), // 7
1589  (1.0 / (double)(1ULL << 26)), // 8
1590  (1.0 / (double)(1ULL << 35)), // 9
1591  (1.0 / (double)(1ULL << 45)), // 10
1592  0.0, // dummy
1593  0.0, // dummy
1594  0.0, // dummy
1595  0.0, // dummy
1596  0.0 // dummy
1597 };
1598 
1599 differential_t g_trail_n24_1[SPECK_TRAIL_LEN] = {
1600  { 0x88A, 0x484008, 0, 1.0}, // 0 : input difference, p = 1
1601  {0x424000, 0x4042, 0, 0.031250}, //(2^2^-5.000000)
1602  { 0x202, 0x20012, 0, 0.062500}, //(2^2^-4.000000)
1603  { 0x10, 0x100080, 0, 0.125000}, //(2^2^-3.000000)
1604  { 0x80, 0x800480, 0, 0.250000}, //(2^2^-2.000000)
1605  { 0x480, 0x2084, 0, 0.250000}, //(2^2^-2.000000)
1606  {0x802080, 0x8124A0, 0, 0.125000}, //(2^2^-3.000000)
1607  { 0xA480, 0x98184, 0, 0.015625}, //(2^2^-6.000000)
1608  {0x888020, 0xC48C00, 0, 0.007812}, //(2^2^-7.000000)
1609  {0x240480, 0x6486, 0, 0.007812}, //(2^2^-7.000000)
1610  {0x800082, 0x8324B2, 0, 0.015625}, //(2^2^-6.000000)
1611  {0, 0, 0, 0.0}, // dummy
1612  {0, 0, 0, 0.0}, // dummy
1613  {0, 0, 0, 0.0}, // dummy
1614  {0, 0, 0, 0.0}, // dummy
1615  {0, 0, 0, 0.0} // dummy
1616 }; // total p = 2^-45
1617 
1618 
1619 // ------------------------- SPECK48 10R -40 (new) --------------------------------
1620 
1621 /*
1622  Found with start-from-the-middle threshold search
1623 */
1624 
1625 uint32_t g_nrounds_n24_2 = 10;
1626 
1627 double g_bounds_n24_2[SPECK_TRAIL_LEN] = {
1628  1.0, // 0: input diff
1629  (1.0 / (double)(1ULL << 0)), // 1
1630  (1.0 / (double)(1ULL << 1)), // 2
1631  (1.0 / (double)(1ULL << 4)), // 3
1632  (1.0 / (double)(1ULL << 8)), // 4
1633  (1.0 / (double)(1ULL << 15)), // 5
1634  (1.0 / (double)(1ULL << 17)), // 6
1635  (1.0 / (double)(1ULL << 21)), // 7
1636  (1.0 / (double)(1ULL << 26)), // 8
1637  (1.0 / (double)(1ULL << 33)), // 9
1638  (1.0 / (double)(1ULL << 40)), // 10
1639  0.0, // dummy
1640  0.0, // dummy
1641  0.0, // dummy
1642  0.0, // dummy
1643  0.0 // dummy
1644 };
1645 
1646 differential_t g_trail_n24_2[SPECK_TRAIL_LEN] = {
1647  {0x480901, 0x94009, 0, 1.000000}, // 0 : input difference, p = 1
1648  { 0x80802, 0x42084A, 0, 0.007812}, // (2^-7.000000)
1649  {0x400052, 0x504200, 0, 0.007812}, // (2^-7.000000)
1650  {0x820200, 0x1202, 0, 0.031250}, // (2^-5.000000)
1651  { 0x9000, 0x10, 0, 0.062500}, // (2^-4.000000)
1652  { 0x80, 0x0, 0, 0.250000}, // (2^-2.000000)
1653  {0x800000, 0x800000, 0, 1.000000}, // (2^-0.000000)
1654  {0x808000, 0x808004, 0, 0.500000}, // (2^-1.000000)
1655  {0x800084, 0x8400A0, 0, 0.125000}, // (2^-3.000000)
1656  { 0x80A0, 0x2085A4, 0, 0.062500}, // (2^-4.000000)
1657  {0x808424, 0x84A905, 0, 0.007812}, // (2^-7.000000)
1658  {0, 0, 0, 0.0}, // dummy
1659  {0, 0, 0, 0.0}, // dummy
1660  {0, 0, 0, 0.0}, // dummy
1661  {0, 0, 0, 0.0}, // dummy
1662  {0, 0, 0, 0.0} // dummy
1663 }; // total p = 2^-45
1664 
1665 // ------------------------- SPECK48 11R -47 (new) --------------------------------
1666 
1667 /*
1668  Found with start-from-the-middle threshold search
1669 */
1670 
1671 uint32_t g_nrounds_n24_best = 11;
1672 
1673 double g_bounds_n24_best[SPECK_TRAIL_LEN] = {
1674  1.0, // 0: input diff
1675  (1.0 / (double)(1ULL << 0)), // 1
1676  (1.0 / (double)(1ULL << 1)), // 2
1677  (1.0 / (double)(1ULL << 4)), // 3
1678  (1.0 / (double)(1ULL << 8)), // 4
1679  (1.0 / (double)(1ULL << 15)), // 5
1680  (1.0 / (double)(1ULL << 17)), // 6
1681  (1.0 / (double)(1ULL << 21)), // 7
1682  (1.0 / (double)(1ULL << 26)), // 8
1683  (1.0 / (double)(1ULL << 33)), // 9
1684  (1.0 / (double)(1ULL << 40)), // 10
1685  (1.0 / (double)(1ULL << 47)), // 11
1686  0.0, // dummy
1687  0.0, // dummy
1688  0.0, // dummy
1689  0.0 // dummy
1690 };
1691 
1692 differential_t g_trail_n24_best[SPECK_TRAIL_LEN] = {
1693  {0x202040, 0x82921, 0, 1.000000}, // 0 : input difference, p = 1
1694  {0x480901, 0x94009, 0, 0.007812}, // (2^-7.000000)
1695  { 0x80802, 0x42084A, 0, 0.007812}, // (2^-7.000000)
1696  {0x400052, 0x504200, 0, 0.007812}, // (2^-7.000000)
1697  {0x820200, 0x1202, 0, 0.031250}, // (2^-5.000000)
1698  { 0x9000, 0x10, 0, 0.062500}, // (2^-4.000000)
1699  { 0x80, 0x0, 0, 0.250000}, // (2^-2.000000)
1700  {0x800000, 0x800000, 0, 1.000000}, // (2^0.000000)
1701  {0x808000, 0x808004, 0, 0.500000}, // (2^-1.000000)
1702  {0x800084, 0x8400A0, 0, 0.125000}, // (2^-3.000000)
1703  { 0x80A0, 0x2085A4, 0, 0.062500}, // (2^-4.000000)
1704  {0x808424, 0x84A905, 0, 0.007812}, // (2^-7.000000)
1705  {0, 0, 0, 0.0}, // dummy
1706  {0, 0, 0, 0.0}, // dummy
1707  {0, 0, 0, 0.0}, // dummy
1708  {0, 0, 0, 0.0} // dummy
1709 }; // total p = 2^-47
1710 
1711 // ------------------------- SPECK64 13 -63 --------------------------------
1712 
1713 uint32_t g_nrounds_n32_1 = 13;
1714 
1715 double g_bounds_n32_1[SPECK_TRAIL_LEN] = {
1716  1.0, // 0: input diff
1717  (1.0 / (double)(1ULL << 0)), // 1
1718  (1.0 / (double)(1ULL << 1)), // 2
1719  (1.0 / (double)(1ULL << 3)), // 3
1720  (1.0 / (double)(1ULL << 6)), // 4
1721  (1.0 / (double)(1ULL << 11)), // 5
1722  (1.0 / (double)(1ULL << 16)), // 6
1723  (1.0 / (double)(1ULL << 21)), // 7
1724  (1.0 / (double)(1ULL << 29)), // 8
1725  (1.0 / (double)(1ULL << 34)), // 9
1726  (1.0 / (double)(1ULL << 38)), // 10
1727  (1.0 / (double)(1ULL << 44)), // 11
1728  (1.0 / (double)(1ULL << 51)), // 12
1729  (1.0 / (double)(1ULL << 58)), // 13
1730  0.0, // dummy
1731  0.0 // dummy
1732 };
1733 
1734 differential_t g_trail_n32_1[SPECK_TRAIL_LEN] = {
1735  {0x50400092, 0x10404000, 0, 1.000000},
1736  {0x82100000, 0x120000, 0, 0.031250}, //(2^-5.000000)
1737  { 0x901000, 0x1000, 0, 0.062500}, //(2^-4.000000)
1738  { 0x8010, 0x10, 0, 0.125000}, //(2^-3.000000)
1739  {0x10000090, 0x10000010, 0, 0.125000}, //(2^-3.000000)
1740  {0x80100010, 0x100090, 0, 0.125000}, //(2^-3.000000)
1741  {0x10901090, 0x10101410, 0, 0.015625}, //(2^-6.000000)
1742  {0x80008400, 0x802480, 0, 0.015625}, //(2^-6.000000)
1743  { 0x2404, 0x4010004, 0, 0.031250}, //(2^-5.000000)
1744  { 0x10020, 0x20090000, 0, 0.062500}, //(2^-4.000000)
1745  { 0x90100, 0x410101, 0, 0.062500}, //(2^-4.000000)
1746  { 0x410800, 0x2490008, 0, 0.031250}, //(2^-5.000000)
1747  { 0x2494100, 0x10014140, 0, 0.007812}, //(2^-7.000000)
1748  {0x10010801, 0x900B0201, 0, 0.003906}, //(2^-8.000000)
1749  {0, 0, 0, 0.0}, // dummy
1750  {0, 0, 0, 0.0} // dummy
1751 }; // 2^-63
1752 
1753 // ------------------------- SPECK64 13R -58 --------------------------------
1754 
1755 /*
1756 Found with parameters:
1757 [ 48] 802490 10800004 83808020 7808000 3C000080 40080 80200080 80000480 802480 800084 808080A0 84808480 24000400 42004 202000 12020 10000 80100 80000 480800 480000 2084000 2080800 124A0800 12480008 80184008 880A0808 88C8084C | 2^-68.000000
1758 
1759 Probability of differential: 2^-57.697796
1760 [./src/speck-xor-threshold-search.cc:1216] 13 R ( 802490 10800004) -> (880A0808 88C8084C) : [ 48 trails] 2^-57.697796
1761  [./tests/speck-xor-threshold-search-tests.cc:165] WORD_SIZE 32 NROUNDS 13 SPECK_P_THRES 0.031250 2^-5.000000 SPECK_MAX_DIFF_CNT 4194304 2^22.00 SPECK_BACK_TO_HWAY 0 SPECK_GREEDY_SEARCH 1 SPECK_MAX_HW 9 SPECK_CLUSTER_MAX_HW 9 SPECK_EPS 2^-5.00
1762 
1763 {--------- new ---------
1764  [./tests/speck-xor-threshold-search-tests.cc:1055] WORD_SIZE 32 NROUNDS 13 SPECK_P_THRES 0.031250 2^-5.000000 SPECK_MAX_DIFF_CNT 4194304 2^22.00 SPECK_BACK_TO_HWAY 0 SPECK_GREEDY_SEARCH 1 SPECK_MAX_HW 9 SPECK_CLUSTER_MAX_HW 9 SPECK_EPS 2^-5.00
1765 
1766  [./tests/speck-xor-threshold-search-tests.cc:1055] WORD_SIZE 32 NROUNDS 13 SPECK_P_THRES 0.007812 2^-7.000000 SPECK_MAX_DIFF_CNT 4194304 2^22.00 SPECK_BACK_TO_HWAY 0 SPECK_GREEDY_SEARCH 0 SPECK_MAX_HW 9 SPECK_CLUSTER_MAX_HW 9 SPECK_EPS 2^-15.00
1767 --------- new ---------}
1768 
1769 
1770 [
1771 [./src/speck-xor-threshold-search.cc:1316] 13 R ( 802490 10800004) -> (880A0808 88C8084C) : [ 728 trails] 2^-57.8633224925 <--- eps 2^-35
1772 [./tests/speck-xor-threshold-search-tests.cc:156] WORD_SIZE 32 NROUNDS 13 SPECK_P_THRES 0.031250 2^-5.000000 SPECK_MAX_DIFF_CNT 33554432 2^25.00 SPECK_BACK_TO_HWAY 0 SPECK_GREEDY_SEARCH 1 SPECK_MAX_HW 9 SPECK_CLUSTER_MAX_HW 7 SPECK_EPS 2^-35.00
1773 */
1774 //uint32_t g_nrounds_n32_2 = 13;
1775 uint32_t g_nrounds_n32_best_old = 13;
1776 
1777 double g_bounds_n32_best_old[SPECK_TRAIL_LEN] = {
1778  1.0, // 0: input diff
1779  (1.0 / (double)(1ULL << 0)), // 1
1780  (1.0 / (double)(1ULL << 1)), // 2
1781  (1.0 / (double)(1ULL << 3)), // 3
1782  (1.0 / (double)(1ULL << 6)), // 4
1783  (1.0 / (double)(1ULL << 11)), // 5
1784  (1.0 / (double)(1ULL << 16)), // 6
1785  (1.0 / (double)(1ULL << 21)), // 7
1786  (1.0 / (double)(1ULL << 29)), // 8
1787  (1.0 / (double)(1ULL << 34)), // 9
1788  (1.0 / (double)(1ULL << 38)), // 10
1789  (1.0 / (double)(1ULL << 44)), // 11
1790  (1.0 / (double)(1ULL << 51)), // 12
1791  (1.0 / (double)(1ULL << 58)), // 13
1792  0.0, // dummy
1793  0.0 // dummy
1794 };
1795 
1796 differential_t g_trail_n32_best_old[SPECK_TRAIL_LEN] = {
1797  { 0x802490, 0x10800004, 0, 1.0}, // 0 : input difference, p = 1
1798  {0x80808020, 0x4808000, 0, 0.031250}, //2^(-5.000000) //1
1799  {0x24000080, 0x40080, 0, 0.031250}, //2^(-5.000000) //2
1800  {0x80200080, 0x80000480, 0, 0.125000}, //2^(-3.000000) //3
1801  { 0x802480, 0x800084, 0, 0.062500}, //2^(-4.000000) //4
1802  {0x808080A0, 0x84808480, 0, 0.031250}, //2^(-5.000000) //5
1803  {0x24000400, 0x42004, 0, 0.015625}, //2^(-6.000000) //6
1804  { 0x202000, 0x12020, 0, 0.062500}, //2^(-4.000000) //7
1805  { 0x10000, 0x80100, 0, 0.125000}, //2^(-3.000000) //8
1806  { 0x80000, 0x480800, 0, 0.250000}, //2^(-2.000000) //9
1807  { 0x480000, 0x2084000, 0, 0.125000}, //2^(-3.000000) //10
1808  { 0x2080800, 0x124A0800, 0, 0.062500}, //2^(-4.000000) //11
1809  {0x12480008, 0x80184008, 0, 0.007812}, //2^(-7.000000) //12
1810  {0x880A0808, 0x88C8084C, 0, 0.007812}, //2^(-7.000000) //13
1811  {0, 0, 0, 0.0}, // dummy
1812  {0, 0, 0, 0.0} // dummy
1813 }; // total: 2^-58
1814 //trail: 802490 10800004 80808020 4808000 24000080 40080 80200080 80000480 802480 800084 808080A0 84808480 24000400 42004 202000 12020 10000 80100 80000 480800 480000 2084000 2080800 124A0800 12480008 80184008 880A0808 88C8084C | 2^-58.000000
1815 
1816 // ------------------------- SPECK64 13R -58 --------------------------------
1817 
1818 /*
1819  Prob. of differential: 2^-57.68
1820  [./src/speck-xor-threshold-search.cc:1803] Initial trail: 13 R (50400092 10404000) -> ( 8010041 10249) : [ 1 trails] 2^-58.000000
1821  [./src/speck-xor-threshold-search.cc:1714] this: 2^-72.000000 (best: 2^-58.000000) 10249) : [ 13 trails] 2^-57.6882516850
1822  [./tests/speck-xor-threshold-search-tests.cc:165] WORD_SIZE 32 NROUNDS 13 SPECK_P_THRES 0.031250 2^-5.000000 SPECK_MAX_DIFF_CNT 4194304 2^22.00 SPECK_BACK_TO_HWAY 0 SPECK_GREEDY_SEARCH 1 SPECK_MAX_HW 6 SPECK_CLUSTER_MAX_HW 6 SPECK_EPS 2^-5.00
1823 */
1824 uint32_t g_nrounds_n32_3 = 13;
1825 
1826 double g_bounds_n32_3[SPECK_TRAIL_LEN] = {
1827  1.0, // 0: input diff
1828  (1.0 / (double)(1ULL << 0)), // 1
1829  (1.0 / (double)(1ULL << 1)), // 2
1830  (1.0 / (double)(1ULL << 3)), // 3
1831  (1.0 / (double)(1ULL << 6)), // 4
1832  (1.0 / (double)(1ULL << 11)), // 5
1833  (1.0 / (double)(1ULL << 16)), // 6
1834  (1.0 / (double)(1ULL << 21)), // 7
1835  (1.0 / (double)(1ULL << 29)), // 8
1836  (1.0 / (double)(1ULL << 34)), // 9
1837  (1.0 / (double)(1ULL << 38)), // 10
1838  (1.0 / (double)(1ULL << 44)), // 11
1839  (1.0 / (double)(1ULL << 51)), // 12
1840  (1.0 / (double)(1ULL << 58)), // 13
1841  0.0, // dummy
1842  0.0 // dummy
1843 };
1844 
1845 differential_t g_trail_n32_3[SPECK_TRAIL_LEN] = {
1846  {0x50400092, 0x10404000, 0, 1.000000},
1847  {0x82100000, 0x120000, 0, (1.0 / (double)(1ULL << 5))},
1848  { 0x901000, 0x1000, 0, (1.0 / (double)(1ULL << 4))},
1849  { 0x8010, 0x10, 0, (1.0 / (double)(1ULL << 3))},
1850  {0x10000090, 0x10000010, 0, (1.0 / (double)(1ULL << 3))},
1851  {0x80100010, 0x100090, 0, (1.0 / (double)(1ULL << 3))},
1852  {0x10901090, 0x10101410, 0, (1.0 / (double)(1ULL << 6))},
1853  {0x8000BC00, 0x801C80, 0, (1.0 / (double)(1ULL << 7))},
1854  { 0xE404, 0x4000004, 0, (1.0 / (double)(1ULL << 12))},
1855  { 0x20, 0x20000000, 0, (1.0 / (double)(1ULL << 5))},
1856  { 0x0, 0x1, 0, (1.0 / (double)(1ULL << 1))},
1857  { 0x1, 0x9, 0, (1.0 / (double)(1ULL << 1))},
1858  { 0x1000009, 0x1000041, 0, (1.0 / (double)(1ULL << 3))},
1859  { 0x8010041, 0x10249, 0, (1.0 / (double)(1ULL << 5))},
1860  {0, 0, 0, 0.0}, // dummy
1861  {0, 0, 0, 0.0} // dummy
1862 }; // 2^-58
1863 //#endif
1864 
1865 
1866 #endif // #ifndef SPECK_TRAILS_H
Definition: common.hh:272