]> git.ipfire.org Git - thirdparty/openssl.git/commit
riscv: Code optimization for SHA-256.
authorPhoebe Chen <phoebe.chen@sifive.com>
Thu, 7 Sep 2023 14:03:56 +0000 (07:03 -0700)
committerHugo Landau <hlandau@openssl.org>
Thu, 26 Oct 2023 14:55:50 +0000 (15:55 +0100)
commita1668660a76e180af5fe1510a4c01c0c2854cdcf
tree8651b1b8fff2d7355449583451c2aba2e48f8375
parentfcf68127e2e171fc0bf1889071768279410fdb80
riscv: Code optimization for SHA-256.

Keep SHA-256 constant values in registers to save the loading time.

Move the constant loading for sha256 into a separate subroutine.
By creating a dedicated sub routine for loading sha256 constants, the
code can be made more modular and easier to modify in the future.

Relaxing the SHA256 constraint, zvknhb also supports SHA256.

Simplify the H and mask initialization flows.

Signed-off-by: Phoebe Chen <phoebe.chen@sifive.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21923)
crypto/sha/asm/sha256-riscv64-zvbb-zvknha.pl [deleted file]
crypto/sha/asm/sha256-riscv64-zvkb-zvknha_or_zvknhb.pl [new file with mode: 0644]
crypto/sha/build.info
crypto/sha/sha_riscv.c