Skip to content

Commit db5b6e2

Browse files
author
Shigeki Ohtsu
committed
revise the doc according to 2nd jasnell's comments
1 parent a152cd9 commit db5b6e2

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

doc/api/crypto.markdown

+9-8
Original file line numberDiff line numberDiff line change
@@ -516,10 +516,10 @@ supported groups are: `'modp1'`, `'modp2'`, `'modp5'` (defined in
516516
`'modp15'`, `'modp16'`, `'modp17'`, `'modp18'` (defined in
517517
[RFC 3526][]). The returned object mimics the interface of objects
518518
created by [crypto.createDiffieHellman()][] above, but will not allow
519-
to change the keys (with [diffieHellman.setPublicKey()][] for
520-
example). The advantage of using this routine is that the parties do
521-
not have to generate nor exchange group modulus beforehand, saving
522-
both processor and communication time.
519+
changing the keys (with [diffieHellman.setPublicKey()][] for example).
520+
The advantage of using this routine is that the parties do not have to
521+
generate nor exchange group modulus beforehand, saving both processor
522+
and communication time.
523523

524524
Example (obtaining a shared secret):
525525

@@ -771,14 +771,13 @@ temporary measure.
771771
## Caveats
772772

773773
The crypto module still supports some algorithms which are already
774-
compromised. And the API also allows to use ciphers and hashes with a
775-
small key size that are considered to be too weak for safe use.
774+
compromised. And the API also allows the use of ciphers and hashes
775+
with a small key size that are considered to be too weak for safe use.
776776

777777
Users should take full responsibility for selecting the crypto
778778
algorithm and key size according to their security requirements.
779779

780-
The following descriptions only show some recommendations to use
781-
crypto module. See [NIST SP 800-131A] for details.
780+
Based on the recommendations of [NIST SP 800-131A]:
782781

783782
- MD5 and SHA-1 are no longer acceptable where collision resistance is
784783
required such as digital signatures.
@@ -788,6 +787,8 @@ crypto module. See [NIST SP 800-131A] for details.
788787
- The DH groups of `modp1`, `modp2` and `modp5` have a key size
789788
smaller than 2048 bits and are not recommended.
790789

790+
See the reference for other recommendations and details.
791+
791792
[createCipher()]: #crypto_crypto_createcipher_algorithm_password
792793
[createCipheriv()]: #crypto_crypto_createcipheriv_algorithm_key_iv
793794
[getCurves()]: #crypto_crypto_getcurves

0 commit comments

Comments
 (0)