|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectanon.crypto.tinytls.keyexchange.Key_Exchange
anon.crypto.tinytls.keyexchange.DHE_RSA_Key_Exchange
public class DHE_RSA_Key_Exchange
| Field Summary | |
|---|---|
private static byte[] |
CLIENTFINISHEDLABEL
|
private static org.bouncycastle.crypto.params.DHParameters |
DH_PARAMS
|
private static byte[] |
KEYEXPANSION
|
private byte[] |
m_clientrandom
|
private org.bouncycastle.crypto.agreement.DHBasicAgreement |
m_dhe
|
private org.bouncycastle.crypto.params.DHParameters |
m_dhparams
|
private org.bouncycastle.crypto.params.DHPublicKeyParameters |
m_dhserverpub
|
private byte[] |
m_mastersecret
|
private byte[] |
m_premastersecret
|
private byte[] |
m_serverrandom
|
private static byte[] |
MASTERSECRET
|
private static int |
MAXKEYMATERIALLENGTH
|
private static java.math.BigInteger |
SAFEPRIME
|
private static byte[] |
SERVERFINISHEDLABEL
|
| Constructor Summary | |
|---|---|
DHE_RSA_Key_Exchange()
|
|
| Method Summary | |
|---|---|
byte[] |
calculateClientFinished(byte[] handshakemessages)
generate the client finished message (see RFC2246) |
byte[] |
calculateClientKeyExchange()
generates the client key exchange message (see RFC2246) |
byte[] |
calculateKeys()
calculates the key material (see RFC2246 TLS Record Protocoll) |
byte[] |
calculateServerFinished(byte[] handshakemessages)
calculates server finished message |
byte[] |
generateServerKeyExchange(IMyPrivateKey key,
byte[] clientrandom,
byte[] serverrandom)
|
void |
processClientFinished(byte[] verify_data,
byte[] handshakemessages)
checks the client finished message |
void |
processClientKeyExchange(java.math.BigInteger dh_y)
processes the client key exchange |
void |
processServerFinished(byte[] b,
int len,
byte[] handshakemessages)
checks the server finished message |
void |
processServerKeyExchange(byte[] bytes,
int bytes_offset,
int bytes_len,
byte[] clientrandom,
byte[] serverrandom,
JAPCertificate servercertificate)
Decode the server keys and check the certificate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final int MAXKEYMATERIALLENGTH
private static final byte[] CLIENTFINISHEDLABEL
private static final byte[] SERVERFINISHEDLABEL
private static final byte[] KEYEXPANSION
private static final byte[] MASTERSECRET
private static final java.math.BigInteger SAFEPRIME
private static final org.bouncycastle.crypto.params.DHParameters DH_PARAMS
private org.bouncycastle.crypto.params.DHParameters m_dhparams
private org.bouncycastle.crypto.params.DHPublicKeyParameters m_dhserverpub
private byte[] m_premastersecret
private byte[] m_mastersecret
private byte[] m_clientrandom
private byte[] m_serverrandom
private org.bouncycastle.crypto.agreement.DHBasicAgreement m_dhe
| Constructor Detail |
|---|
public DHE_RSA_Key_Exchange()
| Method Detail |
|---|
public byte[] generateServerKeyExchange(IMyPrivateKey key,
byte[] clientrandom,
byte[] serverrandom)
throws TLSException
generateServerKeyExchange in class Key_ExchangeTLSException
public void processServerKeyExchange(byte[] bytes,
int bytes_offset,
int bytes_len,
byte[] clientrandom,
byte[] serverrandom,
JAPCertificate servercertificate)
throws TLSException
Key_Exchange
processServerKeyExchange in class Key_Exchangeclientrandom - clientrandomserverrandom - serverrandom
TLSExceptionpublic byte[] calculateServerFinished(byte[] handshakemessages)
Key_Exchange
calculateServerFinished in class Key_Exchangehandshakemessages - handshakemessages
public void processServerFinished(byte[] b,
int len,
byte[] handshakemessages)
throws TLSException
Key_Exchange
processServerFinished in class Key_Exchangeb - server finished message
TLSExceptionpublic void processClientKeyExchange(java.math.BigInteger dh_y)
Key_Exchange
processClientKeyExchange in class Key_Exchangedh_y - diffie hellman parameter
public byte[] calculateClientKeyExchange()
throws TLSException
Key_Exchange
calculateClientKeyExchange in class Key_ExchangeTLSException
public void processClientFinished(byte[] verify_data,
byte[] handshakemessages)
throws TLSException
Key_Exchange
processClientFinished in class Key_Exchangeverify_data - verify datahandshakemessages - handshakemessages
TLSException
public byte[] calculateClientFinished(byte[] handshakemessages)
throws TLSException
Key_Exchange
calculateClientFinished in class Key_Exchangehandshakemessages - all handshakemessages that have been send before this
TLSExceptionpublic byte[] calculateKeys()
Key_Exchange
calculateKeys in class Key_Exchange
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||