Security and correctness
- Protect passed options against mutation / pollution
- keccakprg: fail until entropy is added
- webcrypto: reject output sizes which crashed engine
- blake3: fix tree merging for multi-terabyte streams
- Improve zeroization
Misc
- Speed-up Argon2 by 20%
- Argon2 cost options are now optional. The defaults are
t: 3,m: 1024 ** 2KiB (1 GiB),p: 1,dkLen: 32, and a 1 GiBmaxmemlimit; larger-memory calls must setmaxmemexplicitly. - Corrected scrypt's default
maxmemto work forN: 2 ** 20,r: 8, andp: 1 nextTickandasyncLoopnow yield throughscheduler.yield()when available orsetTimeoutotherwise, allowing timers, I/O, and rendering to progress. They also accept optional rejection cleanup; async Argon2, PBKDF2, and scrypt use it to wipe work state if scheduling is aborted.
Full Changelog: 2.3.0...2.4.0