protected BigInteger modMult(BigInteger x1, BigInteger x2) { return modReduce(x1.multiply(x2)); }
protected BigInteger modMult(BigInteger x1, BigInteger x2) { return modReduce(x1.multiply(x2)); }
public ECFieldElement squareMinusProduct(ECFieldElement x, ECFieldElement y) { BigInteger ax = this.x, xx = x.toBigInteger(), yx = y.toBigInteger(); BigInteger aa = ax.multiply(ax); BigInteger xy = xx.multiply(yx); return new Fp(q, r, modReduce(aa.subtract(xy))); }
|| !modReduce(P.multiply(P).subtract(fourX)).modPow(legendreExponent, q).equals(qMinusOne));
|| !modReduce(P.multiply(P).subtract(fourX)).modPow(legendreExponent, q).equals(qMinusOne));
Vl = modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql))); Vh = modReduce(Vh.multiply(Vh).subtract(Qh.shiftLeft(1))); Uh = modReduce(Uh.multiply(Vl).subtract(Ql)); Vh = modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql))); Vl = modReduce(Vl.multiply(Vl).subtract(Ql.shiftLeft(1))); Uh = modReduce(Uh.multiply(Vl).subtract(Ql)); Vl = modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql))); Ql = modMult(Ql, Qh); Vl = modReduce(Vl.multiply(Vl).subtract(Ql.shiftLeft(1))); Ql = modMult(Ql, Ql);
Vl = modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql))); Vh = modReduce(Vh.multiply(Vh).subtract(Qh.shiftLeft(1))); Uh = modReduce(Uh.multiply(Vl).subtract(Ql)); Vh = modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql))); Vl = modReduce(Vl.multiply(Vl).subtract(Ql.shiftLeft(1))); Uh = modReduce(Uh.multiply(Vl).subtract(Ql)); Vl = modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql))); Ql = modMult(Ql, Qh); Vl = modReduce(Vl.multiply(Vl).subtract(Ql.shiftLeft(1))); Ql = modMult(Ql, Ql);
public ECFieldElement squarePlusProduct(ECFieldElement x, ECFieldElement y) { BigInteger ax = this.x, xx = x.toBigInteger(), yx = y.toBigInteger(); BigInteger aa = ax.multiply(ax); BigInteger xy = xx.multiply(yx); return new Fp(q, r, modReduce(aa.add(xy))); }
public ECFieldElement multiplyPlusProduct(ECFieldElement b, ECFieldElement x, ECFieldElement y) { BigInteger ax = this.x, bx = b.toBigInteger(), xx = x.toBigInteger(), yx = y.toBigInteger(); BigInteger ab = ax.multiply(bx); BigInteger xy = xx.multiply(yx); return new Fp(q, r, modReduce(ab.add(xy))); }
public ECFieldElement multiplyMinusProduct(ECFieldElement b, ECFieldElement x, ECFieldElement y) { BigInteger ax = this.x, bx = b.toBigInteger(), xx = x.toBigInteger(), yx = y.toBigInteger(); BigInteger ab = ax.multiply(bx); BigInteger xy = xx.multiply(yx); return new Fp(q, r, modReduce(ab.subtract(xy))); }
public ECFieldElement multiplyPlusProduct(ECFieldElement b, ECFieldElement x, ECFieldElement y) { BigInteger ax = this.x, bx = b.toBigInteger(), xx = x.toBigInteger(), yx = y.toBigInteger(); BigInteger ab = ax.multiply(bx); BigInteger xy = xx.multiply(yx); return new Fp(q, r, modReduce(ab.add(xy))); }
public ECFieldElement squarePlusProduct(ECFieldElement x, ECFieldElement y) { BigInteger ax = this.x, xx = x.toBigInteger(), yx = y.toBigInteger(); BigInteger aa = ax.multiply(ax); BigInteger xy = xx.multiply(yx); return new Fp(q, r, modReduce(aa.add(xy))); }
public ECFieldElement multiplyMinusProduct(ECFieldElement b, ECFieldElement x, ECFieldElement y) { BigInteger ax = this.x, bx = b.toBigInteger(), xx = x.toBigInteger(), yx = y.toBigInteger(); BigInteger ab = ax.multiply(bx); BigInteger xy = xx.multiply(yx); return new Fp(q, r, modReduce(ab.subtract(xy))); }
public ECFieldElement squareMinusProduct(ECFieldElement x, ECFieldElement y) { BigInteger ax = this.x, xx = x.toBigInteger(), yx = y.toBigInteger(); BigInteger aa = ax.multiply(ax); BigInteger xy = xx.multiply(yx); return new Fp(q, r, modReduce(aa.subtract(xy))); }