algorithm.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2024 TU Dresden
3  * Copyright (C) 2021 HAW Hamburg
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser
6  * General Public License v2.1. See the file LICENSE in the top level
7  * directory for more details.
8  */
9 
22 #ifndef PSA_CRYPTO_PSA_CIPHER_ALGORITHM_H
23 #define PSA_CRYPTO_PSA_CIPHER_ALGORITHM_H
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 #include "psa/algorithm.h"
30 
34 #define PSA_ALG_CATEGORY_CIPHER ((psa_algorithm_t)0x04000000)
35 
44 #define PSA_ALG_IS_CIPHER(alg) (((alg) & PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_CIPHER)
45 
57 #define PSA_ALG_IS_STREAM_CIPHER(alg) (((alg) & 0x7f800000) == 0x04800000)
58 
115 #define PSA_ALG_STREAM_CIPHER ((psa_algorithm_t)0x04800100)
116 
168 #define PSA_ALG_CTR ((psa_algorithm_t)0x04c01000)
169 
199 #define PSA_ALG_CFB ((psa_algorithm_t)0x04c01100)
200 
223 #define PSA_ALG_OFB ((psa_algorithm_t)0x04c01200)
224 
251 #define PSA_ALG_XTS ((psa_algorithm_t)0x0440ff00)
252 
276 #define PSA_ALG_CBC_NO_PADDING ((psa_algorithm_t)0x04404000)
277 
301 #define PSA_ALG_CBC_PKCS7 ((psa_algorithm_t)0x04404100)
302 
334 #define PSA_ALG_ECB_NO_PADDING ((psa_algorithm_t)0x04404400)
335 
336 #ifdef __cplusplus
337 }
338 #endif
339 
340 #endif /* PSA_CRYPTO_PSA_CIPHER_ALGORITHM_H */
Algorithm definitions for the PSA Crypto API.