YAARX: Yet Another ARX Toolkit  0.1
 All Data Structures Files Functions Variables Macros Pages
speck-xor-best-trails.hh
Go to the documentation of this file.
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  */
27 #ifndef SPECK_XOR_BEST_TRAILS_H
28 #define SPECK_XOR_BEST_TRAILS_H
29 
30 /*
31 Found with parameters:
32 [./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
33 */
34 
35 // Speck32, 9R, -31
36 differential_t g_speck32_trail_9r[SPECK_TRAIL_LEN_MAX] = {
37  { 0xA60, 0x4205, 0, 1.0}, // 0 : input difference, p = 1
38  { 0x211, 0xA04, 0, 0.031250}, //(2^-5.000000)
39  {0x2800, 0x10, 0, 0.062500}, //(2^-4.000000)
40  { 0x40, 0x0, 0, 0.250000}, //(2^-2.000000)
41  {0x8000, 0x8000, 0, 1.000000}, //(2^0.000000)
42  {0x8100, 0x8102, 0, 0.500000}, //(2^-1.000000)
43  {0x8000, 0x840A, 0, 0.250000}, //(2^-2.000000)
44  {0x850A, 0x9520, 0, 0.062500}, //(2^-4.000000)
45  {0x802A, 0xD4A8, 0, 0.015625}, //(2^-6.000000)
46  { 0xA8, 0x520B, 0, 0.007812}, //(2^-7.000000)
47  {0, 0, 0, 0.0}, // dummy
48  {0, 0, 0, 0.0}, // dummy
49  {0, 0, 0, 0.0}, // dummy
50  {0, 0, 0, 0.0} // dummy
51 };
52 
53 /*
54 [./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
55 */
56 // Speck48, 10R, -45
57 differential_t g_speck48_trail_10r[SPECK_TRAIL_LEN_MAX] = {
58  { 0x88A, 0x484008, 0, 1.0}, // 0 : input difference, p = 1
59  {0x424000, 0x4042, 0, 0.031250}, //(2^2^-5.000000)
60  { 0x202, 0x20012, 0, 0.062500}, //(2^2^-4.000000)
61  { 0x10, 0x100080, 0, 0.125000}, //(2^2^-3.000000)
62  { 0x80, 0x800480, 0, 0.250000}, //(2^2^-2.000000)
63  { 0x480, 0x2084, 0, 0.250000}, //(2^2^-2.000000)
64  {0x802080, 0x8124A0, 0, 0.125000}, //(2^2^-3.000000)
65  { 0xA480, 0x98184, 0, 0.015625}, //(2^2^-6.000000)
66  {0x888020, 0xC48C00, 0, 0.007812}, //(2^2^-7.000000)
67  {0x240480, 0x6486, 0, 0.007812}, //(2^2^-7.000000)
68  {0x800082, 0x8324B2, 0, 0.015625}, //(2^2^-6.000000)
69  {0, 0, 0, 0.0}, // dummy
70  {0, 0, 0, 0.0}, // dummy
71  {0, 0, 0, 0.0} // dummy
72 }; // total p = 2^-45
73 
74 /*
75 [./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
76 */
77 
78 // Speck64, 13R, -58
79 differential_t g_speck64_trail_13r[SPECK_TRAIL_LEN_MAX] = {
80  { 0x802490, 0x10800004, 0, 1.0}, // 0 : input difference, p = 1
81  {0x80808020, 0x4808000, 0, 0.031250}, //2^(-5.000000) //1
82  {0x24000080, 0x40080, 0, 0.031250}, //2^(-5.000000) //2
83  {0x80200080, 0x80000480, 0, 0.125000}, //2^(-3.000000) //3
84  { 0x802480, 0x800084, 0, 0.062500}, //2^(-4.000000) //4
85  {0x808080A0, 0x84808480, 0, 0.031250}, //2^(-5.000000) //5
86  {0x24000400, 0x42004, 0, 0.015625}, //2^(-6.000000) //6
87  { 0x202000, 0x12020, 0, 0.062500}, //2^(-4.000000) //7
88  { 0x10000, 0x80100, 0, 0.125000}, //2^(-3.000000) //8
89  { 0x80000, 0x480800, 0, 0.250000}, //2^(-2.000000) //9
90  { 0x480000, 0x2084000, 0, 0.125000}, //2^(-3.000000) //10
91  { 0x2080800, 0x124A0800, 0, 0.062500}, //2^(-4.000000) //11
92  {0x12480008, 0x80184008, 0, 0.007812}, //2^(-7.000000) //12
93  {0x880A0808, 0x88C8084C, 0, 0.007812} //2^(-7.000000) //13
94 };
95 
96 #endif // #ifndef SPECK_XOR_BEST_TRAILS_H
Definition: common.hh:272