summaryrefslogtreecommitdiff
path: root/doc/api/crypto.md
AgeCommit message (Collapse)Author
2018-05-30doc: make constants enumeration consistentDiego Rodríguez Baquero
Add missing prefix `crypto.constants.` to `RSA_PKCS1_PADDING` in `crypto.privateEncrypt()`, `crypto.privateDecrypt()`, `crypto.publicEncrypt()`, and `crypto.publicDecrypt()`. PR-URL: https://github.com/nodejs/node/pull/20991 Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-05-232018-05-23, Version 10.2.0 (Current)Anna Henningsen
* addons: - Fixed a memory leak for users of `AsyncResource` and N-API. (Michael Dawson) https://github.com/nodejs/node/pull/20668 * assert: - The `error` parameter of `assert.throws()` can be an object containing regular expressions now. (Ruben Bridgewater) https://github.com/nodejs/node/pull/20485 * crypto: - The `authTagLength` option has been made more flexible (Tobias Nießen) https://github.com/nodejs/node/pull/20235) https://github.com/nodejs/node/pull/20039 * esm: - Builtin modules (e.g. `fs`) now provide named exports in ES6 modules. (Gus Caplan) https://github.com/nodejs/node/pull/20403 * http: - Handling of `close` and `aborted` events has been made more consistent. (Robert Nagy) https://github.com/nodejs/node/pull/20075 https://github.com/nodejs/node/pull/20611 * module: - add --preserve-symlinks-main (David Goldstein) https://github.com/nodejs/node/pull/19911 * timers: - `timeout.refresh()` has been added to the public API. (Jeremiah Senkpiel) https://github.com/nodejs/node/pull/20298 * Embedder support: - Functions for creating V8 `Isolate` and `Context` objects with Node.js-specific behaviour have been added to the API. (Allen Yonghuang Wang) https://github.com/nodejs/node/pull/20639 - Node.js `Environment`s clean up resources before exiting now. (Anna Henningsen) https://github.com/nodejs/node/pull/19377 - Support for multi-threaded embedding has been improved. (Anna Henningsen) https://github.com/nodejs/node/pull/20542 https://github.com/nodejs/node/pull/20539 https://github.com/nodejs/node/pull/20541 PR-URL: https://github.com/nodejs/node/pull/20724
2018-05-07doc: update one more command in crypto.mdShobhit Chittora
PR-URL: https://github.com/nodejs/node/pull/20500 Refs: https://github.com/nodejs/node/pull/20400 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-05-06doc: updates crypto doc with openssl list -cipher-algorithmsShobhit Chittora
PR-URL: https://github.com/nodejs/node/pull/20502 Refs: https://github.com/nodejs/node/issues/20385 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org>
2018-05-03doc: update cli flag in crypto.mdShobhit Chittora
PR-URL: https://github.com/nodejs/node/pull/20400 Fixes: https://github.com/nodejs/node/issues/20385 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org>
2018-05-03doc: add more missing backticksVse Mozhet Byt
Also, fix some other nits in passing (formatting, punctuation, typos, redundancy, obsoleteness). PR-URL: https://github.com/nodejs/node/pull/20438 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-04-29doc: remove redundant empty linesVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/20398 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-04-26crypto: support authTagLength in GCM encryptionTobias Nießen
The authTagLength option can now be used to produce GCM authentication tags with a specific length. PR-URL: https://github.com/nodejs/node/pull/20235 Refs: https://github.com/nodejs/node/pull/20039 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yihong Wang <yh.wang@ibm.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2018-04-242018-04-24, Version 10.0.0 (Current)James M Snell
* Assert * Calling `assert.fail()` with more than one argument is deprecated. #70dcacd710 * Calling `assert.ok()` with no arguments will now throw. #3cd7977a42 * Calling `assert.ifError()` will now throw with any argument other than `undefined` or `null`. Previously the method would throw with any truthy value. #e65a6e81ef * The `assert.rejects()` and `assert.doesNotReject()` methods have been added for working with async functions. #599337f43e * Async_hooks * Older experimental async_hooks APIs have been removed. #1cc6b993b9 * Buffer * Uses of `new Buffer()` and `Buffer()` outside of the `node_modules` directory will now emit a runtime deprecation warning. #9d4ab90117 * `Buffer.isEncoding()` now returns `undefined` for falsy values, including an empty string. #452eed956e * `Buffer.fill()` will throw if an attempt is made to fill with an empty `Buffer`. #1e802539b2 * Child Process * Undefined properties of env are ignored. #38ee25e2e2, #85739b6c5b * Console * The `console.table()` method has been added. #97ace04492 * Crypto * The `crypto.createCipher()` and `crypto.createDecipher()` methods have been deprecated. Please use `crypto.createCipheriv()` and `crypto.createDecipheriv()` instead. #81f88e30dd * The `decipher.finaltol()` method has been deprecated. #19f3927d92 * The `crypto.DEFAULT_ENCODING` property has been deprecated. #6035beea93 * The `ECDH.convertKey()` method has been added. #f2e02883e7 * The `crypto.fips` property has been deprecated. #6e7992e8b8 * Dependencies * V8 has been updated to 6.6. #9daebb48d6 * OpenSSL has been updated to 1.1.0h. #66cb29e646 * EventEmitter * The `EventEmitter.prototype.off()` method has been added as an alias for `EventEmitter.prototype.removeListener()`. #3bb6f07d52 * File System * The `fs.promises` API provides experimental promisified versions of the `fs` functions. #329fc78e49 * Invalid path errors are now thrown synchronously. #d8f73385e2 * The `fs.readFile()` method now partitions reads to avoid thread pool exhaustion. #67a4ce1c6e * HTTP * Processing of HTTP Status codes `100`, `102-199` has been improved. #baf8495078 * Multi-byte characters in URL paths are now forbidden. #b961d9fd83 * N-API * The n-api is no longer experimental. #cd7d7b15c1 * Net * The `'close'` event will be emitted after `'end'`. #9b7a6914a7 * Perf_hooks * The `PerformanceObserver` class is now an `AsyncResource` and can be monitored using `async_hooks`. #009e41826f * Trace events are now emitted for performance events. #9e509b622b * The `performance` API has been simplified. #2ec6995555 * Performance milestone marks will be emitted as trace events. #96cb4fb795 * Process * Using non-string values for `process.env` is deprecated. #5826fe4e79 * The `process.assert()` method is deprecated. #703e37cf3f * REPL * REPL now experimentally supports top-level await when using the `--experimental-repl-await` flag. #eeab7bc068 * The previously deprecated "magic mode" has been removed. #4893f70d12 * The previously deprecated `NODE_REPL_HISTORY_FILE` environment variable has been removed. #60c9ad7979 * Proxy objects are shown as Proxy objects when inspected. #90a43906ab * Streams * The `'readable'` event is now always deferred with nextTick. #1e0f3315c7 * A new `pipeline()` method has been provided for building end-to-data stream pipelines. #a5cf3feaf1 * Experimental support for async for-await has been added to `stream.Readable`. #61b4d60c5d * Timers * The `enroll()` and `unenroll()` methods have been deprecated. #68783ae0b8 * TLS * The `tls.convertNONProtocols()` method has been deprecated. #9204a0db6e * Support for NPN (next protocol negotiation) has been dropped. #5bfbe5ceae * The `ecdhCurve` default is now `'auto'`. #af78840b19 * Trace Events * A new `trace_events` top-level module allows trace event categories to be enabled/disabld at runtime. #da5d818a54 * URL * The WHATWG URL API is now a global. #312414662b * Util * `util.types.is[…]` type checks have been added. #b20af8088a * Support for bigint formatting has been added to `util.inspect()`. #39dc947409
2018-04-23crypto: allow to restrict valid GCM tag lengthTobias Nießen
This change allows users to restrict accepted GCM authentication tag lengths to a single value. PR-URL: https://github.com/nodejs/node/pull/20039 Fixes: https://github.com/nodejs/node/issues/17523 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yihong Wang <yh.wang@ibm.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2018-04-14doc: note that setAuthTag throws on invalid lengthTobias Nießen
PR-URL: https://github.com/nodejs/node/pull/17825 Refs: https://github.com/nodejs/node/issues/17523 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-13doc: mention CCM along with GCM in crypto APIsTobias Nießen
PR-URL: https://github.com/nodejs/node/pull/19945 Refs: https://github.com/nodejs/node/pull/18138 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-04-11doc: remove superfluous word from crypto docTobias Nießen
PR-URL: https://github.com/nodejs/node/pull/19946 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-04-12doc: add and unify even more return valuesVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/19955 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-10doc: fix API descriptions for OpenSSL-1.1.0Shigeki Ohtsu
Fixes: https://github.com/nodejs/node/issues/4270 PR-URL: https://github.com/nodejs/node/pull/19794 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-04-09doc: improve CCM exampleTobias Nießen
The nonce must be transmitted along with ciphertext and tag. PR-URL: https://github.com/nodejs/node/pull/19851 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-04-09doc: add missing quotes in default string valuesVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/19894 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-04-09doc: add and unify return statements in crypto.mdVse Mozhet Byt
Conform return statements to the style guide and tool parsers. Also bring back a description fragment that seems to be erroneously deleted in https://github.com/nodejs/node/commit/1e07acd476309e7ddc4981160b89731b61a31179 PR-URL: https://github.com/nodejs/node/pull/19853 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2018-04-08doc: update language regarding key stretchingUjjwal Sharma
Update the docs to provide clearer instructions regarding the exact scope of the use (and re-use) of an IV, stating the instructions explicitly with greater clarity. PR-URL: https://github.com/nodejs/node/pull/19810 Fixes: https://github.com/nodejs/node/issues/19748 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2018-04-06crypto: add support for AES-CCMTobias Nießen
This commit adds support for another AEAD algorithm and introduces required API changes and extensions. Due to the design of CCM itself and the way OpenSSL implements it, there are some restrictions when using this mode as outlined in the updated documentation. PR-URL: https://github.com/nodejs/node/pull/18138 Fixes: https://github.com/nodejs/node/issues/2383 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org> Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-04-04doc: fix various nitsVse Mozhet Byt
* Replace 2 hyphens (--) by spaced m-dashes (—) as per STYLE_GUIDE.md. * Space infix operators. * Unify quotes in inline code spans (use only single quotes). * Unify `* Returns:` (eliminate deviations). * Dedupe spaces. PR-URL: https://github.com/nodejs/node/pull/19743 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-04-04doc,tools: formalize, unify, codify default valuesVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/19737 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-03-27tls: drop NPN (next protocol negotiation) supportBen Noordhuis
NPN has been superseded by ALPN. Chrome and Firefox removed support for NPN in 2016 and 2017 respectively to no ill effect. Fixes: https://github.com/nodejs/node/issues/14602 PR-URL: https://github.com/nodejs/node/pull/19403 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2018-03-23crypto: add ECDH.convertKey to convert public keysWei-Wei Wu
ECDH.convertKey is used to convert public keys between different formats. PR-URL: https://github.com/nodejs/node/pull/19080 Fixes: https://github.com/nodejs/node/issues/18977 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-03-212018-03-21, Version 9.9.0 (Current)Myles Borins
Notable changes: * assert: - From now on all error messages produced by `assert` in strict mode will produce a error diff. (Ruben Bridgewater) https://github.com/nodejs/node/pull/17615 - From now on it is possible to use a validation object in throws instead of the other possibilities. (Ruben Bridgewater) https://github.com/nodejs/node/pull/17584 * crypto: - allow passing null as IV unless required (Tobias Nießen) https://github.com/nodejs/node/pull/18644 * fs: - support as and as+ flags in stringToFlags() (Sarat Addepalli) https://github.com/nodejs/node/pull/18801 * tls: - expose Finished messages in TLSSocket (Anton Salikhmetov) https://github.com/nodejs/node/pull/19102 * tty: - Add getColorDepth function to determine if terminal supports colors (Ruben Bridgewater) https://github.com/nodejs/node/pull/17615 * util: - add util.inspect compact option (Ruben Bridgewater) https://github.com/nodejs/node/pull/17576 * **Added new collaborators** - [watson](https://github.com/watson) Thomas Watson PR-URL: https://github.com/nodejs/node/pull/19428
2018-03-21crypto: doc-only deprecate createCipher/DecipherTobias Nießen
createCipher and createDecipher are cryptographically weak, can cause severe security issues when used improperly and are unsupported in FIPS mode. PR-URL: https://github.com/nodejs/node/pull/19343 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-02-23doc: add new documentation lint ruleestrada9166
Add 80 characters limit to docs. Change docs to fit 80 characters per row. PR-URL: https://github.com/nodejs/node/pull/18726 Fixes: https://github.com/nodejs/node/issues/18703 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2018-02-14doc: update crypo Certficate class.Antoine AMARA
Update the dead link to <keygen> documentation. Add a link to mozilla developper documentation because W3C deleted the reference to this element. Add a note to inform <keygen> element is deprecated since HTML 5.2. PR-URL: https://github.com/nodejs/node/pull/18721 Fixes: https://github.com/nodejs/node/issues/18662 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-02-10crypto: allow passing null as IV unless requiredTobias Nießen
PR-URL: https://github.com/nodejs/node/pull/18644 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-09doc: add missing meta for createCipherivTobias Nießen
PR-URL: https://github.com/nodejs/node/pull/18651 Refs: https://github.com/nodejs/node/pull/8281 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-02-09doc: fix description of createDecipherivTobias Nießen
PR-URL: https://github.com/nodejs/node/pull/18651 Refs: https://github.com/nodejs/node/pull/12223 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-02-08doc: remove **Note:** tagsJames M Snell
Remove the various **Note:** prefixes throughout the docs. PR-URL: https://github.com/nodejs/node/pull/18592 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-02-02crypto: docs-only deprecate crypto.fips, replaceJames M Snell
Docs-only deprecate the getter/setter crypto.fips and replace with crypto.setFips() and crypto.getFips() This is specifically in preparation for ESM module support PR-URL: https://github.com/nodejs/node/pull/18335 Refs: https://github.com/nodejs/node/pull/18131 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-01-31crypto: runtime deprecate DEFAULT_ENCODINGJames M Snell
Runtime deprecate the crypto.DEFAULT_ENCODING property. This is specifically in preparation for eventual ESM support Refs: https://github.com/nodejs/node/pull/18131 PR-URL: https://github.com/nodejs/node/pull/18333 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2018-01-30doc: warn about GCM authenticityTobias Nießen
PR-URL: https://github.com/nodejs/node/pull/18376 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-01-22doc: use PBKDF2 in textTobias Nießen
Use upper case variant in text in compliance with RFC 2898. PR-URL: https://github.com/nodejs/node/pull/18279 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Vladimir Kurchatkin <vladimir.kurchatkin@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-12-28doc: fix typoTobias Nießen
PR-URL: https://github.com/nodejs/node/pull/17900 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-12-12doc: correct pbkdf2 salt length recommendationWill Clark
According to the linked document: "The length of the randomly-generated portion of the salt shall be at least 128 bits." [NIST SP 800-132] PR-URL: https://github.com/nodejs/node/pull/17524 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-12-12doc: note that randomBytes throws when passed nullTobias Nießen
Fixes: https://github.com/nodejs/node/issues/16778 PR-URL: https://github.com/nodejs/node/pull/17594 Fixes: https://github.com/nodejs/node/issues/16778 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me>
2017-12-12doc: replace ArrayBufferView in cryptoTobias Nießen
PR-URL: https://github.com/nodejs/node/pull/17595 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-12-01doc: add missing serial commasRich Trott
PR-URL: https://github.com/nodejs/node/pull/17384 Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-12-01crypto: better docs for cases where peer's public key is invalidJose M. Palacios Diaz
changes in c++ are in the computeSecret function, but the thrown exception that was moved to JS land was in BufferToPoint function, here i let the allocation error be thrown so the only value returned is the nullptr that i use later to catch the error in computeSecret, to then construct the exception in JS land. an ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY error was added to errors.js and with that, subsequent changes to docs and tests were made. PR-URL: https://github.com/nodejs/node/pull/16849 Refs: https://www.iacr.org/archive/pkc2003/25670211/25670211.pdf Fixes: https://github.com/nodejs/node/issues/16625 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-11-28doc: non-partitioned async crypto operationsJamie Davis
Neither crypto.randomBytes nor crypto.randomFill partitions the work submitted to the threadpool. This change was suggested during the discussion of #17054. See also #17154. PR-URL: https://github.com/nodejs/node/pull/17250 Refs: https://github.com/nodejs/node/pull/17154 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-11-23doc: update http URLs to https in doc/apiRonald Eddy Jr
PR-URL: https://github.com/nodejs/node/pull/17263 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2017-11-02doc : mention constant-time in crypto docMithun Sasidharan
Included reference to 'constant time' in crypto.timingSafeEqual description. The Node website would score higher on a Google search and the API would be more discoverable if it used the words "constant time" in its description. PR-URL: https://github.com/nodejs/node/pull/16604 Fixes: https://github.com/nodejs/node/issues/16504 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-10-312017-10-31, Version 9.0.0 (Current)James M Snell
* Older experimental APIs have been removed. [[`d731369b1d`](https://github.com/nodejs/node/commit/d731369b1d)] [#14414](https://github.com/nodejs/node/pull/14414) * **Errors** * Improvements have been made to `buffer` module error messages. * The assignment of static error codes to Node.js error continues: * `buffer` * `child_process` * `console` * `crypto` * `dns` * `events` * `fs` * `http` * `inspector` * `net` * `path` * `process` * `querystring` * `readline` * `repl` * `streams` * `string_decoder` * `timers` * `tls` * `url` * `util` * `v8` * `zlib` * **Child Processes** * Errors are emitted on process nextTick. * **Domains** * The long-deprecated `.dispose()` method has been removed. * **fs** * The `fs.ReadStream` and `fs.WriteStream` classes now use `destroy()`. * `fs` module callbacks are now invoked with an undefined context. * **HTTP/1** * A 400 Bad Request response will now be sent when parsing fails. * Socket timeout will be set when the socket connects. * A bug causing the request `'error'` event to fire twice was fixed. * HTTP clients may now use generic `Duplex` streams in addition to `net.Socket`. * **Intl** * The deprecated `Intl.v8BreakIterator` has been removed. * **Modules** * The `require.resolve()` method now supports using custom lookup paths. * **OS** * The `os.EOL` property is now read-only. * **Timers** * `setTimeout()` will emit a warning if the timeout is larger that the maximum 32-bit unsigned integer.
2017-10-23crypto: refactor argument validation for pbkdf2James M Snell
Move input argument validation to js, using internal/errors. Also update docs * `password` and `salt` may be Buffers or any TypedArrays * `crypto.DEFAULT_ENCODING` changes the returned derivedKey type PR-URL: https://github.com/nodejs/node/pull/15746 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2017-10-18doc: public keys don't accept passphrasesBen Noordhuis
Since `crypto.publicDecrypt()` and `crypto.publicEncrypt()` accept both public and private keys, make it clear that the `passphrase` option only applies to private keys. PR-URL: https://github.com/nodejs/node/pull/16087 Ref: https://github.com/nodejs/node/pull/16038 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Nikolai Vavilov <vvnicholas@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-10-16doc: add return values in crypto documentationJeremy Huang
Clarify return values for crypto.publicEncrypt and similar functions PR-URL: https://github.com/nodejs/node/pull/16229 Fixes: https://github.com/nodejs/node/issues/12946 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2017-10-16doc: reduce keylen in pbkdf2 examplesLukas
PR-URL: https://github.com/nodejs/node/pull/16203 Refs: https://github.com/nodejs/node/issues/3415 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>