]> git.ipfire.org Git - thirdparty/openssl.git/commit
riscv: SM4: Provide a Zvksed-based implementation
authorChristoph Müllner <christoph.muellner@vrull.eu>
Wed, 18 Jan 2023 19:58:12 +0000 (20:58 +0100)
committerHugo Landau <hlandau@openssl.org>
Thu, 26 Oct 2023 14:55:49 +0000 (15:55 +0100)
commit7543bb3a69c021edbe73bb38a8cc4d3708a68c5d
treef09f67bf7f9a50f45e294e61b600652d91ec2b4f
parent9c22a240dab51dc9a5583d36726b81073f9c8d34
riscv: SM4: Provide a Zvksed-based implementation

The upcoming RISC-V vector crypto extensions feature
a Zvksed extension, that provides SM4-specific instructions.
This patch provides an implementation that utilizes this
extension if available.

Tested on QEMU and no regressions observed.

Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
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)
15 files changed:
crypto/perlasm/riscv.pm
crypto/sm4/asm/sm4-riscv64-zvksed.pl [new file with mode: 0644]
crypto/sm4/build.info
include/crypto/riscv_arch.def
include/crypto/riscv_arch.h
include/crypto/sm4_platform.h
providers/implementations/ciphers/cipher_sm4_ccm.h
providers/implementations/ciphers/cipher_sm4_ccm_hw.c
providers/implementations/ciphers/cipher_sm4_ccm_hw_rv64i.inc [new file with mode: 0644]
providers/implementations/ciphers/cipher_sm4_gcm_hw.c
providers/implementations/ciphers/cipher_sm4_gcm_hw_rv64i.inc [new file with mode: 0644]
providers/implementations/ciphers/cipher_sm4_hw.c
providers/implementations/ciphers/cipher_sm4_hw_rv64i.inc [new file with mode: 0644]
providers/implementations/ciphers/cipher_sm4_xts_hw.c
providers/implementations/ciphers/cipher_sm4_xts_hw_rv64i.inc [new file with mode: 0644]