1 #ifndef TOMCRYPT_CUSTOM_H_
2 #define TOMCRYPT_CUSTOM_H_
4 /* this will sort out which stuff based on the user-config in options.h */
7 /* macros for various libc functions you can change for embedded targets */
10 #define LTC_NO_PROTOTYPES
12 #define XMALLOC malloc
16 #define LTC_NO_PROTOTYPES
18 #define XREALLOC realloc
22 #define LTC_NO_PROTOTYPES
24 #define XCALLOC calloc
28 #define LTC_NO_PROTOTYPES
35 #define LTC_NO_PROTOTYPES
37 #define XMEMSET memset
41 #define LTC_NO_PROTOTYPES
43 #define XMEMCPY memcpy
47 #define LTC_NO_PROTOTYPES
49 #define XMEMCMP memcmp
53 #define LTC_NO_PROTOTYPES
55 #define XSTRCMP strcmp
61 #ifndef XCLOCKS_PER_SEC
62 #define XCLOCKS_PER_SEC CLOCKS_PER_SEC
67 #ifdef DROPBEAR_SMALL_CODE
68 #define LTC_SMALL_CODE
70 /* These spit out warnings etc */
73 /* Enable self-test test vector checking */
74 /* Not for dropbear */
77 /* clean the stack of functions which put private information on stack */
78 /* #define LTC_CLEAN_STACK */
80 /* disable all file related functions */
83 /* disable all forms of ASM */
84 /* #define LTC_NO_ASM */
86 /* disable FAST mode */
87 /* #define LTC_NO_FAST */
89 /* disable BSWAP on x86 */
90 /* #define LTC_NO_BSWAP */
93 #ifdef DROPBEAR_BLOWFISH
101 #ifdef DROPBEAR_TWOFISH
104 /* enabling just TWOFISH_SMALL will make the binary ~1kB smaller, turning on
105 * TWOFISH_TABLES will make it a few kB bigger, but perhaps reduces runtime
107 #define TWOFISH_SMALL
108 /*#define TWOFISH_TABLES*/
117 #ifdef DROPBEAR_ENABLE_CTR_MODE
121 #if defined(DROPBEAR_DSS) && defined(DSS_PROTOK)
127 #ifdef DROPBEAR_MD5_HMAC
133 /* Various tidbits of modern neatoness */
136 /* default no pthread functions */
137 #define LTC_MUTEX_GLOBAL(x)
138 #define LTC_MUTEX_PROTO(x)
139 #define LTC_MUTEX_TYPE(x)
140 #define LTC_MUTEX_INIT(x)
141 #define LTC_MUTEX_LOCK(x)
142 #define LTC_MUTEX_UNLOCK(x)
143 #define FORTUNA_POOLS 0
147 /* define this if you use Valgrind, note: it CHANGES the way SOBER-128 and RC4 work (see the code) */
148 /* #define LTC_VALGRIND */
154 /* $Source: /cvs/libtom/libtomcrypt/src/headers/tomcrypt_custom.h,v $ */
155 /* $Revision: 1.66 $ */
156 /* $Date: 2006/12/04 02:50:11 $ */