AEAD size definitions for the PSA Crypto API. More...
AEAD size definitions for the PSA Crypto API.
Definition in file sizes.h.
#include "algorithm.h"
 Include dependency graph for sizes.h:
 This graph shows which files directly or indirectly include this file:Go to the source code of this file.
| #define | PSA_AEAD_DECRYPT_OUTPUT_MAX_SIZE(ciphertext_length) /* implementation-defined value */ | 
| A sufficient plaintext buffer size for psa_aead_decrypt(), for any of the supported key types and AEAD algorithms.  More... | |
| #define | PSA_AEAD_TAG_LENGTH(key_type, key_bits, alg) | 
| The length of a tag for an AEAD algorithm, in bytes.  More... | |
| #define | PSA_AEAD_TAG_MAX_SIZE (16) | 
| A sufficient buffer size for storing the tag output by psa_aead_finish(), for any of the supported key types and AEAD algorithms.  More... | |
| #define | PSA_AES_CCM_TAG_MAX_SIZE (16) | 
| A sufficient buffer size for storing the tag output by psa_aead_finish(), for AES key types and CCM algorithms.  More... | |
| #define | PSA_AEAD_DECRYPT_OUTPUT_SIZE(key_type, alg, ciphertext_length) | 
| A sufficient plaintext buffer size for psa_aead_decrypt(), in bytes.  More... | |
| #define | PSA_AEAD_ENCRYPT_OUTPUT_MAX_SIZE(plaintext_length) ((plaintext_length) + PSA_AEAD_TAG_MAX_SIZE) | 
| A sufficient ciphertext buffer size for psa_aead_encrypt(), for any of the supported key types and AEAD algorithms.  More... | |
| #define | PSA_AEAD_ENCRYPT_OUTPUT_SIZE(key_type, alg, plaintext_length) | 
| A sufficient ciphertext buffer size for psa_aead_encrypt(), in bytes.  More... | |
| #define | PSA_AEAD_FINISH_OUTPUT_MAX_SIZE /* implementation-defined value */ | 
| A sufficient ciphertext buffer size for psa_aead_finish(), for any of the supported key types and AEAD algorithms.  More... | |
| #define | PSA_AEAD_FINISH_OUTPUT_SIZE(key_type, alg) /* implementation-defined value */ | 
| A sufficient ciphertext buffer size for psa_aead_finish().  More... | |
| #define | PSA_AEAD_NONCE_LENGTH(key_type, alg) | 
| The default nonce size for an AEAD algorithm, in bytes.  More... | |
| #define | PSA_AEAD_NONCE_MAX_SIZE (13) | 
| A sufficient buffer size for storing the nonce generated by psa_aead_generate_nonce(), for any of the supported key types and AEAD algorithms.  More... | |
| #define | PSA_AEAD_UPDATE_OUTPUT_MAX_SIZE(input_length) /* implementation-defined value */ | 
| A sufficient output buffer size for psa_aead_update(), for any of the supported key types and AEAD algorithms.  More... | |
| #define | PSA_AEAD_UPDATE_OUTPUT_SIZE(key_type, alg, input_length) /* implementation-defined value */ | 
| A sufficient output buffer size for psa_aead_update().  More... | |
| #define | PSA_AEAD_VERIFY_OUTPUT_MAX_SIZE /* implementation-defined value */ | 
| A sufficient output buffer size for psa_aead_update(), for any of the supported key types and AEAD algorithms.  More... | |
| #define | PSA_AEAD_VERIFY_OUTPUT_SIZE(key_type, alg) /* implementation-defined value */ | 
| A sufficient plaintext buffer size for psa_aead_verify(), in bytes.  More... | |
| #define PSA_AEAD_DECRYPT_OUTPUT_MAX_SIZE | ( | ciphertext_length | ) | /* implementation-defined value */ | 
A sufficient plaintext buffer size for psa_aead_decrypt(), for any of the supported key types and AEAD algorithms.
If the size of the plaintext buffer is at least this large, it is guaranteed that psa_aead_decrypt() will not fail due to an insufficient buffer size.
See also PSA_AEAD_DECRYPT_OUTPUT_SIZE().
| ciphertext_length | Size of the ciphertext in bytes. | 
| #define PSA_AEAD_DECRYPT_OUTPUT_SIZE | ( | key_type, | |
| alg, | |||
| ciphertext_length | |||
| ) | 
A sufficient plaintext buffer size for psa_aead_decrypt(), in bytes.
If the size of the plaintext buffer is at least this large, it is guaranteed that psa_aead_decrypt() will not fail due to an insufficient buffer size. Depending on the algorithm, the actual size of the plaintext might be smaller.
See also PSA_AEAD_DECRYPT_OUTPUT_MAX_SIZE.
| key_type | A symmetric key type that is compatible with algorithm alg. | 
| alg | An AEAD algorithm: a value of type psa_algorithm_t such that PSA_ALG_IS_AEAD(alg) is true.  | 
| ciphertext_length | Size of the ciphertext in bytes. | 
| #define PSA_AEAD_ENCRYPT_OUTPUT_MAX_SIZE | ( | plaintext_length | ) | ((plaintext_length) + PSA_AEAD_TAG_MAX_SIZE) | 
A sufficient ciphertext buffer size for psa_aead_encrypt(), for any of the supported key types and AEAD algorithms.
If the size of the ciphertext buffer is at least this large, it is guaranteed that psa_aead_encrypt() will not fail due to an insufficient buffer size.
See also PSA_AEAD_ENCRYPT_OUTPUT_SIZE().
| plaintext_length | Size of the plaintext in bytes. | 
| #define PSA_AEAD_ENCRYPT_OUTPUT_SIZE | ( | key_type, | |
| alg, | |||
| plaintext_length | |||
| ) | 
A sufficient ciphertext buffer size for psa_aead_encrypt(), in bytes.
If the size of the ciphertext buffer is at least this large, it is guaranteed that psa_aead_encrypt() will not fail due to an insufficient buffer size. Depending on the algorithm, the actual size of the ciphertext might be smaller.
See also PSA_AEAD_ENCRYPT_OUTPUT_MAX_SIZE.
| key_type | A symmetric key type that is compatible with algorithm alg. | 
| alg | An AEAD algorithm: a value of type psa_algorithm_t such that PSA_ALG_IS_AEAD(alg) is true. | 
| plaintext_length | Size of the plaintext in bytes. | 
| #define PSA_AEAD_FINISH_OUTPUT_MAX_SIZE /* implementation-defined value */ | 
A sufficient ciphertext buffer size for psa_aead_finish(), for any of the supported key types and AEAD algorithms.
If the size of the ciphertext buffer is at least this large, it is guaranteed that psa_aead_finish() will not fail due to an insufficient ciphertext buffer size.
See also PSA_AEAD_FINISH_OUTPUT_SIZE().
| #define PSA_AEAD_FINISH_OUTPUT_SIZE | ( | key_type, | |
| alg | |||
| ) | /* implementation-defined value */ | 
A sufficient ciphertext buffer size for psa_aead_finish().
If the size of the ciphertext buffer is at least this large, it is guaranteed that psa_aead_finish() will not fail due to an insufficient ciphertext buffer size. The actual size of the output might be smaller in any given call.
See also PSA_AEAD_FINISH_OUTPUT_MAX_SIZE.
| key_type | A symmetric key type that is compatible with algorithm alg. | 
| alg | An AEAD algorithm: a value of type psa_algorithm_t such that PSA_ALG_IS_AEAD(alg) is true. | 
| #define PSA_AEAD_NONCE_LENGTH | ( | key_type, | |
| alg | |||
| ) | 
The default nonce size for an AEAD algorithm, in bytes.
If the size of the nonce buffer is at least this large, it is guaranteed that psa_aead_generate_nonce() will not fail due to an insufficient buffer size.
For most AEAD algorithms, PSA_AEAD_NONCE_LENGTH() evaluates to the exact size of the nonce generated by psa_aead_generate_nonce().
See also PSA_AEAD_NONCE_MAX_SIZE.
| key_type | A symmetric key type that is compatible with algorithm alg. | 
| alg | An AEAD algorithm: a value of type psa_algorithm_t such that PSA_ALG_IS_AEAD(alg) is true. | 
| #define PSA_AEAD_NONCE_MAX_SIZE (13) | 
A sufficient buffer size for storing the nonce generated by psa_aead_generate_nonce(), for any of the supported key types and AEAD algorithms.
If the size of the nonce buffer is at least this large, it is guaranteed that psa_aead_generate_nonce() will not fail due to an insufficient buffer size.
See also PSA_AEAD_NONCE_LENGTH().
| #define PSA_AEAD_TAG_LENGTH | ( | key_type, | |
| key_bits, | |||
| alg | |||
| ) | 
The length of a tag for an AEAD algorithm, in bytes.
This is the size of the tag output from psa_aead_finish(). If the size of the tag buffer is at least this large, it is guaranteed that psa_aead_finish() will not fail due to an insufficient tag buffer size.
See also PSA_AEAD_TAG_MAX_SIZE.
| key_type | The type of the AEAD key. | 
| key_bits | The size of the AEAD key in bits. | 
| alg | An AEAD algorithm: a value of type psa_algorithm_t such that PSA_ALG_IS_AEAD(alg) is true. | 
| #define PSA_AEAD_TAG_MAX_SIZE (16) | 
A sufficient buffer size for storing the tag output by psa_aead_finish(), for any of the supported key types and AEAD algorithms.
If the size of the tag buffer is at least this large, it is guaranteed that psa_aead_finish() will not fail due to an insufficient buffer size.
See also PSA_AEAD_TAG_LENGTH().
| #define PSA_AEAD_UPDATE_OUTPUT_MAX_SIZE | ( | input_length | ) | /* implementation-defined value */ | 
A sufficient output buffer size for psa_aead_update(), for any of the supported key types and AEAD algorithms.
If the size of the output buffer is at least this large, it is guaranteed that psa_aead_update() will not fail due to an insufficient buffer size.
See also PSA_AEAD_UPDATE_OUTPUT_SIZE().
| input_length | Size of the input in bytes. | 
| #define PSA_AEAD_UPDATE_OUTPUT_SIZE | ( | key_type, | |
| alg, | |||
| input_length | |||
| ) | /* implementation-defined value */ | 
A sufficient output buffer size for psa_aead_update().
If the size of the output buffer is at least this large, it is guaranteed that psa_aead_update() will not fail due to an insufficient buffer size. The actual size of the output might be smaller in any given call.
See also PSA_AEAD_UPDATE_OUTPUT_MAX_SIZE.
| key_type | A symmetric key type that is compatible with algorithm alg. | 
| alg | An AEAD algorithm: a value of type psa_algorithm_t such that PSA_ALG_IS_AEAD(alg) is true.  | 
| input_length | Size of the input in bytes. | 
| #define PSA_AEAD_VERIFY_OUTPUT_MAX_SIZE /* implementation-defined value */ | 
A sufficient output buffer size for psa_aead_update(), for any of the supported key types and AEAD algorithms.
If the size of the output buffer is at least this large, it is guaranteed that psa_aead_update() will not fail due to an insufficient buffer size.
See also PSA_AEAD_UPDATE_OUTPUT_SIZE().
| input_length | Size of the input in bytes. | 
| #define PSA_AEAD_VERIFY_OUTPUT_SIZE | ( | key_type, | |
| alg | |||
| ) | /* implementation-defined value */ | 
A sufficient plaintext buffer size for psa_aead_verify(), in bytes.
If the size of the plaintext buffer is at least this large, it is guaranteed that psa_aead_verify() will not fail due to an insufficient plaintext buffer size. The actual size of the output might be smaller in any given call.
See also PSA_AEAD_VERIFY_OUTPUT_MAX_SIZE.
| key_type | A symmetric key type that is compatible with algorithm alg. | 
| alg | An AEAD algorithm: a value of type psa_algorithm_t such that PSA_ALG_IS_AEAD(alg) is true. | 
| #define PSA_AES_CCM_TAG_MAX_SIZE (16) | 
A sufficient buffer size for storing the tag output by psa_aead_finish(), for AES key types and CCM algorithms.
If the size of the tag buffer is at least this large, it is guaranteed that psa_aead_finish() will not fail due to an insufficient buffer size.
See also PSA_AEAD_TAG_LENGTH().