27 #ifndef SIMON_XOR_DDT_SEARCH_H
28 #define SIMON_XOR_DDT_SEARCH_H
42 void simon_rot_and_ddt(
double** D,
const uint32_t s,
const uint32_t t,
const double p_thres);
43 void simon_xor_ddt_search(
const int n,
const int nrounds,
46 const uint32_t dyy_init,
47 uint32_t lrot_const_s, uint32_t lrot_const_t, uint32_t lrot_const_u,
51 uint32_t simon_xor_ddt_trail_search(uint32_t key[SIMON_MAX_NROUNDS],
double B[
NROUNDS],
differential_t trail[NROUNDS], uint32_t num_rounds);
54 uint32_t
gen_word_hw(
const uint32_t n,
const uint32_t hw,
55 std::vector<uint32_t>* X);
60 std::unordered_map<uint32_t, std::vector<differential_t>>* T);
62 std::unordered_map<uint32_t, std::vector<differential_t>>* T);
63 void simon_diff_search(
const uint32_t nrounds,
66 const uint32_t hw_max,
67 std::unordered_map<uint32_t, std::vector<differential_t>>* T,
68 std::unordered_map<uint32_t, differential_t>* D,
69 const uint32_t D_round,
72 std::vector<uint32_t> DX,
const uint32_t hw_max);
75 #endif // #ifndef SIMON_XOR_THRESHOLD_SEARCH_H
void simon_compute_partial_ddt(std::unordered_map< uint32_t, std::vector< differential_t >> *T, std::vector< uint32_t > DX, const uint32_t hw_max)
Definition: simon-xor-ddt-search.cc:679
void simon_compute_full_ddt(std::unordered_map< uint32_t, std::vector< differential_t >> *T)
Definition: simon-xor-ddt-search.cc:700
#define NROUNDS
Definition: common.hh:122
Definition: common.hh:272
uint32_t gen_word_hw_all(const uint32_t word_size, const uint32_t hw)
Definition: simon-xor-ddt-search.cc:618
differential_t * simon_sddt_alloc()
Definition: simon-xor-ddt-search.cc:142
double ** simon_ddt_alloc()
Definition: simon-xor-ddt-search.cc:75
void simon_ddt_free(double **T)
Definition: simon-xor-ddt-search.cc:88
void simon_rsddt_free(differential_t **T)
Definition: simon-xor-ddt-search.cc:112
void simon_ddt_sort_rows(differential_t **T)
Definition: simon-xor-ddt-search.cc:123
void simon_ddt_to_diff_struct(double **DDT, differential_t **SDDT)
Definition: simon-xor-ddt-search.cc:177
void simon_sddt_free(differential_t *ST)
Definition: simon-xor-ddt-search.cc:152
bool simon_comp_differentials_npairs(differential_t a, differential_t b)
Definition: simon-xor-ddt-search.cc:52
void simon32_ddt_file_write(const char *filename, std::unordered_map< uint32_t, std::vector< differential_t >> *T)
Definition: simon-xor-ddt-search.cc:1267
uint32_t gen_word_hw(const uint32_t n, const uint32_t hw, std::vector< uint32_t > *X)
Definition: simon-xor-ddt-search.cc:601
differential_t ** simon_rsddt_alloc()
Definition: simon-xor-ddt-search.cc:99
void simon_ddt_to_list(double **DDT, differential_t *SDDT)
Definition: simon-xor-ddt-search.cc:161
void simon_ddt_sort(differential_t *SDDT)
Definition: simon-xor-ddt-search.cc:134
void simon32_ddt_file_read(const char *filename, std::unordered_map< uint32_t, std::vector< differential_t >> *T)
Definition: simon-xor-ddt-search.cc:1315