ECDiffieHellman.GenerateKey(ECCurve) Method

Definition

When overridden in a derived class, generates a new ephemeral public/private key pair for the specified curve.

C#
public virtual void GenerateKey(System.Security.Cryptography.ECCurve curve);

Parameters

curve
ECCurve

The curve used to generate an ephemeral public/private key pair.

Exceptions

curve does not validate.

A derived class must override this method.

Remarks

curve must validate (that is, it must return true) when passed to the ECCurve.Validate method) and must not be implicit.

Characteristic-2 curves are not supported on Windows.

Applies to

Product Versions
.NET Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6
.NET Framework 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.1