public ECPoint importPoint(ECPoint p) { if (this != p.getCurve() && this.getCoordinateSystem() == ECCurve.COORD_JACOBIAN && !p.isInfinity()) { switch (p.getCurve().getCoordinateSystem()) { case ECCurve.COORD_JACOBIAN: case ECCurve.COORD_JACOBIAN_CHUDNOVSKY: case ECCurve.COORD_JACOBIAN_MODIFIED: return new ECPoint.Fp(this, fromBigInteger(p.x.toBigInteger()), fromBigInteger(p.y.toBigInteger()), new ECFieldElement[]{ fromBigInteger(p.zs[0].toBigInteger()) }, p.withCompression); default: break; } } return super.importPoint(p); }
public ECPoint importPoint(ECPoint p) { if (this != p.getCurve() && this.getCoordinateSystem() == COORD_JACOBIAN && !p.isInfinity()) { switch (p.getCurve().getCoordinateSystem()) { case COORD_JACOBIAN: case COORD_JACOBIAN_CHUDNOVSKY: case COORD_JACOBIAN_MODIFIED: return new ECPoint.Fp(this, fromBigInteger(p.x.toBigInteger()), fromBigInteger(p.y.toBigInteger()), new ECFieldElement[]{ fromBigInteger(p.zs[0].toBigInteger()) }, p.withCompression); default: break; } } return super.importPoint(p); }
public Fp(BigInteger q, BigInteger a, BigInteger b, BigInteger order, BigInteger cofactor) { super(q); this.q = q; this.r = ECFieldElement.Fp.calculateResidue(q); this.infinity = new ECPoint.Fp(this, null, null, false); this.a = fromBigInteger(a); this.b = fromBigInteger(b); this.order = order; this.cofactor = cofactor; this.coord = FP_DEFAULT_COORDS; }
public Fp(BigInteger q, BigInteger a, BigInteger b, BigInteger order, BigInteger cofactor) { super(q); this.q = q; this.r = ECFieldElement.Fp.calculateResidue(q); this.infinity = new ECPoint.Fp(this, null, null); this.a = fromBigInteger(a); this.b = fromBigInteger(b); this.order = order; this.cofactor = cofactor; this.coord = FP_DEFAULT_COORDS; }