performance: Perf regression on crypto.verify

On NodeJS 16.x, crypto.verify made 30k op/s (ref)

But on NodeJS 18.x, crypto.verify downgrade to 6~7k op/s (ref).

I initially discover this on this pr: https://github.com/RafaelGSS/nodejs-bench-operations/pull/31, I already did an initial investigation of the cause, which currently points to validationFunction, but I think we should look on V8 side to see if something change.

It’s probable that this slowdown affects crypto.sign too, but I didn’t have time yet to benchmark.

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Reactions: 4
  • Comments: 36 (33 by maintainers)

Most upvoted comments

@nodejs/tsc

I’d like add the following topic to the upcoming TSC agenda: our plan for upgrading OpenSSL.

Here’s why it’s important:

If we don’t upgrade OpenSSL, our crypto library will remain slow, and we won’t get the new features of the 3.x versions. For example, version 3.2 plans to add argon2, but we won’t get it because OpenSSL says they won’t add new functionality to existing minor versions.

The OpenSSL developers say that for versions 3 and up, they’ll keep the ABI stable when they update minor or patch versions. So, in theory, it shouldn’t cause problems for our users.

The only good reason to stick with OpenSSL 3.0 is that it’s supposed to be supported for five years as LTS, while 3.x versions only get two years of support. OpenSSL 3.0’s end-of-life is in September 2026, while 3.1’s is in March 2025. If OpenSSL 3.2 comes out in December 2023, it’ll be unsupported by December 2025.

Node 18’s security support ends on April 30, 2025, which works fine with OpenSSL 3.2. But Node 20’s security support ends on April 30, 2026, which is a problem. We’d have to use OpenSSL 3.0 since the time window for OpenSSL 3.2 is too short and downgrading from OpenSSL 3.2 to 3.0 means removal of additional functionality and thus breaking userland. However, if OpenSSL 3.2 comes out on or after April 30, 2024, we can upgrade to it.

If we release Node 22 with OpenSSL 3.0 and set the security support to end on April 30, 2027, we’ll run into the same issue as with Node 16 because OpenSSL 3.0 becomes unsupported in September 2026.

So, the risk here is that our security support might extend beyond the end-of-life of an OpenSSL version with the same ABI as 3.0. For Node 22, we just can hope that OpenSSL releases a 3.x version on or after April 30, 2025, or they declare a 3.x or 4.0 version as LTS before April 30, 2024.

This situation isn’t ideal because it ties our support to OpenSSL. But it’s something we need to discuss. Maybe we should talk to the OpenSSL developers and work out an agreement to make sure our security support aligns with our security end-of-life. Maybe we have to accept that at some point we need to upgrade OpenSSL with breaking ABI and addons would break and need to adapt accordingly.

My personal preference is to upgrade OpenSSL and force addons to adapt accordingly, as they would run into the same OpenSSL support issues as node core would do.

Others have deemed OpenSSL v3 as not production ready, because it has this super bad performance regression. E.g. microsoft implemented for this reason msquic based on OpenSSL 1 and 3, which they use for their azure instances.

We had no choice but to use OpenSSL 3.x because 1.1.1 is now EOL. We will continue to support linking with 1.1.1 so long as the commercial extended support OpenSSL offers still covers 1.1.1 security releases (privately distributed).

I’d like add the following topic to the upcoming TSC agenda: our plan for upgrading OpenSSL.

Why does that need to be on the TSC agenda? GitHub discussions among collaborators and other community members should be the default channel for any decision-making process.

This situation isn’t ideal because it ties our support to OpenSSL. But it’s something we need to discuss.

That has always been the case, and we’ve regularly discussed how to deal with OpenSSL’s release strategy.

Maybe we should talk to the OpenSSL developers and work out an agreement to make sure our security support aligns with our security end-of-life.

Let’s be realistic. Node.js is one of thousands of dependents of OpenSSL and probably not even among the most important ones. We cannot reasonably ask OpenSSL maintainers to change their release schedule for Node.js, nor can we ask them for commercial support that extends beyond the official end of life. We can adjust the release schedule of Node.js to align with OpenSSL if necessary for security reasons, but we try to avoid that.

If we don’t upgrade OpenSSL, our crypto library will remain slow, and we won’t get the new features of the 3.x versions (…) Maybe we have to accept that at some point we need to upgrade OpenSSL with breaking ABI and addons would break and need to adapt accordingly.

My personal preference is to upgrade OpenSSL and force addons to adapt accordingly

From my point of view, a reasonable list of priorities is: security, then reliability/stability, and lastly features/performance. I don’t think we should sacrifice the former categories for the latter.

As @richardlau mentions, one complication is that we use a fork of OpenSSL.

And let’s not forget about embedders that link against BoringSSL either (e.g., Electron). We don’t want to make things too difficult for them either.

One elephant in the room is that Node.js doesn’t actually bundle openssl – it bundles the quic fork of openssl from https://github.com/quictls/openssl. While they have a fork for 3.1, there appear to be issues for 3.2 and later: https://github.com/quictls/openssl/issues/138. We’re on that fork because it was a prerequisite for http3/quic support: https://github.com/nodejs/node/issues/38478

OpenSSL 1.1.1w vs 3.0.12

compare-1.1.1w-vs-3.0.12.csv

crypto/create-keyobject.js n=1000 keyFormat='der-pkcs8' keyType='ec'                                        ***    -94.67 %       ±0.56% ±0.75% ±0.99%
crypto/create-keyobject.js n=1000 keyFormat='der-pkcs8' keyType='ed25519'                                   ***    -88.01 %       ±0.13% ±0.17% ±0.23%
crypto/create-keyobject.js n=1000 keyFormat='der-pkcs8' keyType='rsa'                                       ***    -97.84 %       ±0.94% ±1.26% ±1.68%
crypto/create-keyobject.js n=1000 keyFormat='der-spki' keyType='ec'                                         ***    -82.98 %       ±0.57% ±0.77% ±1.02%
crypto/create-keyobject.js n=1000 keyFormat='der-spki' keyType='ed25519'                                    ***    -94.37 %       ±0.53% ±0.71% ±0.94%
crypto/create-keyobject.js n=1000 keyFormat='der-spki' keyType='rsa'                                        ***    -95.12 %       ±0.95% ±1.28% ±1.70%
crypto/create-keyobject.js n=1000 keyFormat='jwk-private' keyType='ec'                                      ***     -5.32 %       ±0.51% ±0.68% ±0.89%
crypto/create-keyobject.js n=1000 keyFormat='jwk-private' keyType='ed25519'                                 ***    -12.27 %       ±0.44% ±0.59% ±0.77%
crypto/create-keyobject.js n=1000 keyFormat='jwk-private' keyType='rsa'                                      **     -1.32 %       ±0.81% ±1.08% ±1.41%
crypto/create-keyobject.js n=1000 keyFormat='jwk-public' keyType='ec'                                       ***     -5.35 %       ±0.42% ±0.56% ±0.73%
crypto/create-keyobject.js n=1000 keyFormat='jwk-public' keyType='ed25519'                                  ***    -47.09 %       ±0.87% ±1.16% ±1.52%
crypto/create-keyobject.js n=1000 keyFormat='jwk-public' keyType='rsa'                                      ***     -1.95 %       ±0.69% ±0.92% ±1.20%
crypto/create-keyobject.js n=1000 keyFormat='pkcs8' keyType='ec'                                            ***    -94.48 %       ±0.59% ±0.79% ±1.05%
crypto/create-keyobject.js n=1000 keyFormat='pkcs8' keyType='ed25519'                                       ***    -87.90 %       ±0.18% ±0.24% ±0.32%
crypto/create-keyobject.js n=1000 keyFormat='pkcs8' keyType='rsa'                                           ***    -95.42 %       ±0.90% ±1.21% ±1.61%
crypto/create-keyobject.js n=1000 keyFormat='spki' keyType='ec'                                             ***    -82.43 %       ±0.53% ±0.71% ±0.95%
crypto/create-keyobject.js n=1000 keyFormat='spki' keyType='ed25519'                                        ***    -93.44 %       ±0.47% ±0.64% ±0.84%
crypto/create-keyobject.js n=1000 keyFormat='spki' keyType='rsa'                                            ***    -92.74 %       ±0.76% ±1.03% ±1.36%
crypto/oneshot-sign.js n=1000 keyFormat='der' mode='async-parallel' keyType='ec'                            ***    -93.23 %       ±0.50% ±0.67% ±0.89%
crypto/oneshot-sign.js n=1000 keyFormat='der' mode='async-parallel' keyType='ed25519'                       ***    -87.05 %       ±0.12% ±0.16% ±0.22%
crypto/oneshot-sign.js n=1000 keyFormat='der' mode='async-parallel' keyType='rsa'                           ***    -24.19 %       ±0.15% ±0.21% ±0.27%
crypto/oneshot-sign.js n=1000 keyFormat='der' mode='async' keyType='ec'                                     ***    -85.74 %       ±0.86% ±1.15% ±1.53%
crypto/oneshot-sign.js n=1000 keyFormat='der' mode='async' keyType='ed25519'                                ***    -76.88 %       ±0.28% ±0.37% ±0.50%
crypto/oneshot-sign.js n=1000 keyFormat='der' mode='async' keyType='rsa'                                    ***    -24.22 %       ±0.30% ±0.40% ±0.53%
crypto/oneshot-sign.js n=1000 keyFormat='der' mode='sync' keyType='ec'                                      ***    -88.99 %       ±0.60% ±0.81% ±1.07%
crypto/oneshot-sign.js n=1000 keyFormat='der' mode='sync' keyType='ed25519'                                 ***    -79.48 %       ±0.07% ±0.10% ±0.13%
crypto/oneshot-sign.js n=1000 keyFormat='der' mode='sync' keyType='rsa'                                     ***    -24.35 %       ±0.29% ±0.39% ±0.51%
crypto/oneshot-sign.js n=1000 keyFormat='jwk' mode='async-parallel' keyType='ec'                            ***     -5.15 %       ±0.60% ±0.80% ±1.05%
crypto/oneshot-sign.js n=1000 keyFormat='jwk' mode='async-parallel' keyType='ed25519'                       ***    -11.24 %       ±0.39% ±0.52% ±0.69%
crypto/oneshot-sign.js n=1000 keyFormat='jwk' mode='async-parallel' keyType='rsa'                           ***     -1.47 %       ±0.11% ±0.14% ±0.18%
crypto/oneshot-sign.js n=1000 keyFormat='jwk' mode='async' keyType='ec'                                     ***    -20.01 %       ±0.66% ±0.88% ±1.15%
crypto/oneshot-sign.js n=1000 keyFormat='jwk' mode='async' keyType='ed25519'                                ***    -10.86 %       ±0.49% ±0.67% ±0.88%
crypto/oneshot-sign.js n=1000 keyFormat='jwk' mode='async' keyType='rsa'                                    ***     -1.36 %       ±0.10% ±0.14% ±0.18%
crypto/oneshot-sign.js n=1000 keyFormat='jwk' mode='sync' keyType='ec'                                      ***    -22.81 %       ±0.47% ±0.63% ±0.82%
crypto/oneshot-sign.js n=1000 keyFormat='jwk' mode='sync' keyType='ed25519'                                 ***    -10.24 %       ±0.31% ±0.41% ±0.55%
crypto/oneshot-sign.js n=1000 keyFormat='jwk' mode='sync' keyType='rsa'                                     ***     -1.42 %       ±0.11% ±0.14% ±0.19%
crypto/oneshot-sign.js n=1000 keyFormat='keyObject.unique' mode='async-parallel' keyType='ec'               ***    -24.22 %       ±1.11% ±1.48% ±1.93%
crypto/oneshot-sign.js n=1000 keyFormat='keyObject.unique' mode='async-parallel' keyType='ed25519'          ***    -11.03 %       ±0.36% ±0.47% ±0.62%
crypto/oneshot-sign.js n=1000 keyFormat='keyObject.unique' mode='async-parallel' keyType='rsa'              ***     -0.81 %       ±0.11% ±0.14% ±0.18%
crypto/oneshot-sign.js n=1000 keyFormat='keyObject' mode='async-parallel' keyType='ec'                      ***    -24.53 %       ±1.12% ±1.49% ±1.94%
crypto/oneshot-sign.js n=1000 keyFormat='keyObject' mode='async-parallel' keyType='ed25519'                 ***    -11.04 %       ±0.54% ±0.72% ±0.94%
crypto/oneshot-sign.js n=1000 keyFormat='keyObject' mode='async-parallel' keyType='rsa'                     ***     -1.87 %       ±0.09% ±0.12% ±0.16%
crypto/oneshot-sign.js n=1000 keyFormat='keyObject' mode='async' keyType='ec'                               ***    -10.96 %       ±0.83% ±1.10% ±1.45%
crypto/oneshot-sign.js n=1000 keyFormat='keyObject' mode='async' keyType='ed25519'                          ***     -7.00 %       ±0.68% ±0.92% ±1.22%
crypto/oneshot-sign.js n=1000 keyFormat='keyObject' mode='async' keyType='rsa'                              ***     -1.64 %       ±0.16% ±0.21% ±0.28%
crypto/oneshot-sign.js n=1000 keyFormat='keyObject' mode='sync' keyType='ec'                                ***    -12.17 %       ±0.56% ±0.75% ±0.98%
crypto/oneshot-sign.js n=1000 keyFormat='keyObject' mode='sync' keyType='ed25519'                           ***     -8.75 %       ±0.22% ±0.29% ±0.38%
crypto/oneshot-sign.js n=1000 keyFormat='keyObject' mode='sync' keyType='rsa'                               ***     -1.66 %       ±0.07% ±0.10% ±0.13%
crypto/oneshot-sign.js n=1000 keyFormat='pem' mode='async-parallel' keyType='ec'                            ***    -92.68 %       ±1.03% ±1.38% ±1.84%
crypto/oneshot-sign.js n=1000 keyFormat='pem' mode='async-parallel' keyType='ed25519'                       ***    -86.73 %       ±0.39% ±0.53% ±0.70%
crypto/oneshot-sign.js n=1000 keyFormat='pem' mode='async-parallel' keyType='rsa'                           ***    -21.06 %       ±0.13% ±0.17% ±0.22%
crypto/oneshot-sign.js n=1000 keyFormat='pem' mode='async' keyType='ec'                                     ***    -85.22 %       ±0.65% ±0.87% ±1.16%
crypto/oneshot-sign.js n=1000 keyFormat='pem' mode='async' keyType='ed25519'                                ***    -76.51 %       ±0.87% ±1.17% ±1.56%
crypto/oneshot-sign.js n=1000 keyFormat='pem' mode='async' keyType='rsa'                                    ***    -22.82 %       ±0.07% ±0.09% ±0.12%
crypto/oneshot-sign.js n=1000 keyFormat='pem' mode='sync' keyType='ec'                                      ***    -88.42 %       ±0.13% ±0.18% ±0.24%
crypto/oneshot-sign.js n=1000 keyFormat='pem' mode='sync' keyType='ed25519'                                 ***    -79.16 %       ±0.08% ±0.11% ±0.14%
crypto/oneshot-sign.js n=1000 keyFormat='pem' mode='sync' keyType='rsa'                                     ***    -22.98 %       ±0.18% ±0.24% ±0.31%
crypto/oneshot-verify.js n=1000 keyFormat='der' mode='async-parallel' keyType='ec'                          ***    -82.45 %       ±0.45% ±0.61% ±0.81%
crypto/oneshot-verify.js n=1000 keyFormat='der' mode='async-parallel' keyType='ed25519'                     ***    -61.02 %       ±0.27% ±0.36% ±0.47%
crypto/oneshot-verify.js n=1000 keyFormat='der' mode='async-parallel' keyType='rsa'                         ***    -91.56 %       ±0.50% ±0.67% ±0.89%
crypto/oneshot-verify.js n=1000 keyFormat='der' mode='async' keyType='ec'                                   ***    -47.15 %       ±0.10% ±0.14% ±0.18%
crypto/oneshot-verify.js n=1000 keyFormat='der' mode='async' keyType='ed25519'                              ***    -36.00 %       ±0.35% ±0.47% ±0.62%
crypto/oneshot-verify.js n=1000 keyFormat='der' mode='async' keyType='rsa'                                  ***    -68.58 %       ±0.21% ±0.28% ±0.37%
crypto/oneshot-verify.js n=1000 keyFormat='der' mode='sync' keyType='ec'                                    ***    -50.59 %       ±0.20% ±0.27% ±0.35%
crypto/oneshot-verify.js n=1000 keyFormat='der' mode='sync' keyType='ed25519'                               ***    -37.63 %       ±0.39% ±0.52% ±0.68%
crypto/oneshot-verify.js n=1000 keyFormat='der' mode='sync' keyType='rsa'                                   ***    -75.29 %       ±0.10% ±0.13% ±0.17%
crypto/oneshot-verify.js n=1000 keyFormat='jwk' mode='async-parallel' keyType='ec'                          ***     -6.01 %       ±0.25% ±0.33% ±0.43%
crypto/oneshot-verify.js n=1000 keyFormat='jwk' mode='async-parallel' keyType='ed25519'                     ***     -3.57 %       ±0.47% ±0.63% ±0.81%
crypto/oneshot-verify.js n=1000 keyFormat='jwk' mode='async-parallel' keyType='rsa'                         ***    -20.87 %       ±0.55% ±0.74% ±0.96%
crypto/oneshot-verify.js n=1000 keyFormat='jwk' mode='async' keyType='ec'                                   ***    -14.55 %       ±0.26% ±0.35% ±0.46%
crypto/oneshot-verify.js n=1000 keyFormat='jwk' mode='async' keyType='ed25519'                              ***     -4.95 %       ±0.42% ±0.55% ±0.72%
crypto/oneshot-verify.js n=1000 keyFormat='jwk' mode='async' keyType='rsa'                                  ***    -12.79 %       ±0.39% ±0.53% ±0.69%
crypto/oneshot-verify.js n=1000 keyFormat='jwk' mode='sync' keyType='ec'                                    ***    -15.70 %       ±0.07% ±0.09% ±0.12%
crypto/oneshot-verify.js n=1000 keyFormat='jwk' mode='sync' keyType='ed25519'                               ***     -5.04 %       ±0.36% ±0.48% ±0.63%
crypto/oneshot-verify.js n=1000 keyFormat='jwk' mode='sync' keyType='rsa'                                   ***    -12.53 %       ±0.12% ±0.16% ±0.21%
crypto/oneshot-verify.js n=1000 keyFormat='keyObject.unique' mode='async-parallel' keyType='ec'             ***     -6.21 %       ±0.80% ±1.07% ±1.41%
crypto/oneshot-verify.js n=1000 keyFormat='keyObject.unique' mode='async-parallel' keyType='ed25519'        ***     -3.74 %       ±0.42% ±0.56% ±0.72%
crypto/oneshot-verify.js n=1000 keyFormat='keyObject.unique' mode='async-parallel' keyType='rsa'            ***    -13.91 %       ±0.82% ±1.10% ±1.43%
crypto/oneshot-verify.js n=1000 keyFormat='keyObject' mode='async-parallel' keyType='ec'                    ***     -5.64 %       ±0.45% ±0.59% ±0.77%
crypto/oneshot-verify.js n=1000 keyFormat='keyObject' mode='async-parallel' keyType='ed25519'               ***     -4.00 %       ±0.43% ±0.57% ±0.75%
crypto/oneshot-verify.js n=1000 keyFormat='keyObject' mode='async-parallel' keyType='rsa'                   ***    -22.93 %       ±1.24% ±1.66% ±2.17%
crypto/oneshot-verify.js n=1000 keyFormat='keyObject' mode='async' keyType='ec'                             ***     -3.97 %       ±0.29% ±0.39% ±0.51%
crypto/oneshot-verify.js n=1000 keyFormat='keyObject' mode='async' keyType='ed25519'                        ***     -2.51 %       ±0.37% ±0.50% ±0.65%
crypto/oneshot-verify.js n=1000 keyFormat='keyObject' mode='async' keyType='rsa'                            ***     -7.95 %       ±0.29% ±0.38% ±0.50%
crypto/oneshot-verify.js n=1000 keyFormat='keyObject' mode='sync' keyType='ec'                              ***     -3.74 %       ±0.16% ±0.21% ±0.28%
crypto/oneshot-verify.js n=1000 keyFormat='keyObject' mode='sync' keyType='ed25519'                         ***     -2.31 %       ±0.42% ±0.56% ±0.73%
crypto/oneshot-verify.js n=1000 keyFormat='keyObject' mode='sync' keyType='rsa'                             ***    -11.50 %       ±0.13% ±0.18% ±0.23%
crypto/oneshot-verify.js n=1000 keyFormat='pem' mode='async-parallel' keyType='ec'                          ***    -80.62 %       ±1.35% ±1.82% ±2.42%
crypto/oneshot-verify.js n=1000 keyFormat='pem' mode='async-parallel' keyType='ed25519'                     ***    -61.76 %       ±0.31% ±0.41% ±0.54%
crypto/oneshot-verify.js n=1000 keyFormat='pem' mode='async-parallel' keyType='rsa'                         ***    -91.70 %       ±0.80% ±1.08% ±1.43%
crypto/oneshot-verify.js n=1000 keyFormat='pem' mode='async' keyType='ec'                                   ***    -46.69 %       ±0.29% ±0.39% ±0.52%
crypto/oneshot-verify.js n=1000 keyFormat='pem' mode='async' keyType='ed25519'                              ***    -35.69 %       ±0.33% ±0.44% ±0.57%
crypto/oneshot-verify.js n=1000 keyFormat='pem' mode='async' keyType='rsa'                                  ***    -66.33 %       ±0.96% ±1.29% ±1.71%
crypto/oneshot-verify.js n=1000 keyFormat='pem' mode='sync' keyType='ec'                                    ***    -50.00 %       ±0.13% ±0.17% ±0.23%
crypto/oneshot-verify.js n=1000 keyFormat='pem' mode='sync' keyType='ed25519'                               ***    -37.47 %       ±0.28% ±0.37% ±0.49%
crypto/oneshot-verify.js n=1000 keyFormat='pem' mode='sync' keyType='rsa'                                   ***    -73.50 %       ±0.27% ±0.37% ±0.49%

Be aware that when doing many comparisons the risk of a false-positive result increases.
In this case, there are 96 comparisons, you can thus expect the following amount of false-positive results:
  4.80 false positives, when considering a   5% risk acceptance (*, **, ***),
  0.96 false positives, when considering a   1% risk acceptance (**, ***),
  0.10 false positives, when considering a 0.1% risk acceptance (***)
OpenSSL 1.1.1w vs 3.1.3

compare-1.1.1w-vs-3.1.3.csv

crypto/create-keyobject.js n=1000 keyFormat='der-pkcs8' keyType='ec'                                        ***    -66.46 %       ±0.24% ±0.33% ±0.43%
crypto/create-keyobject.js n=1000 keyFormat='der-pkcs8' keyType='ed25519'                                   ***    -40.37 %       ±0.16% ±0.21% ±0.28%
crypto/create-keyobject.js n=1000 keyFormat='der-pkcs8' keyType='rsa'                                       ***    -84.25 %       ±0.44% ±0.59% ±0.78%
crypto/create-keyobject.js n=1000 keyFormat='der-spki' keyType='ec'                                         ***    -63.54 %       ±0.46% ±0.62% ±0.82%
crypto/create-keyobject.js n=1000 keyFormat='der-spki' keyType='ed25519'                                    ***    -88.08 %       ±0.58% ±0.79% ±1.04%
crypto/create-keyobject.js n=1000 keyFormat='der-spki' keyType='rsa'                                        ***    -87.58 %       ±0.90% ±1.21% ±1.61%
crypto/create-keyobject.js n=1000 keyFormat='jwk-private' keyType='ec'                                      ***     -5.35 %       ±0.46% ±0.62% ±0.82%
crypto/create-keyobject.js n=1000 keyFormat='jwk-private' keyType='ed25519'                                 ***     -7.69 %       ±0.19% ±0.26% ±0.35%
crypto/create-keyobject.js n=1000 keyFormat='jwk-private' keyType='rsa'                                       *     -3.61 %       ±2.74% ±3.68% ±4.88%
crypto/create-keyobject.js n=1000 keyFormat='jwk-public' keyType='ec'                                       ***     -5.68 %       ±0.46% ±0.62% ±0.81%
crypto/create-keyobject.js n=1000 keyFormat='jwk-public' keyType='ed25519'                                  ***    -46.52 %       ±0.66% ±0.88% ±1.16%
crypto/create-keyobject.js n=1000 keyFormat='jwk-public' keyType='rsa'                                      ***     -1.65 %       ±0.90% ±1.20% ±1.57%
crypto/create-keyobject.js n=1000 keyFormat='pkcs8' keyType='ec'                                            ***    -77.97 %       ±0.32% ±0.44% ±0.58%
crypto/create-keyobject.js n=1000 keyFormat='pkcs8' keyType='ed25519'                                       ***    -57.93 %       ±0.20% ±0.26% ±0.35%
crypto/create-keyobject.js n=1000 keyFormat='pkcs8' keyType='rsa'                                           ***    -82.12 %       ±0.99% ±1.33% ±1.77%
crypto/create-keyobject.js n=1000 keyFormat='spki' keyType='ec'                                             ***    -62.90 %       ±0.19% ±0.26% ±0.34%
crypto/create-keyobject.js n=1000 keyFormat='spki' keyType='ed25519'                                        ***    -86.39 %       ±0.31% ±0.42% ±0.55%
crypto/create-keyobject.js n=1000 keyFormat='spki' keyType='rsa'                                            ***    -82.29 %       ±0.39% ±0.52% ±0.69%
crypto/oneshot-sign.js n=1000 keyFormat='der' mode='async-parallel' keyType='ec'                            ***    -61.51 %       ±0.56% ±0.76% ±1.01%
crypto/oneshot-sign.js n=1000 keyFormat='der' mode='async-parallel' keyType='ed25519'                       ***    -39.39 %       ±0.27% ±0.35% ±0.46%
crypto/oneshot-sign.js n=1000 keyFormat='der' mode='async-parallel' keyType='rsa'                           ***      0.51 %       ±0.15% ±0.20% ±0.26%
crypto/oneshot-sign.js n=1000 keyFormat='der' mode='async' keyType='ec'                                     ***    -44.41 %       ±1.21% ±1.63% ±2.17%
crypto/oneshot-sign.js n=1000 keyFormat='der' mode='async' keyType='ed25519'                                ***    -24.89 %       ±0.34% ±0.45% ±0.59%
crypto/oneshot-sign.js n=1000 keyFormat='der' mode='async' keyType='rsa'                                    ***     -3.45 %       ±0.14% ±0.19% ±0.25%
crypto/oneshot-sign.js n=1000 keyFormat='der' mode='sync' keyType='ec'                                      ***    -49.43 %       ±0.59% ±0.79% ±1.05%
crypto/oneshot-sign.js n=1000 keyFormat='der' mode='sync' keyType='ed25519'                                 ***    -27.55 %       ±0.12% ±0.16% ±0.22%
crypto/oneshot-sign.js n=1000 keyFormat='der' mode='sync' keyType='rsa'                                     ***     -3.34 %       ±0.10% ±0.13% ±0.18%
crypto/oneshot-sign.js n=1000 keyFormat='jwk' mode='async-parallel' keyType='ec'                            ***     -5.33 %       ±0.50% ±0.67% ±0.88%
crypto/oneshot-sign.js n=1000 keyFormat='jwk' mode='async-parallel' keyType='ed25519'                       ***     -6.82 %       ±0.35% ±0.46% ±0.61%
crypto/oneshot-sign.js n=1000 keyFormat='jwk' mode='async-parallel' keyType='rsa'                                   -0.27 %       ±0.29% ±0.39% ±0.52%
crypto/oneshot-sign.js n=1000 keyFormat='jwk' mode='async' keyType='ec'                                     ***    -20.20 %       ±0.63% ±0.84% ±1.11%
crypto/oneshot-sign.js n=1000 keyFormat='jwk' mode='async' keyType='ed25519'                                ***     -5.36 %       ±0.76% ±1.01% ±1.31%
crypto/oneshot-sign.js n=1000 keyFormat='jwk' mode='async' keyType='rsa'                                    ***     -0.35 %       ±0.17% ±0.23% ±0.30%
crypto/oneshot-sign.js n=1000 keyFormat='jwk' mode='sync' keyType='ec'                                      ***    -22.14 %       ±0.48% ±0.64% ±0.85%
crypto/oneshot-sign.js n=1000 keyFormat='jwk' mode='sync' keyType='ed25519'                                 ***     -5.65 %       ±0.11% ±0.15% ±0.20%
crypto/oneshot-sign.js n=1000 keyFormat='jwk' mode='sync' keyType='rsa'                                     ***     -0.46 %       ±0.12% ±0.17% ±0.22%
crypto/oneshot-sign.js n=1000 keyFormat='keyObject.unique' mode='async-parallel' keyType='ec'               ***    -17.87 %       ±1.39% ±1.86% ±2.42%
crypto/oneshot-sign.js n=1000 keyFormat='keyObject.unique' mode='async-parallel' keyType='ed25519'          ***     -5.96 %       ±0.77% ±1.03% ±1.34%
crypto/oneshot-sign.js n=1000 keyFormat='keyObject.unique' mode='async-parallel' keyType='rsa'                       0.55 %       ±0.65% ±0.87% ±1.15%
crypto/oneshot-sign.js n=1000 keyFormat='keyObject' mode='async-parallel' keyType='ec'                      ***    -19.31 %       ±1.31% ±1.75% ±2.30%
crypto/oneshot-sign.js n=1000 keyFormat='keyObject' mode='async-parallel' keyType='ed25519'                 ***     -5.98 %       ±0.50% ±0.66% ±0.86%
crypto/oneshot-sign.js n=1000 keyFormat='keyObject' mode='async-parallel' keyType='rsa'                       *     -0.10 %       ±0.08% ±0.11% ±0.14%
crypto/oneshot-sign.js n=1000 keyFormat='keyObject' mode='async' keyType='ec'                               ***     -9.85 %       ±0.32% ±0.42% ±0.55%
crypto/oneshot-sign.js n=1000 keyFormat='keyObject' mode='async' keyType='ed25519'                          ***     -2.64 %       ±0.33% ±0.43% ±0.57%
crypto/oneshot-sign.js n=1000 keyFormat='keyObject' mode='async' keyType='rsa'                                       0.03 %       ±0.11% ±0.14% ±0.19%
crypto/oneshot-sign.js n=1000 keyFormat='keyObject' mode='sync' keyType='ec'                                ***     -9.33 %       ±0.30% ±0.41% ±0.54%
crypto/oneshot-sign.js n=1000 keyFormat='keyObject' mode='sync' keyType='ed25519'                           ***     -4.26 %       ±1.20% ±1.61% ±2.14%
crypto/oneshot-sign.js n=1000 keyFormat='keyObject' mode='sync' keyType='rsa'                                        0.01 %       ±0.14% ±0.18% ±0.24%
crypto/oneshot-sign.js n=1000 keyFormat='pem' mode='async-parallel' keyType='ec'                            ***    -73.09 %       ±0.53% ±0.71% ±0.94%
crypto/oneshot-sign.js n=1000 keyFormat='pem' mode='async-parallel' keyType='ed25519'                       ***    -56.33 %       ±0.32% ±0.43% ±0.56%
crypto/oneshot-sign.js n=1000 keyFormat='pem' mode='async-parallel' keyType='rsa'                           ***      0.31 %       ±0.14% ±0.19% ±0.24%
crypto/oneshot-sign.js n=1000 keyFormat='pem' mode='async' keyType='ec'                                     ***    -57.03 %       ±0.66% ±0.90% ±1.19%
crypto/oneshot-sign.js n=1000 keyFormat='pem' mode='async' keyType='ed25519'                                ***    -38.77 %       ±0.39% ±0.52% ±0.68%
crypto/oneshot-sign.js n=1000 keyFormat='pem' mode='async' keyType='rsa'                                    ***     -4.85 %       ±0.39% ±0.53% ±0.69%
crypto/oneshot-sign.js n=1000 keyFormat='pem' mode='sync' keyType='ec'                                      ***    -62.03 %       ±0.31% ±0.41% ±0.54%
crypto/oneshot-sign.js n=1000 keyFormat='pem' mode='sync' keyType='ed25519'                                 ***    -42.53 %       ±0.07% ±0.10% ±0.12%
crypto/oneshot-sign.js n=1000 keyFormat='pem' mode='sync' keyType='rsa'                                     ***     -4.78 %       ±0.10% ±0.14% ±0.18%
crypto/oneshot-verify.js n=1000 keyFormat='der' mode='async-parallel' keyType='ec'                          ***    -64.88 %       ±0.41% ±0.54% ±0.71%
crypto/oneshot-verify.js n=1000 keyFormat='der' mode='async-parallel' keyType='ed25519'                     ***    -22.50 %       ±0.45% ±0.59% ±0.77%
crypto/oneshot-verify.js n=1000 keyFormat='der' mode='async-parallel' keyType='rsa'                         ***    -80.31 %       ±0.64% ±0.87% ±1.15%
crypto/oneshot-verify.js n=1000 keyFormat='der' mode='async' keyType='ec'                                   ***    -26.46 %       ±0.29% ±0.39% ±0.51%
crypto/oneshot-verify.js n=1000 keyFormat='der' mode='async' keyType='ed25519'                              ***    -21.82 %       ±0.42% ±0.56% ±0.73%
crypto/oneshot-verify.js n=1000 keyFormat='der' mode='async' keyType='rsa'                                  ***    -46.52 %       ±0.28% ±0.37% ±0.48%
crypto/oneshot-verify.js n=1000 keyFormat='der' mode='sync' keyType='ec'                                    ***    -27.91 %       ±0.49% ±0.66% ±0.88%
crypto/oneshot-verify.js n=1000 keyFormat='der' mode='sync' keyType='ed25519'                               ***    -22.38 %       ±0.36% ±0.49% ±0.63%
crypto/oneshot-verify.js n=1000 keyFormat='der' mode='sync' keyType='rsa'                                   ***    -54.22 %       ±0.37% ±0.50% ±0.66%
crypto/oneshot-verify.js n=1000 keyFormat='jwk' mode='async-parallel' keyType='ec'                          ***     -6.12 %       ±0.28% ±0.37% ±0.48%
crypto/oneshot-verify.js n=1000 keyFormat='jwk' mode='async-parallel' keyType='ed25519'                     ***     -2.86 %       ±0.52% ±0.69% ±0.90%
crypto/oneshot-verify.js n=1000 keyFormat='jwk' mode='async-parallel' keyType='rsa'                         ***    -14.76 %       ±0.65% ±0.86% ±1.12%
crypto/oneshot-verify.js n=1000 keyFormat='jwk' mode='async' keyType='ec'                                   ***    -14.50 %       ±0.17% ±0.23% ±0.30%
crypto/oneshot-verify.js n=1000 keyFormat='jwk' mode='async' keyType='ed25519'                              ***     -5.12 %       ±0.45% ±0.60% ±0.78%
crypto/oneshot-verify.js n=1000 keyFormat='jwk' mode='async' keyType='rsa'                                  ***    -10.82 %       ±0.53% ±0.71% ±0.93%
crypto/oneshot-verify.js n=1000 keyFormat='jwk' mode='sync' keyType='ec'                                    ***    -15.23 %       ±0.57% ±0.77% ±1.02%
crypto/oneshot-verify.js n=1000 keyFormat='jwk' mode='sync' keyType='ed25519'                               ***     -4.96 %       ±0.34% ±0.45% ±0.59%
crypto/oneshot-verify.js n=1000 keyFormat='jwk' mode='sync' keyType='rsa'                                   ***    -10.38 %       ±0.62% ±0.83% ±1.08%
crypto/oneshot-verify.js n=1000 keyFormat='keyObject.unique' mode='async-parallel' keyType='ec'             ***     -5.17 %       ±1.03% ±1.38% ±1.82%
crypto/oneshot-verify.js n=1000 keyFormat='keyObject.unique' mode='async-parallel' keyType='ed25519'        ***     -3.08 %       ±0.61% ±0.81% ±1.06%
crypto/oneshot-verify.js n=1000 keyFormat='keyObject.unique' mode='async-parallel' keyType='rsa'            ***     -9.02 %       ±0.85% ±1.14% ±1.48%
crypto/oneshot-verify.js n=1000 keyFormat='keyObject' mode='async-parallel' keyType='ec'                    ***     -4.50 %       ±0.39% ±0.51% ±0.67%
crypto/oneshot-verify.js n=1000 keyFormat='keyObject' mode='async-parallel' keyType='ed25519'               ***     -2.53 %       ±0.56% ±0.75% ±0.98%
crypto/oneshot-verify.js n=1000 keyFormat='keyObject' mode='async-parallel' keyType='rsa'                   ***    -15.89 %       ±1.18% ±1.57% ±2.05%
crypto/oneshot-verify.js n=1000 keyFormat='keyObject' mode='async' keyType='ec'                             ***     -3.40 %       ±0.23% ±0.31% ±0.40%
crypto/oneshot-verify.js n=1000 keyFormat='keyObject' mode='async' keyType='ed25519'                        ***     -2.35 %       ±0.42% ±0.56% ±0.73%
crypto/oneshot-verify.js n=1000 keyFormat='keyObject' mode='async' keyType='rsa'                            ***     -7.96 %       ±3.00% ±4.04% ±5.36%
crypto/oneshot-verify.js n=1000 keyFormat='keyObject' mode='sync' keyType='ec'                              ***     -3.02 %       ±0.60% ±0.79% ±1.03%
crypto/oneshot-verify.js n=1000 keyFormat='keyObject' mode='sync' keyType='ed25519'                         ***     -2.40 %       ±0.45% ±0.60% ±0.78%
crypto/oneshot-verify.js n=1000 keyFormat='keyObject' mode='sync' keyType='rsa'                             ***     -8.88 %       ±0.24% ±0.31% ±0.41%
crypto/oneshot-verify.js n=1000 keyFormat='pem' mode='async-parallel' keyType='ec'                          ***    -61.81 %       ±1.01% ±1.36% ±1.81%
crypto/oneshot-verify.js n=1000 keyFormat='pem' mode='async-parallel' keyType='ed25519'                     ***    -26.07 %       ±0.47% ±0.62% ±0.81%
crypto/oneshot-verify.js n=1000 keyFormat='pem' mode='async-parallel' keyType='rsa'                         ***    -81.46 %       ±1.07% ±1.43% ±1.90%
crypto/oneshot-verify.js n=1000 keyFormat='pem' mode='async' keyType='ec'                                   ***    -25.37 %       ±0.62% ±0.84% ±1.10%
crypto/oneshot-verify.js n=1000 keyFormat='pem' mode='async' keyType='ed25519'                              ***    -21.56 %       ±0.34% ±0.45% ±0.59%
crypto/oneshot-verify.js n=1000 keyFormat='pem' mode='async' keyType='rsa'                                  ***    -44.51 %       ±0.55% ±0.74% ±0.97%
crypto/oneshot-verify.js n=1000 keyFormat='pem' mode='sync' keyType='ec'                                    ***    -27.17 %       ±1.87% ±2.52% ±3.35%
crypto/oneshot-verify.js n=1000 keyFormat='pem' mode='sync' keyType='ed25519'                               ***    -22.17 %       ±0.42% ±0.56% ±0.73%
crypto/oneshot-verify.js n=1000 keyFormat='pem' mode='sync' keyType='rsa'                                   ***    -52.07 %       ±0.39% ±0.52% ±0.69%

Be aware that when doing many comparisons the risk of a false-positive result increases.
In this case, there are 96 comparisons, you can thus expect the following amount of false-positive results:
  4.80 false positives, when considering a   5% risk acceptance (*, **, ***),
  0.96 false positives, when considering a   1% risk acceptance (**, ***),
  0.10 false positives, when considering a 0.1% risk acceptance (***)
OpenSSL 3.0.12 vs 3.1.3

compare-3.0.12-vs-3.1.3.csv

crypto/create-keyobject.js n=1000 keyFormat='der-pkcs8' keyType='ec'                                        ***    530.14 %       ±1.45% ±1.95% ±2.59%
crypto/create-keyobject.js n=1000 keyFormat='der-pkcs8' keyType='ed25519'                                   ***    397.12 %       ±0.76% ±1.02% ±1.34%
crypto/create-keyobject.js n=1000 keyFormat='der-pkcs8' keyType='rsa'                                       ***    637.97 %       ±1.65% ±2.22% ±2.95%
crypto/create-keyobject.js n=1000 keyFormat='der-spki' keyType='ec'                                         ***    113.75 %       ±0.45% ±0.60% ±0.79%
crypto/create-keyobject.js n=1000 keyFormat='der-spki' keyType='ed25519'                                    ***    110.05 %       ±0.84% ±1.13% ±1.50%
crypto/create-keyobject.js n=1000 keyFormat='der-spki' keyType='rsa'                                        ***    154.10 %       ±0.57% ±0.77% ±1.01%
crypto/create-keyobject.js n=1000 keyFormat='jwk-private' keyType='ec'                                              -0.12 %       ±0.27% ±0.37% ±0.48%
crypto/create-keyobject.js n=1000 keyFormat='jwk-private' keyType='ed25519'                                 ***      5.08 %       ±0.37% ±0.49% ±0.65%
crypto/create-keyobject.js n=1000 keyFormat='jwk-private' keyType='rsa'                                              0.11 %       ±1.07% ±1.43% ±1.88%
crypto/create-keyobject.js n=1000 keyFormat='jwk-public' keyType='ec'                                                0.03 %       ±0.41% ±0.54% ±0.70%
crypto/create-keyobject.js n=1000 keyFormat='jwk-public' keyType='ed25519'                                    *      1.05 %       ±0.82% ±1.10% ±1.44%
crypto/create-keyobject.js n=1000 keyFormat='jwk-public' keyType='rsa'                                               0.40 %       ±0.68% ±0.90% ±1.17%
crypto/create-keyobject.js n=1000 keyFormat='pkcs8' keyType='ec'                                            ***    300.02 %       ±0.82% ±1.11% ±1.46%
crypto/create-keyobject.js n=1000 keyFormat='pkcs8' keyType='ed25519'                                       ***    246.48 %       ±0.67% ±0.90% ±1.20%
crypto/create-keyobject.js n=1000 keyFormat='pkcs8' keyType='rsa'                                           ***    289.08 %       ±1.00% ±1.34% ±1.78%
crypto/create-keyobject.js n=1000 keyFormat='spki' keyType='ec'                                             ***    111.66 %       ±1.04% ±1.39% ±1.84%
crypto/create-keyobject.js n=1000 keyFormat='spki' keyType='ed25519'                                        ***    107.97 %       ±1.01% ±1.36% ±1.79%
crypto/create-keyobject.js n=1000 keyFormat='spki' keyType='rsa'                                            ***    143.36 %       ±0.41% ±0.55% ±0.73%
crypto/oneshot-sign.js n=1000 keyFormat='der' mode='async-parallel' keyType='ec'                            ***    468.36 %       ±1.59% ±2.14% ±2.84%
crypto/oneshot-sign.js n=1000 keyFormat='der' mode='async-parallel' keyType='ed25519'                       ***    365.29 %       ±2.24% ±3.01% ±4.00%
crypto/oneshot-sign.js n=1000 keyFormat='der' mode='async-parallel' keyType='rsa'                           ***     32.48 %       ±0.21% ±0.28% ±0.37%
crypto/oneshot-sign.js n=1000 keyFormat='der' mode='async' keyType='ec'                                     ***    285.38 %       ±5.09% ±6.86% ±9.10%
crypto/oneshot-sign.js n=1000 keyFormat='der' mode='async' keyType='ed25519'                                ***    226.60 %       ±0.90% ±1.20% ±1.57%
crypto/oneshot-sign.js n=1000 keyFormat='der' mode='async' keyType='rsa'                                    ***     27.24 %       ±0.59% ±0.79% ±1.04%
crypto/oneshot-sign.js n=1000 keyFormat='der' mode='sync' keyType='ec'                                      ***    359.61 %       ±0.96% ±1.30% ±1.72%
crypto/oneshot-sign.js n=1000 keyFormat='der' mode='sync' keyType='ed25519'                                 ***    253.38 %       ±0.63% ±0.84% ±1.11%
crypto/oneshot-sign.js n=1000 keyFormat='der' mode='sync' keyType='rsa'                                     ***     28.13 %       ±0.24% ±0.32% ±0.42%
crypto/oneshot-sign.js n=1000 keyFormat='jwk' mode='async-parallel' keyType='ec'                                    -0.19 %       ±0.48% ±0.64% ±0.84%
crypto/oneshot-sign.js n=1000 keyFormat='jwk' mode='async-parallel' keyType='ed25519'                       ***      4.35 %       ±0.43% ±0.57% ±0.75%
crypto/oneshot-sign.js n=1000 keyFormat='jwk' mode='async-parallel' keyType='rsa'                           ***      1.08 %       ±0.11% ±0.15% ±0.19%
crypto/oneshot-sign.js n=1000 keyFormat='jwk' mode='async' keyType='ec'                                             -0.91 %       ±0.92% ±1.23% ±1.61%
crypto/oneshot-sign.js n=1000 keyFormat='jwk' mode='async' keyType='ed25519'                                ***      5.69 %       ±1.30% ±1.74% ±2.30%
crypto/oneshot-sign.js n=1000 keyFormat='jwk' mode='async' keyType='rsa'                                    ***      1.03 %       ±0.20% ±0.26% ±0.34%
crypto/oneshot-sign.js n=1000 keyFormat='jwk' mode='sync' keyType='ec'                                       **      0.69 %       ±0.41% ±0.55% ±0.73%
crypto/oneshot-sign.js n=1000 keyFormat='jwk' mode='sync' keyType='ed25519'                                 ***      5.15 %       ±0.47% ±0.62% ±0.82%
crypto/oneshot-sign.js n=1000 keyFormat='jwk' mode='sync' keyType='rsa'                                     ***      0.93 %       ±0.18% ±0.24% ±0.31%
crypto/oneshot-sign.js n=1000 keyFormat='keyObject.unique' mode='async-parallel' keyType='ec'               ***      8.35 %       ±1.22% ±1.62% ±2.11%
crypto/oneshot-sign.js n=1000 keyFormat='keyObject.unique' mode='async-parallel' keyType='ed25519'          ***      6.33 %       ±0.49% ±0.65% ±0.85%
crypto/oneshot-sign.js n=1000 keyFormat='keyObject.unique' mode='async-parallel' keyType='rsa'              ***      1.01 %       ±0.11% ±0.15% ±0.20%
crypto/oneshot-sign.js n=1000 keyFormat='keyObject' mode='async-parallel' keyType='ec'                      ***      8.72 %       ±1.39% ±1.85% ±2.40%
crypto/oneshot-sign.js n=1000 keyFormat='keyObject' mode='async-parallel' keyType='ed25519'                 ***      5.59 %       ±0.67% ±0.89% ±1.17%
crypto/oneshot-sign.js n=1000 keyFormat='keyObject' mode='async-parallel' keyType='rsa'                     ***      1.77 %       ±0.10% ±0.13% ±0.17%
crypto/oneshot-sign.js n=1000 keyFormat='keyObject' mode='async' keyType='ec'                                **      1.13 %       ±0.66% ±0.88% ±1.15%
crypto/oneshot-sign.js n=1000 keyFormat='keyObject' mode='async' keyType='ed25519'                          ***      4.37 %       ±0.25% ±0.34% ±0.44%
crypto/oneshot-sign.js n=1000 keyFormat='keyObject' mode='async' keyType='rsa'                              ***      1.72 %       ±0.19% ±0.25% ±0.33%
crypto/oneshot-sign.js n=1000 keyFormat='keyObject' mode='sync' keyType='ec'                                ***      3.25 %       ±0.58% ±0.77% ±1.02%
crypto/oneshot-sign.js n=1000 keyFormat='keyObject' mode='sync' keyType='ed25519'                           ***      5.51 %       ±0.14% ±0.19% ±0.24%
crypto/oneshot-sign.js n=1000 keyFormat='keyObject' mode='sync' keyType='rsa'                               ***      1.48 %       ±0.48% ±0.64% ±0.85%
crypto/oneshot-sign.js n=1000 keyFormat='pem' mode='async-parallel' keyType='ec'                            ***    269.20 %       ±1.45% ±1.95% ±2.59%
crypto/oneshot-sign.js n=1000 keyFormat='pem' mode='async-parallel' keyType='ed25519'                       ***    229.31 %       ±0.71% ±0.96% ±1.27%
crypto/oneshot-sign.js n=1000 keyFormat='pem' mode='async-parallel' keyType='rsa'                           ***     27.08 %       ±0.34% ±0.46% ±0.60%
crypto/oneshot-sign.js n=1000 keyFormat='pem' mode='async' keyType='ec'                                     ***    191.99 %       ±0.89% ±1.19% ±1.54%
crypto/oneshot-sign.js n=1000 keyFormat='pem' mode='async' keyType='ed25519'                                ***    160.63 %       ±0.93% ±1.24% ±1.63%
crypto/oneshot-sign.js n=1000 keyFormat='pem' mode='async' keyType='rsa'                                    ***     23.29 %       ±0.27% ±0.36% ±0.47%
crypto/oneshot-sign.js n=1000 keyFormat='pem' mode='sync' keyType='ec'                                      ***    225.98 %       ±1.19% ±1.60% ±2.12%
crypto/oneshot-sign.js n=1000 keyFormat='pem' mode='sync' keyType='ed25519'                                 ***    176.01 %       ±0.46% ±0.61% ±0.80%
crypto/oneshot-sign.js n=1000 keyFormat='pem' mode='sync' keyType='rsa'                                     ***     23.63 %       ±0.21% ±0.27% ±0.36%
crypto/oneshot-verify.js n=1000 keyFormat='der' mode='async-parallel' keyType='ec'                          ***    101.62 %       ±1.01% ±1.36% ±1.80%
crypto/oneshot-verify.js n=1000 keyFormat='der' mode='async-parallel' keyType='ed25519'                     ***     99.24 %       ±0.76% ±1.02% ±1.33%
crypto/oneshot-verify.js n=1000 keyFormat='der' mode='async-parallel' keyType='rsa'                         ***    135.00 %       ±1.47% ±1.96% ±2.57%
crypto/oneshot-verify.js n=1000 keyFormat='der' mode='async' keyType='ec'                                   ***     39.13 %       ±0.30% ±0.40% ±0.52%
crypto/oneshot-verify.js n=1000 keyFormat='der' mode='async' keyType='ed25519'                              ***     22.49 %       ±0.81% ±1.08% ±1.42%
crypto/oneshot-verify.js n=1000 keyFormat='der' mode='async' keyType='rsa'                                  ***     70.49 %       ±0.49% ±0.66% ±0.86%
crypto/oneshot-verify.js n=1000 keyFormat='der' mode='sync' keyType='ec'                                    ***     45.29 %       ±0.70% ±0.94% ±1.25%
crypto/oneshot-verify.js n=1000 keyFormat='der' mode='sync' keyType='ed25519'                               ***     25.07 %       ±0.45% ±0.60% ±0.78%
crypto/oneshot-verify.js n=1000 keyFormat='der' mode='sync' keyType='rsa'                                   ***     86.03 %       ±0.32% ±0.43% ±0.57%
crypto/oneshot-verify.js n=1000 keyFormat='jwk' mode='async-parallel' keyType='ec'                           **     -0.26 %       ±0.19% ±0.26% ±0.33%
crypto/oneshot-verify.js n=1000 keyFormat='jwk' mode='async-parallel' keyType='ed25519'                      **      0.51 %       ±0.37% ±0.49% ±0.64%
crypto/oneshot-verify.js n=1000 keyFormat='jwk' mode='async-parallel' keyType='rsa'                         ***      7.76 %       ±0.70% ±0.93% ±1.21%
crypto/oneshot-verify.js n=1000 keyFormat='jwk' mode='async' keyType='ec'                                            0.15 %       ±0.17% ±0.23% ±0.30%
crypto/oneshot-verify.js n=1000 keyFormat='jwk' mode='async' keyType='ed25519'                                       0.16 %       ±0.35% ±0.47% ±0.61%
crypto/oneshot-verify.js n=1000 keyFormat='jwk' mode='async' keyType='rsa'                                  ***      2.33 %       ±0.37% ±0.49% ±0.63%
crypto/oneshot-verify.js n=1000 keyFormat='jwk' mode='sync' keyType='ec'                                            -0.04 %       ±0.37% ±0.50% ±0.67%
crypto/oneshot-verify.js n=1000 keyFormat='jwk' mode='sync' keyType='ed25519'                                       -0.08 %       ±0.52% ±0.69% ±0.91%
crypto/oneshot-verify.js n=1000 keyFormat='jwk' mode='sync' keyType='rsa'                                   ***      2.30 %       ±0.15% ±0.20% ±0.26%
crypto/oneshot-verify.js n=1000 keyFormat='keyObject.unique' mode='async-parallel' keyType='ec'             ***      1.65 %       ±0.30% ±0.40% ±0.53%
crypto/oneshot-verify.js n=1000 keyFormat='keyObject.unique' mode='async-parallel' keyType='ed25519'                 0.28 %       ±0.41% ±0.55% ±0.71%
crypto/oneshot-verify.js n=1000 keyFormat='keyObject.unique' mode='async-parallel' keyType='rsa'            ***      5.77 %       ±0.88% ±1.17% ±1.53%
crypto/oneshot-verify.js n=1000 keyFormat='keyObject' mode='async-parallel' keyType='ec'                    ***      1.39 %       ±0.27% ±0.36% ±0.47%
crypto/oneshot-verify.js n=1000 keyFormat='keyObject' mode='async-parallel' keyType='ed25519'                        0.41 %       ±0.51% ±0.68% ±0.89%
crypto/oneshot-verify.js n=1000 keyFormat='keyObject' mode='async-parallel' keyType='rsa'                   ***     12.54 %       ±2.74% ±3.66% ±4.79%
crypto/oneshot-verify.js n=1000 keyFormat='keyObject' mode='async' keyType='ec'                             ***      0.33 %       ±0.18% ±0.24% ±0.31%
crypto/oneshot-verify.js n=1000 keyFormat='keyObject' mode='async' keyType='ed25519'                                -0.97 %       ±1.81% ±2.44% ±3.23%
crypto/oneshot-verify.js n=1000 keyFormat='keyObject' mode='async' keyType='rsa'                            ***      0.98 %       ±0.31% ±0.41% ±0.54%
crypto/oneshot-verify.js n=1000 keyFormat='keyObject' mode='sync' keyType='ec'                              ***      0.66 %       ±0.09% ±0.12% ±0.16%
crypto/oneshot-verify.js n=1000 keyFormat='keyObject' mode='sync' keyType='ed25519'                                 -0.78 %       ±1.77% ±2.38% ±3.15%
crypto/oneshot-verify.js n=1000 keyFormat='keyObject' mode='sync' keyType='rsa'                             ***      3.09 %       ±0.17% ±0.23% ±0.30%
crypto/oneshot-verify.js n=1000 keyFormat='pem' mode='async-parallel' keyType='ec'                          ***     96.89 %       ±0.91% ±1.22% ±1.61%
crypto/oneshot-verify.js n=1000 keyFormat='pem' mode='async-parallel' keyType='ed25519'                     ***     93.14 %       ±0.88% ±1.18% ±1.55%
crypto/oneshot-verify.js n=1000 keyFormat='pem' mode='async-parallel' keyType='rsa'                         ***    125.13 %       ±0.45% ±0.60% ±0.78%
crypto/oneshot-verify.js n=1000 keyFormat='pem' mode='async' keyType='ec'                                   ***     39.00 %       ±0.25% ±0.34% ±0.44%
crypto/oneshot-verify.js n=1000 keyFormat='pem' mode='async' keyType='ed25519'                              ***     21.67 %       ±0.54% ±0.72% ±0.95%
crypto/oneshot-verify.js n=1000 keyFormat='pem' mode='async' keyType='rsa'                                  ***     66.71 %       ±0.49% ±0.66% ±0.87%
crypto/oneshot-verify.js n=1000 keyFormat='pem' mode='sync' keyType='ec'                                    ***     44.74 %       ±0.24% ±0.31% ±0.41%
crypto/oneshot-verify.js n=1000 keyFormat='pem' mode='sync' keyType='ed25519'                               ***     24.59 %       ±0.32% ±0.43% ±0.56%
crypto/oneshot-verify.js n=1000 keyFormat='pem' mode='sync' keyType='rsa'                                   ***     81.97 %       ±0.38% ±0.51% ±0.67%

Be aware that when doing many comparisons the risk of a false-positive result increases.
In this case, there are 96 comparisons, you can thus expect the following amount of false-positive results:
  4.80 false positives, when considering a   5% risk acceptance (*, **, ***),
  0.96 false positives, when considering a   1% risk acceptance (**, ***),
  0.10 false positives, when considering a 0.1% risk acceptance (***)

Does anyone feel like plotting this to a chart(s)?

Verify

https://gist.githubusercontent.com/panva/7ea8d8514a0ad43adc743747e0aaa383/raw/13afc68a3130f743da4ddd9bbcf3dfd1ba0c64de/oneshot-verify.js

v18.16.0 w/ OpenSSL 1.1.1 `benchmark/crypto/oneshot-verify.js`
crypto/oneshot-verify.js n=1000 keyFormat="pem" mode="sync" keyType="rsa": 35,379.86261716307
crypto/oneshot-verify.js n=1000 keyFormat="der" mode="sync" keyType="rsa": 39,464.72571778837
crypto/oneshot-verify.js n=1000 keyFormat="createPublicKey" mode="sync" keyType="rsa": 34,436.101265829755
crypto/oneshot-verify.js n=1000 keyFormat="jwk" mode="sync" keyType="rsa": 38,691.3921170622
crypto/oneshot-verify.js n=1000 keyFormat="keyObject" mode="sync" keyType="rsa": 62,954.28599704039
crypto/oneshot-verify.js n=1000 keyFormat="pem" mode="async" keyType="rsa": 26,123.98443010528
crypto/oneshot-verify.js n=1000 keyFormat="der" mode="async" keyType="rsa": 28,336.171153647418
crypto/oneshot-verify.js n=1000 keyFormat="createPublicKey" mode="async" keyType="rsa": 25,302.06938793965
crypto/oneshot-verify.js n=1000 keyFormat="jwk" mode="async" keyType="rsa": 27,914.669767502623
crypto/oneshot-verify.js n=1000 keyFormat="keyObject" mode="async" keyType="rsa": 40,339.52487220136
crypto/oneshot-verify.js n=1000 keyFormat="pem" mode="async-parallel" keyType="rsa": 135,874.93744657567
crypto/oneshot-verify.js n=1000 keyFormat="der" mode="async-parallel" keyType="rsa": 147,897.09556725784
crypto/oneshot-verify.js n=1000 keyFormat="createPublicKey" mode="async-parallel" keyType="rsa": 90,189.95718592544
crypto/oneshot-verify.js n=1000 keyFormat="jwk" mode="async-parallel" keyType="rsa": 148,113.4128100032
crypto/oneshot-verify.js n=1000 keyFormat="keyObject" mode="async-parallel" keyType="rsa": 198,067.18121879452
crypto/oneshot-verify.js n=1000 keyFormat="keyObject.unique" mode="async-parallel" keyType="rsa": 143,722.88847362556
crypto/oneshot-verify.js n=1000 keyFormat="pem" mode="sync" keyType="ec": 14,849.307446119881
crypto/oneshot-verify.js n=1000 keyFormat="der" mode="sync" keyType="ec": 15,214.042561284065
crypto/oneshot-verify.js n=1000 keyFormat="createPublicKey" mode="sync" keyType="ec": 14,591.005010186347
crypto/oneshot-verify.js n=1000 keyFormat="jwk" mode="sync" keyType="ec": 9,465.267565082731
crypto/oneshot-verify.js n=1000 keyFormat="keyObject" mode="sync" keyType="ec": 18,429.131429322704
crypto/oneshot-verify.js n=1000 keyFormat="pem" mode="async" keyType="ec": 12,763.920542348173
crypto/oneshot-verify.js n=1000 keyFormat="der" mode="async" keyType="ec": 13,026.791224502093
crypto/oneshot-verify.js n=1000 keyFormat="createPublicKey" mode="async" keyType="ec": 11,772.739045466318
crypto/oneshot-verify.js n=1000 keyFormat="jwk" mode="async" keyType="ec": 8,480.556428982196
crypto/oneshot-verify.js n=1000 keyFormat="keyObject" mode="async" keyType="ec": 15,589.760564194681
crypto/oneshot-verify.js n=1000 keyFormat="pem" mode="async-parallel" keyType="ec": 57,549.955663514156
crypto/oneshot-verify.js n=1000 keyFormat="der" mode="async-parallel" keyType="ec": 67,075.26683379587
crypto/oneshot-verify.js n=1000 keyFormat="createPublicKey" mode="async-parallel" keyType="ec": 52,266.28984762338
crypto/oneshot-verify.js n=1000 keyFormat="jwk" mode="async-parallel" keyType="ec": 17,168.733072487626
crypto/oneshot-verify.js n=1000 keyFormat="keyObject" mode="async-parallel" keyType="ec": 67,972.87882135028
crypto/oneshot-verify.js n=1000 keyFormat="keyObject.unique" mode="async-parallel" keyType="ec": 67,654.42121642649
crypto/oneshot-verify.js n=1000 keyFormat="pem" mode="sync" keyType="ed25519": 11,466.991353762383
crypto/oneshot-verify.js n=1000 keyFormat="der" mode="sync" keyType="ed25519": 11,783.66371780482
crypto/oneshot-verify.js n=1000 keyFormat="createPublicKey" mode="sync" keyType="ed25519": 11,224.588583751565
crypto/oneshot-verify.js n=1000 keyFormat="jwk" mode="sync" keyType="ed25519": 11,601.539375775461
crypto/oneshot-verify.js n=1000 keyFormat="keyObject" mode="sync" keyType="ed25519": 12,039.918300967183
crypto/oneshot-verify.js n=1000 keyFormat="pem" mode="async" keyType="ed25519": 10,228.086325048584
crypto/oneshot-verify.js n=1000 keyFormat="der" mode="async" keyType="ed25519": 10,216.561266490706
crypto/oneshot-verify.js n=1000 keyFormat="createPublicKey" mode="async" keyType="ed25519": 10,110.030801523142
crypto/oneshot-verify.js n=1000 keyFormat="jwk" mode="async" keyType="ed25519": 10,505.32813434449
crypto/oneshot-verify.js n=1000 keyFormat="keyObject" mode="async" keyType="ed25519": 10,566.347341788074
crypto/oneshot-verify.js n=1000 keyFormat="pem" mode="async-parallel" keyType="ed25519": 45,142.1413174734
crypto/oneshot-verify.js n=1000 keyFormat="der" mode="async-parallel" keyType="ed25519": 43,867.98596417469
crypto/oneshot-verify.js n=1000 keyFormat="createPublicKey" mode="async-parallel" keyType="ed25519": 45,332.113718145854
crypto/oneshot-verify.js n=1000 keyFormat="jwk" mode="async-parallel" keyType="ed25519": 43,712.82197170793
crypto/oneshot-verify.js n=1000 keyFormat="keyObject" mode="async-parallel" keyType="ed25519": 44,721.719102882314
crypto/oneshot-verify.js n=1000 keyFormat="keyObject.unique" mode="async-parallel" keyType="ed25519": 44,326.158612647974

v18.16.0 w/ OpenSSL 3.0.x `benchmark/crypto/oneshot-verify.js`
crypto/oneshot-verify.js n=1000 keyFormat="pem" mode="sync" keyType="rsa": 10,185.542386498046
crypto/oneshot-verify.js n=1000 keyFormat="der" mode="sync" keyType="rsa": 10,442.914497133776
crypto/oneshot-verify.js n=1000 keyFormat="createPublicKey" mode="sync" keyType="rsa": 10,089.676235204397
crypto/oneshot-verify.js n=1000 keyFormat="jwk" mode="sync" keyType="rsa": 35,880.17771595543
crypto/oneshot-verify.js n=1000 keyFormat="keyObject" mode="sync" keyType="rsa": 57,090.11566286163
crypto/oneshot-verify.js n=1000 keyFormat="pem" mode="async" keyType="rsa": 9,114.478967802028
crypto/oneshot-verify.js n=1000 keyFormat="der" mode="async" keyType="rsa": 9,369.45515643842
crypto/oneshot-verify.js n=1000 keyFormat="createPublicKey" mode="async" keyType="rsa": 8,968.790850039575
crypto/oneshot-verify.js n=1000 keyFormat="jwk" mode="async" keyType="rsa": 26,137.52740977156
crypto/oneshot-verify.js n=1000 keyFormat="keyObject" mode="async" keyType="rsa": 37,650.89726606293
crypto/oneshot-verify.js n=1000 keyFormat="pem" mode="async-parallel" keyType="rsa": 12,415.696181358953
crypto/oneshot-verify.js n=1000 keyFormat="der" mode="async-parallel" keyType="rsa": 12,665.47570665502
crypto/oneshot-verify.js n=1000 keyFormat="createPublicKey" mode="async-parallel" keyType="rsa": 12,013.888054591107
crypto/oneshot-verify.js n=1000 keyFormat="jwk" mode="async-parallel" keyType="rsa": 121,666.22380161202
crypto/oneshot-verify.js n=1000 keyFormat="keyObject" mode="async-parallel" keyType="rsa": 158,281.067605801
crypto/oneshot-verify.js n=1000 keyFormat="keyObject.unique" mode="async-parallel" keyType="rsa": 126,527.55131103421
crypto/oneshot-verify.js n=1000 keyFormat="pem" mode="sync" keyType="ec": 7,974.534631478054
crypto/oneshot-verify.js n=1000 keyFormat="der" mode="sync" keyType="ec": 8,099.3492747911505
crypto/oneshot-verify.js n=1000 keyFormat="createPublicKey" mode="sync" keyType="ec": 7,855.891525849812
crypto/oneshot-verify.js n=1000 keyFormat="jwk" mode="sync" keyType="ec": 8,067.007272923344
crypto/oneshot-verify.js n=1000 keyFormat="keyObject" mode="sync" keyType="ec": 17,923.716661887007
crypto/oneshot-verify.js n=1000 keyFormat="pem" mode="async" keyType="ec": 7,241.147129204497
crypto/oneshot-verify.js n=1000 keyFormat="der" mode="async" keyType="ec": 7,332.755878807878
crypto/oneshot-verify.js n=1000 keyFormat="createPublicKey" mode="async" keyType="ec": 7,133.767958146183
crypto/oneshot-verify.js n=1000 keyFormat="jwk" mode="async" keyType="ec": 7,312.418174497654
crypto/oneshot-verify.js n=1000 keyFormat="keyObject" mode="async" keyType="ec": 15,022.80657334319
crypto/oneshot-verify.js n=1000 keyFormat="pem" mode="async-parallel" keyType="ec": 12,999.470869537727
crypto/oneshot-verify.js n=1000 keyFormat="der" mode="async-parallel" keyType="ec": 13,106.732434327701
crypto/oneshot-verify.js n=1000 keyFormat="createPublicKey" mode="async-parallel" keyType="ec": 12,735.020829718445
crypto/oneshot-verify.js n=1000 keyFormat="jwk" mode="async-parallel" keyType="ec": 16,407.33963962558
crypto/oneshot-verify.js n=1000 keyFormat="keyObject" mode="async-parallel" keyType="ec": 64,274.23812049787
crypto/oneshot-verify.js n=1000 keyFormat="keyObject.unique" mode="async-parallel" keyType="ec": 64,418.29219248366
crypto/oneshot-verify.js n=1000 keyFormat="pem" mode="sync" keyType="ed25519": 7,872.269777772988
crypto/oneshot-verify.js n=1000 keyFormat="der" mode="sync" keyType="ed25519": 7,928.288629347551
crypto/oneshot-verify.js n=1000 keyFormat="createPublicKey" mode="sync" keyType="ed25519": 7,726.345692220772
crypto/oneshot-verify.js n=1000 keyFormat="jwk" mode="sync" keyType="ed25519": 11,325.065635267269
crypto/oneshot-verify.js n=1000 keyFormat="keyObject" mode="sync" keyType="ed25519": 12,026.44605867145
crypto/oneshot-verify.js n=1000 keyFormat="pem" mode="async" keyType="ed25519": 7,125.971136253912
crypto/oneshot-verify.js n=1000 keyFormat="der" mode="async" keyType="ed25519": 7,142.544656528419
crypto/oneshot-verify.js n=1000 keyFormat="createPublicKey" mode="async" keyType="ed25519": 6,960.496267235502
crypto/oneshot-verify.js n=1000 keyFormat="jwk" mode="async" keyType="ed25519": 10,163.55270318385
crypto/oneshot-verify.js n=1000 keyFormat="keyObject" mode="async" keyType="ed25519": 10,535.455796424989
crypto/oneshot-verify.js n=1000 keyFormat="pem" mode="async-parallel" keyType="ed25519": 19,752.436003736922
crypto/oneshot-verify.js n=1000 keyFormat="der" mode="async-parallel" keyType="ed25519": 20,068.617815289326
crypto/oneshot-verify.js n=1000 keyFormat="createPublicKey" mode="async-parallel" keyType="ed25519": 18,475.096226153062
crypto/oneshot-verify.js n=1000 keyFormat="jwk" mode="async-parallel" keyType="ed25519": 44,223.57226960901
crypto/oneshot-verify.js n=1000 keyFormat="keyObject" mode="async-parallel" keyType="ed25519": 44,613.64516367787
crypto/oneshot-verify.js n=1000 keyFormat="keyObject.unique" mode="async-parallel" keyType="ed25519": 43,780.44108794396

v18.16.0 w/ OpenSSL 3.1.x `benchmark/crypto/oneshot-verify.js`
crypto/oneshot-verify.js n=1000 keyFormat="pem" mode="sync" keyType="rsa": 16,698.161347086094
crypto/oneshot-verify.js n=1000 keyFormat="der" mode="sync" keyType="rsa": 17,673.465059559578
crypto/oneshot-verify.js n=1000 keyFormat="createPublicKey" mode="sync" keyType="rsa": 16,654.234003412552
crypto/oneshot-verify.js n=1000 keyFormat="jwk" mode="sync" keyType="rsa": 34,950.21778354456
crypto/oneshot-verify.js n=1000 keyFormat="keyObject" mode="sync" keyType="rsa": 57,703.957233519955
crypto/oneshot-verify.js n=1000 keyFormat="pem" mode="async" keyType="rsa": 13,827.346060225447
crypto/oneshot-verify.js n=1000 keyFormat="der" mode="async" keyType="rsa": 14,920.408869335593
crypto/oneshot-verify.js n=1000 keyFormat="createPublicKey" mode="async" keyType="rsa": 13,528.92387192011
crypto/oneshot-verify.js n=1000 keyFormat="jwk" mode="async" keyType="rsa": 25,320.622380898123
crypto/oneshot-verify.js n=1000 keyFormat="keyObject" mode="async" keyType="rsa": 37,944.30360572954
crypto/oneshot-verify.js n=1000 keyFormat="pem" mode="async-parallel" keyType="rsa": 24,803.33005540791
crypto/oneshot-verify.js n=1000 keyFormat="der" mode="async-parallel" keyType="rsa": 26,962.74783618556
crypto/oneshot-verify.js n=1000 keyFormat="createPublicKey" mode="async-parallel" keyType="rsa": 22,283.688061792665
crypto/oneshot-verify.js n=1000 keyFormat="jwk" mode="async-parallel" keyType="rsa": 129,729.02849173789
crypto/oneshot-verify.js n=1000 keyFormat="keyObject" mode="async-parallel" keyType="rsa": 173,185.153806601
crypto/oneshot-verify.js n=1000 keyFormat="keyObject.unique" mode="async-parallel" keyType="rsa": 131,446.35950106118
crypto/oneshot-verify.js n=1000 keyFormat="pem" mode="sync" keyType="ec": 10,685.330377058595
crypto/oneshot-verify.js n=1000 keyFormat="der" mode="sync" keyType="ec": 11,030.511774381912
crypto/oneshot-verify.js n=1000 keyFormat="createPublicKey" mode="sync" keyType="ec": 10,108.621382374597
crypto/oneshot-verify.js n=1000 keyFormat="jwk" mode="sync" keyType="ec": 6,155.121381363362
crypto/oneshot-verify.js n=1000 keyFormat="keyObject" mode="sync" keyType="ec": 17,791.74769992289
crypto/oneshot-verify.js n=1000 keyFormat="pem" mode="async" keyType="ec": 9,345.841733142237
crypto/oneshot-verify.js n=1000 keyFormat="der" mode="async" keyType="ec": 9,478.766515601354
crypto/oneshot-verify.js n=1000 keyFormat="createPublicKey" mode="async" keyType="ec": 9,199.106641637247
crypto/oneshot-verify.js n=1000 keyFormat="jwk" mode="async" keyType="ec": 5,727.334480434429
crypto/oneshot-verify.js n=1000 keyFormat="keyObject" mode="async" keyType="ec": 14,488.379182557823
crypto/oneshot-verify.js n=1000 keyFormat="pem" mode="async-parallel" keyType="ec": 22,601.50919769547
crypto/oneshot-verify.js n=1000 keyFormat="der" mode="async-parallel" keyType="ec": 23,523.09263179818
crypto/oneshot-verify.js n=1000 keyFormat="createPublicKey" mode="async-parallel" keyType="ec": 21,763.338363783907
crypto/oneshot-verify.js n=1000 keyFormat="jwk" mode="async-parallel" keyType="ec": 10,227.593827229839
crypto/oneshot-verify.js n=1000 keyFormat="keyObject" mode="async-parallel" keyType="ec": 64,509.54073529136
crypto/oneshot-verify.js n=1000 keyFormat="keyObject.unique" mode="async-parallel" keyType="ec": 62,469.905123206896
crypto/oneshot-verify.js n=1000 keyFormat="pem" mode="sync" keyType="ed25519": 8,943.767128487922
crypto/oneshot-verify.js n=1000 keyFormat="der" mode="sync" keyType="ed25519": 9,194.260942319805
crypto/oneshot-verify.js n=1000 keyFormat="createPublicKey" mode="sync" keyType="ed25519": 8,729.231249338489
crypto/oneshot-verify.js n=1000 keyFormat="jwk" mode="sync" keyType="ed25519": 11,126.817479402425
crypto/oneshot-verify.js n=1000 keyFormat="keyObject" mode="sync" keyType="ed25519": 11,318.021265362248
crypto/oneshot-verify.js n=1000 keyFormat="pem" mode="async" keyType="ed25519": 8,104.417312656264
crypto/oneshot-verify.js n=1000 keyFormat="der" mode="async" keyType="ed25519": 8,186.326287515109
crypto/oneshot-verify.js n=1000 keyFormat="createPublicKey" mode="async" keyType="ed25519": 7,669.128224196411
crypto/oneshot-verify.js n=1000 keyFormat="jwk" mode="async" keyType="ed25519": 9,577.74894300681
crypto/oneshot-verify.js n=1000 keyFormat="keyObject" mode="async" keyType="ed25519": 10,085.622802487773
crypto/oneshot-verify.js n=1000 keyFormat="pem" mode="async-parallel" keyType="ed25519": 32,398.71990065775
crypto/oneshot-verify.js n=1000 keyFormat="der" mode="async-parallel" keyType="ed25519": 33,843.09495103327
crypto/oneshot-verify.js n=1000 keyFormat="createPublicKey" mode="async-parallel" keyType="ed25519": 29,407.152107582657
crypto/oneshot-verify.js n=1000 keyFormat="jwk" mode="async-parallel" keyType="ed25519": 42,777.469209633215
crypto/oneshot-verify.js n=1000 keyFormat="keyObject" mode="async-parallel" keyType="ed25519": 43,512.15683974338
crypto/oneshot-verify.js n=1000 keyFormat="keyObject.unique" mode="async-parallel" keyType="ed25519": 42,840.84864636628

Sign

https://gist.githubusercontent.com/panva/7ea8d8514a0ad43adc743747e0aaa383/raw/13afc68a3130f743da4ddd9bbcf3dfd1ba0c64de/oneshot-sign.js

v18.16.0 w/ OpenSSL 1.1.1 `benchmark/crypto/oneshot-sign.js`
crypto/oneshot-sign.js n=1000 keyFormat="pem" mode="sync" keyType="rsa": 1,216.1513401299426
crypto/oneshot-sign.js n=1000 keyFormat="der" mode="sync" keyType="rsa": 1,230.4919604189668
crypto/oneshot-sign.js n=1000 keyFormat="createPrivateKey" mode="sync" keyType="rsa": 1,217.9888431077063
crypto/oneshot-sign.js n=1000 keyFormat="jwk" mode="sync" keyType="rsa": 1,229.393067083677
crypto/oneshot-sign.js n=1000 keyFormat="keyObject" mode="sync" keyType="rsa": 1,816.0443867689733
crypto/oneshot-sign.js n=1000 keyFormat="pem" mode="async" keyType="rsa": 1,203.439551062267
crypto/oneshot-sign.js n=1000 keyFormat="der" mode="async" keyType="rsa": 1,211.4714845453225
crypto/oneshot-sign.js n=1000 keyFormat="createPrivateKey" mode="async" keyType="rsa": 1,200.8331375504993
crypto/oneshot-sign.js n=1000 keyFormat="jwk" mode="async" keyType="rsa": 1,209.3460677974135
crypto/oneshot-sign.js n=1000 keyFormat="keyObject" mode="async" keyType="rsa": 1,750.4156690209027
crypto/oneshot-sign.js n=1000 keyFormat="pem" mode="async-parallel" keyType="rsa": 4,678.503945997601
crypto/oneshot-sign.js n=1000 keyFormat="der" mode="async-parallel" keyType="rsa": 4,650.502159828068
crypto/oneshot-sign.js n=1000 keyFormat="createPrivateKey" mode="async-parallel" keyType="rsa": 4,677.433454282876
crypto/oneshot-sign.js n=1000 keyFormat="jwk" mode="async-parallel" keyType="rsa": 4,688.090596863223
crypto/oneshot-sign.js n=1000 keyFormat="keyObject" mode="async-parallel" keyType="rsa": 6,848.77171696714
crypto/oneshot-sign.js n=1000 keyFormat="keyObject.unique" mode="async-parallel" keyType="rsa": 4,681.556610269686
crypto/oneshot-sign.js n=1000 keyFormat="pem" mode="sync" keyType="ec": 30,275.507114744174
crypto/oneshot-sign.js n=1000 keyFormat="der" mode="sync" keyType="ec": 30,843.651280074762
crypto/oneshot-sign.js n=1000 keyFormat="createPrivateKey" mode="sync" keyType="ec": 28,847.332703499902
crypto/oneshot-sign.js n=1000 keyFormat="jwk" mode="sync" keyType="ec": 14,082.176541206209
crypto/oneshot-sign.js n=1000 keyFormat="keyObject" mode="sync" keyType="ec": 50,425.6759070205
crypto/oneshot-sign.js n=1000 keyFormat="pem" mode="async" keyType="ec": 22,906.424393051337
crypto/oneshot-sign.js n=1000 keyFormat="der" mode="async" keyType="ec": 23,227.63451140566
crypto/oneshot-sign.js n=1000 keyFormat="createPrivateKey" mode="async" keyType="ec": 22,242.941274875975
crypto/oneshot-sign.js n=1000 keyFormat="jwk" mode="async" keyType="ec": 11,774.708705186975
crypto/oneshot-sign.js n=1000 keyFormat="keyObject" mode="async" keyType="ec": 33,869.07664565271
crypto/oneshot-sign.js n=1000 keyFormat="pem" mode="async-parallel" keyType="ec": 49,248.04392925518
crypto/oneshot-sign.js n=1000 keyFormat="der" mode="async-parallel" keyType="ec": 51,044.823735843034
crypto/oneshot-sign.js n=1000 keyFormat="createPrivateKey" mode="async-parallel" keyType="ec": 45,108.202624422294
crypto/oneshot-sign.js n=1000 keyFormat="jwk" mode="async-parallel" keyType="ec": 17,397.645562707883
crypto/oneshot-sign.js n=1000 keyFormat="keyObject" mode="async-parallel" keyType="ec": 169,177.28578391424
crypto/oneshot-sign.js n=1000 keyFormat="keyObject.unique" mode="async-parallel" keyType="ec": 169,075.999661848
crypto/oneshot-sign.js n=1000 keyFormat="pem" mode="sync" keyType="ed25519": 15,559.863251830615
crypto/oneshot-sign.js n=1000 keyFormat="der" mode="sync" keyType="ed25519": 15,725.835779028419
crypto/oneshot-sign.js n=1000 keyFormat="createPrivateKey" mode="sync" keyType="ed25519": 15,300.706545316354
crypto/oneshot-sign.js n=1000 keyFormat="jwk" mode="sync" keyType="ed25519": 15,778.003490883271
crypto/oneshot-sign.js n=1000 keyFormat="keyObject" mode="sync" keyType="ed25519": 30,678.807579788445
crypto/oneshot-sign.js n=1000 keyFormat="pem" mode="async" keyType="ed25519": 12,790.122669171213
crypto/oneshot-sign.js n=1000 keyFormat="der" mode="async" keyType="ed25519": 13,415.405924828166
crypto/oneshot-sign.js n=1000 keyFormat="createPrivateKey" mode="async" keyType="ed25519": 13,087.085168355341
crypto/oneshot-sign.js n=1000 keyFormat="jwk" mode="async" keyType="ed25519": 13,426.362991336748
crypto/oneshot-sign.js n=1000 keyFormat="keyObject" mode="async" keyType="ed25519": 23,684.31162093013
crypto/oneshot-sign.js n=1000 keyFormat="pem" mode="async-parallel" keyType="ed25519": 26,993.740826345893
crypto/oneshot-sign.js n=1000 keyFormat="der" mode="async-parallel" keyType="ed25519": 27,255.475795434028
crypto/oneshot-sign.js n=1000 keyFormat="createPrivateKey" mode="async-parallel" keyType="ed25519": 25,981.702386094596
crypto/oneshot-sign.js n=1000 keyFormat="jwk" mode="async-parallel" keyType="ed25519": 27,246.564378522893
crypto/oneshot-sign.js n=1000 keyFormat="keyObject" mode="async-parallel" keyType="ed25519": 108,442.70955387862
crypto/oneshot-sign.js n=1000 keyFormat="keyObject.unique" mode="async-parallel" keyType="ed25519": 108,643.9872343315

v18.16.0 w/ OpenSSL 3.0.x `benchmark/crypto/oneshot-sign.js`
crypto/oneshot-sign.js n=1000 keyFormat="pem" mode="sync" keyType="rsa": 975.3147029421003
crypto/oneshot-sign.js n=1000 keyFormat="der" mode="sync" keyType="rsa": 967.383457501031
crypto/oneshot-sign.js n=1000 keyFormat="createPrivateKey" mode="sync" keyType="rsa": 977.7417491676109
crypto/oneshot-sign.js n=1000 keyFormat="jwk" mode="sync" keyType="rsa": 1,259.182059460103
crypto/oneshot-sign.js n=1000 keyFormat="keyObject" mode="sync" keyType="rsa": 1,807.605136004147
crypto/oneshot-sign.js n=1000 keyFormat="pem" mode="async" keyType="rsa": 963.8132303561608
crypto/oneshot-sign.js n=1000 keyFormat="der" mode="async" keyType="rsa": 954.2409643214132
crypto/oneshot-sign.js n=1000 keyFormat="createPrivateKey" mode="async" keyType="rsa": 960.1305777585751
crypto/oneshot-sign.js n=1000 keyFormat="jwk" mode="async" keyType="rsa": 1,227.8782386823393
crypto/oneshot-sign.js n=1000 keyFormat="keyObject" mode="async" keyType="rsa": 1,735.1924291444323
crypto/oneshot-sign.js n=1000 keyFormat="pem" mode="async-parallel" keyType="rsa": 3,804.96509895763
crypto/oneshot-sign.js n=1000 keyFormat="der" mode="async-parallel" keyType="rsa": 3,622.5004325899454
crypto/oneshot-sign.js n=1000 keyFormat="createPrivateKey" mode="async-parallel" keyType="rsa": 3,741.33705097525
crypto/oneshot-sign.js n=1000 keyFormat="jwk" mode="async-parallel" keyType="rsa": 4,796.03080490586
crypto/oneshot-sign.js n=1000 keyFormat="keyObject" mode="async-parallel" keyType="rsa": 6,772.693178374114
crypto/oneshot-sign.js n=1000 keyFormat="keyObject.unique" mode="async-parallel" keyType="rsa": 4,808.477337853072
crypto/oneshot-sign.js n=1000 keyFormat="pem" mode="sync" keyType="ec": 3,717.2947666876003
crypto/oneshot-sign.js n=1000 keyFormat="der" mode="sync" keyType="ec": 3,688.9411078996827
crypto/oneshot-sign.js n=1000 keyFormat="createPrivateKey" mode="sync" keyType="ec": 3,694.886158950167
crypto/oneshot-sign.js n=1000 keyFormat="jwk" mode="sync" keyType="ec": 11,038.913550128396
crypto/oneshot-sign.js n=1000 keyFormat="keyObject" mode="sync" keyType="ec": 45,352.50232431575
crypto/oneshot-sign.js n=1000 keyFormat="pem" mode="async" keyType="ec": 3,515.9194239166027
crypto/oneshot-sign.js n=1000 keyFormat="der" mode="async" keyType="ec": 3,475.617888831493
crypto/oneshot-sign.js n=1000 keyFormat="createPrivateKey" mode="async" keyType="ec": 3,441.7651935339154
crypto/oneshot-sign.js n=1000 keyFormat="jwk" mode="async" keyType="ec": 9,467.761906200552
crypto/oneshot-sign.js n=1000 keyFormat="keyObject" mode="async" keyType="ec": 30,690.380100357543
crypto/oneshot-sign.js n=1000 keyFormat="pem" mode="async-parallel" keyType="ec": 3,917.5275518341587
crypto/oneshot-sign.js n=1000 keyFormat="der" mode="async-parallel" keyType="ec": 3,812.3231439466504
crypto/oneshot-sign.js n=1000 keyFormat="createPrivateKey" mode="async-parallel" keyType="ec": 3,899.4526143392623
crypto/oneshot-sign.js n=1000 keyFormat="jwk" mode="async-parallel" keyType="ec": 16,560.369793057478
crypto/oneshot-sign.js n=1000 keyFormat="keyObject" mode="async-parallel" keyType="ec": 122,197.73108140838
crypto/oneshot-sign.js n=1000 keyFormat="keyObject.unique" mode="async-parallel" keyType="ec": 127,460.91984467102
crypto/oneshot-sign.js n=1000 keyFormat="pem" mode="sync" keyType="ed25519": 3,480.1048167201584
crypto/oneshot-sign.js n=1000 keyFormat="der" mode="sync" keyType="ed25519": 3,396.761733207321
crypto/oneshot-sign.js n=1000 keyFormat="createPrivateKey" mode="sync" keyType="ed25519": 3,426.680871949377
crypto/oneshot-sign.js n=1000 keyFormat="jwk" mode="sync" keyType="ed25519": 16,150.18587571928
crypto/oneshot-sign.js n=1000 keyFormat="keyObject" mode="sync" keyType="ed25519": 32,600.501232706454
crypto/oneshot-sign.js n=1000 keyFormat="pem" mode="async" keyType="ed25519": 3,296.6883565463927
crypto/oneshot-sign.js n=1000 keyFormat="der" mode="async" keyType="ed25519": 3,327.99145222701
crypto/oneshot-sign.js n=1000 keyFormat="createPrivateKey" mode="async" keyType="ed25519": 3,317.27083152784
crypto/oneshot-sign.js n=1000 keyFormat="jwk" mode="async" keyType="ed25519": 13,685.600695228517
crypto/oneshot-sign.js n=1000 keyFormat="keyObject" mode="async" keyType="ed25519": 24,147.444294864443
crypto/oneshot-sign.js n=1000 keyFormat="pem" mode="async-parallel" keyType="ed25519": 3,787.7592152071984
crypto/oneshot-sign.js n=1000 keyFormat="der" mode="async-parallel" keyType="ed25519": 3,755.557055525044
crypto/oneshot-sign.js n=1000 keyFormat="createPrivateKey" mode="async-parallel" keyType="ed25519": 3,714.311847122639
crypto/oneshot-sign.js n=1000 keyFormat="jwk" mode="async-parallel" keyType="ed25519": 26,925.359054374927
crypto/oneshot-sign.js n=1000 keyFormat="keyObject" mode="async-parallel" keyType="ed25519": 111,039.14540720443
crypto/oneshot-sign.js n=1000 keyFormat="keyObject.unique" mode="async-parallel" keyType="ed25519": 108,376.61263044886

v18.16.0 w/ OpenSSL 3.1.x `benchmark/crypto/oneshot-sign.js`
crypto/oneshot-sign.js n=1000 keyFormat="pem" mode="sync" keyType="rsa": 1,160.7563924633391
crypto/oneshot-sign.js n=1000 keyFormat="der" mode="sync" keyType="rsa": 1,172.9390646614188
crypto/oneshot-sign.js n=1000 keyFormat="createPrivateKey" mode="sync" keyType="rsa": 1,149.305733139254
crypto/oneshot-sign.js n=1000 keyFormat="jwk" mode="sync" keyType="rsa": 1,207.3569698106353
crypto/oneshot-sign.js n=1000 keyFormat="keyObject" mode="sync" keyType="rsa": 1,819.927707921622
crypto/oneshot-sign.js n=1000 keyFormat="pem" mode="async" keyType="rsa": 1,143.184528695719
crypto/oneshot-sign.js n=1000 keyFormat="der" mode="async" keyType="rsa": 1,167.612984102516
crypto/oneshot-sign.js n=1000 keyFormat="createPrivateKey" mode="async" keyType="rsa": 1,139.313552191669
crypto/oneshot-sign.js n=1000 keyFormat="jwk" mode="async" keyType="rsa": 1,204.2220627631507
crypto/oneshot-sign.js n=1000 keyFormat="keyObject" mode="async" keyType="rsa": 1,778.0140560901204
crypto/oneshot-sign.js n=1000 keyFormat="pem" mode="async-parallel" keyType="rsa": 4,678.946286697924
crypto/oneshot-sign.js n=1000 keyFormat="der" mode="async-parallel" keyType="rsa": 4,658.998228909777
crypto/oneshot-sign.js n=1000 keyFormat="createPrivateKey" mode="async-parallel" keyType="rsa": 4,667.670604819254
crypto/oneshot-sign.js n=1000 keyFormat="jwk" mode="async-parallel" keyType="rsa": 4,632.6814299692205
crypto/oneshot-sign.js n=1000 keyFormat="keyObject" mode="async-parallel" keyType="rsa": 6,835.454966276224
crypto/oneshot-sign.js n=1000 keyFormat="keyObject.unique" mode="async-parallel" keyType="rsa": 4,671.1718967388315
crypto/oneshot-sign.js n=1000 keyFormat="pem" mode="sync" keyType="ec": 11,553.08062894971
crypto/oneshot-sign.js n=1000 keyFormat="der" mode="sync" keyType="ec": 15,694.665678195697
crypto/oneshot-sign.js n=1000 keyFormat="createPrivateKey" mode="sync" keyType="ec": 11,266.658853614308
crypto/oneshot-sign.js n=1000 keyFormat="jwk" mode="sync" keyType="ec": 7,860.059500650421
crypto/oneshot-sign.js n=1000 keyFormat="keyObject" mode="sync" keyType="ec": 44,931.53624561879
crypto/oneshot-sign.js n=1000 keyFormat="pem" mode="async" keyType="ec": 9,929.574492909043
crypto/oneshot-sign.js n=1000 keyFormat="der" mode="async" keyType="ec": 13,049.329126160026
crypto/oneshot-sign.js n=1000 keyFormat="createPrivateKey" mode="async" keyType="ec": 9,603.783890852996
crypto/oneshot-sign.js n=1000 keyFormat="jwk" mode="async" keyType="ec": 7,130.287871397443
crypto/oneshot-sign.js n=1000 keyFormat="keyObject" mode="async" keyType="ec": 31,247.43673370544
crypto/oneshot-sign.js n=1000 keyFormat="pem" mode="async-parallel" keyType="ec": 13,851.238721126765
crypto/oneshot-sign.js n=1000 keyFormat="der" mode="async-parallel" keyType="ec": 20,925.864892153324
crypto/oneshot-sign.js n=1000 keyFormat="createPrivateKey" mode="async-parallel" keyType="ec": 12,961.734910589821
crypto/oneshot-sign.js n=1000 keyFormat="jwk" mode="async-parallel" keyType="ec": 10,083.198995713381
crypto/oneshot-sign.js n=1000 keyFormat="keyObject" mode="async-parallel" keyType="ec": 137,828.85102424066
crypto/oneshot-sign.js n=1000 keyFormat="keyObject.unique" mode="async-parallel" keyType="ec": 141,697.41028145075
crypto/oneshot-sign.js n=1000 keyFormat="pem" mode="sync" keyType="ed25519": 8,879.22040444849
crypto/oneshot-sign.js n=1000 keyFormat="der" mode="sync" keyType="ed25519": 11,453.60022848558
crypto/oneshot-sign.js n=1000 keyFormat="createPrivateKey" mode="sync" keyType="ed25519": 8,803.911577914067
crypto/oneshot-sign.js n=1000 keyFormat="jwk" mode="sync" keyType="ed25519": 14,828.948010553524
crypto/oneshot-sign.js n=1000 keyFormat="keyObject" mode="sync" keyType="ed25519": 29,183.5893789595
crypto/oneshot-sign.js n=1000 keyFormat="pem" mode="async" keyType="ed25519": 7,944.7074420672525
crypto/oneshot-sign.js n=1000 keyFormat="der" mode="async" keyType="ed25519": 9,871.091832386177
crypto/oneshot-sign.js n=1000 keyFormat="createPrivateKey" mode="async" keyType="ed25519": 7,809.96536116353
crypto/oneshot-sign.js n=1000 keyFormat="jwk" mode="async" keyType="ed25519": 12,676.467037706012
crypto/oneshot-sign.js n=1000 keyFormat="keyObject" mode="async" keyType="ed25519": 23,235.055322782897
crypto/oneshot-sign.js n=1000 keyFormat="pem" mode="async-parallel" keyType="ed25519": 11,792.620819409785
crypto/oneshot-sign.js n=1000 keyFormat="der" mode="async-parallel" keyType="ed25519": 16,682.631110507868
crypto/oneshot-sign.js n=1000 keyFormat="createPrivateKey" mode="async-parallel" keyType="ed25519": 11,472.714105597592
crypto/oneshot-sign.js n=1000 keyFormat="jwk" mode="async-parallel" keyType="ed25519": 25,343.563685207595
crypto/oneshot-sign.js n=1000 keyFormat="keyObject" mode="async-parallel" keyType="ed25519": 105,292.25180642019
crypto/oneshot-sign.js n=1000 keyFormat="keyObject.unique" mode="async-parallel" keyType="ed25519": 104,010.92114672041

createPublicKey / createPrivateKey

https://gist.githubusercontent.com/panva/7ea8d8514a0ad43adc743747e0aaa383/raw/13afc68a3130f743da4ddd9bbcf3dfd1ba0c64de/create-keyobject.js

v18.16.0 w/ OpenSSL 1.1.1 `benchmark/crypto/create-keyobject.js`
crypto/create-keyobject.js n=1000 keyFormat="pkcs8" keyType="rsa": 82,316.09842766375
crypto/create-keyobject.js n=1000 keyFormat="spki" keyType="rsa": 170,394.0362087327
crypto/create-keyobject.js n=1000 keyFormat="der-pkcs8" keyType="rsa": 190,500.3568071683
crypto/create-keyobject.js n=1000 keyFormat="der-spki" keyType="rsa": 300,661.45520144317
crypto/create-keyobject.js n=1000 keyFormat="jwk-public" keyType="rsa": 302,228.9384208538
crypto/create-keyobject.js n=1000 keyFormat="jwk-private" keyType="rsa": 156,389.50432502993
crypto/create-keyobject.js n=1000 keyFormat="pkcs8" keyType="ec": 67,845.48191493872
crypto/create-keyobject.js n=1000 keyFormat="spki" keyType="ec": 71,357.00035721314
crypto/create-keyobject.js n=1000 keyFormat="der-pkcs8" keyType="ec": 74,527.4493912039
crypto/create-keyobject.js n=1000 keyFormat="der-spki" keyType="ec": 79,174.73325240621
crypto/create-keyobject.js n=1000 keyFormat="jwk-public" keyType="ec": 19,220.589341325973
crypto/create-keyobject.js n=1000 keyFormat="jwk-private" keyType="ec": 19,092.167438308436
crypto/create-keyobject.js n=1000 keyFormat="pkcs8" keyType="ed25519": 29,856.65075555987
crypto/create-keyobject.js n=1000 keyFormat="spki" keyType="ed25519": 266,722.9274228244
crypto/create-keyobject.js n=1000 keyFormat="der-pkcs8" keyType="ed25519": 30,467.717549024463
crypto/create-keyobject.js n=1000 keyFormat="der-spki" keyType="ed25519": 366,021.09086729796
crypto/create-keyobject.js n=1000 keyFormat="jwk-public" keyType="ed25519": 361,570.9389527243
crypto/create-keyobject.js n=1000 keyFormat="jwk-private" keyType="ed25519": 30,840.360977789944

v18.16.0 w/ OpenSSL 3.0.x `benchmark/crypto/create-keyobject.js`
crypto/create-keyobject.js n=1000 keyFormat="pkcs8" keyType="rsa": 3,983.350931512192
crypto/create-keyobject.js n=1000 keyFormat="spki" keyType="rsa": 13,447.00535190813
crypto/create-keyobject.js n=1000 keyFormat="der-pkcs8" keyType="rsa": 4,004.6914960876666
crypto/create-keyobject.js n=1000 keyFormat="der-spki" keyType="rsa": 13,859.365552893401
crypto/create-keyobject.js n=1000 keyFormat="jwk-public" keyType="rsa": 315,391.1512597038
crypto/create-keyobject.js n=1000 keyFormat="jwk-private" keyType="rsa": 165,952.15964332232
crypto/create-keyobject.js n=1000 keyFormat="pkcs8" keyType="ec": 4,040.251000593412
crypto/create-keyobject.js n=1000 keyFormat="spki" keyType="ec": 14,415.868988582632
crypto/create-keyobject.js n=1000 keyFormat="der-pkcs8" keyType="ec": 4,021.484103212081
crypto/create-keyobject.js n=1000 keyFormat="der-spki" keyType="ec": 14,695.787859483404
crypto/create-keyobject.js n=1000 keyFormat="jwk-public" keyType="ec": 18,402.12778651
crypto/create-keyobject.js n=1000 keyFormat="jwk-private" keyType="ec": 18,275.995048886733
crypto/create-keyobject.js n=1000 keyFormat="pkcs8" keyType="ed25519": 3,837.0905644504114
crypto/create-keyobject.js n=1000 keyFormat="spki" keyType="ed25519": 22,105.594578930093
crypto/create-keyobject.js n=1000 keyFormat="der-pkcs8" keyType="ed25519": 3,851.4279471451136
crypto/create-keyobject.js n=1000 keyFormat="der-spki" keyType="ed25519": 22,773.012841132615
crypto/create-keyobject.js n=1000 keyFormat="jwk-public" keyType="ed25519": 192,664.3065289117
crypto/create-keyobject.js n=1000 keyFormat="jwk-private" keyType="ed25519": 31,409.871337314533

v18.16.0 w/ OpenSSL 3.1.x `benchmark/crypto/create-keyobject.js`
crypto/create-keyobject.js n=1000 keyFormat="pkcs8" keyType="rsa": 14,823.269568568741
crypto/create-keyobject.js n=1000 keyFormat="spki" keyType="rsa": 29,517.53645696169
crypto/create-keyobject.js n=1000 keyFormat="der-pkcs8" keyType="rsa": 28,891.366612489575
crypto/create-keyobject.js n=1000 keyFormat="der-spki" keyType="rsa": 32,329.284887856826
crypto/create-keyobject.js n=1000 keyFormat="jwk-public" keyType="rsa": 292,761.4725902071
crypto/create-keyobject.js n=1000 keyFormat="jwk-private" keyType="rsa": 152,193.49637619677
crypto/create-keyobject.js n=1000 keyFormat="pkcs8" keyType="ec": 15,470.107482593963
crypto/create-keyobject.js n=1000 keyFormat="spki" keyType="ec": 27,505.744437196987
crypto/create-keyobject.js n=1000 keyFormat="der-pkcs8" keyType="ec": 24,452.443762558163
crypto/create-keyobject.js n=1000 keyFormat="der-spki" keyType="ec": 28,129.361985001313
crypto/create-keyobject.js n=1000 keyFormat="jwk-public" keyType="ec": 10,779.33224731561
crypto/create-keyobject.js n=1000 keyFormat="jwk-private" keyType="ec": 10,805.6757200724
crypto/create-keyobject.js n=1000 keyFormat="pkcs8" keyType="ed25519": 12,405.921708684467
crypto/create-keyobject.js n=1000 keyFormat="spki" keyType="ed25519": 37,764.46882367494
crypto/create-keyobject.js n=1000 keyFormat="der-pkcs8" keyType="ed25519": 17,849.06838483227
crypto/create-keyobject.js n=1000 keyFormat="der-spki" keyType="ed25519": 39,201.33704784296
crypto/create-keyobject.js n=1000 keyFormat="jwk-public" keyType="ed25519": 178,341.84529237272
crypto/create-keyobject.js n=1000 keyFormat="jwk-private" keyType="ed25519": 27,959.645173090197

@panva Did you have a chance to test 18.x against OpenSSL 1.1.1? So far, we have suspected that the difference in performance is due to the different OpenSSL versions.

I have built v18.x with OpenSSL 1.1.1 now, it (OpenSSL 3.x) is indeed the problem at hand for the slowdowns in both pem/der parsing and sign/verify.

I dug into this a little bit on the surface. For testing I used an M1 MacBook Pro, node v16.20.0 and v18.16.0 installed via nvm and the benchmark scripts from https://github.com/nodejs/node/pull/48267

These benchmarks test the oneshot crypto.sign and crypto.verify operations with

  • different asymmetric key types (rsa, ec, ed25519)
  • keys passed in different formats (pem, der, jwk, KeyObject and to ensure that its use dont suffer from mutexes also unique KeyObject)
  • different modes (synchronous, asynchronous callback invoked serially, asynchronous parallel invoked parallel)

I can definitely observe a regression across the board for all verify operation throughputs between v16 and v18, but not as severe as 5x everywhere, it varies per how the key is passed in. For the sign operation some configs have no regression at all.

What is interesting though is that such severe regression (e.g. rsa verify 28k ops/s down to 7k ops/s) is only present when the keys are passed as pem or der, when passed as jwk or a KeyObject a much less severe regression is observed.

IIRC the two severely impacted key formats have their own unique code path in ManagedEVPPKey::GetPublicOrPrivateKeyFromJs and ManagedEVPPKey::GetPrivateKeyFromJs so that to me seems like a good suspect to look into. Furthermore as an experiment I added another key format which is to call createPublicKey or createPrivateKey with pem input before the op, the results were similarly bad to just using pem, the same unique codepath for pem/der is used within the create*Key methods…

cc @tniessen

My results (verify)
// 2048 bit RSASSA-PKCS1-v1_5
keyFormat="pem" mode="sync"
  28,446 down to 7,150
keyFormat="der" mode="sync"
  31,341 down to 7,329
keyFormat="jwk" mode="sync"
  31,043 down to 26,775
keyFormat="keyObject" mode="sync"
  47,087 down to 43,101

keyFormat="pem" mode="async"
  23,111 down to 6,681
keyFormat="der" mode="async"
  23,805 down to 6,885
keyFormat="jwk" mode="async"
  23,562 down to 20,788
keyFormat="keyObject" mode="async"
  34,515 down to 28,409

keyFormat="pem" mode="async-parallel"
  83,863 down to 8,793
keyFormat="der" mode="async-parallel"
  123,438 down to 9,174
keyFormat="jwk" mode="async-parallel"
  124,582 down to 99,207
keyFormat="keyObject" mode="async-parallel"
  167,227 down to 126,255
keyFormat="keyObject-unique" mode="async-parallel"
  121,421 down to 104,601


// ECDSA P-256 w/ SHA-2
keyFormat="pem" mode="sync"
  11,258 down to 5,676
keyFormat="der" mode="sync"
  11,499 down to 5,739
keyFormat="jwk" mode="sync"
  7,187 down to 6,040
keyFormat="keyObject" mode="sync"
  13,842 down to 13,369

keyFormat="pem" mode="async"
  9,878 down to 5,306
keyFormat="der" mode="async"
  10,427 down to 5,466
keyFormat="jwk" mode="async"
  6,782 down to 5,613
keyFormat="keyObject" mode="async"
  11,999 down to 11,519

keyFormat="pem" mode="async-parallel"
  40,404 down to 9,209
keyFormat="der" mode="async-parallel"
  53,853 down to 9,520
keyFormat="jwk" mode="async-parallel"
  14,094 down to 13,161
keyFormat="keyObject" mode="async-parallel"
  52,952 down to 50,455
keyFormat="keyObject-unique" mode="async-parallel"
  53,710 down to 50,282


// Ed25519
keyFormat="pem" mode="sync"
  8,914 down to 5,722
keyFormat="der" mode="sync"
  8,980 down to 5,725
keyFormat="jwk" mode="sync"
  9,078 down to 8,592
keyFormat="keyObject" mode="sync"
  9,379 down to 9,191

keyFormat="pem" mode="async"
  8,467 down to 5,310
keyFormat="der" mode="async"
  8,373 down to 5,260
keyFormat="jwk" mode="async"
  8,195 down to 8,043
keyFormat="keyObject" mode="async"
  8,510 down to 8,311

keyFormat="pem" mode="async-parallel"
  36,037 down to 13,940
keyFormat="der" mode="async-parallel"
  36,288 down to 14,240
keyFormat="jwk" mode="async-parallel"
  35,612 down to 34,852
keyFormat="keyObject" mode="async-parallel"
  35,907 down to 34,888
keyFormat="keyObject-unique" mode="async-parallel"
  35,617 down to 35,398

While they have a fork for 3.1, there appear to be issues for 3.2 and later: https://github.com/quictls/openssl/issues/138.

From the mentioned issue:

Note to projects/packagers that depend on this: this is going to be an issue with 3.3 and later. Weigh in please: we know you exist but we don’t hear from you!

I’m guessing feedback should be left there too on how to move forward.

Then if a API/ABI compatible release come out that has a LTS date after our LTS deadline, we can certainly migrate.

Users can already dynamically link against OpenSSL 3.1 if they wish. If we upgrade the statically linked version of OpenSSL to 3.1, then we will be forced to again upgrade (or downgrade) OpenSSL on existing Node.js release lines. I don’t know if the OpenSSL team has released information about the 3.2 end of life date, or about backward compatibility of future versions.

AFAIK nothing has been stated yet about 3.2, or what the next LTS after 3.0 will be. https://www.openssl.org/policies/releasestrat.html was last updated in March. They have stated that OpenSSL now follows semver. For Node.js the current plan is to stick to OpenSSL 3.0 for Node.js 20. We’ll have a decision to make next year about what we’re going to do for Node.js 22, which has an End-of-Life after the end of support for OpenSSL 3.0.

Is upgrading to openssl 3.2.0 an acceptable?

That depends on how long it will be supported by the OpenSSL team.

ChatGPT did, after massaging the data a bit. The values seem accurate.

There is a noticeable performance drop when moving from OpenSSL 1.1.1 to 3.0.x across all operations. However, there is a small improvement when upgrading from 3.0.x to 3.1.x.

Verify

Version Average Minimum Maximum Drop from 1.1.1 (%)
v18.16.0 w/ OpenSSL 1.1.1 45,424.446015 9,465.267565 198,067.181219 -
v18.16.0 w/ OpenSSL 3.0.x 14,146.405165 6,960.496267 158,281.067606 ≈ 20% - 68%
v18.16.0 w/ OpenSSL 3.1.x 19,824.438734 5,727.334480 173,185.153807 ≈ 10% - 56%

Sign

Version Average Minimum Maximum Drop from 1.1.1 (%)
v18.16.0 w/ OpenSSL 1.1.1 32,115.690019 1,200.833137 169,177.285784 -
v18.16.0 w/ OpenSSL 3.0.x 6,308.925663 954.240964 127,460.919845 ≈ 24% - 80%
v18.16.0 w/ OpenSSL 3.1.x 13,688.469062 1,139.313552 141,697.410281 ≈ 16% - 57%

createPublicKey / createPrivateKey

Version Average Minimum Maximum Drop from 1.1.1 (%)
v18.16.0 w/ OpenSSL 1.1.1 108,089.352566 19,092.167438 366,021.090867 -
v18.16.0 w/ OpenSSL 3.0.x 22,107.414041 3,837.090564 315,391.151260 ≈ 13% - 79%
v18.16.0 w/ OpenSSL 3.1.x 25,450.048696 10,779.332247 292,761.472590 ≈ 20% - 76%

No warranties express or implied.

Edit: Percentage values revised manually.

Might be worth checking if it’s one of the known upstream OpenSSL 3 performance issues: https://github.com/openssl/openssl/issues/17627

Otherwise, if you are comfortable rebuilding Node.js you could try dynamically linking against external OpenSSL, e.g. this would compile against dynamically linked OpenSSL 1.1.1n:

./configure --verbose  --shared-openssl --shared-openssl-includes=/opt/openssl-1.1.1n/include/ --shared-openssl-libpath=/opt/openssl-1.1.1n/lib/

where /opt/openssl-1.1.1n/ is an already compiled/installed OpenSSL – for an example, see https://github.com/nodejs/build/blob/52b1d5bbef880b3d1718c19d08eda4eed4953edb/ansible/roles/docker/templates/ubuntu1804_sharedlibs.Dockerfile.j2#L67-L76 for how we set up Docker containers in the Node.js CI to test Node.js built with dynamically linked libraries.

I suggest to hide the above comment because it seems to mesh together the different configs and losing context while doing so, the drop is not like that across the board.

Besides fixing it upstream. I don’t think so.

Hey, I didn’t have time to build the nodejs with OpenSSL 1.1 but @NewEraCracker did and it seems to improve the performance accords https://github.com/nodejs/performance/issues/84#issuecomment-1559566272.

Is this problem likely to be related to OpenSSL, if so is there anything that can be done?