Skip to content

Commit

Permalink
crypto: xilinx: Add ZynqMP RSA driver
Browse files Browse the repository at this point in the history
Adds RSA driver support for the ZynqMP SoC.
ZynqMP SoC has RSA engine used for encryption and decryption.
The flow is
RSA encrypt/decrypt request from Userspace ->
ZynqMP RSA driver -> Firmware driver -> RSA Hardware Engine

RSA Hardware engine supports 2048, 3072 and 4096 keysizes are supported.
So RSA operations using these key sizes are done by hardware engine.
Software fallback is being used for other key sizes.

Signed-off-by: Harsha Harsha <harsha.harsha@amd.com>
Co-developed-by: Dhaval Shah <dhaval.r.shah@amd.com>
Signed-off-by: Dhaval Shah <dhaval.r.shah@amd.com>
  • Loading branch information
Harsha Harsha authored and intel-lab-lkp committed Mar 21, 2023
1 parent 608331a commit cbf02c3
Show file tree
Hide file tree
Showing 3 changed files with 501 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/crypto/Kconfig
Expand Up @@ -685,6 +685,16 @@ config CRYPTO_DEV_ROCKCHIP_DEBUG
This will create /sys/kernel/debug/rk3288_crypto/stats for displaying
the number of requests per algorithm and other internal stats.

config CRYPTO_DEV_XILINX_RSA
tristate "Support for Xilinx ZynqMP RSA hardware accelerator"
depends on ARCH_ZYNQMP || COMPILE_TEST
select CRYPTO_ENGINE
select CRYPTO_AKCIPHER
help
Xilinx processors have RSA hardware accelerator used for signature
generation and verification. This driver interfaces with RSA
hardware accelerator. Select this if you want to use the ZynqMP
module for RSA algorithms.

config CRYPTO_DEV_ZYNQMP_AES
tristate "Support for Xilinx ZynqMP AES hw accelerator"
Expand Down
1 change: 1 addition & 0 deletions drivers/crypto/xilinx/Makefile
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-2.0-only
obj-$(CONFIG_CRYPTO_DEV_ZYNQMP_AES) += zynqmp-aes-gcm.o
obj-$(CONFIG_CRYPTO_DEV_ZYNQMP_SHA3) += zynqmp-sha.o
obj-$(CONFIG_CRYPTO_DEV_XILINX_RSA) += xilinx-rsa.o

0 comments on commit cbf02c3

Please sign in to comment.