RustCrypto / stream-ciphers

Collection of stream cipher algorithms
255 stars 49 forks source link

Make the neon feature available for ChaCha20 #316

Closed sylvain101010 closed 1 year ago

sylvain101010 commented 1 year ago

Hello,

Today ChaCha20 (and by extension (X)ChaCha20-Poly1305) is painfully slow on arm64 devices.

NEON support was merged last year (https://github.com/RustCrypto/stream-ciphers/pull/310) but is still not available for use.

Is it possible to publish a new version and update the docs so we can use the NEON version?

I can create a PR for the doc (adding a few explanation on how to enable NEON support) if necessary.

Many thanks!

tarcieri commented 1 year ago

As noted on #310, the reason it hasn't been released yet is that the PR gated it under a crate feature and we would like to move it to a cfg attribute for consistency.

See the chacha20_force_soft, chacha20_force_sse2, chacha20_force_avx2 cfg settings as examples.

tarcieri commented 1 year ago

I opened #317 to add the cfg attribute

sylvain101010 commented 1 year ago

Many thanks 🙏