nrfxlib API 2.7.99
Loading...
Searching...
No Matches

◆ ocrypto_rsa2048_oaep_sha256_crt_decrypt()

int ocrypto_rsa2048_oaep_sha256_crt_decrypt ( uint8_t *  m,
size_t  mlen,
const uint8_t  c[256],
const uint8_t *  label,
size_t  llen,
const ocrypto_rsa2048_crt_key sk 
)

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

2048-bit RSA OAEP SHA256 decryption with CRT acceleration.

The ciphertext c is decrypted to the message returned in m.

Parameters
[out]mThe decrypted message. The buffer must be long enough to hold the message.
mlenLength of m.
cThe 256-byte ciphertext to decrypt.
labelThe label associated with the message.
llenLength of label. May be 0.
skA valid 2048-bit RSA secret key with CRT coefficients.
Return values
-1If decryption failed.
-2If the output buffer is too short (mlen < length of message).
nIf a message of length n was successfully decrypted.
Remarks
The key sk should be initialized with ocrypto_rsa2048_init_crt_key.
m may be same as c.