Filip Skokan
6fdd4e6dcf
src: refactor SubtleCrypto algorithm and length validations
...
PR-URL: https://github.com/nodejs/node/pull/57273
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
Reviewed-By: Mattias Buelens <mattias@buelens.com>
2025-03-04 17:45:51 +00:00
Filip Skokan
16184633f6
crypto: allow length=0 for HKDF and PBKDF2 in SubtleCrypto.deriveBits
...
PR-URL: https://github.com/nodejs/node/pull/55866
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2024-11-17 13:13:47 +00:00
Aras Abbasi
83e6350b82
errors: improve hideStackFrames
...
PR-URL: https://github.com/nodejs/node/pull/49990
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-11-11 16:25:08 +00:00
Aras Abbasi
cc725a653a
errors: improve performance of instantiation
...
PR-URL: https://github.com/nodejs/node/pull/49654
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
2023-09-28 09:57:38 +00:00
Filip Skokan
3ef38c4bd7
crypto: use WebIDL converters in WebCryptoAPI
...
WebCryptoAPI functions' arguments are now coersed and validated as per
their WebIDL definitions like in other Web Crypto API implementations.
This further improves interoperability with other implementations of
Web Crypto API.
PR-URL: https://github.com/nodejs/node/pull/46067
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2023-01-17 08:57:58 +00:00
Filip Skokan
40a0757b21
crypto: remove webcrypto HKDF and PBKDF2 default-applied lengths
...
PR-URL: https://github.com/nodejs/node/pull/44945
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-10-12 18:38:33 +00:00
Filip Skokan
159b4d7a94
crypto: allow zero-length IKM in HKDF and in webcrypto PBKDF2
...
PR-URL: https://github.com/nodejs/node/pull/44201
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2022-08-12 21:36:29 +02:00
Filip Skokan
c6c4cdab36
crypto: fix webcrypto deriveBits validations
...
PR-URL: https://github.com/nodejs/node/pull/44173
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2022-08-12 21:31:14 +02:00
Tobias Nießen
75dbb86c58
crypto: clean up parameter validation in HKDF
...
PR-URL: https://github.com/nodejs/node/pull/42924
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
2022-05-02 18:46:04 +01:00
Mohammed Keyvanzadeh
8c4b8b201a
lib: replace validator and error
...
Refs: https://github.com/nodejs/node/pull/41660
PR-URL: https://github.com/nodejs/node/pull/41678
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-02-05 08:36:48 -08:00
Tobias Nießen
1229d49e39
doc,lib,test: rename HKDF 'key' argument
...
PR-URL: https://github.com/nodejs/node/pull/39474
Refs: https://github.com/nodejs/node/issues/39471
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-07-26 08:41:42 -07:00
XadillaX
2de139b5d5
lib: make lazyDOMException more common
...
PR-URL: https://github.com/nodejs/node/pull/39105
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-06-28 13:44:28 +08:00
Rich Trott
b461a1b125
doc,lib: prepare for stricter multi-line array linting
...
We're about to turn on a requirement for dangling commas.
PR-URL: https://github.com/nodejs/node/pull/37088
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-02-19 09:55:35 -08:00
Antoine du Hamel
08a2383a5e
crypto: refactor to avoid unsafe array iteration
...
PR-URL: https://github.com/nodejs/node/pull/37364
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
2021-02-19 12:55:54 +01:00
ZiJian Liu
b00bb01db9
lib: refactor to use validateCallback
...
PR-URL: https://github.com/nodejs/node/pull/36609
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2020-12-29 15:48:57 +00:00
James M Snell
dae283d96f
crypto: refactoring internals, add WebCrypto
...
Fixes: https://github.com/nodejs/node/issues/678
Refs: https://github.com/nodejs/node/issues/26854
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/35093
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-10-07 17:27:05 -07:00