Skip to content

Commit

Permalink
Use scalar ALU and vector ALU together for chacha20 stream cipher
Browse files Browse the repository at this point in the history
Fixes #24070

Use scalar ALU for 1 chacha block with rvv ALU simultaneously.
The tail elements(non-multiple of block length) will be handled by
the scalar logic.

Use rvv path if the input length > chacha_block_size.

And we have about 1.2x improvement comparing with the original code.

Reviewed-by: Hongren Zheng <i@zenithal.me>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #24097)
  • Loading branch information
JerryShih authored and t8m committed Apr 17, 2024
1 parent 96939f1 commit da8b630
Show file tree
Hide file tree
Showing 4 changed files with 269 additions and 82 deletions.

0 comments on commit da8b630

Please sign in to comment.