|
44 | 44 | <Docs> |
45 | 45 | <summary>Provides an implementation of the Elliptic Curve Digital Signature Algorithm (ECDSA) backed by OpenSSL.</summary> |
46 | 46 | <remarks> |
47 | | - <format type="text/markdown"><![CDATA[ |
48 | | - |
49 | | -## Remarks |
50 | | -This class should only be used directly when doing platform interop with the system OpenSSL library. |
51 | | -When platform interop is not needed, you should use the <xref:System.Security.Cryptography.ECDsa.Create%2A?displayProperty=nameWithType> factory methods instead of a specific derived implementation. |
52 | | - |
| 47 | + <format type="text/markdown"><![CDATA[ |
| 48 | +
|
| 49 | +## Remarks |
| 50 | +This class should only be used directly when doing platform interop with the system OpenSSL library. When platform interop isn't needed, you should use the <xref:System.Security.Cryptography.ECDsa.Create%2A?displayProperty=nameWithType> factory methods instead of a specific derived implementation. |
| 51 | +
|
53 | 52 | ]]></format> |
54 | 53 | </remarks> |
55 | 54 | </Docs> |
@@ -99,15 +98,14 @@ When platform interop is not needed, you should use the <xref:System.Security.Cr |
99 | 98 | <Docs> |
100 | 99 | <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.ECDsaOpenSsl" /> class.</summary> |
101 | 100 | <remarks> |
102 | | - <format type="text/markdown"><![CDATA[ |
103 | | - |
104 | | -## Remarks |
| 101 | + <format type="text/markdown"><![CDATA[ |
| 102 | +
|
| 103 | +## Remarks |
105 | 104 |
|
106 | 105 | This constructor does not generate a new public/private keypair immediately. |
107 | | -This constructor sets the <xref:System.Security.Cryptography.ECDsaOpenSsl.KeySize> property to 521 and when a key is needed the saved size is used to identify the target curve. |
108 | | -If a key is loaded via the <xref:System.Security.Cryptography.ECDsaOpenSsl.ImportParameters%2A> method, or other key import method, the key size from this constructor has no meaning. |
109 | | - |
110 | | - |
| 106 | +This constructor sets the <xref:System.Security.Cryptography.ECDsaOpenSsl.KeySize> property to 521 and when a key is needed, the saved size is used to identify the target curve. |
| 107 | +If a key is loaded via the <xref:System.Security.Cryptography.ECDsaOpenSsl.ImportParameters%2A> method or another key import method, the key size from this constructor has no meaning. |
| 108 | +
|
111 | 109 | ]]></format> |
112 | 110 | </remarks> |
113 | 111 | <altmember cref="M:System.Security.Cryptography.ECDsa.Create" /> |
@@ -162,15 +160,14 @@ If a key is loaded via the <xref:System.Security.Cryptography.ECDsaOpenSsl.Impor |
162 | 160 | <param name="keySize">The size of the key. Valid key sizes are 256, 384, and 521 bits.</param> |
163 | 161 | <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.ECDsaOpenSsl" /> class with a specified target key size.</summary> |
164 | 162 | <remarks> |
165 | | - <format type="text/markdown"><![CDATA[ |
166 | | - |
167 | | -## Remarks |
| 163 | + <format type="text/markdown"><![CDATA[ |
| 164 | +
|
| 165 | +## Remarks |
168 | 166 |
|
169 | 167 | This constructor does not generate a new public/private keypair immediately. |
170 | | -This constructor sets the <xref:System.Security.Cryptography.ECDsaOpenSsl.KeySize> property to the provided value and when a key is needed the saved size is used to identify the target curve. |
171 | | -If a key is loaded via the <xref:System.Security.Cryptography.ECDsaOpenSsl.ImportParameters%2A> method, or other key import method, the key size from this constructor has no meaning. |
172 | | - |
173 | | - |
| 168 | +This constructor sets the <xref:System.Security.Cryptography.ECDsaOpenSsl.KeySize> property to the provided value and when a key is needed, the saved size is used to identify the target curve. |
| 169 | +If a key is loaded via the <xref:System.Security.Cryptography.ECDsaOpenSsl.ImportParameters%2A> method or another key import method, the key size from this constructor has no meaning. |
| 170 | +
|
174 | 171 | ]]></format> |
175 | 172 | </remarks> |
176 | 173 | <exception cref="T:System.Security.Cryptography.CryptographicException"> |
@@ -227,12 +224,11 @@ If a key is loaded via the <xref:System.Security.Cryptography.ECDsaOpenSsl.Impor |
227 | 224 | <param name="handle">The OpenSSL <c>EC_KEY*</c> value to use as the key.</param> |
228 | 225 | <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.ECDsaOpenSsl" /> class from an existing OpenSSL key represented as an <c>EC_KEY*</c>.</summary> |
229 | 226 | <remarks> |
230 | | - <format type="text/markdown"><![CDATA[ |
231 | | - |
232 | | -## Remarks |
| 227 | + <format type="text/markdown"><![CDATA[ |
| 228 | +
|
| 229 | +## Remarks |
233 | 230 | > [!IMPORTANT] |
234 | | -> OpenSSL supports multiple library versions being loaded within the same process. |
235 | | -> Before calling this constructor verify your pointer value came from the same version of OpenSSL that this class uses, see <xref:System.Security.Cryptography.SafeEvpPKeyHandle.OpenSslVersion> for more information. |
| 231 | +> OpenSSL supports multiple library versions being loaded within the same process. Before calling this constructor, verify that your pointer value came from the same version of OpenSSL that this class uses. For more information, see <xref:System.Security.Cryptography.SafeEvpPKeyHandle.OpenSslVersion>. |
236 | 232 |
|
237 | 233 | ]]></format> |
238 | 234 | </remarks> |
@@ -348,13 +344,14 @@ If a key is loaded via the <xref:System.Security.Cryptography.ECDsaOpenSsl.Impor |
348 | 344 | <param name="pkeyHandle">The OpenSSL <c>EVP_PKEY*</c> value to use as the key, represented as a <see cref="T:System.Security.Cryptography.SafeEvpPKeyHandle" />.</param> |
349 | 345 | <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.ECDsaOpenSsl" /> class from an existing OpenSSL key represented as an <c>EVP_PKEY*</c>.</summary> |
350 | 346 | <remarks> |
351 | | - <format type="text/markdown"><![CDATA[ |
352 | | - |
353 | | -## Remarks |
| 347 | + <format type="text/markdown"><![CDATA[ |
| 348 | +
|
| 349 | +## Remarks |
| 350 | +
|
| 351 | +In .NET 9 and later versions, external modifications of `pkeyHandle` also affect the handle stored in the instance that this constructor creates. |
| 352 | +
|
354 | 353 | > [!IMPORTANT] |
355 | | -> OpenSSL supports multiple library versions being loaded within the same process. |
356 | | -> Before calling this constructor, verify your pointer value came from the same version of OpenSSL that this class uses. |
357 | | -> For more information, see <xref:System.Security.Cryptography.SafeEvpPKeyHandle.OpenSslVersion>. |
| 354 | +> OpenSSL supports multiple library versions being loaded within the same process. Before calling this constructor, verify that your pointer value came from the same version of OpenSSL that this class uses. For more information, see <xref:System.Security.Cryptography.SafeEvpPKeyHandle.OpenSslVersion>. |
358 | 355 |
|
359 | 356 | ]]></format> |
360 | 357 | </remarks> |
@@ -425,11 +422,10 @@ If a key is loaded via the <xref:System.Security.Cryptography.ECDsaOpenSsl.Impor |
425 | 422 | <summary>Gets a <see cref="T:System.Security.Cryptography.SafeEvpPKeyHandle" /> representation of the cryptographic key.</summary> |
426 | 423 | <returns>A <see cref="T:System.Security.Cryptography.SafeEvpPKeyHandle" /> representation of the cryptographic key.</returns> |
427 | 424 | <remarks> |
428 | | - <format type="text/markdown"><![CDATA[ |
429 | | - |
| 425 | + <format type="text/markdown"><![CDATA[ |
| 426 | +
|
430 | 427 | ## Remarks |
431 | | -Each call to this method produces a new <xref:System.Security.Cryptography.SafeEvpPKeyHandle> object with its own lifetime. |
432 | | -The objects returned by this method can safely be used even after this <xref:System.Security.Cryptography.ECDsaOpenSsl> instance has been disposed. |
| 428 | +Each call to this method produces a new <xref:System.Security.Cryptography.SafeEvpPKeyHandle> object with its own lifetime. The objects returned by this method can safely be used even after this <xref:System.Security.Cryptography.ECDsaOpenSsl> instance has been disposed. However, modifying operations (that is, direct calls to modifying OpenSSL APIs) on the new handle operate on the same underlying object. The new instance this method returns is simply an additional reference. |
433 | 429 |
|
434 | 430 | ]]></format> |
435 | 431 | </remarks> |
@@ -623,11 +619,11 @@ The objects returned by this method can safely be used even after this <xref:Sys |
623 | 619 | <param name="parameters">The curve parameters.</param> |
624 | 620 | <summary>Replaces the current key for this instance with one using the specified key parameters.</summary> |
625 | 621 | <remarks> |
626 | | - <format type="text/markdown"><![CDATA[ |
627 | | - |
628 | | -## Remarks |
629 | | - If `parameters` contains only <xref:System.Security.Cryptography.ECParameters.Q>, only a public key is imported. If `parameters` also contains <xref:System.Security.Cryptography.ECParameters.D>, a full key pair is imported. The <xref:System.Security.Cryptography.ECParameters.Curve> field specifies the type of the curve to import. |
630 | | - |
| 622 | + <format type="text/markdown"><![CDATA[ |
| 623 | +
|
| 624 | +## Remarks |
| 625 | + If `parameters` contains only <xref:System.Security.Cryptography.ECParameters.Q>, only a public key is imported. If `parameters` also contains <xref:System.Security.Cryptography.ECParameters.D>, a full key pair is imported. The <xref:System.Security.Cryptography.ECParameters.Curve> field specifies the type of the curve to import. |
| 626 | +
|
631 | 627 | ]]></format> |
632 | 628 | </remarks> |
633 | 629 | <exception cref="T:System.Security.Cryptography.CryptographicException"> |
@@ -658,9 +654,9 @@ The objects returned by this method can safely be used even after this <xref:Sys |
658 | 654 | <summary>Gets or sets the size, in bits, of the key modulus used by the asymmetric algorithm.</summary> |
659 | 655 | <value>The size, in bits, of the key modulus used by the asymmetric algorithm.</value> |
660 | 656 | <remarks> |
661 | | - <format type="text/markdown"><![CDATA[ |
662 | | - |
663 | | -## Remarks |
| 657 | + <format type="text/markdown"><![CDATA[ |
| 658 | +
|
| 659 | +## Remarks |
664 | 660 |
|
665 | 661 | Setting this property to its current value has no visible effect. |
666 | 662 | Setting this property to a new legal value discards the current key, but defers creation of a new key until one is needed. |
@@ -698,9 +694,9 @@ Because key sizes do not uniquely identify elliptic curves, the use of the prope |
698 | 694 | <summary>Gets the key sizes, in bits, that are supported by the <see cref="P:System.Security.Cryptography.ECDsaCng.KeySize" /> property setter.</summary> |
699 | 695 | <value>An array that contains the key sizes supported by the <see cref="P:System.Security.Cryptography.ECDsaCng.KeySize" /> property setter.</value> |
700 | 696 | <remarks> |
701 | | - <format type="text/markdown"><![CDATA[ |
702 | | - |
703 | | -## Remarks |
| 697 | + <format type="text/markdown"><![CDATA[ |
| 698 | +
|
| 699 | +## Remarks |
704 | 700 |
|
705 | 701 | In Elliptic Curve Cryptography (ECC) the key size is not the only input into the key generation process, |
706 | 702 | it is derived from the curve parameters for a specific elliptic curve. |
|
0 commit comments