YAARX: Yet Another ARX Toolkit
0.1
|
LAX is a cipher based on a linear layer, modular addition and XOR. The linear layer is based on the generator matrix of a linear code over GF(2). The proposal of LAX is motivated by a challenge posed by Johan Wallen in his PhD thesis. More...
Macros | |
#define | LEFT 0 |
#define | RIGHT 1 |
Functions | |
bool | get_bit (const WORD_T x, uint32_t i) |
void | set_bit (WORD_T *x, const bool bit, uint32_t i) |
bool | vector_vector_dotprod (const std::array< bool, WORD_SIZE > vec1, const WORD_T vec2) |
void | matrix_vector_multiply (WORD_T *res, const std::array< std::array< bool, WORD_SIZE >, WORD_SIZE > mat, const WORD_T vec) |
void | print_vector (const WORD_T vec) |
void | print_matrix (const std::array< std::array< bool, WORD_SIZE >, WORD_SIZE > mat) |
void | lax_round (const WORD_T in[2], WORD_T out[2], const std::array< std::array< bool, WORD_SIZE >, WORD_SIZE > L) |
void | lax_cipher (const uint32_t nrounds, const WORD_T in[2], WORD_T out[2], std::array< std::array< bool, WORD_SIZE >, WORD_SIZE > L) |
void | test_lax_cipher () |
void | test_matrix_multiply () |
void | test_minimum_distance () |
void | test_lax_two_rounds () |
void | test_lax_three_rounds () |
void | test_lax_differential_3r () |
int | main () |
LAX is a cipher based on a linear layer, modular addition and XOR. The linear layer is based on the generator matrix of a linear code over GF(2). The proposal of LAX is motivated by a challenge posed by Johan Wallen in his PhD thesis.
void lax_cipher | ( | const uint32_t | nrounds, |
const WORD_T | in[2], | ||
WORD_T | out[2], | ||
std::array< std::array< bool, WORD_SIZE >, WORD_SIZE > | L | ||
) |
LAX cipher
void lax_round | ( | const WORD_T | in[2], |
WORD_T | out[2], | ||
const std::array< std::array< bool, WORD_SIZE >, WORD_SIZE > | L | ||
) |
One round of LAX cipher
int main | ( | ) |
Main function.