public class BcTlsSecret extends AbstractTlsSecret
Modifier and Type | Field and Description |
---|---|
protected BcTlsCrypto |
crypto |
data, MD5_SIZE, SSL3_CONST
Constructor and Description |
---|
BcTlsSecret(BcTlsCrypto 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(org.bouncycastle.crypto.Digest digest,
byte[] secret,
byte[] seed,
byte[] output) |
protected byte[] |
prf_1_0(byte[] secret,
byte[] labelSeed,
int length) |
protected byte[] |
prf_1_2(org.bouncycastle.crypto.Digest prfDigest,
byte[] secret,
byte[] labelSeed,
int length) |
protected byte[] |
prf_SSL(byte[] seed,
int md5Count) |
checkAlive, createCipher, destroy, encrypt, extract
protected final BcTlsCrypto crypto
public BcTlsSecret(BcTlsCrypto crypto, byte[] data)
protected AbstractTlsCrypto getCrypto()
getCrypto
in class AbstractTlsSecret
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 void hmacHash(org.bouncycastle.crypto.Digest digest, byte[] secret, byte[] seed, byte[] output)
protected byte[] prf_SSL(byte[] seed, int md5Count)
protected byte[] prf_1_0(byte[] secret, byte[] labelSeed, int length)
protected byte[] prf_1_2(org.bouncycastle.crypto.Digest prfDigest, byte[] secret, byte[] labelSeed, int length)