1 // SPDX-License-Identifier: BSD-2-Clause
2 /* LibTomCrypt, modular cryptographic library -- Tom St Denis
3  *
4  * LibTomCrypt is a library that provides various cryptographic
5  * algorithms in a highly modular and flexible manner.
6  *
7  * The library is free for all purposes without any express
8  * guarantee it works.
9  */
10 
11 #include "tomcrypt_private.h"
12 
13 /**
14   @file crypt_register_all_ciphers.c
15 
16   Steffen Jaeckel
17 */
18 
19 #define REGISTER_CIPHER(h) do {\
20    LTC_ARGCHK(register_cipher(h) != -1); \
21 } while(0)
22 
register_all_ciphers(void)23 int register_all_ciphers(void)
24 {
25 #ifdef LTC_RIJNDAEL
26 #ifdef ENCRYPT_ONLY
27    /* alternative would be
28     * register_cipher(&rijndael_enc_desc);
29     */
30    REGISTER_CIPHER(&aes_enc_desc);
31 #else
32    /* alternative would be
33     * register_cipher(&rijndael_desc);
34     */
35    REGISTER_CIPHER(&aes_desc);
36 #endif
37 #endif
38 #ifdef LTC_BLOWFISH
39    REGISTER_CIPHER(&blowfish_desc);
40 #endif
41 #ifdef LTC_XTEA
42    REGISTER_CIPHER(&xtea_desc);
43 #endif
44 #ifdef LTC_RC5
45    REGISTER_CIPHER(&rc5_desc);
46 #endif
47 #ifdef LTC_RC6
48    REGISTER_CIPHER(&rc6_desc);
49 #endif
50 #ifdef LTC_SAFERP
51    REGISTER_CIPHER(&saferp_desc);
52 #endif
53 #ifdef LTC_TWOFISH
54    REGISTER_CIPHER(&twofish_desc);
55 #endif
56 #ifdef LTC_SAFER
57    REGISTER_CIPHER(&safer_k64_desc);
58    REGISTER_CIPHER(&safer_sk64_desc);
59    REGISTER_CIPHER(&safer_k128_desc);
60    REGISTER_CIPHER(&safer_sk128_desc);
61 #endif
62 #ifdef LTC_RC2
63    REGISTER_CIPHER(&rc2_desc);
64 #endif
65 #ifdef LTC_DES
66    REGISTER_CIPHER(&des_desc);
67    REGISTER_CIPHER(&des3_desc);
68 #endif
69 #ifdef LTC_CAST5
70    REGISTER_CIPHER(&cast5_desc);
71 #endif
72 #ifdef LTC_NOEKEON
73    REGISTER_CIPHER(&noekeon_desc);
74 #endif
75 #ifdef LTC_SKIPJACK
76    REGISTER_CIPHER(&skipjack_desc);
77 #endif
78 #ifdef LTC_ANUBIS
79    REGISTER_CIPHER(&anubis_desc);
80 #endif
81 #ifdef LTC_KHAZAD
82    REGISTER_CIPHER(&khazad_desc);
83 #endif
84 #ifdef LTC_KSEED
85    REGISTER_CIPHER(&kseed_desc);
86 #endif
87 #ifdef LTC_KASUMI
88    REGISTER_CIPHER(&kasumi_desc);
89 #endif
90 #ifdef LTC_MULTI2
91    REGISTER_CIPHER(&multi2_desc);
92 #endif
93 #ifdef LTC_CAMELLIA
94    REGISTER_CIPHER(&camellia_desc);
95 #endif
96 #ifdef LTC_IDEA
97    REGISTER_CIPHER(&idea_desc);
98 #endif
99 #ifdef LTC_SERPENT
100    REGISTER_CIPHER(&serpent_desc);
101 #endif
102    return CRYPT_OK;
103 }
104 
105 /* ref:         $Format:%D$ */
106 /* git commit:  $Format:%H$ */
107 /* commit time: $Format:%ai$ */
108