Bouncy Castle Cryptography Library 1.49

org.bouncycastle.crypto.tls
Class TlsSRPKeyExchange

java.lang.Object
  extended by org.bouncycastle.crypto.tls.AbstractTlsKeyExchange
      extended by org.bouncycastle.crypto.tls.TlsSRPKeyExchange
All Implemented Interfaces:
TlsKeyExchange

public class TlsSRPKeyExchange
extends AbstractTlsKeyExchange

TLS 1.1 SRP key exchange (RFC 5054).


Field Summary
protected  java.math.BigInteger B
           
protected  byte[] identity
           
protected  byte[] password
           
protected  byte[] s
           
protected  AsymmetricKeyParameter serverPublicKey
           
protected  SRP6Client srpClient
           
protected  TlsSigner tlsSigner
           
 
Fields inherited from class org.bouncycastle.crypto.tls.AbstractTlsKeyExchange
context, keyExchange, supportedSignatureAlgorithms
 
Constructor Summary
TlsSRPKeyExchange(int keyExchange, java.util.Vector supportedSignatureAlgorithms, byte[] identity, byte[] password)
           
 
Method Summary
 void generateClientKeyExchange(java.io.OutputStream output)
           
 byte[] generatePremasterSecret()
           
 void init(TlsContext context)
           
protected  Signer initVerifyer(TlsSigner tlsSigner, SecurityParameters securityParameters)
           
 void processClientCredentials(TlsCredentials clientCredentials)
           
 void processServerCertificate(Certificate serverCertificate)
           
 void processServerKeyExchange(java.io.InputStream input)
           
 boolean requiresServerKeyExchange()
           
 void skipServerCredentials()
           
 void validateCertificateRequest(CertificateRequest certificateRequest)
           
 
Methods inherited from class org.bouncycastle.crypto.tls.AbstractTlsKeyExchange
generateServerKeyExchange, processClientCertificate, processClientKeyExchange, processServerCredentials, 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

identity

protected byte[] identity

password

protected byte[] password

serverPublicKey

protected AsymmetricKeyParameter serverPublicKey

s

protected byte[] s

B

protected java.math.BigInteger B

srpClient

protected SRP6Client srpClient
Constructor Detail

TlsSRPKeyExchange

public TlsSRPKeyExchange(int keyExchange,
                         java.util.Vector supportedSignatureAlgorithms,
                         byte[] identity,
                         byte[] password)
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

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

generatePremasterSecret

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

initVerifyer

protected Signer initVerifyer(TlsSigner tlsSigner,
                              SecurityParameters securityParameters)

Bouncy Castle Cryptography Library 1.49