-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Cryptographic exercises should highlight the existence of the secrets
module
#774
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
Comments
Said file ( |
@exercism/python, |
@m-a-ge I believe those are the only exercises using random for cryptography at this time, but I'm happy to be corrected. |
Ah, Ok then, I just wanted to make sure. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Python 3.6 introduced the
secrets
module, which provides cryptographically stronger randomness than therandom
module. Since this is only available in Python 3.6+,random
needs to be used in the example code in order maintain backwards compatibility.I think it's important that any exercise involving cryptography should highlight the existence of the
secrets
module in Python 3.6+ and explain why it is highly preferable torandom
for creating secure cryptography.During a discussion on PR #756, @m-a-ge suggested that this be raised as an issue, and that a HINTS.md drafted for cryptographic exercises. The suggested wording for the HINTS.md is given below and is based on the wording submitted by @kusti8.
Suggested wording:
The text was updated successfully, but these errors were encountered: