deno
c16785b4 - perf(ext/node): use aws-lc-sys EVP API for chacha20-poly1305 (#33110)

Commit
92 days ago
perf(ext/node): use aws-lc-sys EVP API for chacha20-poly1305 (#33110) ## Summary Replaces the hand-rolled ChaCha20 + Poly1305 implementation (using RustCrypto `chacha20` + `poly1305` crates) with BoringSSL's streaming `EVP_CIPHER` API via `aws-lc-sys`. **Root cause of #33101**: The RustCrypto `chacha20` crate uses a software-only backend on aarch64 (NEON requires an opt-in `chacha20_force_neon` cfg flag), and the `poly1305` crate has **no aarch64 SIMD backend at all**. This made `node:crypto` chacha20-poly1305 slower than pure-JS `@noble/ciphers` for payloads over ~4KB. BoringSSL (`aws-lc`) provides hardware-accelerated implementations on all platforms (NEON on aarch64, AVX2/SSE on x86_64). Since `aws-lc-sys` is already a workspace dependency, this is a straightforward swap that also removes two direct crate dependencies. Closes #33101 --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Parents
Loading