nrfxlib API 0.1.0
Loading...
Searching...
No Matches

◆ ocrypto_rsa_exp()

int ocrypto_rsa_exp ( uint8_t *  m,
size_t  m_len,
const uint8_t *  c,
size_t  c_len,
const ocrypto_rsa_key key,
uint32_t *  mem 
)

#include <crypto/nrf_oberon/include/ocrypto_rsa_primitives.h>

RSA secret key exponentiation. m = c^d mod n

Parameters
[out]mThe generated message.
m_lenLength of m.
cThe ciphertext to be decrypted.
c_lenLength of c.
keyA valid RSA secret key.
memThe working memory. Length OCRYPTO_RSA_MEM_SIZE(bits).
Return values
-1If the input is too large (c >= n).
0On success.
Remarks
The key key should be initialized with ocrypto_rsa_init_key.
c, m, and mem may be same.