Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default hash and iteration count not mentioned the constructors of Rfc2898DeriveBytes Constructors #7829

Open
owlstead opened this issue Mar 15, 2022 · 3 comments
Labels
area-System.Security Issues related to security practices for .NET developers. help wanted Good for community contributors to help [up-for-grabs] Pri3 Indicates issues/PRs that are low priority
Milestone

Comments

@owlstead
Copy link

Currently the default hash algorithm (SHA-1) and iteration count (1000) are not mentioned. It is also not mentioned that requesting more bytes from Rfc2898DeriveBytes than the output size of the selected hash algorithm will have adverse affects on the performance of this algorithm as it will perform all the iterations again, while the adversary may not require those. There is also a slight bug that mentions in the exception that an iteration count < 1 will generate an error, even though the constructor doesn't have the iteration count as parameter. In short: please mention the defaults on top of the constructor description.

@PRMerger6 PRMerger6 added the Pri3 Indicates issues/PRs that are low priority label Mar 15, 2022
@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@rzikm rzikm added the area-System.Security Issues related to security practices for .NET developers. label Mar 17, 2022
@ghost
Copy link

ghost commented Mar 17, 2022

Tagging subscribers to this area: @dotnet/area-system-security, @vcsjones
See info in area-owners.md if you want to be subscribed.

Issue Details

Currently the default hash algorithm (SHA-1) and iteration count (1000) are not mentioned. It is also not mentioned that requesting more bytes from Rfc2898DeriveBytes than the output size of the selected hash algorithm will have adverse affects on the performance of this algorithm as it will perform all the iterations again, while the adversary may not require those. There is also a slight bug that mentions in the exception that an iteration count < 1 will generate an error, even though the constructor doesn't have the iteration count as parameter. In short: please mention the defaults on top of the constructor description.

Author: owlstead
Assignees: -
Labels:

area-System.Security, Pri3, :watch: Not Triaged

Milestone: -

@vcsjones
Copy link
Member

@owlstead I agree these should be better documented. Along these same lines, we intend on obsoleting the constructors that have defaults for iterations and the hash algorithm.

dotnet/runtime#57046

@jeffhandley jeffhandley added untriaged New issue has not been triaged by the area owner and removed ⌚ Not Triaged labels Apr 29, 2022
@jozkee jozkee added this to the Backlog milestone Jul 24, 2023
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Jul 24, 2023
@jozkee jozkee added untriaged New issue has not been triaged by the area owner help wanted Good for community contributors to help [up-for-grabs] labels Jul 24, 2023
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Security Issues related to security practices for .NET developers. help wanted Good for community contributors to help [up-for-grabs] Pri3 Indicates issues/PRs that are low priority
Projects
None yet
Development

No branches or pull requests

7 participants