Class ECUtil


  • public class ECUtil
    extends java.lang.Object
    utility class for converting jce/jca ECDSA, ECDH, and ECDHC objects into their org.bouncycastle.crypto counterparts.
    • Constructor Detail

      • ECUtil

        public ECUtil()
    • Method Detail

      • generatePublicKeyParameter

        public static AsymmetricKeyParameter generatePublicKeyParameter​(java.security.PublicKey key)
                                                                 throws java.security.InvalidKeyException
        Throws:
        java.security.InvalidKeyException
      • generatePrivateKeyParameter

        public static AsymmetricKeyParameter generatePrivateKeyParameter​(java.security.PrivateKey key)
                                                                  throws java.security.InvalidKeyException
        Throws:
        java.security.InvalidKeyException
      • getOrderBitLength

        public static int getOrderBitLength​(ProviderConfiguration configuration,
                                            java.math.BigInteger order,
                                            java.math.BigInteger privateValue)
      • getNamedCurveOid

        public static ASN1ObjectIdentifier getNamedCurveOid​(java.lang.String curveName)
      • getNamedCurveByName

        public static X9ECParameters getNamedCurveByName​(java.lang.String curveName)
      • privateKeyToString

        public static java.lang.String privateKeyToString​(java.lang.String algorithm,
                                                          java.math.BigInteger d,
                                                          ECParameterSpec spec)
      • publicKeyToString

        public static java.lang.String publicKeyToString​(java.lang.String algorithm,
                                                         ECPoint q,
                                                         ECParameterSpec spec)
      • generateKeyFingerprint

        public static java.lang.String generateKeyFingerprint​(ECPoint publicPoint,
                                                              ECParameterSpec spec)
      • getNameFrom

        public static java.lang.String getNameFrom​(java.security.spec.AlgorithmParameterSpec paramSpec)