Ejemplo n.º 1
0
        public void Square_cross_check()
        {
            Fp2 a = new Fp2(Parameters.P / 2, Parameters.P / 4);

            a.IsValid();

            Assert.AreEqual(a.Squared(), a.Mul(a));
        }
Ejemplo n.º 2
0
        public void Squared_complex_check()
        {
            Fp2 a = new Fp2(Parameters.P / 2, Parameters.P / 4);

            Assert.AreEqual(a.Squared(), a.SquaredComplex());
        }
Ejemplo n.º 3
0
        public void Squared_karatsuba_check()
        {
            Fp2 a = new Fp2(Parameters.P / 2, Parameters.P / 4);

            Assert.AreEqual(a.Squared(), a.SquaredKaratsuba());
        }
Ejemplo n.º 4
0
        public void Squared_schoolbook_check()
        {
            Fp2 a = new Fp2(Parameters.P / 2, Parameters.P / 4);

            Assert.AreEqual(a.Squared(), a.SquaredSchoolbook());
        }