public void Square_cross_check() { Fp2 a2 = new Fp2(Parameters.P / 2, Parameters.P / 4); Fp6 a = new Fp6(a2, a2, a2); Assert.True(a.IsValid()); Assert.AreEqual(a.Squared(), a.Mul(a)); }
public void Inverse_mul_self() { Fp2 a2 = new Fp2(Parameters.P / 2, Parameters.P / 4); Fp6 a = new Fp6(a2, a2, a2); Assert.True(a.IsValid()); Assert.AreEqual(Fp6.One, a.Mul(a.Inverse())); }
public void Inverse_mul_self_is_commutative_regression() { Fp2 a2 = new Fp2(Parameters.P / 2, Parameters.P / 4); Fp6 a = new Fp6(a2, a2, a2); Assert.True(a.IsValid()); Fp6 inv = a.Inverse(); Assert.AreEqual(a.Mul(inv), inv.Mul(a)); }