YAARX: Yet Another ARX Toolkit
0.1
|
Various tests that does not fit anywhere else and/or are under development. More...
#include "common.hh"
#include "adp-xor.hh"
#include "xdp-add.hh"
#include "max-xdp-add.hh"
#include "bsdr.hh"
#include "xdp-add-diff-set.hh"
#include <gsl/gsl_permutation.h>
Macros | |
#define | CLEAR_CROADS 1 |
Functions | |
void | test_adp_xor_nonzero_all () |
void | test_xdp_add_nonzero_all () |
void | test_xdp_add_nonzero_index_cond () |
void | test_xdp_add_nonzero_cond () |
void | xdp_add_combine_output_diff_sets (diff_set_t *dc_set, const diff_set_t dc_sets_in[2]) |
void | test_xdp_add_combine_output_diff_sets () |
void | test_xdp_add_combine_output_diff_sets_all () |
void | test_xdp_add_combine_output_diff_sets_2 () |
void | test_xdp_add_input_diff_to_output_dset () |
void | test_xdp_add_dc_set_is_max () |
void | speck_xdp_add_pddt_gen_random (uint32_t hw_thres, double p_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) |
uint32_t | speck_xdp_add_dx_dy_pddt_gen_dset (const uint32_t da, const uint32_t db, const double p_thres, 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_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) |
void | marx_wtrail_print_gsl_matrix_int (const gsl_matrix A, const uint32_t nrows, const uint32_t ncols) |
void | marx_wtrail_build_permutation_matrices (uint32_t order) |
int | main () |
Various tests that does not fit anywhere else and/or are under development.
int main | ( | ) |
Main function of VA tests.
uint32_t speck_xdp_add_dx_dy_pddt_gen_dset | ( | const uint32_t | da, |
const uint32_t | db, | ||
const double | p_thres, | ||
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 fixed da, db, generate max_size set of dc such that p(da, db -> dc) >= p_thres and (optinally) HW(dc) >= hw_thres.
void test_adp_xor_nonzero_all | ( | ) |
Test the condition for a non-zero probability ADP-XOR differential (cf. Theorem 2, Wallen)
void test_xdp_add_combine_output_diff_sets | ( | ) |
Test for xdp_add_combine_output_diff_sets and xdp_add_input_diff_sets_to_diffs .
void test_xdp_add_combine_output_diff_sets_2 | ( | ) |
Test for xdp_add_combine_output_diff_sets and xdp_add_input_diff_sets_to_diffs .
void test_xdp_add_combine_output_diff_sets_all | ( | ) |
Test for xdp_add_combine_output_diff_sets and xdp_add_input_diff_sets_to_diffs over all possible inputs.
void test_xdp_add_dc_set_is_max | ( | ) |
Test if the output set dc generated from or is maximum with respect to all , .
void test_xdp_add_input_diff_to_output_dset | ( | ) |
Constructing a set of output differences for xdp-add.
void test_xdp_add_nonzero_all | ( | ) |
Test the condition under which xdp-add is non-zero:
eq(da<<1, db<<1, dc<<1) & (da ^ db ^ dc ^ (da << 1))
See: [Lipmaa, Moriai, 2001]
void test_xdp_add_nonzero_index_cond | ( | ) |
Test the indices for the non-zero condition for xdp-add
void xdp_add_combine_output_diff_sets | ( | diff_set_t * | dc_set, |
const diff_set_t | dc_sets_in[2] | ||
) |
Combine two output sets dc_set_0
and dc_set_1
from XDP-ADD, to produce a single set.