protected ECPoint detach() { return new SecP256K1Point(null, getAffineXCoord(), getAffineYCoord()); }
public ECPoint negate() { if (this.isInfinity()) { return this; } return new SecP256K1Point(curve, this.x, this.y.negate(), this.zs, this.withCompression); } }
public ECPoint add(ECPoint b) if (this.isInfinity()) return twice(); ECCurve curve = this.getCurve(); return this.twice(); return new SecP256K1Point(curve, X3, Y3, zs, this.withCompression);
public ECPoint twicePlus(ECPoint b) { if (this == b) { return threeTimes(); } if (this.isInfinity()) { return b; } if (b.isInfinity()) { return twice(); } ECFieldElement Y1 = this.y; if (Y1.isZero()) { return b; } return twice().add(b); }
public ECPoint twice() if (this.isInfinity()) ECCurve curve = this.getCurve(); return new SecP256K1Point(curve, X3, Y3, new ECFieldElement[] { Z3 }, this.withCompression);
public ECPoint threeTimes() { if (this.isInfinity() || this.y.isZero()) { return this; } // NOTE: Be careful about recursions between twicePlus and threeTimes return twice().add(this); }
protected ECPoint createRawPoint(ECFieldElement x, ECFieldElement y, boolean withCompression) { return new SecP256K1Point(this, x, y, withCompression); }
public ECPoint add(ECPoint b) if (this.isInfinity()) return twice(); ECCurve curve = this.getCurve(); return this.twice(); return new SecP256K1Point(curve, X3, Y3, zs, this.withCompression);
public ECPoint twicePlus(ECPoint b) { if (this == b) { return threeTimes(); } if (this.isInfinity()) { return b; } if (b.isInfinity()) { return twice(); } ECFieldElement Y1 = this.y; if (Y1.isZero()) { return b; } return twice().add(b); }
public ECPoint twice() if (this.isInfinity()) ECCurve curve = this.getCurve(); return new SecP256K1Point(curve, X3, Y3, new ECFieldElement[] { Z3 }, this.withCompression);
public ECPoint threeTimes() { if (this.isInfinity() || this.y.isZero()) { return this; } // NOTE: Be careful about recursions between twicePlus and threeTimes return twice().add(this); }
protected ECPoint createRawPoint(ECFieldElement x, ECFieldElement y, ECFieldElement[] zs, boolean withCompression) { return new SecP256K1Point(this, x, y, zs, withCompression); }
protected ECPoint detach() { return new SecP256K1Point(null, getAffineXCoord(), getAffineYCoord()); }
public ECPoint negate() { if (this.isInfinity()) { return this; } return new SecP256K1Point(curve, this.x, this.y.negate(), this.zs, this.withCompression); } }
protected ECPoint createRawPoint(ECFieldElement x, ECFieldElement y, ECFieldElement[] zs, boolean withCompression) { return new SecP256K1Point(this, x, y, zs, withCompression); }
protected ECPoint createRawPoint(ECFieldElement x, ECFieldElement y, boolean withCompression) { return new SecP256K1Point(this, x, y, withCompression); }
public SecP256K1Curve() { super(q); this.infinity = new SecP256K1Point(this, null, null); this.a = fromBigInteger(ECConstants.ZERO); this.b = fromBigInteger(BigInteger.valueOf(7)); this.order = new BigInteger(1, Hex.decode("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141")); this.cofactor = BigInteger.valueOf(1); this.coord = SECP256K1_DEFAULT_COORDS; }
public SecP256K1Curve() { super(q); this.infinity = new SecP256K1Point(this, null, null); this.a = fromBigInteger(ECConstants.ZERO); this.b = fromBigInteger(BigInteger.valueOf(7)); this.order = new BigInteger(1, Hex.decode("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141")); this.cofactor = BigInteger.valueOf(1); this.coord = SECP256K1_DEFAULT_COORDS; }