public class JceTlsSecret extends AbstractTlsSecret
data, MD5_SIZE, SSL3_CONST
Constructor and Description |
---|
JceTlsSecret(JcaTlsCrypto crypto,
byte[] data) |
Modifier and Type | Method and Description |
---|---|
TlsSecret |
deriveSSLKeyBlock(byte[] seed,
int length)
Derive a new SSL key block using the passed in seed.
|
TlsSecret |
deriveSSLMasterSecret(byte[] seed)
Derive a new SSL master secret using the passed in seed.
|
TlsSecret |
deriveUsingPRF(int prfAlgorithm,
byte[] labelSeed,
int length)
Return a new secret based on applying a PRF to this one.
|
protected AbstractTlsCrypto |
getCrypto() |
protected void |
hmacHash(java.lang.String digestName,
byte[] secret,
byte[] seed,
byte[] output) |
protected byte[] |
prf_1_0(byte[] secret,
byte[] labelSeed,
int length) |
protected byte[] |
prf_1_2(java.lang.String prfDigest,
byte[] secret,
byte[] labelSeed,
int length) |
protected byte[] |
prf_SSL(byte[] seed,
int md5Count) |
checkAlive, createCipher, destroy, encrypt, extract
public JceTlsSecret(JcaTlsCrypto crypto, byte[] data)
public TlsSecret deriveSSLKeyBlock(byte[] seed, int length)
TlsSecret
seed
- the joint random value.length
- the length (in bytes) required.public TlsSecret deriveSSLMasterSecret(byte[] seed)
TlsSecret
seed
- the session hash or joint random value.public TlsSecret deriveUsingPRF(int prfAlgorithm, byte[] labelSeed, int length)
TlsSecret
prfAlgorithm
- PRF algorithm to use.labelSeed
- the appropriate concatenation of the label and seed detailslength
- the size (in bytes) of the secret to generate.protected AbstractTlsCrypto getCrypto()
getCrypto
in class AbstractTlsSecret
protected void hmacHash(java.lang.String digestName, byte[] secret, byte[] seed, byte[] output) throws java.security.GeneralSecurityException
java.security.GeneralSecurityException
protected byte[] prf_SSL(byte[] seed, int md5Count) throws java.security.GeneralSecurityException
java.security.GeneralSecurityException
protected byte[] prf_1_0(byte[] secret, byte[] labelSeed, int length) throws java.security.GeneralSecurityException
java.security.GeneralSecurityException
protected byte[] prf_1_2(java.lang.String prfDigest, byte[] secret, byte[] labelSeed, int length) throws java.security.GeneralSecurityException
java.security.GeneralSecurityException