Class JceTlsECDomain

  • All Implemented Interfaces:
    TlsECDomain

    public class JceTlsECDomain
    extends java.lang.Object
    implements TlsECDomain
    EC domain class for generating key pairs and performing key agreement.
    • Field Detail

      • ecGenSpec

        protected java.security.spec.ECGenParameterSpec ecGenSpec
      • ecParameterSpec

        protected java.security.spec.ECParameterSpec ecParameterSpec
      • ecCurve

        protected org.bouncycastle.math.ec.ECCurve ecCurve
    • Method Detail

      • calculateECDHAgreement

        public JceTlsSecret calculateECDHAgreement​(java.security.interfaces.ECPrivateKey privateKey,
                                                   java.security.interfaces.ECPublicKey publicKey)
                                            throws java.io.IOException
        Throws:
        java.io.IOException
      • createECDH

        public TlsAgreement createECDH()
        Description copied from interface: TlsECDomain
        Return an agreement operator suitable for ephemeral EC Diffie-Hellman.
        Specified by:
        createECDH in interface TlsECDomain
        Returns:
        a key agreement operator.
      • decodePoint

        public org.bouncycastle.math.ec.ECPoint decodePoint​(byte[] encoding)
                                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • decodePublicKey

        public java.security.interfaces.ECPublicKey decodePublicKey​(byte[] encoding)
                                                             throws java.io.IOException
        Throws:
        java.io.IOException
      • encodePoint

        public byte[] encodePoint​(org.bouncycastle.math.ec.ECPoint point)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • encodePublicKey

        public byte[] encodePublicKey​(java.security.interfaces.ECPublicKey publicKey)
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • generateKeyPair

        public java.security.KeyPair generateKeyPair()