<PackageReference Include="BouncyCastle.Cryptography" Version="2.2.0" />

TlsAgreement

public interface TlsAgreement
Base interface for ephemeral key agreement calculator.

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

Generate an ephemeral key pair, returning the encoding of the public key.

void ReceivePeerValue(byte[] peerValue)

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