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

◆ cracen_sw_aes_ctr_crypt()

psa_status_t cracen_sw_aes_ctr_crypt ( const psa_key_attributes_t * attributes,
const uint8_t * key_buffer,
size_t key_buffer_size,
psa_algorithm_t alg,
const uint8_t * iv,
size_t iv_length,
const uint8_t * input,
size_t input_length,
uint8_t * output,
size_t output_size,
size_t * output_length )

#include <cracen_sw_aes_ctr.h>

Perform a single-shot software AES-CTR encryption or decryption.

Parameters
attributesKey attributes.
key_bufferKey material.
key_buffer_sizeSize of the key material.
algPSA_ALG_CTR or PSA_ALG_CCM_STAR_NO_TAG.
iv16-octet counter block for CTR, or the 13-octet nonce for CCM*.
iv_lengthLength of iv.
inputInput data to encrypt or decrypt.
input_lengthLength of input data.
outputOutput buffer.
output_sizeSize of output buffer.
output_lengthPointer to store the actual output length.
Return values
psa_status_tPSA_SUCCESS on success, error code otherwise.