Table of Contents

Class BcDefaultTlsCredentialedDecryptor

Namespace
Org.BouncyCastle.Tls.Crypto.Impl.BC
Assembly
BouncyCastle.Cryptography.dll

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

public class BcDefaultTlsCredentialedDecryptor : TlsCredentialedDecryptor, TlsCredentials
Inheritance
BcDefaultTlsCredentialedDecryptor
Implements
Inherited Members

Constructors

BcDefaultTlsCredentialedDecryptor(BcTlsCrypto, Certificate, AsymmetricKeyParameter)

public BcDefaultTlsCredentialedDecryptor(BcTlsCrypto crypto, Certificate certificate, AsymmetricKeyParameter privateKey)

Parameters

crypto BcTlsCrypto
certificate Certificate
privateKey AsymmetricKeyParameter

Fields

m_certificate

protected readonly Certificate m_certificate

Field Value

Certificate

m_crypto

protected readonly BcTlsCrypto m_crypto

Field Value

BcTlsCrypto

m_privateKey

protected readonly AsymmetricKeyParameter m_privateKey

Field Value

AsymmetricKeyParameter

Properties

Certificate

Return the certificate structure representing our identity.

public virtual Certificate Certificate { get; }

Property Value

Certificate

our certificate structure.

Methods

Decrypt(TlsCryptoParameters, byte[])

Decrypt the passed in cipher text using the parameters available.

public virtual TlsSecret Decrypt(TlsCryptoParameters cryptoParams, byte[] ciphertext)

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.

SafeDecryptPreMasterSecret(TlsCryptoParameters, RsaKeyParameters, byte[])

protected virtual TlsSecret SafeDecryptPreMasterSecret(TlsCryptoParameters cryptoParams, RsaKeyParameters rsaServerPrivateKey, byte[] encryptedPreMasterSecret)

Parameters

cryptoParams TlsCryptoParameters
rsaServerPrivateKey RsaKeyParameters
encryptedPreMasterSecret byte[]

Returns

TlsSecret