Skip to content

Commit 257c5b6

Browse files
tniessenruyadorno
authored andcommitted
doc: remove section on "recent" ECDH changes
The ECDH API changes were made more than six years ago and this section is not helpful for new applications. The behavior of the ECDH APIs should be explained in the relevant sections, not in a note. Refs: #3511 PR-URL: #41773 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
1 parent 28b95a5 commit 257c5b6

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

doc/api/crypto.md

-16
Original file line numberDiff line numberDiff line change
@@ -5454,21 +5454,6 @@ and returned `'latin1'` encoded strings by default rather than `Buffer`s. This
54545454
default was changed after Node.js v0.8 to use [`Buffer`][] objects by default
54555455
instead.
54565456

5457-
### Recent ECDH changes
5458-
5459-
Usage of `ECDH` with non-dynamically generated key pairs has been simplified.
5460-
Now, [`ecdh.setPrivateKey()`][] can be called with a preselected private key
5461-
and the associated public point (key) will be computed and stored in the object.
5462-
This allows code to only store and provide the private part of the EC key pair.
5463-
[`ecdh.setPrivateKey()`][] now also validates that the private key is valid for
5464-
the selected curve.
5465-
5466-
The [`ecdh.setPublicKey()`][] method is now deprecated as its inclusion in the
5467-
API is not useful. Either a previously stored private key should be set, which
5468-
automatically generates the associated public key, or [`ecdh.generateKeys()`][]
5469-
should be called. The main drawback of using [`ecdh.setPublicKey()`][] is that
5470-
it can be used to put the ECDH key pair into an inconsistent state.
5471-
54725457
### Support for weak or compromised algorithms
54735458

54745459
The `crypto` module still supports some algorithms which are already
@@ -6018,7 +6003,6 @@ See the [list of SSL OP Flags][] for details.
60186003
[`diffieHellman.setPublicKey()`]: #diffiehellmansetpublickeypublickey-encoding
60196004
[`ecdh.generateKeys()`]: #ecdhgeneratekeysencoding-format
60206005
[`ecdh.setPrivateKey()`]: #ecdhsetprivatekeyprivatekey-encoding
6021-
[`ecdh.setPublicKey()`]: #ecdhsetpublickeypublickey-encoding
60226006
[`hash.digest()`]: #hashdigestencoding
60236007
[`hash.update()`]: #hashupdatedata-inputencoding
60246008
[`hmac.digest()`]: #hmacdigestencoding

0 commit comments

Comments
 (0)