Class ECDSAKeyFactory


  • public class ECDSAKeyFactory
    extends java.lang.Object
    Factory for generating Elliptic Curve Keys using Java Security components for NIST Curves
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private ECDSAKeyFactory()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static java.security.spec.ECParameterSpec getParameterSpec​(ECDSACurve ecdsaCurve)  
      static java.security.PrivateKey getPrivateKey​(java.math.BigInteger privateKeyInteger, ECDSACurve ecdsaCurve)
      Get Elliptic Curve Private Key for private key value and Curve Name
      static java.security.PublicKey getPublicKey​(java.security.spec.ECPoint point, ECDSACurve ecdsaCurve)
      Get Elliptic Curve Public Key for public key value and Curve Name
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ECDSAKeyFactory

        private ECDSAKeyFactory()
    • Method Detail

      • getPrivateKey

        public static java.security.PrivateKey getPrivateKey​(java.math.BigInteger privateKeyInteger,
                                                             ECDSACurve ecdsaCurve)
                                                      throws java.security.GeneralSecurityException
        Get Elliptic Curve Private Key for private key value and Curve Name
        Parameters:
        privateKeyInteger - Private Key
        ecdsaCurve - Elliptic Curve
        Returns:
        Elliptic Curve Private Key
        Throws:
        java.security.GeneralSecurityException - Thrown on failure to create parameter specification
      • getPublicKey

        public static java.security.PublicKey getPublicKey​(java.security.spec.ECPoint point,
                                                           ECDSACurve ecdsaCurve)
                                                    throws java.security.GeneralSecurityException
        Get Elliptic Curve Public Key for public key value and Curve Name
        Parameters:
        point - Public Key point
        ecdsaCurve - Elliptic Curve
        Returns:
        Elliptic Curve Public Key
        Throws:
        java.security.GeneralSecurityException - Thrown on failure to create parameter specification
      • getParameterSpec

        private static java.security.spec.ECParameterSpec getParameterSpec​(ECDSACurve ecdsaCurve)
                                                                    throws java.security.GeneralSecurityException
        Throws:
        java.security.GeneralSecurityException