diff options
| author | Zhihang Shao <zhihang.shao.iscas@gmail.com> | 2025-08-29 08:25:13 -0700 |
|---|---|---|
| committer | Eric Biggers <ebiggers@kernel.org> | 2025-08-29 09:49:18 -0700 |
| commit | bef9c755986980eecc18e9cecd847bc3c037aebb (patch) | |
| tree | 25967001759068d69e4e9b6e63af77fff518fcb3 /lib/crypto/Kconfig | |
| parent | b646b782e522da3509e61f971e5502fccb3a3723 (diff) | |
| download | lwn-bef9c755986980eecc18e9cecd847bc3c037aebb.tar.gz lwn-bef9c755986980eecc18e9cecd847bc3c037aebb.zip | |
lib/crypto: riscv/poly1305: Import OpenSSL/CRYPTOGAMS implementation
This is a straight import of the OpenSSL/CRYPTOGAMS Poly1305
implementation for riscv authored by Andy Polyakov. The file
'poly1305-riscv.pl' is taken straight from
https://github.com/dot-asm/cryptogams commit
5e3fba73576244708a752fa61a8e93e587f271bb. This patch was tested on
SpacemiT X60, with 2~2.5x improvement over generic implementation.
Signed-off-by: Chunyan Zhang <zhangchunyan@iscas.ac.cn>
Signed-off-by: Zhihang Shao <zhihang.shao.iscas@gmail.com>
[EB: ported to lib/crypto/riscv/]
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20250829152513.92459-4-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Diffstat (limited to 'lib/crypto/Kconfig')
| -rw-r--r-- | lib/crypto/Kconfig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/crypto/Kconfig b/lib/crypto/Kconfig index 9991118c41a9..cb4e056a98fa 100644 --- a/lib/crypto/Kconfig +++ b/lib/crypto/Kconfig @@ -128,6 +128,7 @@ config CRYPTO_LIB_POLY1305_ARCH default y if MIPS # The PPC64 code needs to be fixed to work in softirq context. default y if PPC64 && CPU_LITTLE_ENDIAN && VSX && BROKEN + default y if RISCV default y if X86_64 # This symbol controls the inclusion of the Poly1305 generic code. This differs @@ -143,7 +144,7 @@ config CRYPTO_LIB_POLY1305_GENERIC config CRYPTO_LIB_POLY1305_RSIZE int - default 2 if MIPS + default 2 if MIPS || RISCV default 11 if X86_64 default 9 if ARM || ARM64 default 1 |
