Commit 10eed54603 for openssl.org
commit 10eed54603ad35dea0429e841641259d91d73b69
Author: peter941221 <peter941221@gmail.com>
Date: Tue May 5 08:45:14 2026 +0800
aes: make riscv64 no-Zkn fallback constant time
Reviewed-by: Andrew Dinh <andrewd@openssl.org>
Reviewed-by: Mounir Idrassi <mounir.idrassi@idrix.fr>
Merge-date: Wed Oct 21 16:17:44 2026
Merged-from: https://github.com/openssl/openssl/pull/31080
diff --git a/crypto/aes/build.info b/crypto/aes/build.info
index 86640dadbf..1d369c8e3a 100644
--- a/crypto/aes/build.info
+++ b/crypto/aes/build.info
@@ -54,8 +54,10 @@ IF[{- !$disabled{asm} -}]
# aes-c64xplus.s implements AES_ctr32_encrypt
$AESDEF_c64xplus=AES_ASM AES_CTR_ASM
- $AESASM_riscv64=aes_cbc.c aes-riscv64.s aes-riscv64-zkn.s aes-riscv64-zvkb-zvkned.s aes-riscv64-zvkned.s aes-riscv64-zvbb-zvkg-zvkned.s
- $AESDEF_riscv64=AES_ASM
+ # Keep the RISC-V Zkn/Zvkned assembly fast paths, but route the generic
+ # low-level AES APIs through the constant-time C implementation.
+ $AESASM_riscv64=aes_core.c aes_cbc.c aes-riscv64-zkn.s aes-riscv64-zvkb-zvkned.s aes-riscv64-zvkned.s aes-riscv64-zvbb-zvkg-zvkned.s
+ $AESDEF_riscv64=OPENSSL_AES_CONST_TIME
$AESASM_riscv32=aes_core.c aes_cbc.c aes-riscv32-zkn.s
$AESASM_loongarch64=aes_core.c aes_cbc.c vpaes-loongarch64.S