YAARX: Yet Another ARX Toolkit  0.1
 All Data Structures Files Functions Variables Macros Pages
adp-xor-count-odiff.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 ADP_XOR_COUNT_ODIFF_H
28 #define ADP_XOR_COUNT_ODIFF_H
29 
30 #define ADP_XOR_COUNT_MSIZE 256
31 #define ADP_XOR_COUNT_NMATRIX_3D 8
32 #define ADP_XOR_COUNT_NMATRIX_2D 4
33 #define ADP_XOR_COUNT_ISTATE 16 // s = 16: 0 0 0 0 1 0 0 0
34 
35 void adp_xor_count_odiff_alloc_matrices_3d(gsl_matrix* P[2][2][2]);
36 void adp_xor_count_odiff_free_matrices_3d(gsl_matrix* P[2][2][2]);
37 void adp_xor_count_odiff_alloc_matrices_2d(gsl_matrix* P[2][2]);
38 void adp_xor_count_odiff_free_matrices_2d(gsl_matrix* P[2][2]);
39 void adp_xor_count_odiff_matrices_3d_to_2d(gsl_matrix* P[2][2][2], gsl_matrix* PP[2][2]);
40 void adp_xor_count_odiff_sf(gsl_matrix* P[2][2][2], gsl_matrix* A[2][2][2]);
41 double adp_xor_count_odiff_3d(gsl_matrix* A[2][2][2], uint32_t da, uint32_t db);
42 double adp_xor_count_odiff_2d(gsl_matrix* A[2][2], uint32_t da, uint32_t db);
43 double adp_xor_count_odiff_exper(const uint32_t da, const uint32_t db);
44 
45 
46 #endif // #ifndef ADP_XOR_COUNT_ODIFF_H