Skip to content

Commit 7bb8e33

Browse files
TimShererWithAquentThraka
authored andcommitted
Recommendations for SHA1. (#2840)
* Recommendations for SHA1. * Update xml/System.Security.Cryptography/MD5.xml Co-Authored-By: Jeremy Barton <[email protected]> * Update xml/System.ServiceModel.Security/Basic128SecurityAlgorithmSuite.xml Co-Authored-By: Andy De George <[email protected]> * Implement input.
1 parent b5a0925 commit 7bb8e33

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

xml/System.Security.Cryptography/MD5.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
The <xref:System.Security.Cryptography.HashAlgorithm.ComputeHash%2A> methods of the <xref:System.Security.Cryptography.MD5> class return the hash as an array of 16 bytes. Note that some MD5 implementations produce a 32-character, hexadecimal-formatted hash. To interoperate with such implementations, format the return value of the <xref:System.Security.Cryptography.HashAlgorithm.ComputeHash%2A> methods as a hexadecimal value.
4848
4949
> [!NOTE]
50-
> Newer hash functions, such as the Secure Hash Algorithms SHA-256 and SHA-512, are available. Consider using the <xref:System.Security.Cryptography.SHA256> class or the <xref:System.Security.Cryptography.SHA512> class instead of the <xref:System.Security.Cryptography.MD5> class. Use <xref:System.Security.Cryptography.MD5> only for compatibility with legacy applications and data.
50+
> Due to collision problems with MD5/SHA1, Microsoft recommends SHA256 or SHA512. Consider using the <xref:System.Security.Cryptography.SHA256> class or the <xref:System.Security.Cryptography.SHA512> class instead of the <xref:System.Security.Cryptography.MD5> class. Use <xref:System.Security.Cryptography.MD5> only for compatibility with legacy applications and data.
5151
5252
5353
@@ -213,4 +213,4 @@
213213
</Docs>
214214
</Member>
215215
</Members>
216-
</Type>
216+
</Type>

xml/System.ServiceModel.Security/Basic128SecurityAlgorithmSuite.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
<Docs>
8080
<summary>Gets the default asymmetric signature algorithm, RsaSha1Signature.</summary>
8181
<value>The default asymmetric signature algorithm, RsaSha1Signature.</value>
82-
<remarks>To be added.</remarks>
82+
<remarks>Due to collision problems with SHA1, Microsoft recommends a security model based on SHA256 or better.</remarks>
8383
</Docs>
8484
</Member>
8585
<Member MemberName="DefaultCanonicalizationAlgorithm">
@@ -121,7 +121,7 @@
121121
<Docs>
122122
<summary>Gets the default digest algorithm, Sha1Digest.</summary>
123123
<value>The default digest algorithm, Sha1Digest.</value>
124-
<remarks>To be added.</remarks>
124+
<remarks>Due to collision problems with SHA1, Microsoft recommends a security model based on SHA256 or better.</remarks>
125125
</Docs>
126126
</Member>
127127
<Member MemberName="DefaultEncryptionAlgorithm">
@@ -247,7 +247,7 @@
247247
<Docs>
248248
<summary>Gets the default symmetric signature algorithm, HmacSha1Signature.</summary>
249249
<value>The default symmetric signature algorithm, HmacSha1Signature.</value>
250-
<remarks>To be added.</remarks>
250+
<remarks>Due to collision problems with SHA1, Microsoft recommends a security model based on SHA256 or better.</remarks>
251251
</Docs>
252252
</Member>
253253
<Member MemberName="IsAsymmetricKeyLengthSupported">
@@ -325,4 +325,4 @@
325325
</Docs>
326326
</Member>
327327
</Members>
328-
</Type>
328+
</Type>

xml/System.Web.Configuration/AuthenticationSection.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
</forms>
4848
</authentication>
4949
```
50+
51+
This example uses SHA1. Due to collision problems with SHA1, Microsoft recommends SHA256.
5052
5153
The following code example demonstrates how to use the <xref:System.Web.Configuration.AuthenticationSection> class.
5254

0 commit comments

Comments
 (0)