FiloSottile / FiloSottile/typage

open to exposing an interface to swap out noble chacha20poly1305?

Open
#51 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
481
Forks
29
Avg merge
9m
Merged PRs (30d)
6

Description

Hiya.

Was just wondering if you'd be open to exposing a way to opt-in to swapping out the `chacha20poly1305` implementation at instantiation?

I patched in libsodium compiled to WebAssembly and saw a ~2.5x performance improvement in throughput while using the streaming interface in a Worker and encrypting/decrypting a large binary (test binary was a 1.6GB linux iso because it's the biggest file I had in my downloads).

Granted, totally recognize this sort of violates the spirit of "a typescript implementation" which is why I'm curious if you'd be up for just making it something I could optionally specify when instantiating an `Encrypter`/`Decrypter` rather than patching in.

Thanks!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.