![]() |
nrfxlib API 3.3.99
|
| int ocrypto_rsa_pkcs1_v15_decrypt | ( | 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_operations.h>
RSA PKCS1 V1.5 decryption.
The ciphertext c is decrypted to the message returned in m.
| [out] | m | The decrypted message. The buffer must be long enough to hold the message. |
| m_len | Length of m. | |
| c | The ciphertext to decrypt. | |
| c_len | Length of c. | |
| key | A valid RSA secret key. | |
| mem | The working memory. Length OCRYPTO_RSA_MEM_SIZE(bits). |
| -1 | If decryption failed. |
| -2 | If the output buffer is too short (m_len < length of message). |
| n | If a message of length n was successfully decrypted. |
key should be initialized with ocrypto_rsa_init_key. c, m, and mem may be same.