public boolean equals(Object other) { if (other == this) { return true; } if (!(other instanceof ECPoint)) { return false; } return equals((ECPoint)other); }
public boolean equals(Object other) { if (other == this) { return true; } if (!(other instanceof ECPoint)) { return false; } return equals((ECPoint)other); }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || !(o instanceof ECKey)) return false; ECKey ecKey = (ECKey) o; if (privKey != null && !privKey.equals(ecKey.privKey)) return false; if (pub != null && !pub.equals(ecKey.pub)) return false; return true; }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || !(o instanceof ECDSARecover)) return false; ECDSARecover ecKey = (ECDSARecover) o; if (priv != null && !priv.equals(ecKey.priv)) return false; if (pub != null && !pub.equals(ecKey.pub)) return false; return true; }
public boolean equals( Object obj) { if (this == obj) { return true; } if ((obj instanceof ECDomainParameters)) { ECDomainParameters other = (ECDomainParameters)obj; return this.curve.equals(other.curve) && this.G.equals(other.G) && this.n.equals(other.n) && this.h.equals(other.h); } return false; }
public static boolean areOnSameCurve(ECDomainParameters a, ECDomainParameters b) { // TODO Move to ECDomainParameters.equals() or other utility method? return a.getCurve().equals(b.getCurve()) && a.getG().equals(b.getG()) && a.getN().equals(b.getN()) && a.getH().equals(b.getH()); }
public boolean equals(Object o) { if (!(o instanceof BCECGOST3410_2012PublicKey)) { return false; } BCECGOST3410_2012PublicKey other = (BCECGOST3410_2012PublicKey)o; return ecPublicKey.getQ().equals(other.ecPublicKey.getQ()) && (engineGetSpec().equals(other.engineGetSpec())); }
public boolean equals(Object o) { if (!(o instanceof BCECPublicKey)) { return false; } BCECPublicKey other = (BCECPublicKey)o; return ecPublicKey.getQ().equals(other.ecPublicKey.getQ()) && (engineGetSpec().equals(other.engineGetSpec())); }
public boolean equals(Object o) { if (!(o instanceof ECParameterSpec)) { return false; } ECParameterSpec other = (ECParameterSpec)o; return this.getCurve().equals(other.getCurve()) && this.getG().equals(other.getG()); }
public boolean equals(Object o) { if (!(o instanceof JCEECPublicKey)) { return false; } JCEECPublicKey other = (JCEECPublicKey)o; return engineGetQ().equals(other.engineGetQ()) && (engineGetSpec().equals(other.engineGetSpec())); }
public boolean equals(Object o) { if (!(o instanceof BCDSTU4145PublicKey)) { return false; } BCDSTU4145PublicKey other = (BCDSTU4145PublicKey)o; return ecPublicKey.getQ().equals(other.ecPublicKey.getQ()) && (engineGetSpec().equals(other.engineGetSpec())); }
public boolean equals(Object o) { if (!(o instanceof BCECGOST3410PublicKey)) { return false; } BCECGOST3410PublicKey other = (BCECGOST3410PublicKey)o; return ecPublicKey.getQ().equals(other.ecPublicKey.getQ()) && (engineGetSpec().equals(other.engineGetSpec())); }
/** * Verify that the private key belongs to the public key. * * @param privateKey * @param publicKey * @return */ public static boolean verifyKeyPair(PrivateKey privateKey, PublicKey publicKey) { ECNamedCurveParameterSpec curveParameters = ECNamedCurveTable.getParameterSpec(CURVE); ECPoint g = curveParameters.getG(); ECPoint sG = g.multiply(((java.security.interfaces.ECPrivateKey) privateKey).getS()); return sG.equals(((ECPublicKey) publicKey).getQ()); }
public static ASN1ObjectIdentifier getNamedCurveOid( ECParameterSpec ecParameterSpec) { for (Enumeration names = ECNamedCurveTable.getNames(); names.hasMoreElements();) { String name = (String)names.nextElement(); X9ECParameters params = ECNamedCurveTable.getByName(name); if (params.getN().equals(ecParameterSpec.getN()) && params.getH().equals(ecParameterSpec.getH()) && params.getCurve().equals(ecParameterSpec.getCurve()) && params.getG().equals(ecParameterSpec.getG())) { return org.bouncycastle.asn1.x9.ECNamedCurveTable.getOID(name); } } return null; }