RSA Driver

Linux RSA Driver for Zynq Ultrascale+ MPSoC

Table of Contents


The Zynq UltraScale+ MPSoC includes an RSA accelerator to facilitate the RSA authentication process.  This block performs the modulus math based on Rivest-Shamir-Adelman (RSA)-4096 algorithm. It is an asymmetric algorithm.

The RSA Linux driver is used for Authentication of Data blobs, where the data is encrypted with public key and  encrypted data is decrypted with private key. The RSA terminology is explained by below table.

OperationKey Used / AlgorithmReason
Signature GenerationPrivate Key  / ALG_OP_DECRYPTOnly a signature authority should hold the secret (private) key.
Signature VerificationPublic Key / ALG_OP_ENCRYPTAnyone should be able to verify a signature so the public key can be handed out freely. Additionally, signatures cannot be created with the public key.
Data EncryptionPublic Key / ALG_OP_ENCRYPTAnyone should be able to encrypt data to send to someone that holds their own private key. No one can decrypt the data using the public key so the key is safe to hand out.
Data DecryptionPrivate Key / ALG_OP_DECRYPTOnly the receiver of data should hold the secret (private) key in order to decrypt the data.

HW IP Features

  • Supports Asymmetric algorithm.

Features supported in driver

  • Supports Asymmetric algorithm.

Note: Exponentiation value is an optional to the RSA core and core has inbuilt support to calculate this value. So from Linux driver Key components modulus and exponent only to be provided, whereas in bare metal driver user has an option.

Kernel Configuration


Test Procedure

Cross compile the below example and Need to create the executable file to test the RSA functionality.

AF ALG Decrypt demo example (RSA)

AF ALG Encrypt demo example (RSA)

Expected Output

Please note as the data provided in user space will be located in virtual space, Linux driver before handing off to ATF converts the data buffers to physical address.

Mainline status

  • This driver is currently not available in mainline kernel.

Change Log


  • crypto: zynqmp-rsa: Adopted RSA support for ZynqMP SoC

  • f0cad69crypto: zynqmp-rsa: Adopted RSA support for ZynqMP SoC

  • None.

  • None

Related Links