Header for xtea-f-xor-pddt.cc.
More...
Go to the source code of this file.
|
void | xtea_f_xor_pddt_i (const uint32_t k, const uint32_t n, const uint32_t lsh_const, const uint32_t rsh_const, gsl_matrix *A[2][2][2], gsl_vector *C, uint32_t *da, uint32_t *db, uint32_t *dc, double *p, const double p_thres, std::set< differential_t, struct_comp_diff_dx_dy > *diff_set_dx_dy) |
|
void | xtea_f_xor_pddt (uint32_t n, double p_thres, uint32_t lsh_const, uint32_t rsh_const, std::set< differential_t, struct_comp_diff_dx_dy > *diff_set_dx_dy) |
|
uint32_t | xtea_f_da_db_xor_pddt (uint32_t n, double p_thres, uint32_t lsh_const, uint32_t rsh_const, const uint32_t da_prev, const uint32_t da_in, std::set< differential_t, struct_comp_diff_dx_dy > *hways_diff_set_dx_dy, std::multiset< differential_t, struct_comp_diff_p > *hways_diff_mset_p, std::set< differential_t, struct_comp_diff_dx_dy > *diff_set_dx_dy) |
|
bool | xtea_is_dx_in_set_dx_dy (uint32_t dy, uint32_t dx_prev, std::set< differential_t, struct_comp_diff_dx_dy > diff_set_dx_dy) |
|
void | xtea_xor_pddt_adjust_to_key (uint32_t nrounds, uint32_t npairs, uint32_t lsh_const, uint32_t rsh_const, uint32_t key, uint32_t delta, double p_thres, std::set< differential_t, struct_comp_diff_dx_dy > *diff_set_dx_dy) |
|
void | xtea_xor_pddt_dxy_to_dp (std::multiset< differential_t, struct_comp_diff_p > *diff_mset_p, const std::set< differential_t, struct_comp_diff_dx_dy > diff_set_dx_dy) |
|
uint32_t xtea_f_da_db_xor_pddt |
( |
uint32_t |
n, |
|
|
double |
p_thres, |
|
|
uint32_t |
lsh_const, |
|
|
uint32_t |
rsh_const, |
|
|
const uint32_t |
da_prev, |
|
|
const uint32_t |
da_in, |
|
|
std::set< differential_t, struct_comp_diff_dx_dy > * |
hways_diff_set_dx_dy, |
|
|
std::multiset< differential_t, struct_comp_diff_p > * |
hways_diff_mset_p, |
|
|
std::set< differential_t, struct_comp_diff_dx_dy > * |
diff_set_dx_dy |
|
) |
| |
Compute an XOR partial DDT (pDDT) for the XTEA F-function: wrapper function of xtea_f_xor_pddt_i . By definition a pDDT contains only differentials that have probability above a fixed probability thershold.
- Parameters
-
n | word size (default is WORD_SIZE). |
p_thres | probability threshold (default is XTEA_XOR_P_THRES). |
lsh_const | LSH constant (TEA_LSH_CONST). |
rsh_const | RSH constant (TEA_RSH_CONST). |
diff_set_dx_dy | set of differentials in the pDDT ordered by index ; stored in an STL set structure, internally implemented as a Red-Black binary search tree. |
- Note
- The compuation of the pDDT is based on the ADD operation in the XTEA F-function: the only non-linear componenet with respect to XOR differences.
- See Also
- xtea_f_xor_pddt_i.
void xtea_f_xor_pddt_i |
( |
const uint32_t |
k, |
|
|
const uint32_t |
n, |
|
|
const uint32_t |
lsh_const, |
|
|
const uint32_t |
rsh_const, |
|
|
gsl_matrix * |
A[2][2][2], |
|
|
gsl_vector * |
C, |
|
|
uint32_t * |
da, |
|
|
uint32_t * |
db, |
|
|
uint32_t * |
dc, |
|
|
double * |
p, |
|
|
const double |
p_thres, |
|
|
std::set< differential_t, struct_comp_diff_dx_dy > * |
diff_set_dx_dy |
|
) |
| |
For a given difference dx, check if in the list of differentials set_dx_dy exists an entry (dx -> dy)
- See Also
- is_dx_in_set_dx_dy
void xtea_xor_pddt_adjust_to_key |
( |
uint32_t |
nrounds, |
|
|
uint32_t |
npairs, |
|
|
uint32_t |
lsh_const, |
|
|
uint32_t |
rsh_const, |
|
|
uint32_t |
key, |
|
|
uint32_t |
delta, |
|
|
double |
p_thres, |
|
|
std::set< differential_t, struct_comp_diff_dx_dy > * |
diff_set_dx_dy |
|
) |
| |
Adjust the probabailities of the differentials in a pDDT computed with xtea_f_xor_pddt , to the value of a fixed key by performing one-round TEA encryptions over a number of chosen plaintext pairs drawn uniformly at random.
- Parameters
-
nrounds | total number of rounds (NROUNDS). |
npairs | number of chosen plaintext pairs (NPAIRS). |
lsh_const | LSH constant (TEA_LSH_CONST). |
rsh_const | RSH constant (TEA_RSH_CONST). |
key | round key. |
delta | round constant. |
p_thres | probability threshold (XTEA_XOR_P_THRES). |
diff_set_dx_dy | set of differentials in the pDDT ordered by index . |