Class BcTlsDH
Support class for ephemeral Diffie-Hellman using the BC light-weight library.
public class BcTlsDH : TlsAgreement
- Inheritance
-
BcTlsDH
- Implements
- Inherited Members
Constructors
BcTlsDH(BcTlsDHDomain)
public BcTlsDH(BcTlsDHDomain domain)
Parameters
domainBcTlsDHDomain
Fields
m_domain
protected readonly BcTlsDHDomain m_domain
Field Value
m_localKeyPair
protected AsymmetricCipherKeyPair m_localKeyPair
Field Value
m_peerPublicKey
protected DHPublicKeyParameters m_peerPublicKey
Field Value
Methods
CalculateSecret()
Calculate the agreed secret based on the calculator's current state.
public virtual TlsSecret CalculateSecret()
Returns
- TlsSecret
the calculated secret.
Exceptions
GenerateEphemeral()
Generate an ephemeral key pair, returning the encoding of the public key.
public virtual byte[] GenerateEphemeral()
Returns
- byte[]
a byte encoding of the public key.
Exceptions
ReceivePeerValue(byte[])
Pass in the public key for the peer to the agreement calculator.
public virtual void ReceivePeerValue(byte[] peerValue)
Parameters
peerValuebyte[]a byte encoding of the peer public key.