nrfxlib API 2.8.99
|
int ocrypto_rsa2048_oaep_sha256_decrypt | ( | uint8_t * | m, |
size_t | mlen, | ||
const uint8_t | c[256], | ||
const uint8_t * | label, | ||
size_t | llen, | ||
const ocrypto_rsa2048_key * | sk ) |
#include <crypto/nrf_oberon/include/ocrypto_rsa.h>
2048-bit RSA OAEP SHA256 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. |
mlen | Length of m . | |
c | The 256-byte ciphertext to decrypt. | |
label | The label associated with the message. | |
llen | Length of label . May be 0. | |
sk | A valid 2048-bit RSA secret key. |
-1 | If decryption failed. |
-2 | If the output buffer is too short (mlen < length of message). |
n | If a message of length n was successfully decrypted. |
sk
should be initialized with ocrypto_rsa2048_init_key
. m
may be same as c
.