3
|
1 /* This header is meant to be included before mycrypt.h in projects where |
|
2 * you don't want to throw all the defines in a makefile. |
|
3 */ |
|
4 |
|
5 #ifndef MYCRYPT_CUSTOM_H_ |
|
6 #define MYCRYPT_CUSTOM_H_ |
|
7 |
|
8 #ifdef CRYPT |
|
9 #error mycrypt_custom.h should be included before mycrypt.h |
|
10 #endif |
|
11 |
15
|
12 /* macros for various libc functions */ |
3
|
13 #define XMALLOC malloc |
|
14 #define XREALLOC realloc |
|
15 #define XCALLOC calloc |
|
16 #define XFREE free |
|
17 #define XCLOCK clock |
|
18 #define XCLOCKS_PER_SEC CLOCKS_PER_SEC |
15
|
19 |
|
20 /* Use small code where possible */ |
3
|
21 #define SMALL_CODE |
15
|
22 |
|
23 /* Enable self-test test vector checking */ |
3
|
24 #define LTC_TEST |
15
|
25 |
|
26 /* clean the stack of functions which put private information on stack */ |
|
27 //#define CLEAN_STACK |
|
28 |
|
29 /* disable all file related functions */ |
|
30 //#define NO_FILE |
|
31 |
|
32 /* various ciphers */ |
3
|
33 #define BLOWFISH |
|
34 #define RC2 |
|
35 #define RC5 |
|
36 #define RC6 |
|
37 #define SAFERP |
|
38 #define RIJNDAEL |
|
39 #define XTEA |
|
40 #define TWOFISH |
|
41 #define TWOFISH_TABLES |
15
|
42 //#define TWOFISH_ALL_TABLES |
|
43 //#define TWOFISH_SMALL |
3
|
44 #define DES |
|
45 #define CAST5 |
|
46 #define NOEKEON |
|
47 #define SKIPJACK |
15
|
48 |
|
49 /* modes of operation */ |
3
|
50 #define CFB |
|
51 #define OFB |
|
52 #define ECB |
|
53 #define CBC |
|
54 #define CTR |
15
|
55 |
|
56 /* hash functions */ |
3
|
57 #define WHIRLPOOL |
|
58 #define SHA512 |
|
59 #define SHA384 |
|
60 #define SHA256 |
|
61 #define SHA224 |
|
62 #define TIGER |
|
63 #define SHA1 |
|
64 #define MD5 |
|
65 #define MD4 |
|
66 #define MD2 |
|
67 #define RIPEMD128 |
|
68 #define RIPEMD160 |
15
|
69 |
|
70 /* MAC functions */ |
3
|
71 #define HMAC |
|
72 #define OMAC |
|
73 #define PMAC |
15
|
74 |
|
75 /* Encrypt + Authenticate Modes */ |
3
|
76 #define EAX_MODE |
|
77 #define OCB_MODE |
15
|
78 |
|
79 /* Various tidbits of modern neatoness */ |
3
|
80 #define BASE64 |
|
81 #define YARROW |
15
|
82 // which descriptor of AES to use? |
|
83 // 0 = rijndael_enc 1 = aes_enc, 2 = rijndael [full], 3 = aes [full] |
|
84 #define YARROW_AES 0 |
3
|
85 #define SPRNG |
|
86 #define RC4 |
|
87 #define DEVRANDOM |
|
88 #define TRY_URANDOM_FIRST |
15
|
89 |
|
90 /* Public Key Neatoness */ |
3
|
91 #define MRSA |
15
|
92 #define RSA_TIMING // enable RSA side channel timing prevention |
3
|
93 #define MDSA |
|
94 #define MDH |
|
95 #define MECC |
|
96 #define DH768 |
|
97 #define DH1024 |
|
98 #define DH1280 |
|
99 #define DH1536 |
|
100 #define DH1792 |
|
101 #define DH2048 |
|
102 #define DH2560 |
|
103 #define DH3072 |
|
104 #define DH4096 |
|
105 #define ECC160 |
|
106 #define ECC192 |
|
107 #define ECC224 |
|
108 #define ECC256 |
|
109 #define ECC384 |
|
110 #define ECC521 |
|
111 #define MPI |
|
112 |
15
|
113 /* PKCS #1 and 5 stuff */ |
3
|
114 #define PKCS_1 |
|
115 #define PKCS_5 |
|
116 |
|
117 #include <mycrypt.h> |
|
118 |
|
119 #endif |
|
120 |