YAARX: Yet Another ARX Toolkit  0.1
 All Data Structures Files Functions Variables Macros Pages
xdp-add-pddt.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 XDP_ADD_PDDT_H
28 #define XDP_ADD_PDDT_H
29 
30 uint32_t xdp_add_pddt_exper(std::multiset<differential_3d_t, struct_comp_diff_3d_p>* diff_set, double p_thres);
31 
32 void xdp_add_pddt_i(const uint32_t k, const uint32_t n, const double p_thres,
33  gsl_matrix* A[2][2][2], gsl_vector* C,
34  uint32_t* da, uint32_t* db, uint32_t* dc, double* p,
35  std::set<differential_3d_t, struct_comp_diff_3d_dx_dy_dz>* diff_set_dx_dy_dz,
36  std::multiset<differential_3d_t, struct_comp_diff_3d_p>* diff_mset_p,
37  uint64_t max_size);
38 
39 void xdp_add_pddt(uint32_t n, double p_thres, const uint64_t max_size,
40  std::set<differential_3d_t, struct_comp_diff_3d_dx_dy_dz>* diff_set_dx_dy_dz,
41  std::multiset<differential_3d_t, struct_comp_diff_3d_p>* diff_mset_p);
42 
43 bool xdp_add_is_dz_in_set_dx_dy_dz(uint32_t dx, uint32_t dy,
44  std::set<differential_3d_t, struct_comp_diff_3d_dx_dy_dz> diff_set_dx_dy_dz);
45 
46 void xdp_add_dx_dy_pddt_i(const uint32_t k, const uint32_t n, gsl_matrix* A[2][2][2], gsl_vector* C,
47  const uint32_t da, const uint32_t db, uint32_t* dc, double* p,
48  std::set<differential_3d_t, struct_comp_diff_3d_dx_dy_dz>* hways_diff_set_dx_dy_dz,
49  std::multiset<differential_3d_t, struct_comp_diff_3d_p>* hways_diff_mset_p,
50  std::set<differential_3d_t, struct_comp_diff_3d_dx_dy_dz>* croads_diff_set_dx_dy_dz,
51  std::multiset<differential_3d_t, struct_comp_diff_3d_p>* croads_diff_mset_p,
52  uint32_t right_rot_const, uint32_t left_rot_const,
53  const double p_thres, uint32_t max_size);
54 
55 uint32_t xdp_add_dx_dy_pddt(uint32_t da, uint32_t db,
56  std::set<differential_3d_t, struct_comp_diff_3d_dx_dy_dz>* hways_diff_set_dx_dy_dz,
57  std::multiset<differential_3d_t, struct_comp_diff_3d_p>* hways_diff_mset_p,
58  std::set<differential_3d_t, struct_comp_diff_3d_dx_dy_dz>* croads_diff_set_dx_dy_dz,
59  std::multiset<differential_3d_t, struct_comp_diff_3d_p>* croads_diff_mset_p,
60  uint32_t right_rot_const, uint32_t left_rot_const,
61  double p_thres, uint32_t max_size);
62 
63 #endif // #ifndef XDP_ADD_PDDT_H
uint32_t xdp_add_pddt_exper(std::multiset< differential_3d_t, struct_comp_diff_3d_p > *diff_set, double p_thres)
Definition: xdp-add-pddt.cc:43
uint32_t xdp_add_dx_dy_pddt(uint32_t da, uint32_t db, std::set< differential_3d_t, struct_comp_diff_3d_dx_dy_dz > *hways_diff_set_dx_dy_dz, std::multiset< differential_3d_t, struct_comp_diff_3d_p > *hways_diff_mset_p, std::set< differential_3d_t, struct_comp_diff_3d_dx_dy_dz > *croads_diff_set_dx_dy_dz, std::multiset< differential_3d_t, struct_comp_diff_3d_p > *croads_diff_mset_p, uint32_t right_rot_const, uint32_t left_rot_const, double p_thres, uint32_t max_size)
Definition: xdp-add-pddt.cc:336
void xdp_add_pddt(uint32_t n, double p_thres, const uint64_t max_size, std::set< differential_3d_t, struct_comp_diff_3d_dx_dy_dz > *diff_set_dx_dy_dz, std::multiset< differential_3d_t, struct_comp_diff_3d_p > *diff_mset_p)
Definition: xdp-add-pddt.cc:188
bool xdp_add_is_dz_in_set_dx_dy_dz(uint32_t dx, uint32_t dy, std::set< differential_3d_t, struct_comp_diff_3d_dx_dy_dz > diff_set_dx_dy_dz)
Definition: xdp-add-pddt.cc:228
void xdp_add_pddt_i(const uint32_t k, const uint32_t n, const double p_thres, gsl_matrix *A[2][2][2], gsl_vector *C, uint32_t *da, uint32_t *db, uint32_t *dc, double *p, std::set< differential_3d_t, struct_comp_diff_3d_dx_dy_dz > *diff_set_dx_dy_dz, std::multiset< differential_3d_t, struct_comp_diff_3d_p > *diff_mset_p, uint64_t max_size)
Definition: xdp-add-pddt.cc:107
void xdp_add_dx_dy_pddt_i(const uint32_t k, const uint32_t n, gsl_matrix *A[2][2][2], gsl_vector *C, const uint32_t da, const uint32_t db, uint32_t *dc, double *p, std::set< differential_3d_t, struct_comp_diff_3d_dx_dy_dz > *hways_diff_set_dx_dy_dz, std::multiset< differential_3d_t, struct_comp_diff_3d_p > *hways_diff_mset_p, std::set< differential_3d_t, struct_comp_diff_3d_dx_dy_dz > *croads_diff_set_dx_dy_dz, std::multiset< differential_3d_t, struct_comp_diff_3d_p > *croads_diff_mset_p, uint32_t right_rot_const, uint32_t left_rot_const, const double p_thres, uint32_t max_size)
Definition: xdp-add-pddt.cc:245