ECDSA是否不适用于KeyFactory BouncyCastle

时间:2019-03-27 17:42:02

标签: java cryptography

当我尝试获取ECDSA的KEyFactory实例时遇到以下异常 java.security.NoSuchAlgorithmException:ECDSA KeyFactory不可用

我正在尝试这种方式

X9ECParameters curve = SECNamedCurves.getByName("secp256r1"); 
ECPoint point = curve.getCurve().decodePoint(decode(PublicKey));
pubKey = KeyFactory.getInstance("ECDSA")
                   .generatePublic(
                       new ECPublicKeySpec(point,
                           new ECParameterSpec(curve.getCurve(),curve.getG(),curve.getN(),curve.getH())
                       )
                    );

0 个答案:

没有答案