TlsSRPKeyExchange (Bouncy Castle Library 1.52 API Specification)

org.bouncycastle.crypto.tls

## Class TlsSRPKeyExchange

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

- All Implemented Interfaces:
    TlsKeyExchange

      public class TlsSRPKeyExchange
      extends AbstractTlsKeyExchange

  (D)TLS SRP key exchange (RFC 5054).

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected TlsSRPGroupVerifier` | `groupVerifier`
    `protected byte[]` | `identity`
    `protected byte[]` | `password`
    `protected TlsSignerCredentials` | `serverCredentials`
    `protected AsymmetricKeyParameter` | `serverPublicKey`
    `protected SRP6Client` | `srpClient`
    `protected SRP6GroupParameters` | `srpGroup`
    `protected java.math.BigInteger` | `srpPeerCredentials`
    `protected byte[]` | `srpSalt`
    `protected SRP6Server` | `srpServer`
    `protected java.math.BigInteger` | `srpVerifier`
    `protected TlsSigner` | `tlsSigner`

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

      `context, keyExchange, supportedSignatureAlgorithms`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TlsSRPKeyExchange(int keyExchange, java.util.Vector supportedSignatureAlgorithms, byte[] identity, byte[] password)` Deprecated. Use constructor taking an explicit 'groupVerifier' argument
    `TlsSRPKeyExchange(int keyExchange, java.util.Vector supportedSignatureAlgorithms, byte[] identity, TlsSRPLoginParameters loginParameters)`
    `TlsSRPKeyExchange(int keyExchange, java.util.Vector supportedSignatureAlgorithms, TlsSRPGroupVerifier groupVerifier, byte[] identity, byte[] password)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected static TlsSigner` | `createSigner(int keyExchange)`
    `void` | `generateClientKeyExchange(java.io.OutputStream output)`
    `byte[]` | `generatePremasterSecret()`
    `byte[]` | `generateServerKeyExchange()`
    `void` | `init(TlsContext context)`
    `protected Signer` | `initVerifyer(TlsSigner tlsSigner, SignatureAndHashAlgorithm algorithm, SecurityParameters securityParameters)`
    `void` | `processClientCredentials(TlsCredentials clientCredentials)`
    `void` | `processClientKeyExchange(java.io.InputStream input)`
    `void` | `processServerCertificate(Certificate serverCertificate)`
    `void` | `processServerCredentials(TlsCredentials serverCredentials)`
    `void` | `processServerKeyExchange(java.io.InputStream input)`
    `boolean` | `requiresServerKeyExchange()`
    `void` | `skipServerCredentials()`
    `void` | `validateCertificateRequest(CertificateRequest certificateRequest)`

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

      `processClientCertificate, 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

    - #### groupVerifier

          protected TlsSRPGroupVerifier groupVerifier

    - #### identity

          protected byte[] identity

    - #### password

          protected byte[] password

    - #### serverPublicKey

          protected AsymmetricKeyParameter serverPublicKey

    - #### srpGroup

          protected SRP6GroupParameters srpGroup

    - #### srpClient

          protected SRP6Client srpClient

    - #### srpServer

          protected SRP6Server srpServer

    - #### srpPeerCredentials

          protected java.math.BigInteger srpPeerCredentials

    - #### srpVerifier

          protected java.math.BigInteger srpVerifier

    - #### srpSalt

          protected byte[] srpSalt

    - #### serverCredentials

          protected TlsSignerCredentials serverCredentials

  - ### Constructor Detail

    - #### TlsSRPKeyExchange

          public TlsSRPKeyExchange(int keyExchange,
                           java.util.Vector supportedSignatureAlgorithms,
                           byte[] identity,
                           byte[] password)

      Deprecated. Use constructor taking an explicit 'groupVerifier' argument

    - #### TlsSRPKeyExchange

          public TlsSRPKeyExchange(int keyExchange,
                           java.util.Vector supportedSignatureAlgorithms,
                           TlsSRPGroupVerifier groupVerifier,
                           byte[] identity,
                           byte[] password)

    - #### TlsSRPKeyExchange

          public TlsSRPKeyExchange(int keyExchange,
                           java.util.Vector supportedSignatureAlgorithms,
                           byte[] identity,
                           TlsSRPLoginParameters loginParameters)

  - ### Method Detail

    - #### createSigner

          protected static TlsSigner createSigner(int keyExchange)

    - #### 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`

    - #### processServerCredentials

          public void processServerCredentials(TlsCredentials serverCredentials)
                                        throws java.io.IOException

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

    - #### requiresServerKeyExchange

          public boolean requiresServerKeyExchange()

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

    - #### generateServerKeyExchange

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

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

    - #### processServerKeyExchange

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

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

    - #### 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`

    - #### 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`

    - #### initVerifyer

          protected Signer initVerifyer(TlsSigner tlsSigner,
                            SignatureAndHashAlgorithm algorithm,
                            SecurityParameters securityParameters)