ECDiffieHellman.DeriveRawSecretAgreement(ECDiffieHellmanPublicKey) Method

Definition

Derive raw key material.

C#
public virtual byte[] DeriveRawSecretAgreement(System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey);

Parameters

otherPartyPublicKey
ECDiffieHellmanPublicKey

The public key of the party with which to derive a mutual secret.

Returns

Byte[]

The raw key agreement.

Exceptions

otherPartyPublicKey is null.

otherPartyPublicKey is over a different curve than this key.

A derived implementation has not provided an implementation of the method.

The current platform does not support raw key agreement.

The object has already been disposed.

Remarks

Care must be taking when using the raw derived secret agreement value. The raw value is expected to be used as input in to a Key Derivation Function, and not used directly as key material.

Applies to

Product Versions
.NET 8, 9