YAARX: Yet Another ARX Toolkit
0.1
|
Header file for xdp-rot-and.cc: More...
Go to the source code of this file.
Functions | |
void | speck_print_round_diffs_latex (FILE *fp, uint32_t nrounds, uint32_t keys[4], differential_t trail[NROUNDS+1]) |
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) |
uint32_t | speck_verify_xor_differential_decrypt (uint32_t nrounds, uint32_t npairs, uint32_t key_in[SPECK_MAX_NROUNDS], differential_t trail[NROUNDS], const uint32_t dx_init, const uint32_t dy_init, uint32_t right_rot_const, uint32_t left_rot_const) |
uint32_t | speck_verify_xor_trail (uint32_t nrounds, uint32_t npairs, uint32_t key_in[SPECK_MAX_NROUNDS], differential_t trail[NROUNDS], const uint32_t dx_init, const uint32_t dy_init, uint32_t right_rot_const, uint32_t left_rot_const) |
uint32_t | speck_verify_xor_trail_decrypt (uint32_t nrounds, uint32_t npairs, uint32_t key_in[SPECK_MAX_NROUNDS], differential_t trail[NROUNDS], const uint32_t dx_init, const uint32_t dy_init, uint32_t right_rot_const, uint32_t left_rot_const) |
uint32_t | speck_xor_trail_search (uint32_t key[SPECK_MAX_NROUNDS], double B[NROUNDS], WORD_T *dx_input, WORD_T *dy_input, differential_t best_trail[NROUNDS], uint32_t num_rounds) |
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]) |
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]) |
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) |
void | speck_trail_cluster_search_boost (boost::unordered_map< std::array< differential_t, NROUNDS >, uint32_t, speck_trail_hash, speck_trail_equal_to > *trails_hash_map, std::multiset< differential_3d_t, struct_comp_diff_3d_p > *diff_mset_p, std::set< differential_3d_t, struct_comp_diff_3d_dx_dy_dz > *diff_set_dx_dy_dz, uint32_t dx_input, uint32_t dy_input, double B[NROUNDS], differential_t trail_in[NROUNDS], uint32_t trail_len) |
void | speck_xor_threshold_search (const int n, const int nrounds, gsl_matrix *A[2][2][2], double B[NROUNDS], double *Bn, const differential_t diff_in[NROUNDS], uint32_t dx_init_in, uint32_t dy_init_in, differential_t trail[NROUNDS], uint32_t *dx_init, uint32_t *dy_init, uint32_t right_rot_const, uint32_t left_rot_const, std::multiset< differential_3d_t, struct_comp_diff_3d_p > *diff_mset_p, 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 > *croads_diff_mset_p, std::set< differential_3d_t, struct_comp_diff_3d_dx_dy_dz > *croads_diff_set_dx_dy_dz, double p_thres, bool b_speck_cluster_trails) |
Header file for xdp-rot-and.cc:
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 | ||
) |
Given an XOR trail for rounds, experimentally verify the probabilities of the corresponding differentials:
- Differential for 1 round: round 0. - Differential for 2 rounds: rounds \form#316. - Differential for 3 rounds: rounds \form#317. - \form#318 - Differential for \form#315 rounds: rounds \form#319.
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 | ||
) |
For Speck: compute a partial DDT for : wrapper function of xdp_add_pddt_i.
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] | ||
) |
Apply threshold search starting from a fixed differences in the middle and proceeding in the decryption direction.
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] | ||
) |
Apply threshold search starting from a fixed differences in the middle end rpoceeding in the encryption direction.