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

public Class JceDefaultTlsCredentialedDecryptor

extends Object
implements TlsCredentialedDecryptor
Class Inheritance
All Implemented Interfaces
org.bouncycastle.tls.TlsCredentialedDecryptor, org.bouncycastle.tls.TlsCredentials
Imports
java.io.IOException, java.security.PrivateKey, .SecureRandom, java.security.interfaces.RSAPrivateKey, javax.crypto.Cipher, org.bouncycastle.tls.Certificate, .ProtocolVersion, .TlsCredentialedDecryptor, org.bouncycastle.tls.crypto.TlsCryptoParameters, .TlsSecret, org.bouncycastle.util.Arrays

Credentialed class decrypting RSA encrypted secrets sent from a peer for our end of the TLS connection using the JCE.

Field Summary

Modifier and TypeField and Description
protected Certificate
protected JcaTlsCrypto
protected PrivateKey

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, PrivateKey rsaServerPrivateKey, byte[] encryptedPreMasterSecret)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

certificateback to summary
protected Certificate certificate
cryptoback to summary
protected JcaTlsCrypto crypto
privateKeyback to summary
protected PrivateKey privateKey

Constructor Detail

JceDefaultTlsCredentialedDecryptorback to summary
public JceDefaultTlsCredentialedDecryptor(JcaTlsCrypto crypto, Certificate certificate, PrivateKey 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, PrivateKey rsaServerPrivateKey, byte[] encryptedPreMasterSecret)