anon.tor.tinytls.ciphersuites
Class DHE_RSA_WITH_AES_128_CBC_SHA

java.lang.Object
  extended byanon.tor.tinytls.ciphersuites.CipherSuite
      extended byanon.tor.tinytls.ciphersuites.DHE_RSA_WITH_AES_128_CBC_SHA

public class DHE_RSA_WITH_AES_128_CBC_SHA
extends CipherSuite

Author:
stefan

Field Summary
private  org.bouncycastle.crypto.modes.CBCBlockCipher m_decryptcipher
           
private  org.bouncycastle.crypto.modes.CBCBlockCipher m_encryptcipher
           
private  MyRandom m_rand
           
 
Fields inherited from class anon.tor.tinytls.ciphersuites.CipherSuite
m_ciphersuitename, m_clientmacsecret, m_clientwriteIV, m_clientwritekey, m_readsequenznumber, m_servermacsecret, m_serverwriteIV, m_serverwritekey, m_writesequenznumber
 
Constructor Summary
DHE_RSA_WITH_AES_128_CBC_SHA()
          Constructor
 
Method Summary
protected  void calculateKeys(byte[] keys, boolean forclient)
          calculate server and client write keys (see RFC2246 TLS Record Protocoll)
 void decode(TLSRecord msg)
          decodes a message with a symmetric key
 void encode(TLSRecord msg)
          encodes a message with a symmetric key
 
Methods inherited from class anon.tor.tinytls.ciphersuites.CipherSuite
calculateClientKeyExchange, getCipherSuiteCode, getKeyExchangeAlgorithm, processClientKeyExchange, processServerFinished, setKeyExchangeAlgorithm, setServerCertificate, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_encryptcipher

private org.bouncycastle.crypto.modes.CBCBlockCipher m_encryptcipher

m_decryptcipher

private org.bouncycastle.crypto.modes.CBCBlockCipher m_decryptcipher

m_rand

private MyRandom m_rand
Constructor Detail

DHE_RSA_WITH_AES_128_CBC_SHA

public DHE_RSA_WITH_AES_128_CBC_SHA()
                             throws TLSException
Constructor

Throws:
java.lang.Exception
TLSException
Method Detail

encode

public void encode(TLSRecord msg)
Description copied from class: CipherSuite
encodes a message with a symmetric key

Specified by:
encode in class CipherSuite
Returns:
encoded message

decode

public void decode(TLSRecord msg)
            throws TLSException
Description copied from class: CipherSuite
decodes a message with a symmetric key

Specified by:
decode in class CipherSuite
Returns:
decoded message
Throws:
TLSException

calculateKeys

protected void calculateKeys(byte[] keys,
                             boolean forclient)
Description copied from class: CipherSuite
calculate server and client write keys (see RFC2246 TLS Record Protocoll)

Specified by:
calculateKeys in class CipherSuite
Parameters:
keys - array of bytes(see RFC how it is calculated)