Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Name | Value | Description |
---|---|---|
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. 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. |
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 |
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. 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 ECDiffieHellmanCng.DeriveKeyMaterial method.
The ECDiffieHellmanCng.KeyDerivationFunction property uses this enumeration to get the key derivation function for the ECDiffieHellmanCng class.
Product | Versions |
---|---|
.NET | 6, 7, 8, 9, 10 |
.NET Framework | 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1 |
.NET Standard | 2.1 (package-provided) |
Windows Desktop | 3.0, 3.1, 5 |
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in