30 #define MAX_NROUNDS 20
35 #define SALSA_FEED_FORWARD 0
40 #define SALSA_RAND_ROT_CONST 0
45 #define SALSA_STATE 16
50 const uint32_t r_start,
const uint32_t r_end,
51 const uint32_t X_in[
SALSA_STATE], uint32_t Y_in[SALSA_STATE]);
59 void salsa_uint8_to_uint32(
const uint8_t X[4], uint32_t* Y);
61 void salsa_uint32_to_uint8(uint8_t X[4],
const uint32_t Y);
63 void salsa_state_uint8_to_uint32(
const uint8_t X[4 *
SALSA_STATE], uint32_t Y[SALSA_STATE]);
65 void salsa_state_uint32_to_uint8(uint8_t X[4 *
SALSA_STATE],
const uint32_t Y[SALSA_STATE]);
67 void salsa_print_trail(uint32_t nrounds,
diff_set_t DT[MAX_NROUNDS][
SALSA_STATE],
double P[MAX_NROUNDS][SALSA_STATE]);
71 void salsa_print_prob_vs_rand(
double P[
SALSA_STATE],
double P_rand[SALSA_STATE]);
74 const uint32_t r_start,
const uint32_t r_end, gsl_matrix* A[3][3][3],
76 diff_set_t DT[MAX_NROUNDS][SALSA_STATE],
double P[MAX_NROUNDS][SALSA_STATE]);
79 const uint32_t r_start,
const uint32_t r_end, uint32_t npairs,
81 double PW[SALSA_STATE]);
92 uint32_t D[MAX_NROUNDS][SALSA_STATE],
93 double P[SALSA_STATE]);
95 void salsa_word_probs_v2(
const uint32_t r_start,
const uint32_t r_end,
98 double P[SALSA_STATE]);
102 double xdp_add_dset_salsa_arx(gsl_matrix* A[3][3][3],
110 #endif // #ifndef SALSA_H
void salsa_word_probs(const uint32_t nrounds, const uint32_t e[SALSA_STATE+SALSA_STATE][5], double PT[MAX_NROUNDS][SALSA_STATE], uint32_t D[MAX_NROUNDS][SALSA_STATE], double P[SALSA_STATE])
Definition: salsa.cc:614
void salsa_gen_rand_shift_const(uint32_t E[SALSA_STATE+SALSA_STATE][5])
Definition: salsa.cc:507
void salsa_gen_rand_input_state(uint32_t X[SALSA_STATE])
Definition: salsa.cc:322
void salsa_print_state_uint32(const uint32_t X[SALSA_STATE])
Definition: salsa.cc:381
uint32_t E[SALSA_STATE+SALSA_STATE][5]
Definition: salsa.cc:50
void salsa_gen_word_deps(const uint32_t nrounds, const uint32_t e[SALSA_STATE+SALSA_STATE][5], uint32_t dep[MAX_NROUNDS][SALSA_STATE])
Definition: salsa.cc:573
void salsa_compute_prob_rand(const diff_set_t Y[SALSA_STATE], double P[SALSA_STATE])
Definition: salsa.cc:465
void salsa_print_state_uint8(const uint8_t X[4 *SALSA_STATE])
Definition: salsa.cc:395
#define SALSA_STATE
Definition: salsa.hh:45
Definition: xdp-add-diff-set.hh:68