13#ifndef CRACEN_PSA_KEY_ENCAPSULATION_H
14#define CRACEN_PSA_KEY_ENCAPSULATION_H
16#include <psa/crypto.h>
44 const uint8_t *key,
size_t key_length,
46 const psa_key_attributes_t *output_attributes,
47 uint8_t *output_key,
size_t output_key_size,
48 size_t *output_key_length,
49 uint8_t *ciphertext,
size_t ciphertext_size,
50 size_t *ciphertext_length);
76 const uint8_t *key,
size_t key_length,
78 const uint8_t *ciphertext,
size_t ciphertext_length,
79 const psa_key_attributes_t *output_attributes,
80 uint8_t *output_key,
size_t output_key_size,
81 size_t *output_key_length);
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)
Use a private key to decapsulate a shared secret key from a ciphertext.
psa_status_t cracen_encapsulate(const psa_key_attributes_t *attributes, const uint8_t *key, size_t key_length, psa_algorithm_t alg, const psa_key_attributes_t *output_attributes, uint8_t *output_key, size_t output_key_size, size_t *output_key_length, uint8_t *ciphertext, size_t ciphertext_size, size_t *ciphertext_length)
Use a public key to generate a new shared secret key and associated ciphertext.