~ubuntu-branches/ubuntu/utopic/dropbear/utopic-proposed

« back to all changes in this revision

Viewing changes to libtomcrypt/mycrypt_custom.h

  • Committer: Bazaar Package Importer
  • Author(s): Matt Johnston
  • Date: 2005-12-08 19:20:21 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051208192021-nyp9rwnt77nsg6ty
Tags: 0.47-1
* New upstream release.
* SECURITY: Fix incorrect buffer sizing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* This header is meant to be included before mycrypt.h in projects where
2
 
 * you don't want to throw all the defines in a makefile. 
3
 
 */
4
 
 
5
 
#ifndef MYCRYPT_CUSTOM_H_
6
 
#define MYCRYPT_CUSTOM_H_
7
 
 
8
 
/* this will sort out which stuff based on the user-config in options.h */
9
 
#include "../options.h"
10
 
 
11
 
/* macros for various libc functions you can change for embedded targets */
12
 
#define XMALLOC  malloc
13
 
#define XREALLOC realloc
14
 
#define XCALLOC  calloc
15
 
#define XFREE    free
16
 
 
17
 
#define XMEMSET  memset
18
 
#define XMEMCPY  memcpy
19
 
 
20
 
#define XCLOCK   clock
21
 
#define XCLOCKS_PER_SEC CLOCKS_PER_SEC
22
 
 
23
 
#ifdef DROPBEAR_SMALL_CODE
24
 
#define SMALL_CODE
25
 
#endif
26
 
 
27
 
/* Enable self-test test vector checking */
28
 
/* Not for dropbear */
29
 
//#define LTC_TEST
30
 
 
31
 
/* clean the stack of functions which put private information on stack */
32
 
// #define CLEAN_STACK
33
 
 
34
 
/* disable all file related functions */
35
 
// #define NO_FILE
36
 
 
37
 
#define CLEAN_STACK
38
 
 
39
 
#ifdef DROPBEAR_BLOWFISH_CBC
40
 
#define BLOWFISH
41
 
#endif
42
 
 
43
 
#ifdef DROPBEAR_AES128_CBC
44
 
#define RIJNDAEL
45
 
#endif
46
 
 
47
 
#ifdef DROPBEAR_TWOFISH128_CBC
48
 
#define TWOFISH
49
 
 
50
 
/* enabling just TWOFISH_SMALL will make the binary ~1kB smaller, turning on
51
 
 * TWOFISH_TABLES will make it a few kB bigger, but perhaps reduces runtime
52
 
 * memory usage? */
53
 
#define TWOFISH_SMALL
54
 
/*#define TWOFISH_TABLES*/
55
 
#endif
56
 
 
57
 
#ifdef DROPBEAR_3DES_CBC
58
 
#define DES
59
 
#endif
60
 
#define CBC
61
 
 
62
 
#if defined(DROPBEAR_DSS) && defined(DSS_PROTOK)
63
 
#define SHA512
64
 
#endif
65
 
 
66
 
#define SHA1
67
 
 
68
 
#ifdef DROPBEAR_MD5_HMAC
69
 
#define MD5
70
 
#endif
71
 
 
72
 
#define HMAC
73
 
 
74
 
/* Various tidbits of modern neatoness */
75
 
#define BASE64
76
 
 
77
 
#define FORTUNA_POOLS 0
78
 
 
79
 
#endif
80