YAARX: Yet Another ARX Toolkit  0.1
 All Data Structures Files Functions Variables Macros Pages
xtea-f-xor-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 XTEA_F_XOR_PDDT_H
28 #define XTEA_F_XOR_PDDT_H
29 
30 void xtea_f_xor_pddt_i(const uint32_t k, const uint32_t n,
31  const uint32_t lsh_const, const uint32_t rsh_const,
32  gsl_matrix* A[2][2][2], gsl_vector* C,
33  uint32_t* da, uint32_t* db, uint32_t* dc,
34  double* p, const double p_thres,
35  std::set<differential_t, struct_comp_diff_dx_dy>* diff_set_dx_dy);
36 
37 void xtea_f_xor_pddt(uint32_t n, double p_thres, uint32_t lsh_const, uint32_t rsh_const,
38  std::set<differential_t, struct_comp_diff_dx_dy>* diff_set_dx_dy);
39 
40 uint32_t xtea_f_da_db_xor_pddt(uint32_t n, double p_thres,
41  uint32_t lsh_const, uint32_t rsh_const, const uint32_t da_prev, const uint32_t da_in,
42  std::set<differential_t, struct_comp_diff_dx_dy>* hways_diff_set_dx_dy,
43  std::multiset<differential_t, struct_comp_diff_p>* hways_diff_mset_p,
44  std::set<differential_t, struct_comp_diff_dx_dy>* diff_set_dx_dy);
45 
46 bool xtea_is_dx_in_set_dx_dy(uint32_t dy, uint32_t dx_prev,
47  std::set<differential_t, struct_comp_diff_dx_dy> diff_set_dx_dy);
48 
49 void xtea_xor_pddt_adjust_to_key(uint32_t nrounds, uint32_t npairs, uint32_t lsh_const, uint32_t rsh_const,
50  uint32_t key, uint32_t delta, double p_thres,
51  std::set<differential_t, struct_comp_diff_dx_dy>* diff_set_dx_dy);
52 
53 void xtea_xor_pddt_dxy_to_dp(std::multiset<differential_t, struct_comp_diff_p>* diff_mset_p,
54  const std::set<differential_t, struct_comp_diff_dx_dy> diff_set_dx_dy);
55 
56 #endif // #ifndef XTEA_F_XOR_PDDT_H
bool xtea_is_dx_in_set_dx_dy(uint32_t dy, uint32_t dx_prev, std::set< differential_t, struct_comp_diff_dx_dy > diff_set_dx_dy)
Definition: xtea-f-xor-pddt.cc:207
void xtea_xor_pddt_adjust_to_key(uint32_t nrounds, uint32_t npairs, uint32_t lsh_const, uint32_t rsh_const, uint32_t key, uint32_t delta, double p_thres, std::set< differential_t, struct_comp_diff_dx_dy > *diff_set_dx_dy)
Definition: xtea-f-xor-pddt.cc:425
void xtea_f_xor_pddt(uint32_t n, double p_thres, uint32_t lsh_const, uint32_t rsh_const, std::set< differential_t, struct_comp_diff_dx_dy > *diff_set_dx_dy)
Definition: xtea-f-xor-pddt.cc:172
void xtea_f_xor_pddt_i(const uint32_t k, const uint32_t n, const uint32_t lsh_const, const uint32_t rsh_const, gsl_matrix *A[2][2][2], gsl_vector *C, uint32_t *da, uint32_t *db, uint32_t *dc, double *p, const double p_thres, std::set< differential_t, struct_comp_diff_dx_dy > *diff_set_dx_dy)
Definition: xtea-f-xor-pddt.cc:77
void xtea_xor_pddt_dxy_to_dp(std::multiset< differential_t, struct_comp_diff_p > *diff_mset_p, const std::set< differential_t, struct_comp_diff_dx_dy > diff_set_dx_dy)
Definition: xtea-f-xor-pddt.cc:462
uint32_t xtea_f_da_db_xor_pddt(uint32_t n, double p_thres, uint32_t lsh_const, uint32_t rsh_const, const uint32_t da_prev, const uint32_t da_in, std::set< differential_t, struct_comp_diff_dx_dy > *hways_diff_set_dx_dy, std::multiset< differential_t, struct_comp_diff_p > *hways_diff_mset_p, std::set< differential_t, struct_comp_diff_dx_dy > *diff_set_dx_dy)
Definition: xtea-f-xor-pddt.cc:368