summaryrefslogtreecommitdiffhomepage
path: root/libtomcrypt/src/headers/tomcrypt_custom.h
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2006-03-08 13:23:58 +0000
committerMatt Johnston <matt@ucc.asn.au>2006-03-08 13:23:58 +0000
commit6ae3a09ef33b62811a7f60a1f97dcb89907c1ac1 (patch)
tree37e84722c5b30bbfc86947bee260473d4604b616 /libtomcrypt/src/headers/tomcrypt_custom.h
parent33defd1f9b6c4889fe5b075e6abb0b24c00f3a59 (diff)
parent8608a8e64c1aeda096867f43f89e29e1aee207ae (diff)
propagate from branch 'au.asn.ucc.matt.ltc.dropbear' (head 20dccfc09627970a312d77fb41dc2970b62689c3)
to branch 'au.asn.ucc.matt.dropbear' (head fdf4a7a3b97ae5046139915de7e40399cceb2c01) --HG-- extra : convert_revision : dc4809882e1b9f2dcd3f8bbe38c74a0a52c39ce4
Diffstat (limited to 'libtomcrypt/src/headers/tomcrypt_custom.h')
-rw-r--r--libtomcrypt/src/headers/tomcrypt_custom.h96
1 files changed, 96 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..ad61f52
--- /dev/null
+++ b/libtomcrypt/src/headers/tomcrypt_custom.h
@@ -0,0 +1,96 @@
+#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 */
+#define XMALLOC malloc
+#define XREALLOC realloc
+#define XCALLOC calloc
+#define XFREE free
+
+#define XMEMSET memset
+#define XMEMCPY memcpy
+
+#define XCLOCK clock
+#define XCLOCKS_PER_SEC CLOCKS_PER_SEC
+
+#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 CBC
+
+#if defined(DROPBEAR_DSS) && defined(DSS_PROTOK)
+#define SHA512
+#endif
+
+#define SHA1
+
+#ifdef DROPBEAR_MD5_HMAC
+#define MD5
+#endif
+
+#define HMAC
+
+/* Various tidbits of modern neatoness */
+#define BASE64
+
+/* default no functions */
+#define LTC_MUTEX_GLOBAL(x)
+#define LTC_MUTEX_PROTO(x)
+#define LTC_MUTEX_LOCK(x)
+#define LTC_MUTEX_UNLOCK(x)
+#define FORTUNA_POOLS 0
+
+#endif
+
+
+/* $Source: /cvs/libtom/libtomcrypt/src/headers/tomcrypt_custom.h,v $ */
+/* $Revision: 1.17 $ */
+/* $Date: 2005/06/19 18:00:28 $ */