![]() |
nRF Connect SDK API 3.4.99
|
| psa_status_t cracen_decapsulate | ( | const psa_key_attributes_t * | attributes, |
| const uint8_t * | key, | ||
| size_t | key_length, | ||
| psa_algorithm_t | alg, | ||
| const uint8_t * | ciphertext, | ||
| size_t | ciphertext_length, | ||
| const psa_key_attributes_t * | output_attributes, | ||
| uint8_t * | output_key, | ||
| size_t | output_key_size, | ||
| size_t * | output_key_length ) |
#include <cracen_psa_key_encapsulation.h>
Use a private key to decapsulate a shared secret key from a ciphertext.
| [in] | attributes | Key attributes of the decapsulation (private) key. |
| [in] | key | Key material of the decapsulation key. |
| [in] | key_length | Size of the decapsulation key in bytes. |
| [in] | alg | Key encapsulation algorithm. |
| [in] | ciphertext | Buffer containing the ciphertext produced by the peer. |
| [in] | ciphertext_length | Size of the ciphertext in bytes. |
| [in] | output_attributes | Key attributes of the shared secret key to produce. |
| [out] | output_key | Buffer where the shared secret key is to be written. |
| [in] | output_key_size | Size of the output key buffer in bytes. |
| [out] | output_key_length | On success, the number of bytes that make up the shared secret key. |
| PSA_SUCCESS | The operation completed successfully. |
| PSA_ERROR_NOT_SUPPORTED | The algorithm or the key type is not supported. |
| PSA_ERROR_INVALID_ARGUMENT | Invalid parameters. |
| PSA_ERROR_BUFFER_TOO_SMALL | The output buffer is too small. |