org.bouncycastle.crypto.tls

Class TlsBlockCipherCipherSuite


public class TlsBlockCipherCipherSuite
extends TlsCipherSuite

A generic TLS 1.0 block cipher suite. This can be used for AES or 3DES for example.

Field Summary

Fields inherited from class org.bouncycastle.crypto.tls.TlsCipherSuite

KE_DHE_DSS, KE_DHE_DSS_EXPORT, KE_DHE_RSA, KE_DHE_RSA_EXPORT, KE_DH_DSS, KE_DH_RSA, KE_DH_anon, KE_RSA, KE_RSA_EXPORT

Constructor Summary

TlsBlockCipherCipherSuite(BlockCipher encrypt, BlockCipher decrypt, Digest writeDigest, Digest readDigest, int cipherKeySize, short keyExchange)

Method Summary

protected byte[]
decodeCiphertext(short type, byte[] ciphertext, int offset, int len, TlsProtocolHandler handler)
protected byte[]
encodePlaintext(short type, byte[] plaintext, int offset, int len)
protected short
getKeyExchangeAlgorithm()
protected void
init(byte[] ms, byte[] cr, byte[] sr)

Methods inherited from class org.bouncycastle.crypto.tls.TlsCipherSuite

decodeCiphertext, encodePlaintext, getKeyExchangeAlgorithm, init

Constructor Details

TlsBlockCipherCipherSuite

protected TlsBlockCipherCipherSuite(BlockCipher encrypt,
                                    BlockCipher decrypt,
                                    Digest writeDigest,
                                    Digest readDigest,
                                    int cipherKeySize,
                                    short keyExchange)

Method Details

decodeCiphertext

protected byte[] decodeCiphertext(short type,
                                  byte[] ciphertext,
                                  int offset,
                                  int len,
                                  TlsProtocolHandler handler)
            throws IOException
Overrides:
decodeCiphertext in interface TlsCipherSuite

encodePlaintext

protected byte[] encodePlaintext(short type,
                                 byte[] plaintext,
                                 int offset,
                                 int len)
Overrides:
encodePlaintext in interface TlsCipherSuite

getKeyExchangeAlgorithm

protected short getKeyExchangeAlgorithm()
Overrides:
getKeyExchangeAlgorithm in interface TlsCipherSuite

init

protected void init(byte[] ms,
                    byte[] cr,
                    byte[] sr)
Overrides:
init in interface TlsCipherSuite