nRF Connect SDK API 3.3.99
Loading...
Searching...
No Matches

◆ cracen_asymmetric_decrypt()

psa_status_t cracen_asymmetric_decrypt ( const psa_key_attributes_t * attributes,
const uint8_t * key_buffer,
size_t key_buffer_size,
psa_algorithm_t alg,
const uint8_t * input,
size_t input_length,
const uint8_t * salt,
size_t salt_length,
uint8_t * output,
size_t output_size,
size_t * output_length )

#include <subsys/nrf_security/src/drivers/cracen/cracenpsa/include/cracen_psa_asymmetric.h>

Decrypt a message using an asymmetric key.

Parameters
[in]attributesKey attributes.
[in]key_bufferKey material buffer.
[in]key_buffer_sizeSize of the key buffer in bytes.
[in]algDecryption algorithm.
[in]inputCiphertext to decrypt.
[in]input_lengthLength of the ciphertext in bytes.
[in]saltOptional salt.
[in]salt_lengthLength of the salt in bytes.
[out]outputBuffer to store the plaintext.
[in]output_sizeSize of the output buffer in bytes.
[out]output_lengthLength of the decrypted plaintext in bytes.
Return values
PSA_SUCCESSThe operation completed successfully.
PSA_ERROR_INVALID_HANDLEThe key handle is invalid.
PSA_ERROR_NOT_SUPPORTEDThe algorithm is not supported.
PSA_ERROR_BUFFER_TOO_SMALLThe output buffer is too small.