*
* The polys used are from here:
* http://en.wikipedia.org/wiki/Finite_field_arithmetic#Rijndael.27s_finite_field
*/
public void testPolynomialArithmetic() {
Polynomial pa = Polynomial.createFromLong(0x53);
Polynomial pb = Polynomial.createFromLong(0xCA);
Polynomial pm = Polynomial.createFromLong(0x11B);
Polynomial px = pa.multiply(pb);
assertEquals(0x3F7E, px.toBigInteger().longValue());
Polynomial pabm = px.mod(pm);
assertEquals(0x1, pabm.toBigInteger().longValue());
}