-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
Pri3Indicates issues/PRs that are low priorityIndicates issues/PRs that are low priorityarea-System.SecurityIssues related to security practices for .NET developers.Issues related to security practices for .NET developers.untriagedNew issue has not been triaged by the area ownerNew issue has not been triaged by the area owner
Description
We have a number of examples for using these symmetric ciphers that I think either need to be significantly improved, or removed.
- They demonstrate incorrect use of
CryptoStream
. Ex:dotnet-api-docs/snippets/csharp/System.Security.Cryptography/DES/Create/memoryexample.cs
Line 99 in 13d97c7
csDecrypt.Read(fromEncrypt, 0, fromEncrypt.Length); - They are incomplete examples. They, for example, do not demonstrate proper nonce management, they do not demonstrate proper authentication (authentication in cryptographic terms). It would be rather hard to demonstrate how to do these things properly in short examples, and nor do I think it's something that should be in API documentation.
The CryptoStream
issue doesn't apply to Aes
because we don't have that example for Aes
, but we do have them for the other symmetric ciphers.
If we want to keep the examples, then they need to be re-written to 1. be correct 2. use modern APIs and 3. be heavily caveated that they are incomplete examples and do not demonstrate safe examples of using symmetric encryption.
Metadata
Metadata
Assignees
Labels
Pri3Indicates issues/PRs that are low priorityIndicates issues/PRs that are low priorityarea-System.SecurityIssues related to security practices for .NET developers.Issues related to security practices for .NET developers.untriagedNew issue has not been triaged by the area ownerNew issue has not been triaged by the area owner