introduced galois_multiplication to be used for mix_columns: for encryption, we only needed to multiply column values once at worst to do a matrix multiplication for the polynomial a(x) = 3x^3 + x^2 + x + 2, so we could do it within mix_columns(), but since the inverse inv_mix_columnsuses a more complex polynomial (the inverse of a, a^-1(x) = 11x^3 + 13x^2 + 9x + 14), it would be cleaner to properly implement this fn.
added README details for decryption.
also changed shift_rows impl since I realized we could simply just use rotate_left and rotate_right found in Rust stdlib.
Closes #119
Some key notes/changes:
galois_multiplication
to be used formix_columns
: for encryption, we only needed to multiply column values once at worst to do a matrix multiplication for the polynomial a(x) = 3x^3 + x^2 + x + 2, so we could do it withinmix_columns()
, but since the inverseinv_mix_columns
uses a more complex polynomial (the inverse of a, a^-1(x) = 11x^3 + 13x^2 + 9x + 14), it would be cleaner to properly implement this fn.shift_rows
impl since I realized we could simply just userotate_left
androtate_right
found in Rust stdlib.