Skip to content

Commit

Permalink
riscv: Code optimization for SHA-256.
Browse files Browse the repository at this point in the history
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 #21923)
  • Loading branch information
phoebesv authored and hlandau committed Oct 26, 2023
1 parent fcf6812 commit a166866
Show file tree
Hide file tree
Showing 4 changed files with 323 additions and 318 deletions.
312 changes: 0 additions & 312 deletions crypto/sha/asm/sha256-riscv64-zvbb-zvknha.pl

This file was deleted.

0 comments on commit a166866

Please sign in to comment.