Skip to content

Commit 7bc1ba2

Browse files
TimShererWithAquentThraka
authored andcommitted
Updates re MD5/SHA1 usage. (dotnet#2917)
* Updates re MD5/SHA1 usage. * Update summary tag contents Per comments from @mairaw. * Update summary tag edits. Per feedback from @mairaw. * Move enum summary content to remarks.
1 parent 9ae564c commit 7bc1ba2

File tree

25 files changed

+81
-42
lines changed

25 files changed

+81
-42
lines changed

xml/Microsoft.Build.Tasks.Deployment.ManifestUtilities/BaseReference.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
<Docs>
149149
<summary>Gets or sets the SHA1 hash of the file.</summary>
150150
<value>A string indicating the SHA1 hash of the file.</value>
151-
<remarks>To be added.</remarks>
151+
<remarks>Due to collision problems with SHA1, Microsoft recommends a security model based on SHA256 or better.</remarks>
152152
</Docs>
153153
</Member>
154154
<Member MemberName="IsOptional">

xml/Mono.Security.Interface/HashAlgorithmType.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
<MemberValue>1</MemberValue>
3636
<Docs>
3737
<summary>To be added.</summary>
38+
<remarks>Due to collision problems with SHA1, Microsoft recommends SHA256 or better.</remarks>
3839
</Docs>
3940
</Member>
4041
<Member MemberName="Md5Sha1">
@@ -55,6 +56,7 @@
5556
<MemberValue>254</MemberValue>
5657
<Docs>
5758
<summary>To be added.</summary>
59+
<remarks>Due to collision problems with SHA1, Microsoft recommends SHA256 or better.</remarks>
5860
</Docs>
5961
</Member>
6062
<Member MemberName="None">
@@ -95,6 +97,7 @@
9597
<MemberValue>2</MemberValue>
9698
<Docs>
9799
<summary>To be added.</summary>
100+
<remarks>Due to collision problems with SHA1, Microsoft recommends SHA256 or better.</remarks>
98101
</Docs>
99102
</Member>
100103
<Member MemberName="Sha224">
@@ -198,4 +201,4 @@
198201
</Docs>
199202
</Member>
200203
</Members>
201-
</Type>
204+
</Type>

xml/System.CodeDom/CodeChecksumPragma.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@
192192
193193
The calculation of the checksum is language-specific. That is, the language vendor can use any of the hashing algorithms known to the debugger to calculate the checksum. The use of a GUID for this property provides hash algorithm extensibility.
194194
195-
195+
Due to collision problems with SHA1 and MD5, Microsoft recommends a security model based on SHA256 or better.
196196
197197
## Examples
198198
The following code example shows the setting of the <xref:System.CodeDom.CodeChecksumPragma.ChecksumAlgorithmId%2A> property. This code example is part of a larger example provided for the <xref:System.CodeDom.CodeChecksumPragma> class.

xml/System.Configuration.Assemblies/AssemblyHashAlgorithm.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
</ReturnValue>
123123
<MemberValue>0</MemberValue>
124124
<Docs>
125-
<summary>A mask indicating that there is no hash algorithm. If you specify <see langword="None" /> for a multi-module assembly, the common language runtime defaults to the SHA1 algorithm, since multi-module assemblies need to generate a hash.</summary>
125+
<summary>A mask indicating that there is no hash algorithm. If you specify <see langword="None" /> for a multi-module assembly, the common language runtime defaults to the SHA1 algorithm, since multi-module assemblies need to generate a hash. Due to collision problems with SHA1, Microsoft recommends SHA256.</summary>
126126
</Docs>
127127
</Member>
128128
<Member MemberName="SHA1">

xml/System.IO.Packaging/PackageDigitalSignatureManager.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,9 @@
257257
The <xref:System.IO.Packaging.PackageDigitalSignatureManager.HashAlgorithm%2A> property gets or sets the actual hash algorithm this is used to create and verify signatures.
258258
259259
The <xref:System.IO.Packaging.PackageDigitalSignatureManager.DefaultHashAlgorithm%2A> property is typically used to reset the <xref:System.IO.Packaging.PackageDigitalSignatureManager.HashAlgorithm%2A> property back to default after a temporary change.
260-
260+
261+
Due to collision problems with SHA1, Microsoft recommends a security model based on SHA256 or better.
262+
261263
]]></format>
262264
</remarks>
263265
<altmember cref="T:System.Security.Cryptography.Xml.SignedXml" />
@@ -324,7 +326,9 @@
324326
Unless explicitly set otherwise, this property gets the same value as <xref:System.IO.Packaging.PackageDigitalSignatureManager.DefaultHashAlgorithm%2A>.
325327
326328
The <xref:System.IO.Packaging.PackageDigitalSignatureManager.HashAlgorithm%2A> property is typically not changed from its default. This property must be changed only if a signature that uses a different known and accessible <xref:System.Security.Cryptography.HashAlgorithm> is encountered. When finished with the signature that uses a different hash algorithm, call <xref:System.IO.Packaging.PackageDigitalSignatureManager.DefaultHashAlgorithm%2A> to reset the <xref:System.IO.Packaging.PackageDigitalSignatureManager.HashAlgorithm%2A> property back to default.
327-
329+
330+
Due to collision problems with SHA1, Microsoft recommends a security model based on SHA256 or better.
331+
328332
]]></format>
329333
</remarks>
330334
<exception cref="T:System.ArgumentNullException">The string for the [!INCLUDE[TLA2#tla_uri](~/includes/tla2sharptla-uri-md.md)] to set is <see langword="null" />.</exception>

xml/System.IdentityModel.Tokens/InMemorySymmetricSecurityKey.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,9 @@
219219
220220
## Remarks
221221
To specify P-SHA1 as the cryptographic algorithm, use the <xref:System.IdentityModel.Tokens.SecurityAlgorithms.Psha1KeyDerivation> field.
222-
222+
223+
Due to collision problems with SHA1, Microsoft recommends a security model based on SHA256 or better.
224+
223225
]]></format>
224226
</remarks>
225227
<exception cref="T:System.InvalidOperationException">

xml/System.IdentityModel.Tokens/SecurityAlgorithms.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@
289289
</ReturnValue>
290290
<Docs>
291291
<summary>Represents the P-SHA1 key generation algorithm. This field is constant.</summary>
292-
<remarks>To be added.</remarks>
292+
<remarks>Due to collision problems with SHA1, Microsoft recommends a security model based on SHA256 or better.</remarks>
293293
</Docs>
294294
</Member>
295295
<Member MemberName="Psha1KeyDerivationDec2005">
@@ -310,7 +310,7 @@
310310
</ReturnValue>
311311
<Docs>
312312
<summary>Represents the December 2007 version of the P-SHA1 key generation algorithm. This field is constant.</summary>
313-
<remarks>To be added.</remarks>
313+
<remarks>Due to collision problems with SHA1, Microsoft recommends a security model based on SHA256 or better.</remarks>
314314
</Docs>
315315
</Member>
316316
<Member MemberName="Ripemd160Digest">
@@ -373,7 +373,7 @@
373373
</ReturnValue>
374374
<Docs>
375375
<summary>Specifies a URI that points to the RSA-SHA1 cryptographic algorithm for digitally signing XML. This field is constant.</summary>
376-
<remarks>To be added.</remarks>
376+
<remarks>Due to collision problems with SHA1, Microsoft recommends a security model based on SHA256 or better.</remarks>
377377
</Docs>
378378
</Member>
379379
<Member MemberName="RsaSha256Signature">
@@ -436,7 +436,7 @@
436436
</ReturnValue>
437437
<Docs>
438438
<summary>Specifies a URI that points to the 160-bit SHA-1 digest algorithm. This field is constant.</summary>
439-
<remarks>To be added.</remarks>
439+
<remarks>Due to collision problems with SHA1, Microsoft recommends a security model based on SHA256 or better.</remarks>
440440
</Docs>
441441
</Member>
442442
<Member MemberName="Sha256Digest">

xml/System.IdentityModel.Tokens/SymmetricSecurityKey.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@
8080
8181
## Remarks
8282
To specify P-SHA1 as the cryptographic algorithm, use the <xref:System.IdentityModel.Tokens.SecurityAlgorithms.Psha1KeyDerivation> field.
83+
84+
Due to collision problems with SHA1, Microsoft recommends a security model based on SHA256 or better.
8385
8486
]]></format>
8587
</remarks>

xml/System.IdentityModel.Tokens/X509AsymmetricSecurityKey.xml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,9 @@
162162
163163
## Remarks
164164
Use the <xref:System.Security.Cryptography.Xml.SignedXml.XmlDsigDSAUrl>, <xref:System.Security.Cryptography.Xml.EncryptedXml.XmlEncRSA15Url>, <xref:System.Security.Cryptography.Xml.EncryptedXml.XmlEncRSAOAEPUrl>, <xref:System.Security.Cryptography.Xml.SignedXml.XmlDsigRSASHA1Url> or <xref:System.IdentityModel.Tokens.SecurityAlgorithms.RsaSha256Signature> fields to specify the `algorithm` parameter.
165-
165+
166+
Due to collision problems with SHA1, Microsoft recommends a security model based on SHA256 or better.
167+
166168
]]></format>
167169
</remarks>
168170
<exception cref="T:System.NotSupportedException">
@@ -209,7 +211,9 @@
209211
210212
## Remarks
211213
Use the <xref:System.Security.Cryptography.Xml.SignedXml.XmlDsigDSAUrl>, <xref:System.Security.Cryptography.Xml.SignedXml.XmlDsigRSASHA1Url> or <xref:System.IdentityModel.Tokens.SecurityAlgorithms.RsaSha256Signature> fields to specify the `algorithm` parameter.
212-
214+
215+
Due to collision problems with SHA1, Microsoft recommends a security model based on SHA256 or better.
216+
213217
]]></format>
214218
</remarks>
215219
<exception cref="T:System.NotSupportedException">
@@ -289,7 +293,9 @@
289293
290294
## Remarks
291295
Use the <xref:System.Security.Cryptography.Xml.SignedXml.XmlDsigDSAUrl>, <xref:System.Security.Cryptography.Xml.SignedXml.XmlDsigRSASHA1Url> or <xref:System.IdentityModel.Tokens.SecurityAlgorithms.RsaSha256Signature> fields to specify the `algorithm` parameter.
292-
296+
297+
Due to collision problems with SHA1, Microsoft recommends a security model based on SHA256 or better.
298+
293299
]]></format>
294300
</remarks>
295301
<exception cref="T:System.NotSupportedException">The X.509 certificate specified in the constructor does not have a private key.
@@ -357,7 +363,7 @@
357363
<summary>Gets a value that indicates whether the specified algorithm uses asymmetric keys.</summary>
358364
<returns>
359365
<see langword="true" /> when the specified algorithm is <see cref="F:System.IdentityModel.Tokens.SecurityAlgorithms.DsaSha1Signature" />, <see cref="F:System.IdentityModel.Tokens.SecurityAlgorithms.RsaSha1Signature" />, <see cref="F:System.IdentityModel.Tokens.SecurityAlgorithms.RsaSha256Signature" />, <see cref="F:System.IdentityModel.Tokens.SecurityAlgorithms.RsaOaepKeyWrap" />, or <see cref="F:System.IdentityModel.Tokens.SecurityAlgorithms.RsaV15KeyWrap" />; otherwise, <see langword="false" />.</returns>
360-
<remarks>To be added.</remarks>
366+
<remarks>Due to collision problems with SHA1, Microsoft recommends a security model based on SHA256 or better.</remarks>
361367
</Docs>
362368
</Member>
363369
<Member MemberName="IsSupportedAlgorithm">
@@ -393,7 +399,9 @@
393399
- The `algorithm` parameter is <xref:System.Security.Cryptography.Xml.SignedXml.XmlDsigDSAUrl> and the public key for the X.509 certificate specified in the constructor is of type <xref:System.Security.Cryptography.DSA>.
394400
395401
- The `algorithm` parameter is <xref:System.Security.Cryptography.Xml.EncryptedXml.XmlEncRSA15Url>, <xref:System.Security.Cryptography.Xml.EncryptedXml.XmlEncRSAOAEPUrl>, <xref:System.Security.Cryptography.Xml.SignedXml.XmlDsigRSASHA1Url> or <xref:System.IdentityModel.Tokens.SecurityAlgorithms.RsaSha256Signature> and the public key for the X.509 certificate specified in the constructor is of type <xref:System.Security.Cryptography.RSA>.
396-
402+
403+
Due to collision problems with SHA1, Microsoft recommends a security model based on SHA256 or better.
404+
397405
]]></format>
398406
</remarks>
399407
</Docs>

xml/System.IdentityModel/RsaEncryptionCookieTransform.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,9 @@
228228
## Remarks
229229
SHA256 is the default algorithm. This may require a minimum platform of Windows Server 2003 and .NET 3.5 SP1.
230230
231-
If SHA256 is not supported, set the <xref:System.IdentityModel.RsaEncryptionCookieTransform.HashName%2A> property to "SHA1".
231+
If SHA256 is not supported, set the <xref:System.IdentityModel.RsaEncryptionCookieTransform.HashName%2A> property to "SHA1".
232+
233+
Due to collision problems with SHA1, Microsoft recommends SHA256 or better.
232234
233235
]]></format>
234236
</remarks>

0 commit comments

Comments
 (0)