30 #define SIMON_LROT_CONST_S 1
31 #define SIMON_LROT_CONST_T 8
32 #define SIMON_LROT_CONST_U 2
33 #define SIMON_NPAIRS (1ULL << 20)
34 #define SIMON_NROUNDS 20
35 #define SIMON_NDIFFS 2
36 #define SIMON_MAX_NKEY_WORDS 4
37 #define SIMON_KEY_LEN_BITS 128
38 #define SIMON_ZSEQ_LEN 62
39 #define SIMON_MAX_NROUNDS 72
40 #define SIMON_EPS (double)(1.0 / (double)(1ULL << 15))//(double)(1.0 / (double)(1ULL << 15))
41 #define SIMON_DRAW_GRAPH 0 // draw gviz graph
42 #define SIMON_BACK_TO_HWAY true
43 #define SIMON_TRAIL_LEN_MAX 21
45 #define SIMON_GVIZ_DATFILE "simon-gviz.dat" // full graph
46 #define SIMON_GVIZ_DATFILE_CON "simon-gviz-con.dat" // concentrated graph
47 #define SIMON_BEST_TRAILS_LATEX_FILE "simon-trails.tex"
49 #define SIMON_GVIZ_CLUSTER_TRAILS_DATFILE "gviz-cluster-full.dat" // full graph
50 #define SIMON_GVIZ_CLUSTER_TRAILS_DATFILE_CON "gviz-cluster.dat" // condensed graph
53 #define SIMON_CLUSTER_TRAILS_DATFILE "temp.dat"
60 uint32_t node_from[2];
74 void simon_diff_graph_check_edge(std::vector<simon_diff_graph_edge_t>*
E,
79 void simon_key_expansion(uint32_t key[SIMON_MAX_NROUNDS], uint32_t Z[5][62], uint32_t zseq_j,
80 uint32_t nrounds, uint32_t nkey_words);
81 void simon_encrypt(uint32_t key[SIMON_MAX_NROUNDS], uint32_t nrounds,
82 uint32_t* x_in, uint32_t* y_in);
84 void simon_encrypt_pairs(uint32_t key[SIMON_MAX_NROUNDS], uint32_t nrounds,
85 uint32_t* x_in, uint32_t* y_in,
86 uint32_t* xx_in, uint32_t* yy_in,
87 std::vector<simon_diff_graph_edge_t>*
E);
90 #endif // #ifndef SIMON_H
void simon_encrypt(uint32_t key[SIMON_MAX_NROUNDS], uint32_t nrounds, uint32_t *x_in, uint32_t *y_in)
Definition: simon.cc:229
uint32_t simon_compute_nkeywords(uint32_t word_size, uint32_t key_size)
Definition: simon.cc:64
uint32_t E[SALSA_STATE+SALSA_STATE][5]
Definition: salsa.cc:50
uint32_t simon_compute_nrounds(uint32_t word_size, uint32_t nkey_words, uint32_t *zseq_j)
Definition: simon.cc:122
void simon_key_expansion(uint32_t key[SIMON_MAX_NROUNDS], uint32_t Z[5][62], uint32_t zseq_j, uint32_t nrounds, uint32_t nkey_words)
Definition: simon.cc:189
uint32_t simon_get_keysize(uint32_t word_size)
Definition: simon.cc:90
uint32_t g_simon_zseq[5][62]
Definition: simon.cc:40