|
224 | 224 | <AssemblyVersion>4.0.0.0</AssemblyVersion>
|
225 | 225 | </AssemblyInfo>
|
226 | 226 | <Docs>
|
227 |
| - <summary>Derives bytes that can be used as a key using a hash function .</summary> |
| 227 | + <summary>Performs key derivation using a specified hash algorithm.</summary> |
228 | 228 | </Docs>
|
229 | 229 | </MemberGroup>
|
230 | 230 | <Member MemberName="DeriveKeyFromHash">
|
|
260 | 260 | </Parameters>
|
261 | 261 | <Docs>
|
262 | 262 | <param name="otherPartyPublicKey">The other party's public key.</param>
|
263 |
| - <param name="hashAlgorithm">The hash algorithm to use to derive the key material.</param> |
| 263 | + <param name="hashAlgorithm">The hash algorithm to use to derive the key material.</param> |
264 | 264 | <param name="secretPrepend">A value to prepend to the derived secret before hashing.</param>
|
265 | 265 | <param name="secretAppend">A value to append to the derived secret before hashing.</param>
|
266 |
| - <summary>Derives bytes that can be used as a key using a hash function, given another party's public key, hash algorithm's name, a prepend value and an append value.</summary> |
267 |
| - <returns>The key material from the key exchange with the other party's public key.</returns> |
268 |
| - <remarks> |
269 |
| - <format type="text/markdown"><![CDATA[ |
270 |
| - |
271 |
| -## Remarks |
272 |
| - If the value of `secretPrepend` or `secretAppend` is `null`, they are treated as empty arrays. |
273 |
| - |
274 |
| - ]]></format> |
275 |
| - </remarks> |
| 266 | + <summary>Performs key derivation using a specified hash algorithm with optional prepended or appended data.</summary> |
| 267 | + <returns>The hash of the shared secret after prepending or appending data as requested.</returns> |
| 268 | + <remarks>To be added.</remarks> |
| 269 | + <exception cref="T:System.NotImplementedException">A derived class must override this method.</exception> |
| 270 | + <exception cref="T:System.ArgumentException">The curve used by <paramref name="otherPartyPublicKey" /> has a different size than the curve from this key. |
| 271 | + |
| 272 | +-or- |
| 273 | + |
| 274 | +The <paramref name="hashAlgorithm"/> parameter does not specify a hash. |
| 275 | +</exception> |
276 | 276 | <exception cref="T:System.ArgumentNullException">
|
277 |
| - <paramref name="otherPartyPublicKey" /> is <see langword="null" />.</exception> |
278 |
| - <exception cref="T:System.ArgumentException"> |
279 |
| - <paramref name="otherPartyPublicKey" /> is not an ECDH key, or it is not the correct size. |
280 |
| - |
281 |
| - -or- |
282 |
| - |
283 |
| - <paramref name="hashAlgorithm" />.<see cref="P:System.Security.Cryptography.HashAlgorithmName.Name" /> is <see langword="null" /> or <see cref="F:System.String.Empty" />.</exception> |
284 |
| - <exception cref="T:System.Security.Cryptography.CryptographicException">All other errors.</exception> |
| 277 | + <paramref name="otherPartyPublicKey" /> is <see langword="null"/>.</exception> |
| 278 | + <exception cref="T:System.Security.Cryptography.CryptographicException">The curve used by <paramref name="otherPartyPublicKey" /> is different than the curve from this key. |
| 279 | + |
| 280 | +-or- |
| 281 | + |
| 282 | +This instance represents only a public key.</exception> |
285 | 283 | </Docs>
|
286 | 284 | </Member>
|
287 | 285 | <MemberGroup MemberName="DeriveKeyFromHmac">
|
|
331 | 329 | <param name="hmacKey">The key for the HMAC.</param>
|
332 | 330 | <param name="secretPrepend">A value to prepend to the derived secret before hashing.</param>
|
333 | 331 | <param name="secretAppend">A value to append to the derived secret before hashing.</param>
|
334 |
| - <summary>Derives bytes that can be used as a key using a Hash-based Message Authentication Code (HMAC).</summary> |
335 |
| - <returns>The key material from the key exchange with the other party's public key.</returns> |
336 |
| - <remarks> |
337 |
| - <format type="text/markdown"><![CDATA[ |
338 |
| - |
339 |
| -## Remarks |
340 |
| - If the value of `secretPrepend` or `secretAppend` is `null`, they are treated as empty arrays. If the value of `hmacKey` is `null`, the result of the Elliptic Curve Diffie-Hellman (ECDH) algorithm will be used as the HMAC key. |
341 |
| - |
342 |
| - ]]></format> |
343 |
| - </remarks> |
| 332 | + <summary>Performs key derivation using a specified HMAC (Hash-based Message Authentication Code) algorithm with optional prepended or appended data.</summary> |
| 333 | + <returns>The HMAC of the shared secret after prepending or appending data as requested.</returns> |
| 334 | + <remarks>To be added.</remarks> |
| 335 | + <exception cref="T:System.ArgumentException">The curve used by <paramref name="otherPartyPublicKey" /> has a different size than the curve from this key. |
| 336 | + |
| 337 | +-or- |
| 338 | + |
| 339 | +The <paramref name="hashAlgorithm"/> parameter does not specify a hash.</exception> |
344 | 340 | <exception cref="T:System.ArgumentNullException">
|
345 |
| - <paramref name="otherPartyPublicKey" /> is <see langword="null" />.</exception> |
346 |
| - <exception cref="T:System.ArgumentException"> |
347 |
| - <paramref name="otherPartyPublicKey" /> is not an ECDH key, or it is not the correct size. |
348 |
| - |
349 |
| - -or- |
350 |
| - |
351 |
| - <paramref name="hashAlgorithm" />.<see cref="P:System.Security.Cryptography.HashAlgorithmName.Name" /> is <see langword="null" /> or <see cref="F:System.String.Empty" />.</exception> |
352 |
| - <exception cref="T:System.Security.Cryptography.CryptographicException">All other errors.</exception> |
| 341 | + <paramref name="otherPartyPublicKey" /> is <see langword="null"/>.</exception> |
| 342 | + <exception cref="T:System.Security.Cryptography.CryptographicException">The curve used by <paramref name="otherPartyPublicKey" /> is different than the curve from this key. |
| 343 | + |
| 344 | +-or- |
| 345 | + |
| 346 | +This instance represents only a public key.</exception> |
353 | 347 | </Docs>
|
354 | 348 | </Member>
|
355 | 349 | <MemberGroup MemberName="DeriveKeyMaterial">
|
|
483 | 477 | <param name="otherPartyPublicKey">The other party's public key.</param>
|
484 | 478 | <param name="prfLabel">The ASCII-encoded PRF label.</param>
|
485 | 479 | <param name="prfSeed">The 64-byte PRF seed.</param>
|
486 |
| - <summary>Derives bytes that can be used as a key using a Transport Layer Security (TLS) Pseudo-Random Function (PRF) derivation algorithm.</summary> |
487 |
| - <returns>The key material from the key exchange with the other party's public key.</returns> |
| 480 | + <summary>Performs key derivation using the TLS (Transport Layer Security) 1.1 PRF (Pseudo-Random Function).</summary> |
| 481 | + <returns>The first 48 bytes from the TLS 1.1 PRF, using the shared secret as the key.</returns> |
488 | 482 | <remarks>To be added.</remarks>
|
489 |
| - <exception cref="T:System.ArgumentNullException"> |
490 |
| - <paramref name="otherPartyPublicKey" /> is <see langword="null" />. |
491 |
| - |
492 |
| - -or- |
493 |
| - |
494 |
| - <paramref name="prfLabel" /> is <see langword="null" />. |
495 |
| - |
496 |
| - -or- |
497 |
| - |
498 |
| - <paramref name="prfSeed" /> is <see langword="null" />.</exception> |
| 483 | + <exception cref="T:System.NotImplementedException">A derived class must override this method.</exception> |
499 | 484 | <exception cref="T:System.ArgumentException">
|
500 |
| - <paramref name="otherPartyPublicKey" /> is not an ECDH key, or it is not the correct size.</exception> |
| 485 | + The curve used by <paramref name="otherPartyPublicKey" /> has a different size than the curve from this key.</exception> |
| 486 | + <exception cref="T:System.ArgumentNullException"> |
| 487 | + <paramref name="otherPartyPublicKey"/>, <paramref name="prfLabel" /> or <paramref name="prfSeed" /> is <see langword="null" />.</exception> |
501 | 488 | <exception cref="T:System.Security.Cryptography.CryptographicException">
|
502 |
| - <paramref name="prfSeed" /> is not exactly 64 bytes in length. |
503 |
| - |
504 |
| - -or- |
505 |
| - |
506 |
| - All other cryptographic errors.</exception> |
| 489 | + <paramref name="prfSeed" /> is not exactly 64 bytes in length. |
| 490 | + |
| 491 | +-or- |
| 492 | + |
| 493 | +The curve used by <paramref name="otherPartyPublicKey" /> is different than the curve from this key. |
| 494 | + |
| 495 | +-or- |
| 496 | + |
| 497 | +This instance represents only a public key.</exception> |
507 | 498 | </Docs>
|
508 | 499 | </Member>
|
509 | 500 | <MemberGroup MemberName="DeriveSecretAgreementHandle">
|
|
625 | 616 | <Parameter Name="disposing" Type="System.Boolean" />
|
626 | 617 | </Parameters>
|
627 | 618 | <Docs>
|
628 |
| - <param name="disposing">To be added.</param> |
629 |
| - <summary>To be added.</summary> |
| 619 | + <param name="disposing"> |
| 620 | + <see langword="true"/> to release managed and unmanaged resources; <see langword="false"/> to release only unmanaged resources.</param> |
| 621 | + <summary>Releases the resources used by the current instance of the <see cref="T:System.Security.Cryptography.ECDiffieHellmanCng"/> class.</summary> |
630 | 622 | <remarks>To be added.</remarks>
|
631 | 623 | </Docs>
|
632 | 624 | </Member>
|
|
1043 | 1035 | <ReturnType>System.Int32</ReturnType>
|
1044 | 1036 | </ReturnValue>
|
1045 | 1037 | <Docs>
|
1046 |
| - <summary>To be added.</summary> |
1047 |
| - <value>To be added.</value> |
1048 |
| - <remarks>To be added.</remarks> |
| 1038 | + <summary>Gets or sets the size, in bits, of the key modulus used by the asymmetric algorithm.</summary> |
| 1039 | + <value>The size, in bits, of the key modulus used by the asymmetric algorithm.</value> |
| 1040 | + <remarks> |
| 1041 | + <format type="text/markdown"><![CDATA[ |
| 1042 | + |
| 1043 | +## Remarks |
| 1044 | +Setting this property to its current value has no visible effect. |
| 1045 | +Setting this property to a new legal value discards the current key, but defers creation of a new key until one is needed. |
| 1046 | +
|
| 1047 | +Because key sizes do not uniquely identify elliptic curves, the use of the property setter is discouraged. To generate a new key on a specific curve, use the <xref:System.Security.Cryptography.ECDiffieHellmanCng.GenerateKey%2A> method. |
| 1048 | +
|
| 1049 | +]]></format> |
| 1050 | + </remarks> |
| 1051 | + <exception cref="T:System.Security.Cryptography.CryptographicException"> |
| 1052 | + <paramref name="value" /> is not permitted by <see cref="P:System.Security.Cryptography.ECDiffieHellmanCng.LegalKeySizes" />.</exception> |
| 1053 | + <altmember cref="M:System.Security.Cryptography.ECDiffieHellmanCng.GenerateKey(System.Security.Cryptography.ECCurve)" /> |
1049 | 1054 | </Docs>
|
1050 | 1055 | </Member>
|
1051 | 1056 | <Member MemberName="Label">
|
|
1109 | 1114 | <ReturnType>System.Security.Cryptography.KeySizes[]</ReturnType>
|
1110 | 1115 | </ReturnValue>
|
1111 | 1116 | <Docs>
|
1112 |
| - <summary>To be added.</summary> |
1113 |
| - <value>To be added.</value> |
1114 |
| - <remarks>To be added.</remarks> |
| 1117 | + <summary>Gets the key sizes, in bits, that are supported by the <see cref="P:System.Security.Cryptography.ECDiffieHellmanCng.KeySize"/> property setter.</summary> |
| 1118 | + <value>An array that contains the key sizes supported by the <see cref="P:System.Security.Cryptography.ECDiffieHellmanCng.KeySize"/> property setter.</value> |
| 1119 | + <remarks> |
| 1120 | + <format type="text/markdown"><![CDATA[ |
| 1121 | + |
| 1122 | +## Remarks |
| 1123 | +
|
| 1124 | +In Elliptic Curve Cryptography (ECC) the key size is not the only input into the key generation process, |
| 1125 | +it is derived from the curve parameters for a specific elliptic curve. |
| 1126 | +This property reports only three sizes for LegalKeySizes: 256, 384, and 521 bits. |
| 1127 | +When the key size is used alone as a basis for key generation, |
| 1128 | +the supported sizes map to the named curves secp256r1 (aka NIST P-256), secp384r1 (aka NIST P-384), and secp521r1 (aka NIST P-521). |
| 1129 | +
|
| 1130 | +When executed on Windows 10, this class supports many additional named curves, |
| 1131 | +but that is not reflected in this property. |
| 1132 | +
|
| 1133 | + ]]></format> |
| 1134 | + </remarks> |
| 1135 | + <altmember cref="M:System.Security.Cryptography.ECDiffieHellmanCng.GenerateKey(System.Security.Cryptography.ECCurve)" /> |
1115 | 1136 | </Docs>
|
1116 | 1137 | </Member>
|
1117 | 1138 | <Member MemberName="PublicKey">
|
|
1388 | 1409 |
|
1389 | 1410 | ## Remarks
|
1390 | 1411 |
|
1391 |
| -- This value is used for key derivation if the <xref:System.Security.Cryptography.ECDiffieHellmanCng.KeyDerivationFunction%2A> property is set to <xref:System.Security.Cryptography.ECDiffieHellmanKeyDerivationFunction.Hmac>. By default, the value is `false`. |
| 1412 | +This value is used for key derivation if the <xref:System.Security.Cryptography.ECDiffieHellmanCng.KeyDerivationFunction%2A> property is set to <xref:System.Security.Cryptography.ECDiffieHellmanKeyDerivationFunction.Hmac>. By default, the value is `false`. |
1392 | 1413 |
|
1393 | 1414 | ]]></format>
|
1394 | 1415 | </remarks>
|
|
0 commit comments