Skip to content

Commit 9f77692

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 2c566a9 commit 9f77692

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

doc/api/crypto.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5399,21 +5399,6 @@ and returned `'latin1'` encoded strings by default rather than `Buffer`s. This
53995399
default was changed after Node.js v0.8 to use [`Buffer`][] objects by default
54005400
instead.
54015401

5402-
### Recent ECDH changes
5403-
5404-
Usage of `ECDH` with non-dynamically generated key pairs has been simplified.
5405-
Now, [`ecdh.setPrivateKey()`][] can be called with a preselected private key
5406-
and the associated public point (key) will be computed and stored in the object.
5407-
This allows code to only store and provide the private part of the EC key pair.
5408-
[`ecdh.setPrivateKey()`][] now also validates that the private key is valid for
5409-
the selected curve.
5410-
5411-
The [`ecdh.setPublicKey()`][] method is now deprecated as its inclusion in the
5412-
API is not useful. Either a previously stored private key should be set, which
5413-
automatically generates the associated public key, or [`ecdh.generateKeys()`][]
5414-
should be called. The main drawback of using [`ecdh.setPublicKey()`][] is that
5415-
it can be used to put the ECDH key pair into an inconsistent state.
5416-
54175402
### Support for weak or compromised algorithms
54185403

54195404
The `crypto` module still supports some algorithms which are already
@@ -5956,7 +5941,6 @@ See the [list of SSL OP Flags][] for details.
59565941
[`diffieHellman.setPublicKey()`]: #diffiehellmansetpublickeypublickey-encoding
59575942
[`ecdh.generateKeys()`]: #ecdhgeneratekeysencoding-format
59585943
[`ecdh.setPrivateKey()`]: #ecdhsetprivatekeyprivatekey-encoding
5959-
[`ecdh.setPublicKey()`]: #ecdhsetpublickeypublickey-encoding
59605944
[`hash.digest()`]: #hashdigestencoding
59615945
[`hash.update()`]: #hashupdatedata-inputencoding
59625946
[`hmac.digest()`]: #hmacdigestencoding

0 commit comments

Comments
 (0)