27 #ifndef SPECK_XOR_THRESHOLD_SEARCH_H
28 #define SPECK_XOR_THRESHOLD_SEARCH_H
31 extern double g_B[SPECK_TRAIL_LEN];
35 extern double g_B[SPECK_TRAIL_LEN];
39 extern double g_B[SPECK_TRAIL_LEN];
43 void speck_print_round_diffs_latex(FILE* fp, uint32_t nrounds, uint32_t keys[4],
differential_t trail[
NROUNDS + 1]);
46 const WORD_T dx_init,
const WORD_T dy_init,
47 uint32_t right_rot_const, uint32_t left_rot_const);
48 uint32_t speck_verify_xor_differential_decrypt(uint32_t nrounds, uint32_t npairs,
50 const uint32_t dx_init,
const uint32_t dy_init,
51 uint32_t right_rot_const, uint32_t left_rot_const);
54 const uint32_t dx_init,
const uint32_t dy_init,
55 uint32_t right_rot_const, uint32_t left_rot_const);
58 const uint32_t dx_init,
const uint32_t dy_init,
59 uint32_t right_rot_const, uint32_t left_rot_const);
60 uint32_t speck_xor_trail_search(uint32_t key[SPECK_MAX_NROUNDS],
double B[
NROUNDS],
61 WORD_T* dx_input, WORD_T* dy_input,
64 const WORD_T dx_input,
const WORD_T dy_input,
66 std::set<differential_3d_t, struct_comp_diff_3d_dx_dy_dz>* diff_set_dx_dy_dz,
67 std::multiset<differential_3d_t, struct_comp_diff_3d_p>* diff_mset_p,
68 gsl_matrix* A[2][2][2]);
70 const WORD_T dx_input,
const WORD_T dy_input,
72 std::set<differential_3d_t, struct_comp_diff_3d_dx_dy_dz>* diff_set_dx_dy_dz,
73 std::multiset<differential_3d_t, struct_comp_diff_3d_p>* diff_mset_p,
74 gsl_matrix* A[2][2][2]);
75 void speck_xdp_add_pddt(uint32_t n,
double p_thres, uint32_t hw_thres,
const uint64_t max_size,
76 std::set<differential_3d_t, struct_comp_diff_3d_dx_dy_dz>* diff_set_dx_dy_dz,
77 std::multiset<differential_3d_t, struct_comp_diff_3d_p>* diff_mset_p);
79 std::multiset<differential_3d_t, struct_comp_diff_3d_p>* diff_mset_p,
80 std::set<differential_3d_t, struct_comp_diff_3d_dx_dy_dz>* diff_set_dx_dy_dz,
81 uint32_t dx_input, uint32_t dy_input,
83 void speck_xor_threshold_search(
const int n,
const int nrounds, gsl_matrix* A[2][2][2],
double B[
NROUNDS],
double* Bn,
84 const differential_t diff_in[NROUNDS], uint32_t dx_init_in, uint32_t dy_init_in,
85 differential_t trail[NROUNDS], uint32_t* dx_init, uint32_t* dy_init,
86 uint32_t right_rot_const, uint32_t left_rot_const,
87 std::multiset<differential_3d_t, struct_comp_diff_3d_p>* diff_mset_p,
88 std::set<differential_3d_t, struct_comp_diff_3d_dx_dy_dz>* diff_set_dx_dy_dz,
89 std::multiset<differential_3d_t, struct_comp_diff_3d_p>* croads_diff_mset_p,
90 std::set<differential_3d_t, struct_comp_diff_3d_dx_dy_dz>* croads_diff_set_dx_dy_dz,
91 double p_thres,
bool b_speck_cluster_trails);
92 #endif // #ifndef SPECK_XOR_THRESHOLD_SEARCH_H
void speck_xdp_add_pddt(uint32_t n, double p_thres, uint32_t hw_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: speck-xor-threshold-search.cc:666
#define NROUNDS
Definition: common.hh:122
uint32_t speck_xor_trail_search_encrypt(uint32_t key[SPECK_MAX_NROUNDS], double B[NROUNDS], const WORD_T dx_input, const WORD_T dy_input, differential_t best_trail[NROUNDS], const uint32_t num_rounds, 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, gsl_matrix *A[2][2][2])
Definition: speck-xor-threshold-search.cc:3300
uint32_t speck_verify_xor_trail(uint32_t nrounds, uint32_t npairs, WORD_T key_in[SPECK_MAX_NROUNDS], differential_t trail[NROUNDS], const WORD_T dx_init, const WORD_T dy_init, uint32_t right_rot_const, uint32_t left_rot_const)
Definition: speck-xor-threshold-search.cc:256
Definition: common.hh:272
uint32_t speck_xor_trail_search_decrypt(uint32_t key[SPECK_MAX_NROUNDS], double B[NROUNDS], const WORD_T dx_input, const WORD_T dy_input, differential_t best_trail[NROUNDS], const uint32_t num_rounds, 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, gsl_matrix *A[2][2][2])
Definition: speck-xor-threshold-search.cc:3541
uint32_t speck_verify_xor_differential(uint32_t nrounds, uint32_t npairs, WORD_T key_in[SPECK_MAX_NROUNDS], differential_t trail[NROUNDS], const WORD_T dx_init, const WORD_T dy_init, uint32_t right_rot_const, uint32_t left_rot_const)
Definition: speck-xor-threshold-search.cc:92
uint32_t speck_verify_xor_trail_decrypt(uint32_t nrounds, uint32_t npairs, WORD_T key_in[SPECK_MAX_NROUNDS], differential_t trail[NROUNDS], const WORD_T dx_init, const WORD_T dy_init, uint32_t right_rot_const, uint32_t left_rot_const)
Definition: speck-xor-threshold-search.cc:340