summaryrefslogtreecommitdiff
path: root/doc/api/crypto.md
AgeCommit message (Collapse)Author
2019-11-28crypto: forbid setting the PBKDF2 iter count to 0Tobias Nießen
RFC 2898 does not permit an iteration count of zero, and OpenSSL 1.1.1 will treat it as one iteration internally. Future OpenSSL versions will reject such inputs (already on master branch), but until that happens, Node.js should manually reject them. Refs: https://github.com/nodejs/webcrypto/pull/29 PR-URL: https://github.com/nodejs/node/pull/30578 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-11-20crypto: add support for IEEE-P1363 DSA signaturesTobias Nießen
PR-URL: https://github.com/nodejs/node/pull/29292 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-11-052019-11-05, Version 13.1.0 (Current)Michaël Zasso
Notable changes: * cli: * Added a new flag (`--trace-uncaught`) that makes Node.js print the stack trace at the time of throwing uncaught exceptions, rather than at the creation of the `Error` object, if there is any. This is disabled by default because it affects GC behavior. https://github.com/nodejs/node/pull/30025 * crypto * Added `Hash.prototype.copy()` method. It returns a new `Hash` object with its internal state cloned from the original one. https://github.com/nodejs/node/pull/29910 * dgram * Added source-specific multicast support. This adds methods to Datagram sockets to support RFC 4607 (https://tools.ietf.org/html/rfc4607) for IPv4 and IPv6. https://github.com/nodejs/node/pull/15735 * fs * Added a `bufferSize` option to `fs.opendir()`. It allows to control the number of entries that are buffered internally when reading from the directory. https://github.com/nodejs/node/pull/30114 * meta * Added Chengzhong Wu (https://github.com/legendecas) to collaborators. https://github.com/nodejs/node/pull/30115 PR-URL: https://github.com/nodejs/node/pull/30262
2019-10-26doc: remove "it is important to" phrasingRich Trott
Instead of telling someone "It is important to do X", just tell them to "Do X." PR-URL: https://github.com/nodejs/node/pull/30108 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-10-26doc: remove dashesRich Trott
The use of dashes -- in general, but especially in our docs -- can be problematic. It is used inconsistently and there is always another form of punctuation that is as good or better for the situation. In an effort to reduce the number of variations we use to display the same types of information, remove the various uses of dashes from the documentation. PR-URL: https://github.com/nodejs/node/pull/30101 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-10-18doc: make YAML matter consistent in crypto.mdRich Trott
This fixes YAML that gets incorrectly processed by our tooling. Refs: https://github.com/nodejs/node/pull/29910#issuecomment-543237767 PR-URL: https://github.com/nodejs/node/pull/30016 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2019-10-16crypto: add Hash.prototype.copy() methodBen Noordhuis
Make it possible to clone the internal state of a Hash object into a new Hash object, i.e., to fork the state of the object. Fixes: https://github.com/nodejs/node/issues/29903 PR-URL: https://github.com/nodejs/node/pull/29910 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-10-15doc: re-enable passing remark-lint ruleNick Schonning
PR-URL: https://github.com/nodejs/node/pull/29961 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2019-10-10doc: escape brackets not used as markdown reference linksNick Schonning
These can turn into links if reference links are added to the document PR-URL: https://github.com/nodejs/node/pull/29809 Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-10-03doc: add explicit bracket for markdown reference linksNick Schonning
Use explicit trailing `[]` for reference markdown links to prevent implicit links when references are added to documents. PR-URL: https://github.com/nodejs/node/pull/29808 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-10-03doc: fix return type for crypto.createDiffieHellmanGroup()exoego
PR-URL: https://github.com/nodejs/node/pull/29696 Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-09-27doc: add KeyObject to type for crypto.createDecipheriv() argumentexoego
PR-URL: https://github.com/nodejs/node/pull/29689 Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-09-262019-09-24, Version 12.11.0 (Current)Ruben Bridgewater
Notable changes: * crypto: * Add `oaepLabel` option https://github.com/nodejs/node/pull/29489 * deps: * Update V8 to 7.7.299.11 https://github.com/nodejs/node/pull/28918 * More efficient memory handling * Stack trace serialization got faster * The `Intl.NumberFormat` API gained new functionality * For more information: https://v8.dev/blog/v8-release-77 * events: * Add support for `EventTarget` in `once` https://github.com/nodejs/node/pull/29498 * fs: * Expose memory file mapping flag `UV_FS_O_FILEMAP` https://github.com/nodejs/node/pull/29260 * inspector: * New API - `Session.connectToMainThread` https://github.com/nodejs/node/pull/28870 * process: * Initial SourceMap support via `env.NODE_V8_COVERAGE` https://github.com/nodejs/node/pull/28960 * stream: * Make `_write()` optional when `_writev()` is implemented https://github.com/nodejs/node/pull/29639 * tls: * Add option to override signature algorithms https://github.com/nodejs/node/pull/29598 * util: * Add `encodeInto` to `TextEncoder` https://github.com/nodejs/node/pull/29524 * worker: * The `worker_thread` module is now stable https://github.com/nodejs/node/pull/29512 PR-URL: https://github.com/nodejs/node/pull/29695
2019-09-24doc: document that iv may be null when using createCipheriv()Ruben Bridgewater
This adds `null` to the supported types of the `iv` option when using `crypto.createCipheriv()`. PR-URL: https://github.com/nodejs/node/pull/29684 Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-09-16doc: use consistent unordered list styleNick Schonning
Convert to asterisks when there are mixed styles in document. Addresses Markdownlint MD004 rule PR-URL: https://github.com/nodejs/node/pull/29516 Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-09-13crypto: add oaepLabel optionTobias Nießen
The label acts as the "L" input to the RSA-OAEP algorithm. PR-URL: https://github.com/nodejs/node/pull/29489 Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-09-09doc: space around listsNick Schonning
Address markdownlint rule MD032. Flagged a few mixed list styles. PR-URL: https://github.com/nodejs/node/pull/29467 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-08-31doc: add blanks around code fencesNick Schonning
Addresses Markdownlint MD031 rule warnings PR-URL: https://github.com/nodejs/node/pull/29366 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: David Carlier <devnexen@gmail.com>
2019-08-29doc,crypto: add extends for derived classesKamat, Trivikram
PR-URL: https://github.com/nodejs/node/pull/29302 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-08-202019-08-20, Version 12.9.0 (Current)Michaël Zasso
Notable changes: * crypto: * Added an oaepHash option to asymmetric encryption which allows users to specify a hash function when using OAEP padding. https://github.com/nodejs/node/pull/28335 * deps: * Updated V8 to 7.6.303.29. https://github.com/nodejs/node/pull/28955 * Improves the performance of various APIs such as `JSON.parse` and methods called on frozen arrays. * Adds the Promise.allSettled method. * Improves support of `BigInt` in `Intl` methods. * For more information: https://v8.dev/blog/v8-release-76 * Updated libuv to 1.31.0. https://github.com/nodejs/node/pull/29070 * `UV_FS_O_FILEMAP` has been added for faster access to memory mapped files on Windows. * `uv_fs_mkdir()` now returns `UV_EINVAL` for invalid filenames on Windows. It previously returned `UV_ENOENT`. * The `uv_fs_statfs()` API has been added. * The `uv_os_environ()` and `uv_os_free_environ()` APIs have been added. * fs: * Added `fs.writev`, `fs.writevSync` and `filehandle.writev` (promise version) methods. They allow to write an array of `ArrayBufferView`s to a file descriptor. https://github.com/nodejs/node/pull/25925 https://github.com/nodejs/node/pull/29186 * http: * Added three properties to `OutgoingMessage.prototype`: `writableObjectMode`, `writableLength` and `writableHighWaterMark` https://github.com/nodejs/node/pull/29018 * stream: * Added an new property `readableEnded` to readable streams. Its value is set to `true` when the `'end'` event is emitted. https://github.com/nodejs/node/pull/28814 * Added an new property `writableEnded` to writable streams. Its value is set to `true` after `writable.end()` has been called. https://github.com/nodejs/node/pull/28934 PR-URL: https://github.com/nodejs/node/pull/29210
2019-08-07crypto: extend RSA-OAEP support with oaepHashTobias Nießen
This adds an oaepHash option to asymmetric encryption which allows users to specify a hash function when using OAEP padding. This feature is required for interoperability with WebCrypto applications. PR-URL: https://github.com/nodejs/node/pull/28335 Fixes: https://github.com/nodejs/node/issues/25756 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2019-08-072019-08-06, Version 12.8.0 (Current)Ruben Bridgewater
Notable changes: * assert: * Legacy mode deprecation (`DEP0089`) is revoked (Colin Ihrig) https://github.com/nodejs/node/pull/28892 * crypto: * The `outputLength` option is added to `crypto.createHash` (Tobias Nießen) https://github.com/nodejs/node/pull/28805 * The `maxmem` range is increased from 32 to 53 bits (Tobias Nießen) https://github.com/nodejs/node/pull/28799 * n-api: * Added APIs for per-instance state management (Gabriel Schulhof) https://github.com/nodejs/node/pull/28682 * report: * Network interfaces get included in the report (cjihrig) https://github.com/nodejs/node/pull/28911 * src: * `v8.getHeapCodeStatistics()` is now exported (Yuriy Vasiyarov) https://github.com/nodejs/node/pull/27978 PR-URL: https://github.com/nodejs/node/pull/29017
2019-07-25crypto: add outputLength option to crypto.createHashTobias Nießen
This change adds an outputLength option to crypto.createHash which allows users to produce variable-length hash values using XOF hash functons. Fixes: https://github.com/nodejs/node/issues/28757 PR-URL: https://github.com/nodejs/node/pull/28805 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-23crypto: increase maxmem range from 32 to 53 bitsTobias Nießen
Fixes: https://github.com/nodejs/node/issues/28755 PR-URL: https://github.com/nodejs/node/pull/28799 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-14doc: add documentation for createDiffieHellmanGroupOjasvi Monga
PR-URL: https://github.com/nodejs/node/pull/28585 Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-12doc: relax requirements for setAAD in CCM modeTobias Nießen
This was fixed in OpenSSL 1.1.1c (openssl/openssl@b48e3be947). The authentication tag can now be specified after setAAD was called, matching the behavior of the other supported AEAD modes (GCM, OCB). Refs: https://github.com/openssl/openssl/pull/7243 PR-URL: https://github.com/nodejs/node/pull/28624 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-23doc: remove "note that" from crypto.mdRich Trott
Refs: https://github.com/nodejs/remark-preset-lint-node/pull/16 PR-URL: https://github.com/nodejs/node/pull/28329 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-08doc: clarify weak keys textRich Trott
Describe small key sizes as "too weak for safe use" rather than "considered to be too weak for safe use". PR-URL: https://github.com/nodejs/node/pull/28090 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-05-06doc: improve CCM exampleTobias Nießen
Applications should never attempt to use the deciphered message if authentication fails. In reality, this is usually not a problem since OpenSSL does not disclose the plaintext in this case, but it is still a design mistake and can lead to critical security problems in other cipher modes and implementations. PR-URL: https://github.com/nodejs/node/pull/27396 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-04-232019-04-23, Version 12.0.0 (Current)Beth Griggs
Notable changes: * assert: * validate required arguments (Ruben Bridgewater) [#26641](https://github.com/nodejs/node/pull/26641) * adjust loose assertions (Ruben Bridgewater) [#25008](https://github.com/nodejs/node/pull/25008) * async_hooks: * remove deprecated `emitBefore` and `emitAfter` (Matteo Collina) [#26530](https://github.com/nodejs/node/pull/26530) * remove promise object from resource (Andreas Madsen) [#23443](https://github.com/nodejs/node/pull/23443) * bootstrap: make Buffer and process non-enumerable (Ruben Bridgewater) [#24874](https://github.com/nodejs/node/pull/24874) * buffer: * use stricter range checks (Ruben Bridgewater) [#27045](https://github.com/nodejs/node/pull/27045) * harden `SlowBuffer` creation (ZYSzys) [#26272](https://github.com/nodejs/node/pull/26272) * harden validation of buffer allocation size (ZYSzys) [#26162](https://github.com/nodejs/node/pull/26162) * do proper error propagation in addon methods (Anna Henningsen) [#23939](https://github.com/nodejs/node/pull/23939) * child_process: * remove `options.customFds` (cjihrig) [#25279](https://github.com/nodejs/node/pull/25279) * harden fork arguments validation (ZYSzys) [#27039](https://github.com/nodejs/node/pull/27039) * use non-infinite `maxBuffer` defaults (kohta ito) [#23027](https://github.com/nodejs/node/pull/23027) * console: * don't use ANSI escape codes when `TERM=dumb` (Vladislav Kaminsky) [#26261](https://github.com/nodejs/node/pull/26261) * crypto: * remove legacy native handles (Tobias Nießen) [#27011](https://github.com/nodejs/node/pull/27011) * decode missing passphrase errors (Tobias Nießen) [#25208](https://github.com/nodejs/node/pull/25208) * remove `Cipher.setAuthTag()` and `Decipher.getAuthTag()` (Tobias Nießen) [#26249](https://github.com/nodejs/node/pull/26249) * remove deprecated `crypto._toBuf()` (Tobias Nießen) [#25338](https://github.com/nodejs/node/pull/25338) * set `DEFAULT\_ENCODING` property to non-enumerable (Antoine du Hamel) [#23222](https://github.com/nodejs/node/pull/23222) * deps: * update V8 to 7.4.288.13 (Michaël Zasso, cjihrig, Refael Ackermann) (Anna Henningsen, Ujjwal Sharma) [#26685](https://github.com/nodejs/node/pull/26685) * bump minimum icu version to 63 (Ujjwal Sharma) [#25852](https://github.com/nodejs/node/pull/25852) * update OpenSSL to 1.1.1b (Sam Roberts, Shigeki Ohtsu) [#26327](https://github.com/nodejs/node/pull/26327) * errors: * update error name (Ruben Bridgewater) [#26738](https://github.com/nodejs/node/pull/26738) * fs: * use proper .destroy() implementation for SyncWriteStream (Matteo Collina) [#26690](https://github.com/nodejs/node/pull/26690) * improve mode validation (Ruben Bridgewater) [#26575](https://github.com/nodejs/node/pull/26575) * harden validation of start option in `createWriteStream()` (ZYSzys) [#25579](https://github.com/nodejs/node/pull/25579) * make writeFile consistent with readFile wrt fd (Sakthipriyan Vairamani (thefourtheye)) [#23709](https://github.com/nodejs/node/pull/23709) * http: * validate timeout in `ClientRequest()` (cjihrig) [#26214](https://github.com/nodejs/node/pull/26214) * return HTTP 431 on `HPE_HEADER_OVERFLOW` error (Albert Still) [#25605](https://github.com/nodejs/node/pull/25605) * switch default parser to llhttp (Anna Henningsen) [#24870](https://github.com/nodejs/node/pull/24870) * Runtime-deprecate `outgoingMessage._headers` and `outgoingMessage._headerNames` (Morgan Roderick) [#24167](https://github.com/nodejs/node/pull/24167) * lib: * remove `Atomics.wake()` (Gus Caplan) [#27033](https://github.com/nodejs/node/pull/27033) * move DTRACE\_\* probes out of global scope (James M Snell) [#26541](https://github.com/nodejs/node/pull/26541) * deprecate `_stream_wrap` (Sam Roberts) [#26245](https://github.com/nodejs/node/pull/26245) * use ES6 class inheritance style (Ruben Bridgewater) [#24755](https://github.com/nodejs/node/pull/24755) * module: * remove unintended access to deps/ (Anna Henningsen) [#25138](https://github.com/nodejs/node/pull/25138) * improve error message for MODULE\_NOT\_FOUND (Ali Ijaz Sheikh) [#25690](https://github.com/nodejs/node/pull/25690) * requireStack property for MODULE\_NOT\_FOUND (Ali Ijaz Sheikh) [#25690](https://github.com/nodejs/node/pull/25690) * remove dead code (Ruben Bridgewater) [#26983](https://github.com/nodejs/node/pull/26983) * make `require('.')` never resolve outside the current directory (Ruben Bridgewater) [#26973](https://github.com/nodejs/node/pull/26973) * throw an error for invalid package.json main entries (Ruben Bridgewater) [#26823](https://github.com/nodejs/node/pull/26823) * don't search in `require.resolve.paths` (cjihrig) [#23683](https://github.com/nodejs/node/pull/23683) * net: * remove `Server.listenFD()` (cjihrig) [#27127](https://github.com/nodejs/node/pull/27127) * do not add `.host` and `.port` properties to DNS error (Ruben Bridgewater) [#26751](https://github.com/nodejs/node/pull/26751) * emit "write after end" errors in the next tick (Ouyang Yadong) [#24457](https://github.com/nodejs/node/pull/24457) * deprecate `_setSimultaneousAccepts()` undocumented function (James M Snell) [#23760](https://github.com/nodejs/node/pull/23760) * os: * implement `os.type()` using `uv_os_uname()` (cjihrig) [#25659](https://github.com/nodejs/node/pull/25659) * remove `os.getNetworkInterfaces()` (cjihrig) [#25280](https://github.com/nodejs/node/pull/25280) * process: * make global.process, global.Buffer getters (Guy Bedford) [#26882](https://github.com/nodejs/node/pull/26882) * move DEP0062 (node --debug) to end-of-life (Joyee Cheung) [#25828](https://github.com/nodejs/node/pull/25828) * exit on --debug and --debug-brk after option parsing (Joyee Cheung) [#25828](https://github.com/nodejs/node/pull/25828) * improve `--redirect-warnings` handling (Ruben Bridgewater) [#24965](https://github.com/nodejs/node/pull/24965) * readline: * support TERM=dumb (Vladislav Kaminsky) [#26261](https://github.com/nodejs/node/pull/26261) * repl: * add welcome message (gengjiawen) [#25947](https://github.com/nodejs/node/pull/25947) * fix terminal default setting (Ruben Bridgewater) [#26518](https://github.com/nodejs/node/pull/26518) * check colors with `.getColorDepth()` (Vladislav Kaminsky) [#26261](https://github.com/nodejs/node/pull/26261) * deprecate REPLServer.rli (Ruben Bridgewater) [#26260](https://github.com/nodejs/node/pull/26260) * src: * remove unused `INT_MAX` constant (Sam Roberts) [#27078](https://github.com/nodejs/node/pull/27078) * update `NODE_MODULE_VERSION` to 72 (Ujjwal Sharma) [#26685](https://github.com/nodejs/node/pull/26685) * remove `AddPromiseHook()` (Anna Henningsen) [#26574](https://github.com/nodejs/node/pull/26574) * clean up `MultiIsolatePlatform` interface (Anna Henningsen) [#26384](https://github.com/nodejs/node/pull/26384) * properly configure default heap limits (Ali Ijaz Sheikh) [#25576](https://github.com/nodejs/node/pull/25576) * remove `icuDataDir` from node config (GauthamBanasandra) [#24780](https://github.com/nodejs/node/pull/24780) * tls: * support TLSv1.3 (Sam Roberts) [#26209](https://github.com/nodejs/node/pull/26209) * return correct version from `getCipher()` (Sam Roberts) [#26625](https://github.com/nodejs/node/pull/26625) * check arg types of renegotiate() (Sam Roberts) [#25876](https://github.com/nodejs/node/pull/25876) * add code for `ERR_TLS_INVALID_PROTOCOL_METHOD` (Sam Roberts) [#24729](https://github.com/nodejs/node/pull/24729) * emit a warning when servername is an IP address (Rodger Combs) [#23329](https://github.com/nodejs/node/pull/23329) * disable TLS v1.0 and v1.1 by default (Ben Noordhuis) [#23814](https://github.com/nodejs/node/pull/23814) * remove unused arg to createSecureContext() (Sam Roberts) [#24241](https://github.com/nodejs/node/pull/24241) * deprecate `Server.prototype.setOptions()` (cjihrig) [#23820](https://github.com/nodejs/node/pull/23820) * load `NODE_EXTRA_CA_CERTS` at startup (Ouyang Yadong) [#23354](https://github.com/nodejs/node/pull/23354) * util: * remove `util.print()`, `util.puts()`, `util.debug()` and `util.error()` (cjihrig) [#25377](https://github.com/nodejs/node/pull/25377) * change inspect compact and breakLength default (Ruben Bridgewater) [#27109](https://github.com/nodejs/node/pull/27109) * improve inspect edge cases (Ruben Bridgewater) [#27109](https://github.com/nodejs/node/pull/27109) * only the first line of the error message (Simon Zünd) [#26685](https://github.com/nodejs/node/pull/26685) * don't set the prototype of callbackified functions (Ruben Bridgewater) [#26893](https://github.com/nodejs/node/pull/26893) * rename callbackified function (Ruben Bridgewater) [#26893](https://github.com/nodejs/node/pull/26893) * increase function length when using `callbackify()` (Ruben Bridgewater) [#26893](https://github.com/nodejs/node/pull/26893) * prevent tampering with internals in `inspect()` (Ruben Bridgewater) [#26577](https://github.com/nodejs/node/pull/26577) * prevent Proxy traps being triggered by `.inspect()` (Ruben Bridgewater) [#26241](https://github.com/nodejs/node/pull/26241) * prevent leaking internal properties (Ruben Bridgewater) [#24971](https://github.com/nodejs/node/pull/24971) * protect against monkeypatched Object prototype for inspect() (Rich Trott) [#25953](https://github.com/nodejs/node/pull/25953) * treat format arguments equally (Roman Reiss) [#23162](https://github.com/nodejs/node/pull/23162) * win, fs: * detect if symlink target is a directory (Bartosz Sosnowski) [#23724](https://github.com/nodejs/node/pull/23724) * zlib: * throw TypeError if callback is missing (Anna Henningsen) [#24929](https://github.com/nodejs/node/pull/24929) * make “bare” constants un-enumerable (Anna Henningsen) [#24824](https://github.com/nodejs/node/pull/24824) PR-URL: https://github.com/nodejs/node/pull/26930
2019-04-08crypto: add support for RSA-PSS keysTobias Nießen
This commit adds support for RSA-PSS keys, including - KeyObjects of type rsa-pss, - key pair generation for RSA-PSS, and - signing and verification using RSA-PSS keys. PR-URL: https://github.com/nodejs/node/pull/26960 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2019-04-04crypto: fail early if passphrase is too longTobias Nießen
This causes OpenSSL to fail early if the decryption passphrase is too long, and produces a somewhat helpful error message. PR-URL: https://github.com/nodejs/node/pull/27010 Refs: https://github.com/nodejs/node/pull/25208 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2019-04-01crypto: don't crash on unknown asymmetricKeyTypeFilip Skokan
PR-URL: https://github.com/nodejs/node/pull/26786 Fixes: https://github.com/nodejs/node/issues/26775 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2019-03-28crypto: add crypto.sign() and crypto.verify()Brian White
These methods are added primarily to allow signing and verifying using Ed25519 and Ed448 keys, which do not support streaming of input data. However, any key type can be used with these new APIs, to allow better performance when only signing/verifying a single chunk. Fixes: https://github.com/nodejs/node/issues/26320 PR-URL: https://github.com/nodejs/node/pull/26611 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2019-03-282019-03-28, Version 11.13.0 (Current)Michaël Zasso
Notable changes: * crypto * Allow deriving public from private keys (Tobias Nießen) [#26278](https://github.com/nodejs/node/pull/26278). * events * Added a `once` function to use `EventEmitter` with promises (Matteo Collina) [#26078](https://github.com/nodejs/node/pull/26078). * tty * Added a `hasColors` method to `WriteStream` (Ruben Bridgewater) [#26247](https://github.com/nodejs/node/pull/26247). * Added NO_COLOR and FORCE_COLOR support (Ruben Bridgewater) [#26485](https://github.com/nodejs/node/pull/26485). * v8 * Added `v8.getHeapSnapshot` and `v8.writeHeapSnapshot` to generate snapshots in the format used by tools such as Chrome DevTools (James M Snell) [#26501](https://github.com/nodejs/node/pull/26501). * worker * Added `worker.moveMessagePortToContext`. This enables using MessagePorts in different vm.Contexts, aiding with the isolation that the vm module seeks to provide (Anna Henningsen) [#26497](https://github.com/nodejs/node/pull/26497). * C++ API * `AddPromiseHook` is now deprecated. This API was added to fill an use case that is served by `async_hooks`, since that has `Promise` support (Anna Henningsen) [#26529](https://github.com/nodejs/node/pull/26529). * Added a `Stop` API to shut down Node.js while it is running (Gireesh Punathil) [#21283](https://github.com/nodejs/node/pull/21283). * meta * [Gireesh Punathil](https://github.com/gireeshpunathil) is now a member of the Technical Steering Committee [#26657](https://github.com/nodejs/node/pull/26657). * Added [Yongsheng Zhang](https://github.com/ZYSzys) to collaborators [#26730](https://github.com/nodejs/node/pull/26730). PR-URL: https://github.com/nodejs/node/pull/26949
2019-03-25crypto: add support for x25119 and x448 KeyObjectsFilip Skokan
PR-URL: https://github.com/nodejs/node/pull/26774 Refs: https://github.com/nodejs/node/issues/26626 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-03-18crypto: add support for EdDSA key pair generationTobias Nießen
PR-URL: https://github.com/nodejs/node/pull/26554 Refs: https://github.com/nodejs/node/pull/26319 Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2019-03-17crypto: expose KeyObject classFilip Skokan
PR-URL: https://github.com/nodejs/node/pull/26438 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2019-03-15Revert "crypto: add KeyObject.asymmetricKeySize"Tobias Nießen
This reverts commit 4895927a0a4372e0699f84657e0a299393a3d281. PR-URL: https://github.com/nodejs/node/pull/26636 Fixes: https://github.com/nodejs/node/issues/26631 Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-03-12crypto: fix EdDSA support for KeyObjectBrian White
PR-URL: https://github.com/nodejs/node/pull/26319 Fixes: https://github.com/nodejs/node/issues/26316 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
2019-03-07crypto: add KeyObject.asymmetricKeySizePatrick Gansterer
Expose the size of asymetric keys of crypto key object from the crypto module added in v11.6.0. PR-URL: https://github.com/nodejs/node/pull/26387 Refs: https://github.com/nodejs/node/pull/24234 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-03-05crypto: allow deriving public from private keysTobias Nießen
This change allows passing private key objects to crypto.createPublicKey, resulting in a key object that represents a valid public key for the given private key. The returned public key object can be used and exported safely without revealing information about the private key. PR-URL: https://github.com/nodejs/node/pull/26278 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2019-03-02doc: correct typos in various docsBeni von Cheni
PR-URL: https://github.com/nodejs/node/pull/26312 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-01-26doc: fix keyObject.symmetricSize to be keyObject.symmetricKeySizeFilip Skokan
PR-URL: https://github.com/nodejs/node/pull/25670 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2019-01-182019-01-17, Version 11.7.0 (Current), @BridgeARRuben Bridgewater
Notable Changes * compression / zlib: * Added brotli support (Anna Henningsen and Zach Vacura) https://github.com/nodejs/node/pull/24938 * console: * Added `inspectOptions` option (Ruben Bridgewater) https://github.com/nodejs/node/pull/24978 * crypto: * Always accept private keys as public keys (Tobias Nießen) https://github.com/nodejs/node/pull/25217 * deps: * Upgrade npm to v6.5.0 (Jordan Harband) https://github.com/nodejs/node/pull/25234 * fs: * Use internalBinding('fs') internally instead of process.binding('fs') (Masashi Hirano) https://github.com/nodejs/node/pull/22478 * http(s): * Support overriding http\\s.globalAgent (Roy Sommer) https://github.com/nodejs/node/pull/25170 * util: * Inspect ArrayBuffers contents closely (Ruben Bridgewater) https://github.com/nodejs/node/pull/25006 * worker: * Expose workers by default and remove `--experimental-worker` flag (Anna Henningsen) https://github.com/nodejs/node/pull/25361 PR-URL: https://github.com/nodejs/node/pull/25537
2019-01-14doc: improve Sign/Verify examples and docsSam Roberts
- Use complete examples that can be pasted and run as-is - Move note about algorithm to the functions it applies to - Uncapitalize inconsistence use of "Class" - Use both EC and RSA keys in the examples - Note that hash and digest are two names for the same algorithms PR-URL: https://github.com/nodejs/node/pull/25452 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-10doc: make sure that calls to .read() are loopedMatteo Collina
The 'readable' event assumes that calls to readable.read() happens within that event handler until readable.read() returns null. Fixes: https://github.com/nodejs/node/issues/20503 PR-URL: https://github.com/nodejs/node/pull/25375 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-01-08crypto: always accept private keys as public keysTobias Nießen
Some APIs already accept private keys instead of public keys. This changes all relevant crypto APIs to do so. PR-URL: https://github.com/nodejs/node/pull/25217 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2019-01-07crypto: fix key object wrapping in sync keygenTobias Nießen
PR-URL: https://github.com/nodejs/node/pull/25326 Fixes: https://github.com/nodejs/node/issues/25322 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-05doc: document key encryption optionsTobias Nießen
PR-URL: https://github.com/nodejs/node/pull/23632 Reviewed-By: Sam Roberts <vieuxtech@gmail.com>