YAARX: Yet Another ARX Toolkit
0.1
|
Header file for adp-arx.cc: More...
Go to the source code of this file.
Macros | |
#define | ADP_ARX_MSIZE 8 |
#define | ADP_ARX_NMATRIX 8 |
#define | ADP_ARX_NINPUTS 2 |
#define | ADP_ARX_COLSUM 4 |
#define | ADP_ARX_NSPOS 2 |
#define | ADP_ARX_NORM 1.0 /(double)ADP_ARX_COLSUM |
#define | ADP_ARX_NISTATES 4 |
#define | ADP_ARX_NFSTATES 2 |
Functions | |
void | adp_arx_alloc_matrices (gsl_matrix *A[2][2][2][2]) |
void | adp_arx_free_matrices (gsl_matrix *A[2][2][2][2]) |
void | adp_arx_normalize_matrices (gsl_matrix *A[2][2][2][2]) |
void | adp_arx_print_matrices (gsl_matrix *A[2][2][2][2]) |
void | adp_arx_sf (gsl_matrix *A[2][2][2][2]) |
double | adp_arx (gsl_matrix *A[2][2][2][2], uint32_t rot_const, uint32_t da, uint32_t db, uint32_t dd, uint32_t de) |
double | adp_arx_exper (uint32_t r, uint32_t da, uint32_t db, uint32_t dd, uint32_t de) |
Variables | |
uint32_t | ADP_ARX_ISTATES [ADP_ARX_NISTATES] |
uint32_t | ADP_ARX_FSTATES [ADP_ARX_NISTATES][ADP_ARX_NFSTATES] |
Header file for adp-arx.cc:
#define ADP_ARX_COLSUM 4 |
Sum of non-zero elements in one column of the matrices.
#define ADP_ARX_MSIZE 8 |
Number of state values in the S-function.
#define ADP_ARX_NFSTATES 2 |
Number of final states for the S-function; To every initial state out of all ADP_ARX_NISTATES, corresponds a set of ADP_ARX_FSTATES final states.
#define ADP_ARX_NINPUTS 2 |
Number of inputs to the ARX operation.
#define ADP_ARX_NISTATES 4 |
Number of initial states for the S-function; To every initial state out of all ADP_ARX_NISTATES, corresponds a set of ADP_ARX_FSTATES final states.
#define ADP_ARX_NMATRIX 8 |
Number of matrices.
#define ADP_ARX_NORM 1.0 /(double)ADP_ARX_COLSUM |
Normalization factor for the matrices.
#define ADP_ARX_NSPOS 2 |
Number of special bit positions for the matrices - two: if and otherwise.
double adp_arx | ( | gsl_matrix * | A[2][2][2][2], |
uint32_t | rot_const, | ||
uint32_t | da, | ||
uint32_t | db, | ||
uint32_t | dd, | ||
uint32_t | de | ||
) |
The additive differential probability of ARX . Complexity: .
A | transition probability matrices for computed with adp_arx_sf. |
rot_const | rotation constant. |
da | first input difference (input to ADD). |
db | second input difference (input to ADD). |
dd | third input difference (input to XOR). |
de | output difference (output from ARX). |
void adp_arx_alloc_matrices | ( | gsl_matrix * | A[2][2][2][2] | ) |
Allocate memory for the transition probability matrices for .
A | transition probability matrices for . |
double adp_arx_exper | ( | uint32_t | r, |
uint32_t | da, | ||
uint32_t | db, | ||
uint32_t | dd, | ||
uint32_t | de | ||
) |
The additive differential probability of ARX ( ) computed experimentally over all inputs. Complexity: .
r | rotation constant. |
da | first input difference (input to ADD). |
db | second input difference (input to ADD). |
dd | third input difference (input to XOR). |
de | output difference (output from ARX). |
void adp_arx_free_matrices | ( | gsl_matrix * | A[2][2][2][2] | ) |
Free memory reserved by a previous call to adp_arx_alloc_matrices.
A | transition probability matrices for . |
void adp_arx_normalize_matrices | ( | gsl_matrix * | A[2][2][2][2] | ) |
Transform the elements of A into probabilities.
A | transition probability matrices for . |
void adp_arx_print_matrices | ( | gsl_matrix * | A[2][2][2][2] | ) |
Print the matrices for .
A | transition probability matrices for . |
void adp_arx_sf | ( | gsl_matrix * | A[2][2][2][2] | ) |
S-function for : .
A | zero-initialized set of matrices. |
, where
uint32_t ADP_ARX_FSTATES[ADP_ARX_NISTATES][ADP_ARX_NFSTATES] |
Array of final states for the S-function of : adp_arx_sf. Every set of final states corresponds to a unique initial state (ADP_ARX_ISTATES).
uint32_t ADP_ARX_ISTATES[ADP_ARX_NISTATES] |
Array of initial states for the S-function of : adp_arx_sf.