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

◆ cracen_cipher_decrypt()

psa_status_t cracen_cipher_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,
uint8_t * output,
size_t output_size,
size_t * output_length )

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

Decrypt a message using a symmetric cipher.

Parameters
[in]attributesKey attributes.
[in]key_bufferKey material buffer.
[in]key_buffer_sizeSize of the key buffer in bytes.
[in]algCipher algorithm.
[in]inputCiphertext to decrypt.
[in]input_lengthLength of the ciphertext 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.