nrfxlib API 2.8.99
Loading...
Searching...
No Matches

◆ ocrypto_rsa1024_oaep_sha256_decrypt()

int ocrypto_rsa1024_oaep_sha256_decrypt ( uint8_t * m,
size_t m_len,
const uint8_t c[128],
const uint8_t * label,
size_t l_len,
const ocrypto_rsa1024_key * sk )

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

1024 bit RSA OAEP SHA256 decryption.

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.
m_lenLength of m.
cThe 128 byte ciphertext to decrypt.
labelThe label associated with the message.
l_lenLength of label. May be 0.
skA valid 1024 bit RSA secret key.
Return values
-1If decryption failed.
-2If the output buffer is too short (m_len < length of message).
nIf a message of length n was successfully decrypted.
Remarks
The key sk should be initialized with ocrypto_rsa1024_init_key.
m may be same as c.