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

◆ cracen_unwrap_key()

psa_status_t cracen_unwrap_key ( const psa_key_attributes_t * attributes,
const psa_key_attributes_t * wrapping_key_attributes,
const uint8_t * wrapping_key_data,
size_t wrapping_key_size,
psa_algorithm_t alg,
const uint8_t * data,
size_t data_length,
uint8_t * key,
size_t key_size,
size_t * key_length )

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

Perform a key unwrap operation.

Parameters
[in]attributesThe attributes for the new key.
[in]wrapping_key_attributesThe attributes for the key to use for the unwrapping operation.
[in]wrapping_key_dataWrapping key material.
[in]wrapping_key_sizeSize of the wrapping key in bytes.
[in]algKey wrapping algorithm.
[in]dataBuffer containing the wrapped key data. The content of this buffer is unwrapped.
[in]data_lengthSize of the data buffer in bytes.
[out]keyKey material of the unwrapped key.
[in]key_sizeSize of the buffer containing the unwrapped key.
[out]key_lengthOn success, the number of bytes that make up the unwrapped key data
Return values
PSA_SUCCESSThe operation completed successfully.
PSA_ERROR_INVALID_ARGUMENT
PSA_ERROR_NOT_SUPPORTED
PSA_ERROR_BUFFER_TOO_SMALL
PSA_ERROR_INVALID_SIGNATURE