nrfxlib API 0.1.0
|
int ocrypto_rsa1024_pkcs1_v15_decrypt | ( | uint8_t * | m, |
size_t | m_len, | ||
const uint8_t | c[128], | ||
const ocrypto_rsa1024_key * | sk | ||
) |
#include <crypto/nrf_oberon/include/ocrypto_rsa.h>
1024-bit 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 128-byte ciphertext to decrypt. | |
sk | A valid 1024-bit RSA secret key. |
-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. |
sk
should be initialized with ocrypto_rsa1024_init_key
. m
may be same as c
.