![]() |
nRF Connect SDK API 3.4.99
|
| psa_status_t cracen_asymmetric_encrypt | ( | 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, | ||
| const uint8_t * | salt, | ||
| size_t | salt_length, | ||
| uint8_t * | output, | ||
| size_t | output_size, | ||
| size_t * | output_length ) |
#include <cracen_psa_asymmetric.h>
Encrypt a message using an asymmetric key.
| [in] | attributes | Key attributes. |
| [in] | key_buffer | Key material buffer. |
| [in] | key_buffer_size | Size of the key buffer in bytes. |
| [in] | alg | Encryption algorithm. |
| [in] | input | Plaintext to encrypt. |
| [in] | input_length | Length of the plaintext in bytes. |
| [in] | salt | Optional salt. |
| [in] | salt_length | Length of the salt in bytes. |
| [out] | output | Buffer to store the ciphertext. |
| [in] | output_size | Size of the output buffer in bytes. |
| [out] | output_length | Length of the generated ciphertext in bytes. |
| PSA_SUCCESS | The operation completed successfully. |
| PSA_ERROR_INVALID_HANDLE | The key handle is invalid. |
| PSA_ERROR_NOT_SUPPORTED | The algorithm is not supported. |
| PSA_ERROR_BUFFER_TOO_SMALL | The output buffer is too small. |