public ECFieldElement multiplyPlusProduct(ECFieldElement b, ECFieldElement x, ECFieldElement y) { long[] ax = this.x, bx = ((SecT113FieldElement) b).x; long[] xx = ((SecT113FieldElement) x).x, yx = ((SecT113FieldElement) y).x; long[] tt = Nat128.createExt64(); SecT113Field.multiplyAddToExt(ax, bx, tt); SecT113Field.multiplyAddToExt(xx, yx, tt); long[] z = Nat128.create64(); SecT113Field.reduce(tt, z); return new SecT113FieldElement(z); }
public ECFieldElement squarePow(int pow) { if (pow < 1) { return this; } long[] z = Nat128.create64(); SecT113Field.squareN(x, pow, z); return new SecT113FieldElement(z); }
public boolean equals(Object other) { if (other == this) { return true; } if (!(other instanceof SecT113FieldElement)) { return false; } SecT113FieldElement o = (SecT113FieldElement) other; return Nat128.eq64(x, o.x); }
public ECFieldElement multiply(ECFieldElement b) { long[] z = Nat128.create64(); SecT113Field.multiply(x, ((SecT113FieldElement) b).x, z); return new SecT113FieldElement(z); }
public ECFieldElement addOne() { long[] z = Nat128.create64(); SecT113Field.addOne(x, z); return new SecT113FieldElement(z); }
public BigInteger toBigInteger() { return Nat128.toBigInteger64(x); }
public boolean isZero() { return Nat128.isZero64(x); }
public boolean isOne() { return Nat128.isOne64(x); }
public SecT113FieldElement() { this.x = Nat128.create64(); }
public ECFieldElement sqrt() { long[] z = Nat128.create64(); SecT113Field.sqrt(x, z); return new SecT113FieldElement(z); }