Skip to content

Commit 1192039

Browse files
tniessendanielleadams
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 96b7289 commit 1192039

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
@@ -5414,21 +5414,6 @@ and returned `'latin1'` encoded strings by default rather than `Buffer`s. This
54145414
default was changed after Node.js v0.8 to use [`Buffer`][] objects by default
54155415
instead.
54165416

5417-
### Recent ECDH changes
5418-
5419-
Usage of `ECDH` with non-dynamically generated key pairs has been simplified.
5420-
Now, [`ecdh.setPrivateKey()`][] can be called with a preselected private key
5421-
and the associated public point (key) will be computed and stored in the object.
5422-
This allows code to only store and provide the private part of the EC key pair.
5423-
[`ecdh.setPrivateKey()`][] now also validates that the private key is valid for
5424-
the selected curve.
5425-
5426-
The [`ecdh.setPublicKey()`][] method is now deprecated as its inclusion in the
5427-
API is not useful. Either a previously stored private key should be set, which
5428-
automatically generates the associated public key, or [`ecdh.generateKeys()`][]
5429-
should be called. The main drawback of using [`ecdh.setPublicKey()`][] is that
5430-
it can be used to put the ECDH key pair into an inconsistent state.
5431-
54325417
### Support for weak or compromised algorithms
54335418

54345419
The `crypto` module still supports some algorithms which are already
@@ -5971,7 +5956,6 @@ See the [list of SSL OP Flags][] for details.
59715956
[`diffieHellman.setPublicKey()`]: #diffiehellmansetpublickeypublickey-encoding
59725957
[`ecdh.generateKeys()`]: #ecdhgeneratekeysencoding-format
59735958
[`ecdh.setPrivateKey()`]: #ecdhsetprivatekeyprivatekey-encoding
5974-
[`ecdh.setPublicKey()`]: #ecdhsetpublickeypublickey-encoding
59755959
[`hash.digest()`]: #hashdigestencoding
59765960
[`hash.update()`]: #hashupdatedata-inputencoding
59775961
[`hmac.digest()`]: #hmacdigestencoding

0 commit comments

Comments
 (0)