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

Use RNGCryptoServiceProvider for crypto headers #538

Merged
merged 2 commits into from
Nov 21, 2020
Merged

Use RNGCryptoServiceProvider for crypto headers #538

merged 2 commits into from
Nov 21, 2020

Conversation

piksel
Copy link
Member

@piksel piksel commented Nov 10, 2020

Use a proper RNG for cryptographically important randomness.
Fixes #536

I certify that I own, and have sufficient rights to contribute, all source code and related material intended to be compiled or integrated with the source code for the SharpZipLib open source product (the "Contribution"). My Contribution is licensed under the MIT License.

@Numpsy
Copy link
Contributor

Numpsy commented Nov 10, 2020

Is it intentional that the RNGCryptoServiceProvider is disposed in two of those changes, but not the third?

@piksel
Copy link
Member Author

piksel commented Nov 10, 2020

Is it intentional that the RNGCryptoServiceProvider is disposed in two of those changes, but not the third?

Noope.

HowToDoThis added a commit to HowToDoThis/SharpZipLib that referenced this pull request Nov 21, 2020
@piksel piksel merged commit 7520a3f into master Nov 21, 2020
@piksel piksel deleted the fix/cwe-331 branch November 21, 2020 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Random() is not secure because it provides insufficient entropy. CWE ID 331.
2 participants