YAARX: Yet Another ARX Toolkit  0.1
 All Data Structures Files Functions Variables Macros Pages
xdp-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 XDP_XTEA_F_FK_H
28 #define XDP_XTEA_F_FK_H
29 
30 double xdp_xtea_f_fk_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 double xdp_xtea_f_fk_approx(const uint32_t ninputs,
35  const uint32_t da, const uint32_t db,
36  const uint32_t k, const uint32_t delta,
37  const uint32_t lsh_const, const uint32_t rsh_const);
38 
39 bool xdp_xtea_f_check_x(const uint32_t lsh_const, const uint32_t rsh_const,
40  const uint32_t k, const uint32_t delta,
41  const uint32_t dx, const uint32_t dy,
42  const uint32_t x);
43 
44 bool xdp_xtea_f_is_sat(const uint32_t mask_i, const uint32_t lsh_const, const uint32_t rsh_const,
45  const uint32_t k, const uint32_t delta,
46  const uint32_t dx, const uint32_t dy, const uint32_t x);
47 
48 
49 uint32_t xdp_xtea_f_assign_bit_x(const uint32_t n, const uint32_t i, const uint32_t mask_i,
50  const uint32_t x, const uint32_t key, const uint32_t delta,
51  const uint32_t lsh_const, const uint32_t rsh_const,
52  const uint32_t dx, const uint32_t dy, uint32_t* x_cnt, double* prob);
53 
54 double xdp_xtea_f_fk(const uint32_t n, const uint32_t dx, const uint32_t dy,
55  const uint32_t key, const uint32_t delta,
56  const uint32_t lsh_const, const uint32_t rsh_const);
57 
58 double xdp_xtea_f2_fk_exper(const uint32_t daa, const uint32_t da, const uint32_t db,
59  const uint32_t k, const uint32_t delta,
60  const uint32_t lsh_const, const uint32_t rsh_const);
61 
62 double xdp_xtea_f2_fk_approx(const uint32_t ninputs,
63  const uint32_t daa, const uint32_t da, const uint32_t db,
64  const uint32_t k, const uint32_t delta,
65  const uint32_t lsh_const, const uint32_t rsh_const);
66 
67 bool xdp_xtea_f2_check_x_xx(const uint32_t lsh_const, const uint32_t rsh_const,
68  const uint32_t k, const uint32_t delta,
69  const uint32_t dxx, const uint32_t dx, const uint32_t dy,
70  const uint32_t xx, const uint32_t x);
71 
72 bool xdp_xtea_f2_is_sat(const uint32_t mask_i, const uint32_t lsh_const, const uint32_t rsh_const,
73  const uint32_t k, const uint32_t delta,
74  const uint32_t dxx, const uint32_t dx, const uint32_t dy,
75  const uint32_t xx, const uint32_t x);
76 
77 uint32_t xdp_xtea_f2_assign_bit_x_xx(const uint32_t n, const uint32_t i, const uint32_t mask_i,
78  const uint32_t xx, const uint32_t x,
79  const uint32_t key, const uint32_t delta,
80  const uint32_t lsh_const, const uint32_t rsh_const,
81  const uint32_t dxx, const uint32_t dx, const uint32_t dy,
82  uint64_t* x_cnt, double* prob);
83 
84 double xdp_xtea_f2_fk(const uint32_t n, const uint32_t dxx, const uint32_t dx, const uint32_t dy,
85  const uint32_t key, const uint32_t delta,
86  const uint32_t lsh_const, const uint32_t rsh_const);
87 
88 double nz_xdp_xtea_f(gsl_matrix* A[2][2][2], const uint32_t dx, uint32_t* dy,
89  uint32_t lsh_const, uint32_t rsh_const);
90 
91 #endif // #ifndef XDP_XTEA_F_FK_H
bool xdp_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: xdp-xtea-f-fk.cc:137
bool xdp_xtea_f2_check_x_xx(const uint32_t lsh_const, const uint32_t rsh_const, const uint32_t k, const uint32_t delta, const uint32_t dxx, const uint32_t dx, const uint32_t dy, const uint32_t xx, const uint32_t x)
Definition: xdp-xtea-f-fk.cc:424
double xdp_xtea_f2_fk_exper(const uint32_t daa, 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: xdp-xtea-f-fk.cc:331
bool xdp_xtea_f2_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 dxx, const uint32_t dx, const uint32_t dy, const uint32_t xx, const uint32_t x)
Definition: xdp-xtea-f-fk.cc:466
double xdp_xtea_f2_fk_approx(const uint32_t ninputs, const uint32_t daa, 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: xdp-xtea-f-fk.cc:376
double nz_xdp_xtea_f(gsl_matrix *A[2][2][2], const uint32_t dx, uint32_t *dy, uint32_t lsh_const, uint32_t rsh_const)
Definition: xdp-xtea-f-fk.cc:656
uint32_t xdp_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: xdp-xtea-f-fk.cc:211
bool xdp_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: xdp-xtea-f-fk.cc:171
uint32_t xdp_xtea_f2_assign_bit_x_xx(const uint32_t n, const uint32_t i, const uint32_t mask_i, const uint32_t xx, 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 dxx, const uint32_t dx, const uint32_t dy, uint64_t *x_cnt, double *prob)
Definition: xdp-xtea-f-fk.cc:518
double xdp_xtea_f_fk_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: xdp-xtea-f-fk.cc:57
double xdp_xtea_f_fk(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: xdp-xtea-f-fk.cc:278
double xdp_xtea_f2_fk(const uint32_t n, const uint32_t dxx, 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: xdp-xtea-f-fk.cc:592
double xdp_xtea_f_fk_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: xdp-xtea-f-fk.cc:96