summaryrefslogtreecommitdiffhomepage
path: root/libtomcrypt/src/headers/tomcrypt_custom.h
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2008-11-06 13:16:55 +0000
committerMatt Johnston <matt@ucc.asn.au>2008-11-06 13:16:55 +0000
commit800810a1816a0ac29ba2f5c77f8eed11a97566af (patch)
treedf044012cc8a0c94635a4469c3078d0e14497c3d /libtomcrypt/src/headers/tomcrypt_custom.h
parent3301bad391f5792e9aa35a01d4e0aa0566fef303 (diff)
parente80f8e8c09dab7cece30660a33e2a2bfd5d5f571 (diff)
propagate from branch 'au.asn.ucc.matt.dropbear' (head cdcc3c729e29544e8b98a408e2dc60e4483dfd2a)
to branch 'au.asn.ucc.matt.dropbear.insecure-nocrypto' (head 0ca38a1cf349f7426ac9de34ebe4c3e3735effab) --HG-- branch : insecure-nocrypto extra : convert_revision : dbb093e087a68abf2e54ab0b711af70771ddb29d
Diffstat (limited to 'libtomcrypt/src/headers/tomcrypt_custom.h')
-rw-r--r--libtomcrypt/src/headers/tomcrypt_custom.h82
1 files changed, 71 insertions, 11 deletions
diff --git a/libtomcrypt/src/headers/tomcrypt_custom.h b/libtomcrypt/src/headers/tomcrypt_custom.h
index ad61f52..928f54e 100644
--- a/libtomcrypt/src/headers/tomcrypt_custom.h
+++ b/libtomcrypt/src/headers/tomcrypt_custom.h
@@ -5,27 +5,74 @@
#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
+/*#define LTC_TEST*/
/* clean the stack of functions which put private information on stack */
/* #define LTC_CLEAN_STACK */
@@ -43,15 +90,15 @@
/* #define LTC_NO_BSWAP */
-#ifdef DROPBEAR_BLOWFISH_CBC
+#ifdef DROPBEAR_BLOWFISH
#define BLOWFISH
#endif
-#ifdef DROPBEAR_AES_CBC
+#ifdef DROPBEAR_AES
#define RIJNDAEL
#endif
-#ifdef DROPBEAR_TWOFISH_CBC
+#ifdef DROPBEAR_TWOFISH
#define TWOFISH
/* enabling just TWOFISH_SMALL will make the binary ~1kB smaller, turning on
@@ -61,10 +108,15 @@
/*#define TWOFISH_TABLES*/
#endif
-#ifdef DROPBEAR_3DES_CBC
+#ifdef DROPBEAR_3DES
#define DES
#endif
-#define CBC
+
+#define LTC_CBC_MODE
+
+#ifdef DROPBEAR_ENABLE_CTR_MODE
+#define LTC_CTR_MODE
+#endif
#if defined(DROPBEAR_DSS) && defined(DSS_PROTOK)
#define SHA512
@@ -76,21 +128,29 @@
#define MD5
#endif
-#define HMAC
+#define LTC_HMAC
/* Various tidbits of modern neatoness */
#define BASE64
-/* default no functions */
+/* 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.17 $ */
-/* $Date: 2005/06/19 18:00:28 $ */
+/* $Revision: 1.66 $ */
+/* $Date: 2006/12/04 02:50:11 $ */