8#ifndef CC3XX_PSA_AEAD_H
9#define CC3XX_PSA_AEAD_H
19#include "psa/crypto.h"
47 const uint8_t *key_buffer,
size_t key_buffer_size,
48 psa_algorithm_t alg,
const uint8_t *nonce,
49 size_t nonce_length,
const uint8_t *additional_data,
50 size_t additional_data_length,
const uint8_t *plaintext,
51 size_t plaintext_length, uint8_t *ciphertext,
52 size_t ciphertext_size,
size_t *ciphertext_length);
76 const uint8_t *key_buffer,
size_t key_buffer_size,
77 psa_algorithm_t alg,
const uint8_t *nonce,
78 size_t nonce_length,
const uint8_t *additional_data,
79 size_t additional_data_length,
const uint8_t *ciphertext,
80 size_t ciphertext_length, uint8_t *plaintext,
81 size_t plaintext_size,
size_t *plaintext_length);
101 const psa_key_attributes_t *attributes,
102 const uint8_t *key_buffer,
size_t key_buffer_size,
103 psa_algorithm_t alg);
123 const psa_key_attributes_t *attributes,
124 const uint8_t *key_buffer,
size_t key_buffer_size,
125 psa_algorithm_t alg);
143 const uint8_t *nonce,
144 size_t nonce_length);
161 size_t plaintext_length);
178 const uint8_t *input,
199 const uint8_t *input,
203 size_t *output_length);
224 size_t ciphertext_size,
225 size_t *ciphertext_length,
248 size_t plaintext_size,
249 size_t *plaintext_length,
psa_status_t cc3xx_aead_update_ad(cc3xx_aead_operation_t *operation, const uint8_t *input, size_t input_size)
Pass additional data to an active AEAD operation.
psa_status_t cc3xx_aead_encrypt_setup(cc3xx_aead_operation_t *operation, const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg)
Set the key for a multipart authenticated encryption operation.
psa_status_t cc3xx_aead_set_nonce(cc3xx_aead_operation_t *operation, const uint8_t *nonce, size_t nonce_length)
Set the nonce for an authenticated encryption or decryption operation.
psa_status_t cc3xx_aead_update(cc3xx_aead_operation_t *operation, const uint8_t *input, size_t input_length, uint8_t *output, size_t output_size, size_t *output_length)
Encrypt or decrypt a message fragment in an active AEAD operation.
psa_status_t cc3xx_aead_encrypt(const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg, const uint8_t *nonce, size_t nonce_length, const uint8_t *additional_data, size_t additional_data_length, const uint8_t *plaintext, size_t plaintext_length, uint8_t *ciphertext, size_t ciphertext_size, size_t *ciphertext_length)
Encrypt and authenticate with an AEAD algorithm in one-shot.
psa_status_t cc3xx_aead_verify(cc3xx_aead_operation_t *operation, uint8_t *plaintext, size_t plaintext_size, size_t *plaintext_length, const uint8_t *tag, size_t tag_size)
Finish decrypting a message in an AEAD operation.
psa_status_t cc3xx_aead_set_lengths(cc3xx_aead_operation_t *operation, size_t ad_length, size_t plaintext_length)
Declare the lengths of the message and additional data for AEAD.
psa_status_t cc3xx_aead_abort(cc3xx_aead_operation_t *operation)
Abort an AEAD operation.
psa_status_t cc3xx_aead_decrypt(const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg, const uint8_t *nonce, size_t nonce_length, const uint8_t *additional_data, size_t additional_data_length, const uint8_t *ciphertext, size_t ciphertext_length, uint8_t *plaintext, size_t plaintext_size, size_t *plaintext_length)
Decrypt and verify tag with an AEAD algorithm in one-shot.
psa_status_t cc3xx_aead_decrypt_setup(cc3xx_aead_operation_t *operation, const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg)
Set the key for a multipart authenticated decryption operation.
psa_status_t cc3xx_aead_finish(cc3xx_aead_operation_t *operation, uint8_t *ciphertext, size_t ciphertext_size, size_t *ciphertext_length, uint8_t *tag, size_t tag_size, size_t *tag_length)
Finish encrypting a message in an AEAD operation.
Definition cc3xx_crypto_primitives_private.h:26