Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

enum System.Security.Cryptography.ECDiffieHellmanKeyDerivationFunction

Assembly: System.Security.Cryptography

Specifies the key derivation function that the <see cref="T:System.Security.Cryptography.ECDiffieHellmanCng" /> class will use to convert secret agreements into key material.

Values

Hash
A hash algorithm is used to generate key material. The <see cref="P:System.Security.Cryptography.ECDiffieHellmanCng.HashAlgorithm" /> property specifies the name of the algorithm to use. If the algorithm name is not specified, <see cref="T:System.Security.Cryptography.SHA256" /> is used as the default algorithm. You can also specify the <see cref="P:System.Security.Cryptography.ECDiffieHellmanCng.SecretPrepend" /> and <see cref="P:System.Security.Cryptography.ECDiffieHellmanCng.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.
Hmac
A Hash-based Message Authentication Code (HMAC) algorithm is used to generate key material. The <see cref="P:System.Security.Cryptography.ECDiffieHellmanCng.HmacKey" /> property specifies the key to use. Either this property must be set or the <see cref="P:System.Security.Cryptography.ECDiffieHellmanCng.UseSecretAgreementAsHmacKey" /> property must be set to <see langword="true" /> ; otherwise, a <see cref="T:System.Security.Cryptography.CryptographicException" /> is thrown when you use <see cref="F:System.Security.Cryptography.ECDiffieHellmanKeyDerivationFunction.Hmac" /> . If both properties are set, the secret agreement is used as the HMAC key. You can also specify the <see cref="P:System.Security.Cryptography.ECDiffieHellmanCng.SecretPrepend" /> and <see cref="P:System.Security.Cryptography.ECDiffieHellmanCng.SecretAppend" /> properties, but they are not required. The amount of key material that is generated is equivalent to the size of the HMAC value.
Tls
The Transport Layer Security (TLS) protocol is used to generate key material. The <see cref="P:System.Security.Cryptography.ECDiffieHellmanCng.Seed" /> and <see cref="P:System.Security.Cryptography.ECDiffieHellmanCng.Label" /> properties must be set; otherwise, a <see cref="T:System.Security.Cryptography.CryptographicException" /> is thrown when you use <see cref="F:System.Security.Cryptography.ECDiffieHellmanKeyDerivationFunction.Tls" /> . This value generates 160 bits of key material.