Code example for BigInteger

Methods: negate

0
            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));
        } 
 
        public ECFieldElement invert() 
        { 
            return new Fp(q, x.modInverse(q));
        } 
 
        // D.1.4 91 
        /** 
         * return a sqrt root - the routine verifies that the calculation