Table of Contents

Class BcTlsECDH

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

Support class for ephemeral Elliptic Curve Diffie-Hellman using the BC light-weight library.

public class BcTlsECDH : TlsAgreement
Inheritance
BcTlsECDH
Implements
Inherited Members

Constructors

BcTlsECDH(BcTlsECDomain)

public BcTlsECDH(BcTlsECDomain domain)

Parameters

domain BcTlsECDomain

Fields

m_domain

protected readonly BcTlsECDomain m_domain

Field Value

BcTlsECDomain

m_localKeyPair

protected AsymmetricCipherKeyPair m_localKeyPair

Field Value

AsymmetricCipherKeyPair

m_peerPublicKey

protected ECPublicKeyParameters m_peerPublicKey

Field Value

ECPublicKeyParameters

Methods

CalculateSecret()

Calculate the agreed secret based on the calculator's current state.

public virtual TlsSecret CalculateSecret()

Returns

TlsSecret

the calculated secret.

Exceptions

IOException

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

IOException

ReceivePeerValue(byte[])

Pass in the public key for the peer to the agreement calculator.

public virtual void ReceivePeerValue(byte[] peerValue)

Parameters

peerValue byte[]

a byte encoding of the peer public key.

Exceptions

IOException