41 #define PSA_BLOCK_CIPHER_BLOCK_LENGTH(type) \
42 (1u << (((type) >> 8) & 7))
49 #define PSA_BLOCK_CIPHER_BLOCK_MAX_SIZE
77 #define PSA_CIPHER_IV_LENGTH(key_type, alg) \
78 ((PSA_BLOCK_CIPHER_BLOCK_LENGTH(key_type) > 1 && \
79 ((alg) == PSA_ALG_CBC_NO_PADDING)) ? 16 : \
80 (key_type == PSA_KEY_TYPE_CHACHA20) ? 12 : 0)
91 #define PSA_CIPHER_IV_MAX_SIZE
111 #define PSA_CIPHER_ENCRYPT_OUTPUT_SIZE(key_type, alg, input_length) \
112 (input_length + PSA_CIPHER_IV_LENGTH(key_type, alg))
125 #define PSA_CIPHER_ENCRYPT_OUTPUT_MAX_SIZE(input_length) \
126 (PSA_CIPHER_ENCRYPT_OUTPUT_SIZE(PSA_KEY_TYPE_AES, PSA_ALG_CBC_NO_PADDING, input_length))
146 #define PSA_CIPHER_DECRYPT_OUTPUT_SIZE(key_type, alg, input_length) \
147 (input_length - PSA_CIPHER_IV_LENGTH(key_type, alg))
160 #define PSA_CIPHER_DECRYPT_OUTPUT_MAX_SIZE(input_length) \
182 #define PSA_CIPHER_UPDATE_OUTPUT_SIZE(key_type, alg, input_length) \
197 #define PSA_CIPHER_UPDATE_OUTPUT_MAX_SIZE(input_length) \
217 #define PSA_CIPHER_FINISH_OUTPUT_SIZE(key_type, alg) \
229 #define PSA_CIPHER_FINISH_OUTPUT_MAX_SIZE
Cipher algorithm definitions for the PSA Crypto API.
Common macros and compiler attributes/pragmas configuration.
Key type definitions for the PSA Crypto API.