RSA - 2020.2 English

OS and Libraries Document Collection (UG643)

Document ID
UG643
Release Date
2020-11-24
Version
2020.2 English

The xsecure_rsa.h file contains hardware interface related information for the RSA hardware accelerator. This hardened cryptographic accelerator, within the CSU, performs the modulus math based on the Rivest-Shamir-Adelman (RSA) algorithm. It is an asymmetric algorithm.

The RSA driver instance can be initialized by using the XSecure_RsaInitialize() function.

The method used for RSA implementation can take a pre-calculated value of R^2 mod N. If you do not have the pre-calculated exponential value pass NULL, the controller will take care of the exponential value.

Note:
  • From the RSA key modulus, the exponent should be extracted.
  • For verification, PKCS v1.5 padding scheme has to be applied for comparing the data hash with decrypted hash.
Table 1. Quick Function Reference
Type Name Arguments
s32 XSecure_RsaInitialize
  • XSecure_Rsa * InstancePtr
  • u8 * Mod
  • u8 * ModExt
  • u8 * ModExpo
u32 XSecure_RsaSignVerification
  • u8 * Signature
  • u8 * Hash
  • u32 HashLen
s32 XSecure_RsaPublicEncrypt
  • XSecure_Rsa * InstancePtr
  • u8 * Input
  • u32 Size
  • u8 * Result
s32 XSecure_RsaPrivateDecrypt
  • XSecure_Rsa * InstancePtr
  • u8 * Input
  • u32 Size
  • u8 * Result