Revert "Revert "and added files""
[bcm963xx.git] / userapps / opensource / sshd / libtomcrypt / mycrypt_cfg.h
1 /* This is the build config file.
2  *
3  * With this you can setup what to inlcude/exclude automatically during any build.  Just comment
4  * out the line that #define's the word for the thing you want to remove.  phew!
5  */
6
7 #ifndef MYCRYPT_CFG_H
8 #define MYCRYPT_CFG_H
9
10 /* you can change how memory allocation works ... */
11 extern void *XMALLOC(size_t n);
12 extern void *REALLOC(void *p, size_t n);
13 extern void *XCALLOC(size_t n, size_t s);
14 extern void XFREE(void *p);
15
16 /* change the clock function too */
17 extern clock_t XCLOCK(void);
18
19 /* ch1-01-1 */
20 /* type of argument checking, 0=default, 1=fatal and 2=none */
21 #define ARGTYPE  0
22 /* ch1-01-1 */
23
24 /* Controls endianess and size of registers.  Leave uncommented to get platform neutral [slower] code */
25 /* detect x86-32 machines somewhat */
26 #if (defined(_MSC_VER) && defined(WIN32)) || (defined(__GNUC__) && (defined(__DJGPP__) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__i386__)))
27    #define ENDIAN_LITTLE
28    #define ENDIAN_32BITWORD
29 #endif
30
31 /* detects MIPS R5900 processors (PS2) */
32 #if (defined(__R5900) || defined(R5900) || defined(__R5900__)) && (defined(_mips) || defined(__mips__) || defined(mips))
33    #define ENDIAN_LITTLE
34    #define ENDIAN_64BITWORD
35 #endif
36
37 /* #define ENDIAN_LITTLE */
38 /* #define ENDIAN_BIG */
39
40 /* #define ENDIAN_32BITWORD */
41 /* #define ENDIAN_64BITWORD */
42
43 #if (defined(ENDIAN_BIG) || defined(ENDIAN_LITTLE)) && !(defined(ENDIAN_32BITWORD) || defined(ENDIAN_64BITWORD))
44     #error You must specify a word size as well as endianess in mycrypt_cfg.h
45 #endif
46
47 #if !(defined(ENDIAN_BIG) || defined(ENDIAN_LITTLE))
48    #define ENDIAN_NEUTRAL
49 #endif
50
51 #ifdef SHA384
52    #ifndef SHA512
53       #error The SHA384 hash requires SHA512 to be defined!
54    #endif
55 #endif
56
57 #ifdef YARROW
58    #ifndef CTR
59       #error YARROW requires CTR chaining mode to be defined!
60    #endif
61 #endif
62
63 /* packet code */
64 #if defined(MRSA) || defined(MDH) || defined(MECC)
65     #define PACKET
66
67     /* size of a packet header in bytes */
68     #define PACKET_SIZE            4
69
70     /* Section tags */
71     #define PACKET_SECT_RSA        0
72     #define PACKET_SECT_DH         1
73     #define PACKET_SECT_ECC        2
74     #define PACKET_SECT_DSA        4
75
76     /* Subsection Tags for the first three sections */
77     #define PACKET_SUB_KEY         0
78     #define PACKET_SUB_ENCRYPTED   1
79     #define PACKET_SUB_SIGNED      2
80     #define PACKET_SUB_ENC_KEY     3
81 #endif
82
83 #endif /* MYCRYPT_CFG_H */
84