30 #ifndef XTEA_XOR_P_THRES
31 #define XTEA_XOR_P_THRES 0.05//0.05//0.05//0.08//0.120
33 #ifndef XTEA_ADD_P_THRES
34 #define XTEA_ADD_P_THRES 0.05
36 #ifndef XTEA_XOR_MAX_PDDT_SIZE // 2^20 ~= 1,048,576
37 #define XTEA_XOR_MAX_PDDT_SIZE (1U << 30)
39 #ifndef XTEA_ADD_MAX_PDDT_SIZE
40 #define XTEA_ADD_MAX_PDDT_SIZE (1U << 20)
43 void xtea_r(uint32_t nrounds, uint32_t v[2], uint32_t
const k[4], uint32_t lsh_const, uint32_t rsh_const);
45 uint32_t
xtea_f(uint32_t x, uint32_t k, uint32_t delta,
46 uint32_t lsh_const, uint32_t rsh_const);
48 uint32_t
xtea_f_i(
const uint32_t mask_i,
49 const uint32_t lsh_const,
const uint32_t rsh_const,
50 const uint32_t x_in,
const uint32_t k,
const uint32_t delta);
52 uint32_t
xtea_f2(uint32_t xx, uint32_t x, uint32_t k, uint32_t delta,
53 uint32_t lsh_const, uint32_t rsh_const);
56 const uint32_t lsh_const,
const uint32_t rsh_const,
57 const uint32_t xx_in,
const uint32_t x_in,
58 const uint32_t k,
const uint32_t delta);
60 uint32_t
xtea_f_lxr(uint32_t x, uint32_t lsh_const, uint32_t rsh_const);
63 const uint32_t lsh_const,
const uint32_t rsh_const,
const uint32_t x_in);
70 uint32_t key, uint32_t delta,
71 uint32_t daa, uint32_t da, uint32_t db);
74 uint32_t key, uint32_t delta,
75 uint32_t da, uint32_t db);
78 uint32_t key[4], uint32_t da[2], uint32_t db[2],
79 uint32_t lsh_const, uint32_t rsh_const);
82 uint32_t key[4], uint32_t da[2], uint32_t db[2],
83 uint32_t lsh_const, uint32_t rsh_const);
92 uint32_t round_key[64], uint32_t round_delta[64],
96 uint32_t round_key[64], uint32_t round_delta[64],
100 #endif // #ifndef XTEA_H
double xtea_xor_differential_exper_v2(uint64_t npairs, int r, uint32_t key[4], uint32_t da[2], uint32_t db[2], uint32_t lsh_const, uint32_t rsh_const)
Definition: xtea.cc:431
uint32_t xtea_xor_verify_trail(uint32_t nrounds, uint32_t npairs, uint32_t round_key[64], uint32_t round_delta[64], uint32_t dxx_init, differential_t trail[NROUNDS])
Definition: xtea.cc:626
#define NROUNDS
Definition: common.hh:122
uint32_t xtea_add_verify_differential(uint32_t nrounds, uint32_t npairs, uint32_t lsh_const, uint32_t rsh_const, uint32_t key[4], differential_t trail[NROUNDS])
Definition: xtea.cc:578
uint32_t xtea_f(uint32_t x, uint32_t k, uint32_t delta, uint32_t lsh_const, uint32_t rsh_const)
Definition: xtea.cc:101
uint32_t xtea_xor_verify_differential(uint32_t nrounds, uint32_t npairs, uint32_t lsh_const, uint32_t rsh_const, uint32_t key[4], uint32_t dxx_init, differential_t trail[NROUNDS])
Definition: xtea.cc:529
Definition: common.hh:272
uint32_t xtea_f_i(const uint32_t mask_i, const uint32_t lsh_const, const uint32_t rsh_const, const uint32_t x_in, const uint32_t k, const uint32_t delta)
Definition: xtea.cc:131
void xtea_all_round_keys_and_deltas(uint32_t key[4], uint32_t round_key[64], uint32_t round_delta[64])
Definition: xtea.cc:255
double xtea_add_differential_exper_v2(uint64_t npairs, int r, uint32_t key[4], uint32_t da[2], uint32_t db[2], uint32_t lsh_const, uint32_t rsh_const)
Definition: xtea.cc:477
uint32_t xtea_f2(uint32_t xx, uint32_t x, uint32_t k, uint32_t delta, uint32_t lsh_const, uint32_t rsh_const)
Definition: xtea.cc:160
double xtea_one_round_add_differential_exper(uint64_t npairs, int round_idx, uint32_t key, uint32_t delta, uint32_t da, uint32_t db)
Definition: xtea.cc:365
uint32_t xtea_f_lxr(uint32_t x, uint32_t lsh_const, uint32_t rsh_const)
Definition: xtea.cc:212
double xtea_one_round_xor_differential_exper(uint64_t npairs, int round_idx, uint32_t key, uint32_t delta, uint32_t daa, uint32_t da, uint32_t db)
Definition: xtea.cc:291
uint32_t xtea_f_lxr_i(const uint32_t mask_i, const uint32_t lsh_const, const uint32_t rsh_const, const uint32_t x_in)
Definition: xtea.cc:236
void xtea_r(uint32_t nrounds, uint32_t v[2], uint32_t const k[4], uint32_t lsh_const, uint32_t rsh_const)
Definition: xtea.cc:44
uint32_t xtea_f2_i(const uint32_t mask_i, const uint32_t lsh_const, const uint32_t rsh_const, const uint32_t xx_in, const uint32_t x_in, const uint32_t k, const uint32_t delta)
Definition: xtea.cc:188
uint32_t xtea_add_verify_trail(uint32_t nrounds, uint32_t npairs, uint32_t round_key[64], uint32_t round_delta[64], differential_t trail[NROUNDS])
Definition: xtea.cc:664