Code example for BigInteger

Methods: multiply

0
            return new Fp(q, x.subtract(b.toBigInteger()).mod(q));
        } 
 
        public ECFieldElement multiply(ECFieldElement b)
        { 
            return new Fp(q, x.multiply(b.toBigInteger()).mod(q));
        } 
 
        public ECFieldElement divide(ECFieldElement b)
        { 
            return new Fp(q, x.multiply(b.toBigInteger().modInverse(q)).mod(q));
        } 
 
        public ECFieldElement negate() 
        { 
            return new Fp(q, x.negate().mod(q));
        } 
 
        public ECFieldElement square() 
        { 
            return new Fp(q, x.multiply(x).mod(q));