30 #ifndef TEA_ADD_P_THRES
31 #define TEA_ADD_P_THRES 0.05//0.01//0.05//0.0002//0.001//0.008//0.05
33 #ifndef TEA_ADD_MAX_PDDT_SIZE // 2^20 ~= 1,048,576
34 #define TEA_ADD_MAX_PDDT_SIZE (1U << 25)
37 #define TEA_NCYCLES 32
39 #ifndef TEA_ADD_TRAILS_LOGFILE
42 #define TEA_ADD_TRAILS_LOGFILE "tea-add-trails-nz.log"
44 #ifndef TEA_GVIZ_DATFILE
47 #define TEA_GVIZ_DATFILE "tea-gviz-nz.dat"
50 void tea_encrypt(uint32_t* v, uint32_t* k,
int nrounds);
52 uint32_t
tea_f(uint32_t x, uint32_t k0, uint32_t k1, uint32_t delta, uint32_t lsh_const, uint32_t rsh_const);
54 uint32_t
tea_f_i(
const uint32_t mask_i,
55 const uint32_t k0,
const uint32_t k1,
const uint32_t delta,
56 const uint32_t lsh_const,
const uint32_t rsh_const,
const uint32_t x_in);
61 const uint32_t da,
const uint32_t db,
62 const uint32_t key[4]);
72 #endif // #ifndef TEA_H
#define NROUNDS
Definition: common.hh:122
Definition: common.hh:272
uint32_t tea_add_verify_trail(uint32_t nrounds, uint32_t npairs, uint32_t key[4], differential_t trail[NROUNDS])
Definition: tea.cc:354
void tea_compute_delta_const(uint32_t D[TEA_NCYCLES])
Definition: tea.cc:145
double tea_add_diff_adjust_to_key(const uint64_t npairs, const int round_idx, const uint32_t da, const uint32_t db, const uint32_t key[4])
Definition: tea.cc:175
double tea_differential_thres_exper_fk(uint64_t npairs, int r, uint32_t key[4], uint32_t da[2], uint32_t db[2])
Definition: tea.cc:314
void tea_encrypt(uint32_t *v, uint32_t *k, int nrounds)
Definition: tea.cc:41
uint32_t tea_add_verify_differential(uint32_t nrounds, uint32_t npairs, uint32_t key[4], differential_t trail[NROUNDS])
Definition: tea.cc:389
uint32_t tea_f_i(const uint32_t mask_i, const uint32_t k0, const uint32_t k1, const uint32_t delta, const uint32_t lsh_const, const uint32_t rsh_const, const uint32_t x_in)
Definition: tea.cc:123
#define TEA_NCYCLES
Definition: tea.hh:37
void print_trail_latex(FILE *fp, uint32_t nrounds, uint32_t keys[4], differential_t trail[NROUNDS])
Definition: tea.cc:436
uint32_t tea_f(uint32_t x, uint32_t k0, uint32_t k1, uint32_t delta, uint32_t lsh_const, uint32_t rsh_const)
Definition: tea.cc:95