33 static void reverseArray(uint8_t arr[], uint8_t low, uint8_t high);
40 static void swap(uint8_t &a, uint8_t &b);
57 static uint8_t
ffMul(uint8_t x, uint8_t y);
Class providing some mathematical functions needed for AES.
Definition: aesMath.h:24
AESMath()=default
Construct a new AESMath object.
static void rightRotateArray(uint8_t arr[], uint8_t n, uint8_t k)
Rotate an array arr of length n by k to the right.
static void swap(uint8_t &a, uint8_t &b)
Swap the values of 2 integers.
static constexpr uint8_t IRREDUCIBLE_POLYNOMIAL
Irreducible polynomial: x^8 + x^4 + x^3 + x + 1.
Definition: aesMath.h:59
static void reverseArray(uint8_t arr[], uint8_t low, uint8_t high)
Reverse an array by swapping the lowest and highest element.
static uint8_t ffMul(uint8_t x, uint8_t y)
Multiply x and y in GF(2^8) Implemented after https://en.wikipedia.org/wiki/Finite_field_arithmetic.