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

Org.BouncyCastle.Math.EC.Rfc7748.X25519

public static class X25519
namespace Org.BouncyCastle.Math.EC.Rfc7748 { public static class X25519 { public const int PointSize = 32; public const int ScalarSize = 32; public static bool CalculateAgreement(byte[] k, int kOff, byte[] u, int uOff, byte[] r, int rOff); public static void ClampPrivateKey(byte[] k); public static void GeneratePrivateKey(SecureRandom random, byte[] k); public static void GeneratePublicKey(byte[] k, int kOff, byte[] r, int rOff); public static void Precompute(); public static void ScalarMult(byte[] k, int kOff, byte[] u, int uOff, byte[] r, int rOff); public static void ScalarMultBase(byte[] k, int kOff, byte[] r, int rOff); } }