diff --git a/src/main/java/com/danubetech/keyformats/PublicKeyBytes.java b/src/main/java/com/danubetech/keyformats/PublicKeyBytes.java index 701887d..0cb9a73 100644 --- a/src/main/java/com/danubetech/keyformats/PublicKeyBytes.java +++ b/src/main/java/com/danubetech/keyformats/PublicKeyBytes.java @@ -187,7 +187,7 @@ public static ECPublicKey bytes_to_P_256PublicKey(byte[] publicKeyBytes) { } else { byte[] k = new byte[33]; System.arraycopy(publicKeyBytes, 0, k, 0, k.length); - ECNamedCurveParameterSpec ecNamedCurveParameterSpec = ECNamedCurveTable.getParameterSpec("secp256k1"); + ECNamedCurveParameterSpec ecNamedCurveParameterSpec = ECNamedCurveTable.getParameterSpec("secp256r1"); org.bouncycastle.math.ec.ECPoint bcEcPoint = ecNamedCurveParameterSpec.getCurve().decodePoint(k); x = bcEcPoint.getRawXCoord().getEncoded(); y = bcEcPoint.getRawYCoord().getEncoded();