Java Code Examples for org.spongycastle.math.ec.ECPoint#normalize()

The following examples show how to use org.spongycastle.math.ec.ECPoint#normalize() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ECKey.java    From bcm-android with GNU General Public License v3.0 5 votes vote down vote up
private static ECPoint getPointWithCompression(ECPoint point, boolean compressed) {
    if (point.isCompressed() == compressed)
        return point;
    point = point.normalize();
    BigInteger x = point.getAffineXCoord().toBigInteger();
    BigInteger y = point.getAffineYCoord().toBigInteger();
    return CURVE.getCurve().createPoint(x, y, compressed);
}
 
Example 2
Source File: ECKey.java    From guarda-android-wallets with GNU General Public License v3.0 5 votes vote down vote up
private static ECPoint getPointWithCompression(ECPoint point, boolean compressed) {
  if (point.isCompressed() == compressed)
    return point;
  point = point.normalize();
  BigInteger x = point.getAffineXCoord().toBigInteger();
  BigInteger y = point.getAffineYCoord().toBigInteger();
  return CURVE.getCurve().createPoint(x, y, compressed);
}
 
Example 3
Source File: ECKey.java    From guarda-android-wallets with GNU General Public License v3.0 5 votes vote down vote up
private static ECPoint getPointWithCompression(ECPoint point, boolean compressed) {
  if (point.isCompressed() == compressed)
    return point;
  point = point.normalize();
  BigInteger x = point.getAffineXCoord().toBigInteger();
  BigInteger y = point.getAffineYCoord().toBigInteger();
  return CURVE.getCurve().createPoint(x, y, compressed);
}
 
Example 4
Source File: ECKey.java    From guarda-android-wallets with GNU General Public License v3.0 5 votes vote down vote up
private static ECPoint getPointWithCompression(ECPoint point, boolean compressed) {
  if (point.isCompressed() == compressed)
    return point;
  point = point.normalize();
  BigInteger x = point.getAffineXCoord().toBigInteger();
  BigInteger y = point.getAffineYCoord().toBigInteger();
  return CURVE.getCurve().createPoint(x, y, compressed);
}
 
Example 5
Source File: ECKey.java    From guarda-android-wallets with GNU General Public License v3.0 5 votes vote down vote up
private static ECPoint getPointWithCompression(ECPoint point, boolean compressed) {
  if (point.isCompressed() == compressed)
    return point;
  point = point.normalize();
  BigInteger x = point.getAffineXCoord().toBigInteger();
  BigInteger y = point.getAffineYCoord().toBigInteger();
  return CURVE.getCurve().createPoint(x, y, compressed);
}
 
Example 6
Source File: ECKey.java    From green_android with GNU General Public License v3.0 5 votes vote down vote up
private static ECPoint getPointWithCompression(ECPoint point, boolean compressed) {
  if (point.isCompressed() == compressed)
      return point;
  point = point.normalize();
  BigInteger x = point.getAffineXCoord().toBigInteger();
  BigInteger y = point.getAffineYCoord().toBigInteger();
  return CURVE.getCurve().createPoint(x, y, compressed);
}
 
Example 7
Source File: ECKey.java    From nuls with MIT License 5 votes vote down vote up
@SuppressWarnings("deprecation")
private static ECPoint getPointWithCompression(ECPoint point, boolean compressed) {
    if (point.isCompressed() == compressed) {
        return point;
    }
    point = point.normalize();
    BigInteger x = point.getAffineXCoord().toBigInteger();
    BigInteger y = point.getAffineYCoord().toBigInteger();
    return CURVE.getCurve().createPoint(x, y, compressed);
}
 
Example 8
Source File: ECKey.java    From GreenBits with GNU General Public License v3.0 5 votes vote down vote up
private static ECPoint getPointWithCompression(ECPoint point, boolean compressed) {
  if (point.isCompressed() == compressed)
      return point;
  point = point.normalize();
  BigInteger x = point.getAffineXCoord().toBigInteger();
  BigInteger y = point.getAffineYCoord().toBigInteger();
  return CURVE.getCurve().createPoint(x, y, compressed);
}