ECDiffieHellmanKeyDerivationFunction ECDiffieHellmanKeyDerivationFunction ECDiffieHellmanKeyDerivationFunction ECDiffieHellmanKeyDerivationFunction Enum


Specifies the key derivation function that the ECDiffieHellmanCng class will use to convert secret agreements into key material.

public enum class ECDiffieHellmanKeyDerivationFunction
public enum ECDiffieHellmanKeyDerivationFunction
type ECDiffieHellmanKeyDerivationFunction = 
Public Enum ECDiffieHellmanKeyDerivationFunction


Hash Hash Hash Hash 0

A hash algorithm is used to generate key material. The HashAlgorithm property specifies the name of the algorithm to use. If the algorithm name is not specified, SHA256 is used as the default algorithm.

Hmac Hmac Hmac Hmac 1

A Hash-based Message Authentication Code (HMAC) algorithm is used to generate key material. The HmacKey property specifies the key to use. Either this property must be set or the UseSecretAgreementAsHmacKey property must be set to true; otherwise, a CryptographicException is thrown when you use Hmac. If both properties are set, the secret agreement is used as the HMAC key.

Tls Tls Tls Tls 2

The Transport Layer Security (TLS) protocol is used to generate key material. The Seed and Label properties must be set; otherwise, a CryptographicException is thrown when you use Tls.


The ECDiffieHellmanKeyDerivationFunction enumeration defines the type of algorithm that will be used to transform a raw secret agreement into key material. The secret agreement is the value that is generated from a private key and the other party’s public key, as part of the key exchange. It is the seed value for the key material that is generated by the DeriveKeyMaterial method.

The KeyDerivationFunction property uses this enumeration to get the key derivation function for the ECDiffieHellmanCng class.

Applies to