-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
Add caveats section in the doc of crypto #3479
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
Changes from 1 commit
e4ef21e
875f6ab
3db5f4f
bbe1076
220a635
a152cd9
db5b6e2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Add description of user responsibility in the choice of cypto algorithms and its key length. Some of recommendations for the safer use are also described.
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -768,6 +768,25 @@ default, set the `crypto.DEFAULT_ENCODING` field to 'binary'. Note | |
| that new programs will probably expect buffers, so only use this as a | ||
| temporary measure. | ||
|
|
||
| ## Caveats | ||
|
|
||
| The crypto module still supports some algorithms which are already | ||
| compromised. And the API also allows to use ciphers and hashes with a | ||
| small key size that are consider to be weak for a safe use. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "... that are considered to be too weak for safe use." |
||
|
|
||
| Users should take full responsibility for selecting the crypto | ||
| algorithm and its key size according to their security requirements. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "algorithm and key size..." (remove |
||
|
|
||
| The following descriptions only show some of recommendations to use | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This sentence is a bit awkward. Should rework it a bit. |
||
| crypto module. See [NIST SP 800-131A] for details. | ||
|
|
||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps something like, "Based on the recommendations of [NIST SP 800-131A]:" instead? |
||
| - MD5 and SHA-1 are no longer acceptable where collision resistance is | ||
| required such as digital signatures. | ||
| - The key size of RSA, DSA and DH is recommended to use more than 2048 | ||
| bits and that of the curve of ECDSA and ECDH is more than 224 bits to | ||
| be safe to use for several years. | ||
| - The DH groups of `modp1`, `modp2` and `modp5` have a small key size | ||
| less than 2048 bits so they are not recommended. | ||
|
|
||
| [createCipher()]: #crypto_crypto_createcipher_algorithm_password | ||
| [createCipheriv()]: #crypto_crypto_createcipheriv_algorithm_key_iv | ||
|
|
@@ -779,3 +798,4 @@ temporary measure. | |
| [RFC 3526]: http://www.rfc-editor.org/rfc/rfc3526.txt | ||
| [crypto.pbkdf2]: #crypto_crypto_pbkdf2_password_salt_iterations_keylen_digest_callback | ||
| [EVP_BytesToKey]: https://www.openssl.org/docs/crypto/EVP_BytesToKey.html | ||
| [NIST SP 800-131A]: http://csrc.nist.gov/publications/nistpubs/800-131A/sp800-131A.pdf | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"And the API also allows the use of ciphers and hashes with a" (replace
towiththe)