Lowmc generate matrices

Adapted from the generate_matrices.py file the LowMC repo: https://github.com/LowMC/lowmc/blob/master/generate_matrices.py

grain_ssg()

Generate a Grain LSFR in a self-shrinking generator.

instantiate_matrix(n, m, gen)

Instantiate a matrix of maximal rank using bits from the generatator gen.

main(args)

Generate matrices for LowMC instance.

Use the global parameters blocksize, keysize and rounds to create the set of matrices and constants for the corresponding LowMC instance. Save those in a file named lowmc_constants_p{blocksize}_k{keysize}_r{rounds}.dat.

rank(matrix)

Determine the rank of a binary matrix.

xor_matrix_values(column, columns_m, mat, rows_n)