Bouncy Castle Cryptography Library 1.49

org.bouncycastle.crypto.tls
Class TlsECDHKeyExchange

java.lang.Object
  extended by org.bouncycastle.crypto.tls.AbstractTlsKeyExchange
      extended by org.bouncycastle.crypto.tls.TlsECDHKeyExchange
All Implemented Interfaces:
TlsKeyExchange
Direct Known Subclasses:
TlsECDHEKeyExchange

public class TlsECDHKeyExchange
extends AbstractTlsKeyExchange

ECDH key exchange (see RFC 4492)


Field Summary
protected  TlsAgreementCredentials agreementCredentials
           
protected  short[] clientECPointFormats
           
protected  ECPrivateKeyParameters ecAgreeClientPrivateKey
           
protected  ECPublicKeyParameters ecAgreeClientPublicKey
           
protected  ECPrivateKeyParameters ecAgreeServerPrivateKey
           
protected  ECPublicKeyParameters ecAgreeServerPublicKey
           
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
TlsECDHKeyExchange(int keyExchange, java.util.Vector supportedSignatureAlgorithms, int[] namedCurves, short[] clientECPointFormats, short[] serverECPointFormats)
           
 
Method Summary
 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, 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

ecAgreeServerPublicKey

protected ECPublicKeyParameters ecAgreeServerPublicKey

agreementCredentials

protected TlsAgreementCredentials agreementCredentials

ecAgreeClientPrivateKey

protected ECPrivateKeyParameters ecAgreeClientPrivateKey

ecAgreeServerPrivateKey

protected ECPrivateKeyParameters ecAgreeServerPrivateKey

ecAgreeClientPublicKey

protected ECPublicKeyParameters ecAgreeClientPublicKey
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

Bouncy Castle Cryptography Library 1.49