Mercurial > dropbear
comparison mycrypt_custom.h @ 16:09ab3354aa21 libtomcrypt
propagate of e8bea23df30f9f46c647d06db3b223427b4e3604 and b0b6b4a8843b94d9f049cb5ffe0b1ae91ec1bf8b from branch 'au.asn.ucc.matt.ltc-orig' to 'au.asn.ucc.matt.ltc-db'
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 15 Jun 2004 14:27:14 +0000 |
parents | 6362d3854bb4 d7da3b1e1540 |
children | 7ed585a2c53b |
comparison
equal
deleted
inserted
replaced
15:6362d3854bb4 | 16:09ab3354aa21 |
---|---|
2 * you don't want to throw all the defines in a makefile. | 2 * you don't want to throw all the defines in a makefile. |
3 */ | 3 */ |
4 | 4 |
5 #ifndef MYCRYPT_CUSTOM_H_ | 5 #ifndef MYCRYPT_CUSTOM_H_ |
6 #define MYCRYPT_CUSTOM_H_ | 6 #define MYCRYPT_CUSTOM_H_ |
7 | |
8 /* this will sort out which stuff based on the user-config in options.h */ | |
9 #include "../options.h" | |
7 | 10 |
8 #ifdef CRYPT | 11 #ifdef CRYPT |
9 #error mycrypt_custom.h should be included before mycrypt.h | 12 #error mycrypt_custom.h should be included before mycrypt.h |
10 #endif | 13 #endif |
11 | 14 |
15 #define XCALLOC calloc | 18 #define XCALLOC calloc |
16 #define XFREE free | 19 #define XFREE free |
17 #define XCLOCK clock | 20 #define XCLOCK clock |
18 #define XCLOCKS_PER_SEC CLOCKS_PER_SEC | 21 #define XCLOCKS_PER_SEC CLOCKS_PER_SEC |
19 | 22 |
20 /* Use small code where possible */ | 23 #ifdef DROPBEAR_SMALL_CODE |
21 #define SMALL_CODE | 24 #define SMALL_CODE |
25 #endif | |
22 | 26 |
23 /* Enable self-test test vector checking */ | 27 /* #define LTC_TEST */ |
24 #define LTC_TEST | 28 #define CLEAN_STACK |
29 #define NO_FILE | |
25 | 30 |
26 /* clean the stack of functions which put private information on stack */ | 31 #ifdef DROPBEAR_BLOWFISH_CBC |
27 //#define CLEAN_STACK | 32 #define BLOWFISH |
33 #endif | |
28 | 34 |
29 /* disable all file related functions */ | 35 #ifdef DROPBEAR_AES128_CBC |
30 //#define NO_FILE | 36 #define RIJNDAEL |
37 #endif | |
31 | 38 |
32 /* various ciphers */ | 39 #ifdef DROPBEAR_TWOFISH128_CBC |
33 #define BLOWFISH | |
34 #define RC2 | |
35 #define RC5 | |
36 #define RC6 | |
37 #define SAFERP | |
38 #define RIJNDAEL | |
39 #define XTEA | |
40 #define TWOFISH | 40 #define TWOFISH |
41 #define TWOFISH_TABLES | 41 |
42 //#define TWOFISH_ALL_TABLES | 42 /* enabling just TWOFISH_SMALL will make the binary ~1kB smaller, turning on |
43 //#define TWOFISH_SMALL | 43 * TWOFISH_TABLES will make it a few kB bigger, but perhaps reduces runtime |
44 * memory usage? */ | |
45 #define TWOFISH_SMALL | |
46 /*#define TWOFISH_TABLES*/ | |
47 #endif | |
48 | |
49 #ifdef DROPBEAR_3DES_CBC | |
44 #define DES | 50 #define DES |
45 #define CAST5 | 51 #endif |
46 #define NOEKEON | |
47 #define SKIPJACK | |
48 | 52 |
49 /* modes of operation */ | |
50 #define CFB | |
51 #define OFB | |
52 #define ECB | |
53 #define CBC | 53 #define CBC |
54 #define CTR | |
55 | 54 |
56 /* hash functions */ | 55 #if defined(DROPBEAR_DSS) && defined(DSS_PROTOK) |
57 #define WHIRLPOOL | |
58 #define SHA512 | 56 #define SHA512 |
59 #define SHA384 | 57 #endif |
60 #define SHA256 | 58 |
61 #define SHA224 | |
62 #define TIGER | |
63 #define SHA1 | 59 #define SHA1 |
60 | |
61 #ifdef DROPBEAR_MD5_HMAC | |
64 #define MD5 | 62 #define MD5 |
65 #define MD4 | 63 #endif |
66 #define MD2 | |
67 #define RIPEMD128 | |
68 #define RIPEMD160 | |
69 | 64 |
70 /* MAC functions */ | |
71 #define HMAC | 65 #define HMAC |
72 #define OMAC | |
73 #define PMAC | |
74 | |
75 /* Encrypt + Authenticate Modes */ | |
76 #define EAX_MODE | |
77 #define OCB_MODE | |
78 | |
79 /* Various tidbits of modern neatoness */ | |
80 #define BASE64 | 66 #define BASE64 |
81 #define YARROW | |
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 | |
85 #define SPRNG | |
86 #define RC4 | |
87 #define DEVRANDOM | |
88 #define TRY_URANDOM_FIRST | |
89 | |
90 /* Public Key Neatoness */ | |
91 #define MRSA | |
92 #define RSA_TIMING // enable RSA side channel timing prevention | |
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 | |
113 /* PKCS #1 and 5 stuff */ | |
114 #define PKCS_1 | |
115 #define PKCS_5 | |
116 | 67 |
117 #include <mycrypt.h> | 68 #include <mycrypt.h> |
118 | 69 |
119 #endif | 70 #endif |
120 | 71 |