YAARX: Yet Another ARX Toolkit  0.1
 All Data Structures Files Functions Variables Macros Pages
adp-tea-f-fk-noshift.hh File Reference

Header file for adp-tea-f-fk-noshift.cc: More...

Go to the source code of this file.

Macros

#define ADP_F_OP_NOSHIFT_NINPUTS   4
 
#define ADP_F_OP_NOSHIFT_MSIZE   (1L << 7)
 
#define ADP_F_OP_NOSHIFT_NMATRIX   32
 
#define ADP_F_OP_NOSHIFT_COLSUM   2
 
#define ADP_F_OP_NOSHIFT_NORM   1.0 /(double)ADP_F_OP_NOSHIFT_COLSUM
 
#define ADP_F_OP_NOSHIFT_ISTATE   64
 
#define NSPOS   1
 

Functions

void adp_f_op_noshift_sf (gsl_matrix *A[NSPOS][2][2][2][2][2])
 
void adp_f_op_noshift_alloc_matrices (gsl_matrix *A[NSPOS][2][2][2][2][2])
 
void adp_f_op_noshift_free_matrices (gsl_matrix *A[NSPOS][2][2][2][2][2])
 
void adp_f_op_noshift_normalize_matrices (gsl_matrix *A[NSPOS][2][2][2][2][2])
 
void adp_f_op_noshift_print_matrices (gsl_matrix *A[NSPOS][2][2][2][2][2])
 
double adp_f_op_noshift (gsl_matrix *A[NSPOS][2][2][2][2][2], uint32_t k0, uint32_t k1, uint32_t delta, uint32_t da, uint32_t db)
 
double adp_f_op_noshift_exper (uint32_t k0, uint32_t k1, uint32_t delta, uint32_t da, uint32_t db)
 

Detailed Description

Macro Definition Documentation

#define ADP_F_OP_NOSHIFT_COLSUM   2

Sum of the non-zero elements in one column of the F' matrices.

#define ADP_F_OP_NOSHIFT_ISTATE   64

Initial state for start of the compuation of the ADP of F'.

#define ADP_F_OP_NOSHIFT_MSIZE   (1L << 7)

Number of states of the S-function for F'.

#define ADP_F_OP_NOSHIFT_NINPUTS   4

Number of inputs to F': $k_0,k_1,\delta,da$.

#define ADP_F_OP_NOSHIFT_NMATRIX   32

Number of transition probability matrices for F'.

#define ADP_F_OP_NOSHIFT_NORM   1.0 /(double)ADP_F_OP_NOSHIFT_COLSUM

Normalization factor for transforming the elements of the matrices into probabilities.

#define NSPOS   1

Number of special positions for ADP of F'.

Function Documentation

double adp_f_op_noshift ( gsl_matrix *  A[NSPOS][2][2][2][2][2],
uint32_t  k0,
uint32_t  k1,
uint32_t  delta,
uint32_t  da,
uint32_t  db 
)

The additive differential probability (ADP) of a modified version of the F-function of TEA with the shift operations removed, denoted by F' and defined as:

$y = F'(k_0, k_1, \delta |~ x) = (x + k_0) \oplus (x + \delta) \oplus (x + k_1)$.

Complexity: $O(n)$.

Parameters
Atransition probability matrices for $F'$ computed with adp_f_op_noshift_sf
k0first round key.
k1second round key.
deltaround constant.
dainput difference.
dboutput difference.
Returns
$\mathrm{adp}^{F'}(k_0, k_1, \delta |~ da \rightarrow db)$.
void adp_f_op_noshift_alloc_matrices ( gsl_matrix *  A[NSPOS][2][2][2][2][2])

Allocate memory for the transition probability matrices for $F'$.

Parameters
Atransition probability matrices for $F'$.
See Also
adp_rsh_xor_free_matrices
double adp_f_op_noshift_exper ( uint32_t  k0,
uint32_t  k1,
uint32_t  delta,
uint32_t  da,
uint32_t  db 
)

The additive differential probability (ADP) of F' (a modified version of the F-function of TEA with the shift operations removed) computed experimentally over all inputs. Complexity: $O(2^{2n})$.

Parameters
k0first round key.
k1second round key.
deltaround constant.
dainput difference.
dboutput difference.
Returns
$\mathrm{adp}^{F'}(k_0, k_1, \delta |~ da \rightarrow db)$.
See Also
adp_f_op_noshift
void adp_f_op_noshift_free_matrices ( gsl_matrix *  A[NSPOS][2][2][2][2][2])

Free memory reserved by a previous call to adp_rsh_xor_free_matrices.

Parameters
Atransition probability matrices for $F'$.
void adp_f_op_noshift_normalize_matrices ( gsl_matrix *  A[NSPOS][2][2][2][2][2])

Transform the elements of A into probabilities.

Parameters
Atransition probability matrices for $F'$.
void adp_f_op_noshift_print_matrices ( gsl_matrix *  A[NSPOS][2][2][2][2][2])

Print the elements of A.

Parameters
Atransition probability matrices for $F'$.
void adp_f_op_noshift_sf ( gsl_matrix *  A[NSPOS][2][2][2][2][2])

S-function for a modified version of the TEA F-function with the shift operations removed, denoted by F' and defined as:

$y = F'(k_0, k_1, \delta |~ x) = (x + k_0) \oplus (x + \delta) \oplus (x + k_1)$.

Parameters
Azero-initialized set of matrices.
Returns
Transition probability matrices A for $F'$.

$A[j][2][2][2][2][2] = A[j][k0[i]][k1[i]][\delta[i]][da[i]][db[i]]$, where

  • $j$ : dummy variable for future use.
  • $k_0[i]$ : the i-th bit of the first round key.
  • $k_1[i]$ : the i-th bit of the second round key.
  • $\delta[i]$ : the i-th bit of the round constant:
  • $da[i]$ : the i-th bit of the input difference.
  • $db[i]$ : the i-th bit of the output difference.