Top Description Fields Constructors Methods
org.bouncycastle.tls.crypto.impl.bc

public Class BcDefaultTlsCredentialedDecryptor

extends Object
implements TlsCredentialedDecryptor
Class Inheritance
All Implemented Interfaces
org.bouncycastle.tls.TlsCredentialedDecryptor, org.bouncycastle.tls.TlsCredentials
Imports
java.io.IOException, org.bouncycastle.crypto.params.AsymmetricKeyParameter, .RSAKeyParameters, org.bouncycastle.tls.Certificate, .ProtocolVersion, .TlsCredentialedDecryptor, org.bouncycastle.tls.crypto.TlsCryptoParameters, .TlsSecret

Credentialed class decrypting RSA encrypted secrets sent from a peer for our end of the TLS connection using the BC light-weight API.

Field Summary

Modifier and TypeField and Description
protected Certificate
protected BcTlsCrypto
protected AsymmetricKeyParameter

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public TlsSecret
decrypt(TlsCryptoParameters
the parameters to use for the decryption.
cryptoParams
,
byte[]
the cipher text containing the secret.
ciphertext
)

Implements org.bouncycastle.tls.TlsCredentialedDecryptor.decrypt.

Decrypt the passed in cipher text using the parameters available.

public Certificate
getCertificate()

Implements org.bouncycastle.tls.TlsCredentials.getCertificate.

Return the certificate structure representing our identity.

protected TlsSecret
safeDecryptPreMasterSecret(TlsCryptoParameters cryptoParams, RSAKeyParameters rsaServerPrivateKey, byte[] encryptedPreMasterSecret)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

certificateback to summary
protected Certificate certificate
cryptoback to summary
protected BcTlsCrypto crypto
privateKeyback to summary
protected AsymmetricKeyParameter privateKey

Constructor Detail

BcDefaultTlsCredentialedDecryptorback to summary
public BcDefaultTlsCredentialedDecryptor(BcTlsCrypto crypto, Certificate certificate, AsymmetricKeyParameter privateKey)

Method Detail

decryptback to summary
public TlsSecret decrypt(TlsCryptoParameters cryptoParams, byte[] ciphertext) throws IOException

Implements org.bouncycastle.tls.TlsCredentialedDecryptor.decrypt.

Doc from org.bouncycastle.tls.TlsCredentialedDecryptor.decrypt.

Decrypt the passed in cipher text using the parameters available.

Parameters
cryptoParams:TlsCryptoParameters

the parameters to use for the decryption.

ciphertext:byte[]

the cipher text containing the secret.

Returns:TlsSecret

a TLS secret.

Exceptions
IOException:
on a parsing or decryption error.
getCertificateback to summary
public Certificate getCertificate()

Implements org.bouncycastle.tls.TlsCredentials.getCertificate.

Doc from org.bouncycastle.tls.TlsCredentials.getCertificate.

Return the certificate structure representing our identity.

Returns:Certificate

our certificate structure.

safeDecryptPreMasterSecretback to summary
protected TlsSecret safeDecryptPreMasterSecret(TlsCryptoParameters cryptoParams, RSAKeyParameters rsaServerPrivateKey, byte[] encryptedPreMasterSecret)