[openssl/openssl] df4bc0: Use scalar ALU and vector ALU together for chacha2...

Jerry Shih noreply at github.com
Wed Apr 17 14:58:06 UTC 2024


  Branch: refs/heads/openssl-3.3
  Home:   https://github.com/openssl/openssl
  Commit: df4bc0febdf64e61da9b2a4b2c3bd2c45c081124
      https://github.com/openssl/openssl/commit/df4bc0febdf64e61da9b2a4b2c3bd2c45c081124
  Author: Jerry Shih <bignose1007 at gmail.com>
  Date:   2024-04-17 (Wed, 17 Apr 2024)

  Changed paths:
    A crypto/chacha/asm/chacha-riscv64-zbb-zvkb.pl
    R crypto/chacha/asm/chacha-riscv64-zvkb.pl
    M crypto/chacha/build.info
    M crypto/chacha/chacha_riscv.c
    M crypto/perlasm/riscv.pm

  Log Message:
  -----------
  Use scalar ALU and vector ALU together for chacha20 stream cipher

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 at zenithal.me>
Reviewed-by: Paul Dale <ppzgs1 at gmail.com>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24097)

(cherry picked from commit da8b6308bd7ad5b7c779aa2d9123bf5faacaec7f)



To unsubscribe from these emails, change your notification settings at https://github.com/openssl/openssl/settings/notifications


More information about the openssl-commits mailing list