Export (0) Print
Expand All
Expand Minimize

ECDiffieHellmanKeyDerivationFunction Enumeration

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

Namespace:  System.Security.Cryptography
Assembly:  System.Core (in System.Core.dll)

public enum ECDiffieHellmanKeyDerivationFunction

Member nameDescription
HashA 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.

You can also specify the SecretPrepend and SecretAppend properties, but they are not required.

The amount of key material that is generated is equivalent to the size of the hash value for the specified algorithm.

HmacA 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.

You can also specify the SecretPrepend and SecretAppend properties, but they are not required.

The amount of key material that is generated is equivalent to the size of the HMAC value.

TlsThe 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.

This value generates 160 bits of key material.

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.

.NET Framework

Supported in: 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2014 Microsoft