<PackageReference Include="BouncyCastle.Cryptography" Version="2.8.0-beta.349" />

Org.BouncyCastle.Crypto.Agreement.DHAgreement

public class DHAgreement
A Diffie-Hellman key exchange engine.
public DHAgreement()

Given a message from a given party and the corresponding public key calculate the next message in the agreement sequence. In this case this will represent the shared secret.

Calculate our initial message.

public void Init(ICipherParameters parameters)