comparison libtomcrypt/src/headers/tomcrypt_custom.h @ 285:1b9e69c058d2

propagate from branch 'au.asn.ucc.matt.ltc.dropbear' (head 20dccfc09627970a312d77fb41dc2970b62689c3) to branch 'au.asn.ucc.matt.dropbear' (head fdf4a7a3b97ae5046139915de7e40399cceb2c01)
author Matt Johnston <matt@ucc.asn.au>
date Wed, 08 Mar 2006 13:23:58 +0000
parents
children 0cbe8f6dbf9e
comparison
equal deleted inserted replaced
281:997e6f7dc01e 285:1b9e69c058d2
1 #ifndef TOMCRYPT_CUSTOM_H_
2 #define TOMCRYPT_CUSTOM_H_
3
4 /* this will sort out which stuff based on the user-config in options.h */
5 #include "options.h"
6
7 /* macros for various libc functions you can change for embedded targets */
8 #define XMALLOC malloc
9 #define XREALLOC realloc
10 #define XCALLOC calloc
11 #define XFREE free
12
13 #define XMEMSET memset
14 #define XMEMCPY memcpy
15
16 #define XCLOCK clock
17 #define XCLOCKS_PER_SEC CLOCKS_PER_SEC
18
19 #ifdef DROPBEAR_SMALL_CODE
20 #define LTC_SMALL_CODE
21 #endif
22
23 /* These spit out warnings etc */
24 #define LTC_NO_ROLC
25
26 /* Enable self-test test vector checking */
27 /* Not for dropbear */
28 //#define LTC_TEST
29
30 /* clean the stack of functions which put private information on stack */
31 /* #define LTC_CLEAN_STACK */
32
33 /* disable all file related functions */
34 /* #define LTC_NO_FILE */
35
36 /* disable all forms of ASM */
37 /* #define LTC_NO_ASM */
38
39 /* disable FAST mode */
40 /* #define LTC_NO_FAST */
41
42 /* disable BSWAP on x86 */
43 /* #define LTC_NO_BSWAP */
44
45
46 #ifdef DROPBEAR_BLOWFISH_CBC
47 #define BLOWFISH
48 #endif
49
50 #ifdef DROPBEAR_AES_CBC
51 #define RIJNDAEL
52 #endif
53
54 #ifdef DROPBEAR_TWOFISH_CBC
55 #define TWOFISH
56
57 /* enabling just TWOFISH_SMALL will make the binary ~1kB smaller, turning on
58 * TWOFISH_TABLES will make it a few kB bigger, but perhaps reduces runtime
59 * memory usage? */
60 #define TWOFISH_SMALL
61 /*#define TWOFISH_TABLES*/
62 #endif
63
64 #ifdef DROPBEAR_3DES_CBC
65 #define DES
66 #endif
67 #define CBC
68
69 #if defined(DROPBEAR_DSS) && defined(DSS_PROTOK)
70 #define SHA512
71 #endif
72
73 #define SHA1
74
75 #ifdef DROPBEAR_MD5_HMAC
76 #define MD5
77 #endif
78
79 #define HMAC
80
81 /* Various tidbits of modern neatoness */
82 #define BASE64
83
84 /* default no functions */
85 #define LTC_MUTEX_GLOBAL(x)
86 #define LTC_MUTEX_PROTO(x)
87 #define LTC_MUTEX_LOCK(x)
88 #define LTC_MUTEX_UNLOCK(x)
89 #define FORTUNA_POOLS 0
90
91 #endif
92
93
94 /* $Source: /cvs/libtom/libtomcrypt/src/headers/tomcrypt_custom.h,v $ */
95 /* $Revision: 1.17 $ */
96 /* $Date: 2005/06/19 18:00:28 $ */