RSA API 参考
RSA
-
wm_device_t *wm_drv_rsa_init(const char *dev_name)
Initialize RSA driver.
备注
This API must be called before all other RSA API can be called
- 参数:
dev_name – RSA device name
- 返回:
NULL: failed
others: RSA driver device
-
int wm_drv_rsa_deinit(wm_device_t *dev)
Deinitialize RSA driver.
- 参数:
dev – RSA driver device
- 返回:
WM_ERR_SUCCESS: succeed
WM_ERR_INVALID_PARAM: invalid argument
others: failed
-
int wm_drv_rsa_expt_mod(wm_device_t *dev, mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *E, const mbedtls_mpi *N)
This function implements the large module power multiplication algorithm. X = A^E mod N.
- 参数:
dev – [in] Pointer to the RSA device structure.
X – [out] Pointer to a bignumber. used to store the result of A^E mod N
A – [in] Pointer to a bignumber. base
E – [in] Pointer to a bignumber. exponent
N – [in] Pointer to a bignumber. modulus
- 返回:
0