nrfxlib API 2.8.99
|
int ocrypto_rsa_crt_exp | ( | uint8_t * | m, |
size_t | m_len, | ||
const uint8_t * | c, | ||
size_t | c_len, | ||
const ocrypto_rsa_crt_key * | key, | ||
uint32_t * | mem ) |
#include <crypto/nrf_oberon/include/ocrypto_rsa_primitives.h>
RSA CRT key exponentiation. m = (c^dp mod p - c^dq mod q) * qinv mod p * q + c^dq mod q
[out] | m | The generated message. |
m_len | Length of m . | |
c | The ciphertext to be decrypted. | |
c_len | Length of c . | |
key | A valid RSA secret key with CRT coefficients. | |
mem | The working memory. Length OCRYPTO_RSA_CRT_MEM_SIZE(bits). |
-1 | If the input is too large (c >= n). |
0 | On success. |
key
should be initialized with ocrypto_rsa_init_crt_key
. c
, m
, and mem
may be same.