diff options
author | Matt Johnston <matt@ucc.asn.au> | 2007-01-11 03:05:30 +0000 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2007-01-11 03:05:30 +0000 |
commit | 4ebcb4da9b179c9bc735698414524ccda5932568 (patch) | |
tree | 9ad32b57ddb21adc7906da94974efd721dc139f5 /libtomcrypt/src/headers/tomcrypt_custom.h | |
parent | a8df079d41495a4b4f6288c2fbeea45e1963e3d5 (diff) | |
parent | 1fccffd891ce88522bb018de87faad1487a8b832 (diff) | |
download | dropbear-4ebcb4da9b179c9bc735698414524ccda5932568.tar.gz |
propagate from branch 'au.asn.ucc.matt.ltc.dropbear' (head ffd1015238ffcc959f6cd95176d96fcd0945a397)
to branch 'au.asn.ucc.matt.dropbear' (head 52ccb0ad0587a62bc64aecb939adbb76546aac16)
Diffstat (limited to 'libtomcrypt/src/headers/tomcrypt_custom.h')
-rw-r--r-- | libtomcrypt/src/headers/tomcrypt_custom.h | 152 |
1 files changed, 152 insertions, 0 deletions
diff --git a/libtomcrypt/src/headers/tomcrypt_custom.h b/libtomcrypt/src/headers/tomcrypt_custom.h new file mode 100644 index 0000000..4bf668f --- /dev/null +++ b/libtomcrypt/src/headers/tomcrypt_custom.h @@ -0,0 +1,152 @@ +#ifndef TOMCRYPT_CUSTOM_H_ +#define TOMCRYPT_CUSTOM_H_ + +/* this will sort out which stuff based on the user-config in options.h */ +#include "options.h" + +/* macros for various libc functions you can change for embedded targets */ +#ifndef XMALLOC + #ifdef malloc + #define LTC_NO_PROTOTYPES + #endif +#define XMALLOC malloc +#endif +#ifndef XREALLOC + #ifdef realloc + #define LTC_NO_PROTOTYPES + #endif +#define XREALLOC realloc +#endif +#ifndef XCALLOC + #ifdef calloc + #define LTC_NO_PROTOTYPES + #endif +#define XCALLOC calloc +#endif +#ifndef XFREE + #ifdef free + #define LTC_NO_PROTOTYPES + #endif +#define XFREE free +#endif + +#ifndef XMEMSET + #ifdef memset + #define LTC_NO_PROTOTYPES + #endif +#define XMEMSET memset +#endif +#ifndef XMEMCPY + #ifdef memcpy + #define LTC_NO_PROTOTYPES + #endif +#define XMEMCPY memcpy +#endif +#ifndef XMEMCMP + #ifdef memcmp + #define LTC_NO_PROTOTYPES + #endif +#define XMEMCMP memcmp +#endif +#ifndef XSTRCMP + #ifdef strcmp + #define LTC_NO_PROTOTYPES + #endif +#define XSTRCMP strcmp +#endif + +#ifndef XCLOCK +#define XCLOCK clock +#endif +#ifndef XCLOCKS_PER_SEC +#define XCLOCKS_PER_SEC CLOCKS_PER_SEC +#endif + + #define LTC_NO_PRNGS + #define LTC_NO_PK +#ifdef DROPBEAR_SMALL_CODE +#define LTC_SMALL_CODE +#endif +/* These spit out warnings etc */ +#define LTC_NO_ROLC + +/* Enable self-test test vector checking */ +/* Not for dropbear */ +//#define LTC_TEST + +/* clean the stack of functions which put private information on stack */ +/* #define LTC_CLEAN_STACK */ + +/* disable all file related functions */ +/* #define LTC_NO_FILE */ + +/* disable all forms of ASM */ +/* #define LTC_NO_ASM */ + +/* disable FAST mode */ +/* #define LTC_NO_FAST */ + +/* disable BSWAP on x86 */ +/* #define LTC_NO_BSWAP */ + + +#ifdef DROPBEAR_BLOWFISH_CBC +#define BLOWFISH +#endif + +#ifdef DROPBEAR_AES_CBC +#define RIJNDAEL +#endif + +#ifdef DROPBEAR_TWOFISH_CBC +#define TWOFISH + +/* enabling just TWOFISH_SMALL will make the binary ~1kB smaller, turning on + * TWOFISH_TABLES will make it a few kB bigger, but perhaps reduces runtime + * memory usage? */ +#define TWOFISH_SMALL +/*#define TWOFISH_TABLES*/ +#endif + +#ifdef DROPBEAR_3DES_CBC +#define DES +#endif + +#define LTC_CBC_MODE + +#if defined(DROPBEAR_DSS) && defined(DSS_PROTOK) +#define SHA512 +#endif + +#define SHA1 + +#ifdef DROPBEAR_MD5_HMAC +#define MD5 +#endif + +#define LTC_HMAC + +/* Various tidbits of modern neatoness */ +#define BASE64 + +/* default no pthread functions */ +#define LTC_MUTEX_GLOBAL(x) +#define LTC_MUTEX_PROTO(x) +#define LTC_MUTEX_TYPE(x) +#define LTC_MUTEX_INIT(x) +#define LTC_MUTEX_LOCK(x) +#define LTC_MUTEX_UNLOCK(x) +#define FORTUNA_POOLS 0 + +/* Debuggers */ + +/* define this if you use Valgrind, note: it CHANGES the way SOBER-128 and RC4 work (see the code) */ +/* #define LTC_VALGRIND */ + +#endif + + + +/* $Source: /cvs/libtom/libtomcrypt/src/headers/tomcrypt_custom.h,v $ */ +/* $Revision: 1.66 $ */ +/* $Date: 2006/12/04 02:50:11 $ */ |