Header file for xdp-add.cc:
More...
Go to the source code of this file.
|
void | xdp_add_alloc_matrices (gsl_matrix *A[2][2][2]) |
|
void | xdp_add_free_matrices (gsl_matrix *A[2][2][2]) |
|
void | xdp_add_normalize_matrices (gsl_matrix *A[2][2][2]) |
|
void | xdp_add_print_matrices (gsl_matrix *A[2][2][2]) |
|
void | xdp_add_print_matrices_sage (gsl_matrix *A[2][2][2]) |
|
void | xdp_add_sf (gsl_matrix *A[2][2][2]) |
|
double | xdp_add (gsl_matrix *A[2][2][2], WORD_T da, WORD_T db, WORD_T dc) |
|
double | xdp_add_exper (const WORD_T da, const WORD_T db, const WORD_T dc) |
|
WORD_T | aop (WORD_T x, WORD_T n_in) |
|
WORD_T | cap (WORD_T x, WORD_T y) |
|
bool | is_eq (WORD_T x, WORD_T y, WORD_T z) |
|
WORD_T | eq (const WORD_T x, const WORD_T y, const WORD_T z) |
|
WORD_T | eq (const WORD_T x, const WORD_T y, const WORD_T z, const uint32_t word_size) |
|
bool | xdp_add_is_nonzero (WORD_T da, WORD_T db, WORD_T dc) |
|
double | xdp_add_lm (WORD_T da, WORD_T db, WORD_T dc) |
|
double | xdp_add_lm (WORD_T da, WORD_T db, WORD_T dc, uint32_t word_size) |
|
int | xdp_add_lm_log2 (WORD_T da, WORD_T db, WORD_T dc) |
|
int | xdp_add_lm_log2 (WORD_T da, WORD_T db, WORD_T dc, uint32_t word_size) |
|
Sum of non-zero elements in one column of the matrices.
Initial state for computing the S-function.
Number of state values in the S-function.
#define XDP_ADD_NINPUTS 2 |
Number of inputs to the XOR operation.
#define XDP_ADD_NMATRIX 8 |
Number of matrices.
Normalization factor for the matrices.
WORD_T aop |
( |
WORD_T |
x, |
|
|
WORD_T |
n_in |
|
) |
| |
The all-one parity function (AOP) [Algorithm 1, Lipmaa, Moriai, FSE 2001]
y = aop(x): y[i] = 1 iff x[i..j] = 11..1 has odd length .
WORD_T cap |
( |
WORD_T |
x, |
|
|
WORD_T |
y |
|
) |
| |
WORD_T eq |
( |
const WORD_T |
x, |
|
|
const WORD_T |
y, |
|
|
const WORD_T |
z |
|
) |
| |
bool is_eq |
( |
WORD_T |
x, |
|
|
WORD_T |
y, |
|
|
WORD_T |
z |
|
) |
| |
Check if three integers are equal.
- Parameters
-
x | first input word |
y | second input word. |
z | third input word. |
- Returns
TRUE
if ; FALSE
otherwise.
double xdp_add |
( |
gsl_matrix * |
A[2][2][2], |
|
|
WORD_T |
da, |
|
|
WORD_T |
db, |
|
|
WORD_T |
dc |
|
) |
| |
void xdp_add_alloc_matrices |
( |
gsl_matrix * |
A[2][2][2] | ) |
|
Allocate memory for the transition probability matrices for .
- Parameters
-
A | transition probability matrices for . |
- See Also
- xdp_add_free_matrices
double xdp_add_exper |
( |
const WORD_T |
da, |
|
|
const WORD_T |
db, |
|
|
const WORD_T |
dc |
|
) |
| |
void xdp_add_free_matrices |
( |
gsl_matrix * |
A[2][2][2] | ) |
|
Free memory reserved by a previous call to xdp_add_alloc_matrices.
- Parameters
-
A | transition probability matrices for . |
bool xdp_add_is_nonzero |
( |
WORD_T |
da, |
|
|
WORD_T |
db, |
|
|
WORD_T |
dc |
|
) |
| |
Checks of the differential (da, db -> dc) is possible.
double xdp_add_lm |
( |
WORD_T |
da, |
|
|
WORD_T |
db, |
|
|
WORD_T |
dc |
|
) |
| |
|
inline |
The XOR differential probability of ADD ( ), as proposed in [Algorithm 2, Lipmaa, Moriai, FSE 2001]. Complexity: .
- Parameters
-
da | first input difference. |
db | second input difference. |
dc | output difference. |
- Returns
-
- See Also
- xdp_add
Credits: Yann Le Corre for optimizations
double xdp_add_lm |
( |
WORD_T |
da, |
|
|
WORD_T |
db, |
|
|
WORD_T |
dc, |
|
|
uint32_t |
word_size |
|
) |
| |
|
inline |
Same as xdp_add_lm but taking the word size as an input parameter – used to compute the prob. of partial differentials
Credits: Yann Le Corre for optimizations
int xdp_add_lm_log2 |
( |
WORD_T |
da, |
|
|
WORD_T |
db, |
|
|
WORD_T |
dc |
|
) |
| |
|
inline |
The log base 2 of the XOR differential probability of ADD ( ), as proposed in [Algorithm 2, Lipmaa, Moriai, FSE 2001]. Complexity: .
- Parameters
-
da | first input difference. |
db | second input difference. |
dc | output difference. |
- Returns
-
- See Also
- xdp_add_lm
Credits: Yann Le Corre
int xdp_add_lm_log2 |
( |
WORD_T |
da, |
|
|
WORD_T |
db, |
|
|
WORD_T |
dc, |
|
|
uint32_t |
word_size |
|
) |
| |
|
inline |
void xdp_add_normalize_matrices |
( |
gsl_matrix * |
A[2][2][2] | ) |
|
Transform the elements of A into probabilities.
- Parameters
-
A | transition probability matrices for . |
void xdp_add_print_matrices |
( |
gsl_matrix * |
A[2][2][2] | ) |
|
Print the matrices for .
- Parameters
-
A | transition probability matrices for . |
void xdp_add_print_matrices_sage |
( |
gsl_matrix * |
A[2][2][2] | ) |
|
Print the matrices for in a format readable by the computer algebra system Sage (http://www.sagemath.org/).
- Parameters
-
A | transition probability matrices for . |
void xdp_add_sf |
( |
gsl_matrix * |
A[2][2][2] | ) |
|