YAARX: Yet Another ARX Toolkit  0.1
 All Data Structures Files Functions Variables Macros Pages
tea-add-threshold-search.hh File Reference

Header for tea-add-threshold-search.cc. More...

Go to the source code of this file.

Functions

uint32_t tea_add_threshold_count_lp (differential_t trail[NROUNDS], uint32_t trail_len, double p_thres)
 
uint32_t tea_add_trail_search (uint32_t key[4], double B[NROUNDS], differential_t trail[NROUNDS])
 
uint32_t tea_add_trail_search_full (uint32_t key[4], double BB[NROUNDS], differential_t trail[NROUNDS], uint32_t num_rounds)
 

Detailed Description

Function Documentation

uint32_t tea_add_threshold_count_lp ( differential_t  trail[NROUNDS],
uint32_t  trail_len,
double  p_thres 
)

Count the number of differentials in a trail that have probabilities below a given threshold.

Parameters
traila differential trail for trail_len rounds.
trail_lenlength of the differential trail.
p_thresprobability threshold.
uint32_t tea_add_trail_search ( uint32_t  key[4],
double  B[NROUNDS],
differential_t  trail[NROUNDS] 
)

Search for ADD differential trails in block cipher TEA: wrapper function for tea_add_threshold_search.

Parameters
keycryptographic key of TEA.
Barray of bounds.
trailbest found differential trail.

Algorithm Outline:

The procedure operates as follows:

  1. Compute a pDDT for F (tea_f_add_pddt).
  2. Adjust the probabilities of the pDDT to the round key and constant (tea_f_add_pddt_adjust_to_key).
  3. Execute the search for differential trails for $n$ rounds (n = NROUNDS) through a successive application of tea_add_threshold_search :
    • Compute the best found probability on 1 round: $B[0]$.
    • Using $B[0]$ compute the best found probability on 2 rounds: $B[1]$.
    • $\ldots$
    • Using $B[0],\ldots,B[i-1]$ compute the best found probability on $(i+1)$ rounds: $B[i]$.
    • $\ldots$
    • Using $B[0],\ldots,B[n-2]$ compute the best found probability on $n$ rounds: $B[n-1]$.
  4. Print the best found trail on $n$ rounds on standrad output and terminate.
See Also
tea_add_threshold_search
uint32_t tea_add_trail_search_full ( uint32_t  key[4],
double  BB[NROUNDS],
differential_t  trail[NROUNDS],
uint32_t  num_rounds 
)

Full threshold search using bounds pre-computed with tea_add_trail_search ; basically a wrapper function for tea_add_threshold_search_full .

Parameters
keycryptographic key of TEA.
BBarray of bounds.
trailbest found differential trail.

The function takes as input an array of initial bounds B and the corresponding best found trail, computed with a prior call to tea_add_trail_search and outputs a trail that is at least as good as the niput.

See Also
tea_add_threshold_search_full