27 #ifndef ADP_TEA_F_FK_H
28 #define ADP_TEA_F_FK_H
30 bool adp_f_check_x(
const uint32_t lsh_const,
const uint32_t rsh_const,
31 const uint32_t k0,
const uint32_t k1,
const uint32_t delta,
32 const uint32_t dx,
const uint32_t dy,
const uint32_t x);
35 bool adp_f_is_sat(
const uint32_t mask_i,
const uint32_t lsh_const,
const uint32_t rsh_const,
36 const uint32_t k0,
const uint32_t k1,
const uint32_t delta,
37 const uint32_t dx,
const uint32_t dy, int32_t x);
39 uint32_t
adp_f_assign_bit_x(
const uint32_t n,
const uint32_t i,
const uint32_t mask_i,
const uint32_t x,
40 const uint32_t lsh_const,
const uint32_t rsh_const,
41 const uint32_t k0,
const uint32_t k1,
const uint32_t delta,
42 const uint32_t dx,
const uint32_t dy, uint32_t* x_cnt,
double* prob);
44 double adp_f_fk(
const uint32_t n,
const uint32_t dx,
const uint32_t dy,
45 const uint32_t k0,
const uint32_t k1,
const uint32_t delta,
46 const uint32_t lsh_const,
const uint32_t rsh_const);
48 uint32_t
adp_f_assign_bit_x_dx(
const uint32_t n,
const uint32_t i,
const uint32_t mask_i,
const uint32_t x,
49 const uint32_t lsh_const,
const uint32_t rsh_const,
50 const uint32_t k0,
const uint32_t k1,
const uint32_t delta,
51 const uint32_t dx,
const uint32_t dy, uint64_t* x_cnt,
52 double* ret_prob, uint32_t* ret_dx);
54 double max_dx_adp_f_fk(
const uint32_t n, uint32_t* ret_dx,
const uint32_t dy,
55 const uint32_t k0,
const uint32_t k1,
const uint32_t delta,
56 const uint32_t lsh_const,
const uint32_t rsh_const);
59 uint32_t
adp_f_assign_bit_x_dy(
const uint32_t n,
const uint32_t i,
const uint32_t mask_i,
const uint32_t x,
60 const uint32_t lsh_const,
const uint32_t rsh_const,
61 const uint32_t k0,
const uint32_t k1,
const uint32_t delta,
62 const uint32_t dx,
const uint32_t dy, uint64_t* x_cnt,
63 double* ret_prob, uint32_t* ret_dy);
65 double max_dy_adp_f_fk(
const uint32_t n,
const uint32_t dx, uint32_t* ret_dy,
66 const uint32_t k0,
const uint32_t k1,
const uint32_t delta,
67 const uint32_t lsh_const,
const uint32_t rsh_const);
69 double all_dy_adp_f_fk(
const uint32_t n,
const uint32_t dx, uint32_t* ret_dy,
70 const uint32_t k0,
const uint32_t k1,
const uint32_t delta,
71 const uint32_t lsh_const,
const uint32_t rsh_const, uint64_t* x_cnt);
75 const uint32_t lsh_const,
const uint32_t rsh_const,
76 const uint32_t k0,
const uint32_t k1,
const uint32_t delta,
78 double* ret_prob, uint32_t* ret_dx, uint32_t* ret_dy);
81 const uint32_t k0,
const uint32_t k1,
const uint32_t delta,
82 const uint32_t lsh_const,
const uint32_t rsh_const);
85 const uint32_t lsh_const,
const uint32_t rsh_const,
86 const uint32_t k0,
const uint32_t k1,
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, uint32_t* ret_k0, uint32_t* ret_k1);
91 uint32_t* ret_k0, uint32_t* ret_k1,
const uint32_t delta,
92 const uint32_t lsh_const,
const uint32_t rsh_const);
94 double adp_f_fk_v2(
const uint32_t da,
const uint32_t dd,
95 const uint32_t k0,
const uint32_t k1,
const uint32_t delta,
96 const uint32_t lsh_const,
const uint32_t rsh_const);
98 void f_sfun(
const uint32_t n,
99 const uint32_t x_word,
const uint32_t dx_word,
const uint32_t delta_word,
100 const uint32_t k0_word,
const uint32_t k1_word);
103 const uint32_t k0,
const uint32_t k1,
const uint32_t delta,
104 uint32_t lsh_const, uint32_t rsh_const);
107 const uint32_t k0,
const uint32_t k1,
const uint32_t delta,
108 uint32_t lsh_const, uint32_t rsh_const);
111 const uint32_t k0,
const uint32_t k1,
const uint32_t delta,
112 uint32_t lsh_const, uint32_t rsh_const);
115 const uint32_t k0,
const uint32_t k1,
const uint32_t delta,
116 uint32_t lsh_const, uint32_t rsh_const);
124 #endif // #ifndef ADP_TEA_F_FK_H
double max_dx_adp_f_fk(const uint32_t n, uint32_t *ret_dx, const uint32_t dy, const uint32_t k0, const uint32_t k1, const uint32_t delta, const uint32_t lsh_const, const uint32_t rsh_const)
Definition: adp-tea-f-fk.cc:349
double adp_f_fk_exper(const uint32_t da, const uint32_t db, const uint32_t k0, const uint32_t k1, const uint32_t delta, uint32_t lsh_const, uint32_t rsh_const)
Definition: adp-tea-f-fk.cc:1428
double max_dy_adp_f_fk_exper(const uint32_t dx, uint32_t *max_dy, const uint32_t k0, const uint32_t k1, const uint32_t delta, uint32_t lsh_const, uint32_t rsh_const)
Definition: adp-tea-f-fk.cc:1504
Definition: common.hh:272
uint32_t adp_f_assign_bit_x_dx_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 k0, const uint32_t k1, const uint32_t delta, const uint32_t dx, const uint32_t dy, differential_t *x_cnt, double *ret_prob, uint32_t *ret_dx, uint32_t *ret_dy)
Definition: adp-tea-f-fk.cc:713
uint32_t adp_f_assign_bit_x_dx_key(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 k0, const uint32_t k1, const uint32_t delta, const uint32_t dx, const uint32_t dy, uint64_t ***x_cnt, double *ret_prob, uint32_t *ret_dx, uint32_t *ret_k0, uint32_t *ret_k1)
Definition: adp-tea-f-fk.cc:1004
double max_dx_dy_adp_f_fk_exper(uint32_t *max_dx, uint32_t *max_dy, const uint32_t k0, const uint32_t k1, const uint32_t delta, uint32_t lsh_const, uint32_t rsh_const)
Definition: adp-tea-f-fk.cc:1546
double max_dx_dy_adp_f_fk(const uint32_t n, uint32_t *ret_dx, uint32_t *ret_dy, const uint32_t k0, const uint32_t k1, const uint32_t delta, const uint32_t lsh_const, const uint32_t rsh_const)
Definition: adp-tea-f-fk.cc:829
double max_dx_adp_f_fk_exper(uint32_t *max_dx, const uint32_t dy, const uint32_t k0, const uint32_t k1, const uint32_t delta, uint32_t lsh_const, uint32_t rsh_const)
Definition: adp-tea-f-fk.cc:1471
double adp_f_fk(const uint32_t n, const uint32_t dx, const uint32_t dy, const uint32_t k0, const uint32_t k1, const uint32_t delta, const uint32_t lsh_const, const uint32_t rsh_const)
Definition: adp-tea-f-fk.cc:200
void f_sfun(const uint32_t n, const uint32_t x_word, const uint32_t dx_word, const uint32_t delta_word, const uint32_t k0_word, const uint32_t k1_word)
Definition: adp-tea-f-fk.cc:1301
void x_cnt_print(uint32_t ***x_cnt)
Definition: adp-tea-f-fk.cc:959
void x_cnt_free(uint64_t ***x_cnt)
Definition: adp-tea-f-fk.cc:944
uint32_t adp_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 k0, const uint32_t k1, 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-tea-f-fk.cc:450
uint32_t adp_f_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 k0, const uint32_t k1, const uint32_t delta, const uint32_t dx, const uint32_t dy, uint32_t *x_cnt, double *prob)
Definition: adp-tea-f-fk.cc:129
bool adp_f_is_sat(const uint32_t mask_i, const uint32_t lsh_const, const uint32_t rsh_const, const uint32_t k0, const uint32_t k1, const uint32_t delta, const uint32_t dx, const uint32_t dy, int32_t x)
Definition: adp-tea-f-fk.cc:88
double max_key_dx_adp_f_fk(const uint32_t n, uint32_t *ret_dx, const uint32_t dy, uint32_t *ret_k0, uint32_t *ret_k1, const uint32_t delta, const uint32_t lsh_const, const uint32_t rsh_const)
Definition: adp-tea-f-fk.cc:1103
double adp_f_fk_v2(const uint32_t da, const uint32_t dd, const uint32_t k0, const uint32_t k1, const uint32_t delta, const uint32_t lsh_const, const uint32_t rsh_const)
Definition: adp-tea-f-fk.cc:1194
uint32_t adp_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 k0, const uint32_t k1, 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-tea-f-fk.cc:267
bool adp_f_check_x(const uint32_t lsh_const, const uint32_t rsh_const, const uint32_t k0, const uint32_t k1, const uint32_t delta, const uint32_t dx, const uint32_t dy, const uint32_t x)
Definition: adp-tea-f-fk.cc:55
uint64_t *** x_cnt_alloc()
Definition: adp-tea-f-fk.cc:927
double max_dy_adp_f_fk(const uint32_t n, const uint32_t dx, uint32_t *ret_dy, const uint32_t k0, const uint32_t k1, const uint32_t delta, const uint32_t lsh_const, const uint32_t rsh_const)
Definition: adp-tea-f-fk.cc:540
double all_dy_adp_f_fk(const uint32_t n, const uint32_t dx, uint32_t *ret_dy, const uint32_t k0, const uint32_t k1, const uint32_t delta, const uint32_t lsh_const, const uint32_t rsh_const, uint64_t *x_cnt)
Definition: adp-tea-f-fk.cc:626