-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed
Labels
cryptoIssues and PRs related to the crypto subsystem.Issues and PRs related to the crypto subsystem.opensslIssues and PRs related to the OpenSSL dependency.Issues and PRs related to the OpenSSL dependency.performanceIssues and PRs related to the performance of Node.js.Issues and PRs related to the performance of Node.js.
Description
- Version: master branch (v13.0.0-pre)
- Platform: macOS Mojave but I've seen it on Linux in CI too
- Subsystem: crypto
node
compiled from the master branch takes 24 seconds while Node.js 12.4.0 takes less than 2 seconds.
$ time ./node -e "require('crypto').getDiffieHellman('modp18')"
real 0m24.159s
user 0m23.687s
sys 0m0.066s
$ time node -e "require('crypto').getDiffieHellman('modp18')"
real 0m1.403s
user 0m1.173s
sys 0m0.070s
$
@bnoordhuis notes that the default key size in 1.1.1c was increased from 1024 bits to 2048 bits, but IIUC, specifying modp18
sets the key size for both to a large value.
Bug? Ot maybe it's not-a-bug because it's using a more reliable source of randomness so things are slower or something like that?
@nodejs/crypto
apricote
Metadata
Metadata
Assignees
Labels
cryptoIssues and PRs related to the crypto subsystem.Issues and PRs related to the crypto subsystem.opensslIssues and PRs related to the OpenSSL dependency.Issues and PRs related to the OpenSSL dependency.performanceIssues and PRs related to the performance of Node.js.Issues and PRs related to the performance of Node.js.