YAARX: Yet Another ARX Toolkit  0.1
 All Data Structures Files Functions Variables Macros Pages
adp-xtea-f-fk.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_XTEA_F_FK_H
28 #define ADP_XTEA_F_FK_H
29 
30 double adp_xtea_f_exper(const uint32_t da, const uint32_t db,
31  const uint32_t k, const uint32_t delta,
32  const uint32_t lsh_const, const uint32_t rsh_const);
33 
34 
35 double adp_xtea_f_approx(const uint32_t ninputs,
36  const uint32_t da, const uint32_t db,
37  const uint32_t k, const uint32_t delta,
38  const uint32_t lsh_const, const uint32_t rsh_const);
39 
40 double max_dy_adp_xtea_f_exper(const uint32_t dx, uint32_t* dy_max,
41  const uint32_t k, const uint32_t delta,
42  const uint32_t lsh_const, const uint32_t rsh_const);
43 
44 double max_dx_adp_xtea_f_exper(uint32_t *dx_max, const uint32_t dy,
45  const uint32_t k, const uint32_t delta,
46  const uint32_t lsh_const, const uint32_t rsh_const);
47 
48 double adp_xtea_f_lxr_exper(const uint32_t da, const uint32_t db, uint32_t lsh_const, uint32_t rsh_const);
49 
50 double adp_xtea_f_lxr_approx(const uint32_t ninputs, const uint32_t da, const uint32_t db, uint32_t lsh_const, uint32_t rsh_const);
51 
52 bool adp_xtea_f_lxr_check_x(const uint32_t lsh_const, const uint32_t rsh_const,
53  const uint32_t dx, const uint32_t dy, const uint32_t x);
54 
55 bool adp_xtea_f_lxr_is_sat(const uint32_t mask_i, const uint32_t lsh_const, const uint32_t rsh_const,
56  const uint32_t dx, const uint32_t dy, int32_t x);
57 
58 uint32_t adp_xtea_f_lxr_assign_bit_x(const uint32_t n, const uint32_t i, const uint32_t mask_i, const uint32_t x,
59  const uint32_t lsh_const, const uint32_t rsh_const,
60  const uint32_t dx, const uint32_t dy, uint32_t* x_cnt, double* prob);
61 
62 double adp_xtea_f_lxr(const uint32_t n, const uint32_t dx, const uint32_t dy,
63  const uint32_t lsh_const, const uint32_t rsh_const);
64 
65 double adp_xtea_f_approx(const uint32_t n, gsl_matrix* A[2][2][2],
66  const uint32_t dx, const uint32_t dy,
67  const uint32_t k, const uint32_t delta,
68  const uint32_t lsh_const, const uint32_t rsh_const);
69 
70 bool adp_xtea_f_check_x(const uint32_t lsh_const, const uint32_t rsh_const,
71  const uint32_t k, const uint32_t delta,
72  const uint32_t dx, const uint32_t dy,
73  const uint32_t x);
74 
75 bool adp_xtea_f_is_sat(const uint32_t mask_i, const uint32_t lsh_const, const uint32_t rsh_const,
76  const uint32_t k, const uint32_t delta,
77  const uint32_t dx, const uint32_t dy, const uint32_t x);
78 
79 uint32_t adp_xtea_f_assign_bit_x(const uint32_t n, const uint32_t i, const uint32_t mask_i,
80  const uint32_t x, const uint32_t key, const uint32_t delta,
81  const uint32_t lsh_const, const uint32_t rsh_const,
82  const uint32_t dx, const uint32_t dy, uint32_t* x_cnt, double* prob);
83 
84 uint32_t adp_xtea_f_assign_bit_x_dx(const uint32_t n, const uint32_t i, const uint32_t mask_i, const uint32_t x,
85  const uint32_t lsh_const, const uint32_t rsh_const,
86  const uint32_t key, const uint32_t delta,
87  const uint32_t dx, const uint32_t dy, uint64_t* x_cnt,
88  double* ret_prob, uint32_t* ret_dx);
89 
90 uint32_t adp_xtea_f_assign_bit_x_dy(const uint32_t n, const uint32_t i, const uint32_t mask_i, const uint32_t x,
91  const uint32_t lsh_const, const uint32_t rsh_const,
92  const uint32_t key, const uint32_t delta,
93  const uint32_t dx, const uint32_t dy, uint64_t* x_cnt,
94  double* ret_prob, uint32_t* ret_dy);
95 
96 double adp_xtea_f(const uint32_t n, const uint32_t dx, const uint32_t dy,
97  const uint32_t key, const uint32_t delta,
98  const uint32_t lsh_const, const uint32_t rsh_const);
99 
100 double max_dy_adp_xtea_f(const uint32_t n, const uint32_t dx, uint32_t* ret_dy,
101  const uint32_t key, const uint32_t delta,
102  const uint32_t lsh_const, const uint32_t rsh_const);
103 
104 double max_dx_adp_xtea_f(const uint32_t n, uint32_t* ret_dx, const uint32_t dy,
105  const uint32_t key, const uint32_t delta,
106  const uint32_t lsh_const, const uint32_t rsh_const);
107 
108 double first_nz_adp_xtea_f(gsl_matrix* A[2][2][2], gsl_matrix* AA[2][2][2],
109  const uint32_t key, const uint32_t delta,
110  const uint32_t da, uint32_t* ret_dd,
111  uint32_t lsh_const, uint32_t rsh_const);
112 
113 #endif // #ifndef ADP_XTEA_F_FK_H
double max_dy_adp_xtea_f(const uint32_t n, const uint32_t dx, uint32_t *ret_dy, const uint32_t key, const uint32_t delta, const uint32_t lsh_const, const uint32_t rsh_const)
Definition: adp-xtea-f-fk.cc:958
double max_dx_adp_xtea_f_exper(uint32_t *dx_max, const uint32_t dy, const uint32_t k, const uint32_t delta, const uint32_t lsh_const, const uint32_t rsh_const)
Definition: adp-xtea-f-fk.cc:184
double adp_xtea_f_lxr_approx(const uint32_t ninputs, const uint32_t da, const uint32_t db, uint32_t lsh_const, uint32_t rsh_const)
Definition: adp-xtea-f-fk.cc:246
double adp_xtea_f_exper(const uint32_t da, const uint32_t db, const uint32_t k, const uint32_t delta, const uint32_t lsh_const, const uint32_t rsh_const)
Definition: adp-xtea-f-fk.cc:69
uint32_t adp_xtea_f_lxr_assign_bit_x(const uint32_t n, const uint32_t i, const uint32_t mask_i, const uint32_t x, const uint32_t lsh_const, const uint32_t rsh_const, const uint32_t dx, const uint32_t dy, uint32_t *x_cnt, double *prob)
Definition: adp-xtea-f-fk.cc:351
double adp_xtea_f(const uint32_t n, const uint32_t dx, const uint32_t dy, const uint32_t key, const uint32_t delta, const uint32_t lsh_const, const uint32_t rsh_const)
Definition: adp-xtea-f-fk.cc:897
bool adp_xtea_f_check_x(const uint32_t lsh_const, const uint32_t rsh_const, const uint32_t k, const uint32_t delta, const uint32_t dx, const uint32_t dy, const uint32_t x)
Definition: adp-xtea-f-fk.cc:510
double first_nz_adp_xtea_f(gsl_matrix *A[2][2][2], gsl_matrix *AA[2][2][2], const uint32_t key, const uint32_t delta, const uint32_t da, uint32_t *ret_dd, uint32_t lsh_const, uint32_t rsh_const)
Definition: adp-xtea-f-fk.cc:1146
uint32_t adp_xtea_f_assign_bit_x_dx(const uint32_t n, const uint32_t i, const uint32_t mask_i, const uint32_t x, const uint32_t lsh_const, const uint32_t rsh_const, const uint32_t key, const uint32_t delta, const uint32_t dx, const uint32_t dy, uint64_t *x_cnt, double *ret_prob, uint32_t *ret_dx)
Definition: adp-xtea-f-fk.cc:672
double adp_xtea_f_approx(const uint32_t ninputs, const uint32_t da, const uint32_t db, const uint32_t k, const uint32_t delta, const uint32_t lsh_const, const uint32_t rsh_const)
Definition: adp-xtea-f-fk.cc:109
bool adp_xtea_f_is_sat(const uint32_t mask_i, const uint32_t lsh_const, const uint32_t rsh_const, const uint32_t k, const uint32_t delta, const uint32_t dx, const uint32_t dy, const uint32_t x)
Definition: adp-xtea-f-fk.cc:544
uint32_t adp_xtea_f_assign_bit_x(const uint32_t n, const uint32_t i, const uint32_t mask_i, const uint32_t x, const uint32_t key, const uint32_t delta, const uint32_t lsh_const, const uint32_t rsh_const, const uint32_t dx, const uint32_t dy, uint32_t *x_cnt, double *prob)
Definition: adp-xtea-f-fk.cc:584
double max_dx_adp_xtea_f(const uint32_t n, uint32_t *ret_dx, const uint32_t dy, const uint32_t key, const uint32_t delta, const uint32_t lsh_const, const uint32_t rsh_const)
Definition: adp-xtea-f-fk.cc:1044
bool adp_xtea_f_lxr_check_x(const uint32_t lsh_const, const uint32_t rsh_const, const uint32_t dx, const uint32_t dy, const uint32_t x)
Definition: adp-xtea-f-fk.cc:282
double max_dy_adp_xtea_f_exper(const uint32_t dx, uint32_t *dy_max, const uint32_t k, const uint32_t delta, const uint32_t lsh_const, const uint32_t rsh_const)
Definition: adp-xtea-f-fk.cc:153
double adp_xtea_f_lxr_exper(const uint32_t da, const uint32_t db, uint32_t lsh_const, uint32_t rsh_const)
Definition: adp-xtea-f-fk.cc:210
bool adp_xtea_f_lxr_is_sat(const uint32_t mask_i, const uint32_t lsh_const, const uint32_t rsh_const, const uint32_t dx, const uint32_t dy, int32_t x)
Definition: adp-xtea-f-fk.cc:313
uint32_t adp_xtea_f_assign_bit_x_dy(const uint32_t n, const uint32_t i, const uint32_t mask_i, const uint32_t x, const uint32_t lsh_const, const uint32_t rsh_const, const uint32_t key, const uint32_t delta, const uint32_t dx, const uint32_t dy, uint64_t *x_cnt, double *ret_prob, uint32_t *ret_dy)
Definition: adp-xtea-f-fk.cc:795
double adp_xtea_f_lxr(const uint32_t n, const uint32_t dx, const uint32_t dy, const uint32_t lsh_const, const uint32_t rsh_const)
Definition: adp-xtea-f-fk.cc:415