public static boolean isSameEcParameterSpec(ECParameterSpec one, ECParameterSpec two) {
    return one.getCurve().equals(two.getCurve())
        && one.getGenerator().equals(two.getGenerator())
        && one.getOrder().equals(two.getOrder())
        && one.getCofactor() == two.getCofactor();
  }
Returns whether {@code one} is the same {@link ECParameterSpec} as {@code two}.
java_src/src/main/java/com/google/crypto/tink/internal/EllipticCurvesUtil.java