TlsECDHKeyExchange (Bouncy Castle Library 1.54 API Specification)
Date: 2015-12-29

org.bouncycastle.crypto.tls

## Class TlsECDHKeyExchange

- java.lang.Object
- - org.bouncycastle.crypto.tls.AbstractTlsKeyExchange
  - - org.bouncycastle.crypto.tls.TlsECDHKeyExchange

- All Implemented Interfaces:
    TlsKeyExchange
  Direct Known Subclasses:
    TlsECDHEKeyExchange

      public class TlsECDHKeyExchange
      extends AbstractTlsKeyExchange

  (D)TLS ECDH key exchange (see RFC 4492).

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected TlsAgreementCredentials` | `agreementCredentials`
    `protected short[]` | `clientECPointFormats`
    `protected ECPrivateKeyParameters` | `ecAgreePrivateKey`
    `protected ECPublicKeyParameters` | `ecAgreePublicKey`
    `protected int[]` | `namedCurves`
    `protected short[]` | `serverECPointFormats`
    `protected AsymmetricKeyParameter` | `serverPublicKey`
    `protected TlsSigner` | `tlsSigner`

    - ### Fields inherited from class org.bouncycastle.crypto.tls.AbstractTlsKeyExchange

      `context, keyExchange, supportedSignatureAlgorithms`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TlsECDHKeyExchange(int keyExchange, java.util.Vector supportedSignatureAlgorithms, int[] namedCurves, short[] clientECPointFormats, short[] serverECPointFormats)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `generateClientKeyExchange(java.io.OutputStream output)`
    `byte[]` | `generatePremasterSecret()`
    `void` | `init(TlsContext context)`
    `void` | `processClientCertificate(Certificate clientCertificate)`
    `void` | `processClientCredentials(TlsCredentials clientCredentials)`
    `void` | `processClientKeyExchange(java.io.InputStream input)`
    `void` | `processServerCertificate(Certificate serverCertificate)`
    `boolean` | `requiresServerKeyExchange()`
    `void` | `skipServerCredentials()`
    `void` | `validateCertificateRequest(CertificateRequest certificateRequest)`

    - ### Methods inherited from class org.bouncycastle.crypto.tls.AbstractTlsKeyExchange

      `generateServerKeyExchange, parseSignature, processServerCredentials, processServerKeyExchange, skipClientCredentials, skipServerKeyExchange`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### tlsSigner

          protected TlsSigner tlsSigner

    - #### namedCurves

          protected int[] namedCurves

    - #### clientECPointFormats

          protected short[] clientECPointFormats

    - #### serverECPointFormats

          protected short[] serverECPointFormats

    - #### serverPublicKey

          protected AsymmetricKeyParameter serverPublicKey

    - #### agreementCredentials

          protected TlsAgreementCredentials agreementCredentials

    - #### ecAgreePrivateKey

          protected ECPrivateKeyParameters ecAgreePrivateKey

    - #### ecAgreePublicKey

          protected ECPublicKeyParameters ecAgreePublicKey

  - ### Constructor Detail

    - #### TlsECDHKeyExchange

          public TlsECDHKeyExchange(int keyExchange,
                            java.util.Vector supportedSignatureAlgorithms,
                            int[] namedCurves,
                            short[] clientECPointFormats,
                            short[] serverECPointFormats)

  - ### Method Detail

    - #### init

          public void init(TlsContext context)

      Specified by:
        `init` in interface `TlsKeyExchange`
      Overrides:
        `init` in class `AbstractTlsKeyExchange`

    - #### skipServerCredentials

          public void skipServerCredentials()
                                     throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### processServerCertificate

          public void processServerCertificate(Certificate serverCertificate)
                                        throws java.io.IOException

      Specified by:
        `processServerCertificate` in interface `TlsKeyExchange`
      Overrides:
        `processServerCertificate` in class `AbstractTlsKeyExchange`
      Throws:
        `java.io.IOException`

    - #### requiresServerKeyExchange

          public boolean requiresServerKeyExchange()

      Specified by:
        `requiresServerKeyExchange` in interface `TlsKeyExchange`
      Overrides:
        `requiresServerKeyExchange` in class `AbstractTlsKeyExchange`

    - #### validateCertificateRequest

          public void validateCertificateRequest(CertificateRequest certificateRequest)
                                          throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### processClientCredentials

          public void processClientCredentials(TlsCredentials clientCredentials)
                                        throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### generateClientKeyExchange

          public void generateClientKeyExchange(java.io.OutputStream output)
                                         throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### processClientCertificate

          public void processClientCertificate(Certificate clientCertificate)
                                        throws java.io.IOException

      Specified by:
        `processClientCertificate` in interface `TlsKeyExchange`
      Overrides:
        `processClientCertificate` in class `AbstractTlsKeyExchange`
      Throws:
        `java.io.IOException`

    - #### processClientKeyExchange

          public void processClientKeyExchange(java.io.InputStream input)
                                        throws java.io.IOException

      Specified by:
        `processClientKeyExchange` in interface `TlsKeyExchange`
      Overrides:
        `processClientKeyExchange` in class `AbstractTlsKeyExchange`
      Throws:
        `java.io.IOException`

    - #### generatePremasterSecret

          public byte[] generatePremasterSecret()
                                         throws java.io.IOException

      Throws:
        `java.io.IOException`