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

◆ cracen_wrap_key()

psa_status_t cracen_wrap_key ( const psa_key_attributes_t * wrapping_key_attributes,
const uint8_t * wrapping_key_data,
size_t wrapping_key_size,
psa_algorithm_t alg,
const psa_key_attributes_t * key_attributes,
const uint8_t * key_data,
size_t key_size,
uint8_t * data,
size_t data_size,
size_t * data_length )

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

Perform a key wrap operation.

Parameters
[in]wrapping_key_attributesKey attributes for the wrapping key.
[in]wrapping_key_dataWrapping key material.
[in]wrapping_key_sizeSize of the wrapping key in bytes.
[in]algKey wrapping algorithm.
[in]key_attributesKey attributes for the key that must be wrapped.
[in]key_dataKey material of the key to wrap.
[in]key_sizeSize of the key that must be wrapped in bytes.
[out]dataBuffer where the wrapped key data is to be written.
[in]data_sizeSize of the data buffer in bytes.
[out]data_lengthOn success, the number of bytes that make up the wrapped key data.
Return values
PSA_SUCCESSThe operation completed successfully.
PSA_ERROR_INVALID_ARGUMENT
PSA_ERROR_NOT_SUPPORTED
PSA_ERROR_BUFFER_TOO_SMALL