YAARX: Yet Another ARX Toolkit  0.1
 All Data Structures Files Functions Variables Macros Pages
adp-xor-fi.cc File Reference

The ADD differential probability of XOR with one fixed input (FI): $\mathrm{adp}^{\oplus}_{\mathrm{FI}}(a,db \rightarrow db)$. More...

#include "common.hh"
#include "adp-xor-fi.hh"

Functions

void adp_xor_fixed_input_alloc_matrices (gsl_matrix *A[2][2][2])
 
void adp_xor_fixed_input_free_matrices (gsl_matrix *A[2][2][2])
 
void adp_xor_fixed_input_normalize_matrices (gsl_matrix *A[2][2][2])
 
void adp_xor_fixed_input_print_matrices_sage (gsl_matrix *A[2][2][2])
 
void adp_xor_fixed_input_sf (gsl_matrix *A[2][2][2])
 
double adp_xor_fixed_input (gsl_matrix *A[2][2][2], uint32_t a, uint32_t db, uint32_t dc)
 
double adp_xor_fixed_input_exper (const uint32_t a, const uint32_t db, const uint32_t dc)
 

Detailed Description

The ADD differential probability of XOR with one fixed input (FI): $\mathrm{adp}^{\oplus}_{\mathrm{FI}}(a,db \rightarrow db)$.

Author
V.Velichkov, vesse.nosp@m.lin..nosp@m.velic.nosp@m.hkov.nosp@m.@uni..nosp@m.lu
Date
2012-2013
See Also
adp-xor.cc

Function Documentation

double adp_xor_fixed_input ( gsl_matrix *  A[2][2][2],
uint32_t  a,
uint32_t  db,
uint32_t  dc 
)

The additive differential probability (ADP) of $\mathrm{adp}^{\oplus}_{\mathrm{FI}}$. Complexity: $O(n)$.

Parameters
Atransition probability matrices for $\mathrm{adp}^{\oplus}_{\mathrm{FI}}$ computed with adp_xor_fixed_input_sf.
ainput value.
dbinput difference.
dcoutput difference.
Returns
$\mathrm{adp}^{\oplus}(a,db \rightarrow db)$.
void adp_xor_fixed_input_alloc_matrices ( gsl_matrix *  A[2][2][2])

Allocate memory for the transition probability matrices for $\mathrm{adp}^{\oplus}_{\mathrm{FI}}$.

Parameters
Atransition probability matrices for $\mathrm{adp}^{\oplus}_{\mathrm{FI}}$.
See Also
adp_xor_fixed_input_free_matrices
double adp_xor_fixed_input_exper ( const uint32_t  a,
const uint32_t  db,
const uint32_t  dc 
)

The additive differential probability (ADP) of $\mathrm{adp}^{\oplus}_{\mathrm{FI}}$ computed experimentally over all inputs. Complexity: $O(2^{n})$.

Parameters
ainput value.
dbinput difference.
dcoutput difference.
Returns
$\mathrm{adp}^{\oplus}(a,db \rightarrow db)$.
See Also
adp_xor_fixed_input
void adp_xor_fixed_input_free_matrices ( gsl_matrix *  A[2][2][2])

Free memory reserved by a previous call to adp_xor_fixed_input_alloc_matrices.

Parameters
Atransition probability matrices for $\mathrm{adp}^{\oplus}_{\mathrm{FI}}$.
void adp_xor_fixed_input_normalize_matrices ( gsl_matrix *  A[2][2][2])

Transform the elements of A into probabilities.

Parameters
Atransition probability matrices for $\mathrm{adp}^{\oplus}_{\mathrm{FI}}$.
void adp_xor_fixed_input_print_matrices_sage ( gsl_matrix *  A[2][2][2])

Print the matrices for $\mathrm{adp}^{\oplus}_{\mathrm{FI}}$ in a format readable by the computer algebra system Sage (http://www.sagemath.org/).

Parameters
Atransition probability matrices for $\mathrm{adp}^{\oplus}_{\mathrm{FI}}$.
void adp_xor_fixed_input_sf ( gsl_matrix *  A[2][2][2])

S-function for $\mathrm{adp}^{\oplus}_{\mathrm{FI}}$: $\mathrm{adp}^{\oplus}(a,db \rightarrow db)$.

Parameters
Azero-initialized set of matrices.
Returns
Transition probability matrices A.

A[2][2][2] = A[a[i]][db[i]][dc[i]], where

  • a[i] : the i-th bit of the fixed input.
  • db[i] : the i-th bit of the input difference.
  • dc[i] : the i-th bit of the output difference.