YAARX: Yet Another ARX Toolkit
0.1
|
Experiments with linear codes for SK design. More...
#include "common.hh"
#include "xdp-add.hh"
#include "max-xdp-add.hh"
#include "linear-code-tests-aux.cc"
Functions | |
void | lcode_matrix_print (gsl_matrix *A, uint32_t nrows, uint32_t ncols) |
void | lcode_vector_print (gsl_vector *V, uint32_t len) |
void | lcode_vec_to_hex (WORD_T *hex, gsl_vector *vec, uint32_t vec_len) |
void | lcode_hex_to_vec (const WORD_T hex, gsl_vector *vec, uint32_t vec_len) |
void | lcode_matrix_double_to_boolean (gsl_matrix *A, uint32_t nrows, uint32_t ncols) |
void | lcode_vector_double_to_boolean (gsl_vector *vec, uint32_t vec_len) |
void | lcode_encode (gsl_vector *codeword, gsl_vector *message, gsl_matrix *G, uint32_t nrows, uint32_t ncols) |
void | lcode_matrix_init (WORD_T GM[LCODE_GEN_MATRIX_NROWS][LCODE_GEN_MATRIX_NCOLS], gsl_matrix *A, uint32_t nrows, uint32_t ncols) |
void | lcode_codewords (std::vector< WORD_T > *C, gsl_matrix *G, uint32_t message_len) |
void | lcode_codewords_diffs (std::vector< WORD_T > C) |
double | lcode_add_dp_exper (WORD_T da, WORD_T db) |
uint32_t | lcode_ndiff_bits (WORD_T a, WORD_T b) |
uint32_t | lcode_ndiff_bits_no_msb (WORD_T a, WORD_T b) |
WORD_T | speck_sigma_left (const WORD_T x, const WORD_T rot_const) |
WORD_T | speck_sigma_right (const WORD_T x, const WORD_T y, const WORD_T rot_const) |
WORD_T | speck_negation (const WORD_T x) |
double | speck_round_dp_max (const WORD_T r, const WORD_T s, const WORD_T da_in, const WORD_T db_in, WORD_T *da_out, WORD_T *db_out) |
void | speck_diff_seq () |
void | speck_negation_approximation () |
void | speck_round_dp () |
bool | sort_comp_diff_3d_hw_custom (differential_3d_t a, differential_3d_t b) |
void | test_speck_xdp_add_vec () |
void | test_speck_xdp_add () |
void | test_speck_xdp_add_two_round () |
int | main () |
Variables | |
WORD_T | g_G [LCODE_GEN_MATRIX_NROWS][LCODE_GEN_MATRIX_NCOLS] |
Experiments with linear codes for SK design.
void lcode_encode | ( | gsl_vector * | codeword, |
gsl_vector * | message, | ||
gsl_matrix * | G, | ||
uint32_t | nrows, | ||
uint32_t | ncols | ||
) |
Encode NROWS bit message X into NCOLS bite codeword C using the NROWS x NCOLS generator matrix G as:
C[1 x NCOLS] = X[1 x NROWS] G[NROWS x NCOLS]
void lcode_matrix_double_to_boolean | ( | gsl_matrix * | A, |
uint32_t | nrows, | ||
uint32_t | ncols | ||
) |
Convert matrix of double-s to matrix of Booleans: if an element x is non-zero => set it to (x mod 2); else leave it to zero
void lcode_vector_double_to_boolean | ( | gsl_vector * | vec, |
uint32_t | vec_len | ||
) |
Convert vector of double-s to vector of Booleans: if an element x is non-zero => set it to (x mod 2); else leave it to zero
bool sort_comp_diff_3d_hw_custom | ( | differential_3d_t | a, |
differential_3d_t | b | ||
) |
Compare differential_3d_t structs for use with std::sort
WORD_T g_G[LCODE_GEN_MATRIX_NROWS][LCODE_GEN_MATRIX_NCOLS] |