summaryrefslogtreecommitdiffstats
path: root/providers/implementations/ciphers
diff options
context:
space:
mode:
authorPhoebe Chen <phoebe.chen@sifive.com>2023-09-12 16:02:30 +0200
committerHugo Landau <hlandau@openssl.org>2023-10-26 16:55:50 +0200
commit18ed3a58b01f8f1affdedced1f4f62447b7df9f9 (patch)
treee478245a0b1f91a50cf314e76aa50ad6dc0adaa1 /providers/implementations/ciphers
parentriscv: Support SHA-512 family on platforms with vlen >= 128. (diff)
downloadopenssl-18ed3a58b01f8f1affdedced1f4f62447b7df9f9.tar.xz
openssl-18ed3a58b01f8f1affdedced1f4f62447b7df9f9.zip
riscv: Provide vector crypto implementation of AES-CTR mode.
Support zvbb-zvkned based rvv AES-128/192/256-CTR encryption. 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)
Diffstat (limited to 'providers/implementations/ciphers')
-rw-r--r--providers/implementations/ciphers/cipher_aes_hw_rv64i.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/providers/implementations/ciphers/cipher_aes_hw_rv64i.inc b/providers/implementations/ciphers/cipher_aes_hw_rv64i.inc
index c7e1c035c7..7a3337a357 100644
--- a/providers/implementations/ciphers/cipher_aes_hw_rv64i.inc
+++ b/providers/implementations/ciphers/cipher_aes_hw_rv64i.inc
@@ -89,6 +89,10 @@ static int cipher_hw_rv64i_zvkned_initkey(PROV_CIPHER_CTX *dat,
} else {
dat->stream.cbc = (cbc128_f) rv64i_zvkned_cbc_decrypt;
}
+ } else if (dat->mode == EVP_CIPH_CTR_MODE) {
+ if (RISCV_HAS_ZVKB()) {
+ dat->stream.ctr = (ctr128_f) rv64i_zvkb_zvkned_ctr32_encrypt_blocks;
+ }
}
/* Zvkned supports aes-128/192/256 encryption and decryption. */