YAARX: Yet Another ARX Toolkit
0.1
|
Analysis of block cipher Simon [ePrint 2013/404]. More...
Functions | |
uint32_t | simon_compute_nkeywords (uint32_t word_size, uint32_t key_size) |
uint32_t | simon_get_keysize (uint32_t word_size) |
uint32_t | simon_compute_nrounds (uint32_t word_size, uint32_t nkey_words, uint32_t *zseq_j) |
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) |
void | simon_encrypt (uint32_t key[SIMON_MAX_NROUNDS], uint32_t nrounds, uint32_t *x_in, uint32_t *y_in) |
void | simon_diff_graph_check_edge (std::vector< simon_diff_graph_edge_t > *E, const simon_diff_graph_edge_t new_edge) |
void | simon_encrypt_pairs (uint32_t key[SIMON_MAX_NROUNDS], uint32_t nrounds, uint32_t *x_in, uint32_t *y_in, uint32_t *xx_in, uint32_t *yy_in, std::vector< simon_diff_graph_edge_t > *E) |
Variables | |
uint32_t | g_simon_zseq [5][62] |
Analysis of block cipher Simon [ePrint 2013/404].
uint32_t simon_compute_nkeywords | ( | uint32_t | word_size, |
uint32_t | key_size | ||
) |
Compute the number of key words depending on the word size
word_size | word size |
key_size | key size in bits |
uint32_t simon_compute_nrounds | ( | uint32_t | word_size, |
uint32_t | nkey_words, | ||
uint32_t * | zseq_j | ||
) |
Compute the number of rounds for Simon and the index of the z-sequence
word_size | word size |
nkey_words | number of key words |
zseq_j | index of the z-sequence g_simon_zseq |
void simon_encrypt | ( | uint32_t | key[SIMON_MAX_NROUNDS], |
uint32_t | nrounds, | ||
uint32_t * | x_in, | ||
uint32_t * | y_in | ||
) |
Simon encryption procedure.
key | expanded key |
nrounds | number of rounds |
x_in | first plaintext word |
y_in | second plaintext word |
uint32_t simon_get_keysize | ( | uint32_t | word_size | ) |
Get the size of the key in bits depending on the word size
word_size | word size in bits |
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 | ||
) |
Simon key expansion procedure.
key | original key (with enough space for the expanded key) |
Z | the z-sequence ( g_simon_zseq) |
zseq_j | index of the z-seqence |
nrounds | number of rounds |
nkey_words | number of key words |
uint32_t g_simon_zseq[5][62] |
Pre-computed z_j sequences (o <= j < 5) used in the key schedule of Simon.