My Project
Loading...
Searching...
No Matches
user_settings_verbose_example.h
1#ifndef _EMBOS_USER_SETTINGS_H_
2#define _EMBOS_USER_SETTINGS_H_
3
4/* ------------------------------------------------------------------------- */
5/* Platform */
6/* ------------------------------------------------------------------------- */
7#undef NO_INLINE
8#define NO_INLINE
9
10#undef SINGLE_THREADED
11#define SINGLE_THREADED
12
13#undef WOLFSSL_SMALL_STACK
14#define WOLFSSL_SMALL_STACK
15
16
17/* ------------------------------------------------------------------------- */
18/* Math Configuration */
19/* ------------------------------------------------------------------------- */
20#undef NO_64BIT
21#define NO_64BIT
22
23#ifndef SIZEOF_LONG
24#define SIZEOF_LONG 4
25#endif
26#ifndef SIZEOF_LONG_LONG
27#define SIZEOF_LONG_LONG 8
28#endif
29
30#undef USE_FAST_MATH
31#define USE_FAST_MATH
32
33#ifdef USE_FAST_MATH
34 #undef TFM_TIMING_RESISTANT
35// #define TFM_TIMING_RESISTANT
36
37 /* Optimizations (TFM_ARM, TFM_ASM or none) */
38 #undef TFM_ARM
39// #define TFM_ARM
40
41 #undef TFM_ASM
42 //#define TFM_ASM
43#endif
44
45/* ------------------------------------------------------------------------- */
46/* Crypto */
47/* ------------------------------------------------------------------------- */
48#undef WOLFCRYPT_ONLY
49#define WOLFCRYPT_ONLY
50
51/* ECC */
52#if 1
53 #undef HAVE_ECC
54 #define HAVE_ECC
55
56 /* Manually define enabled curves */
57 #undef ECC_USER_CURVES
58 #define ECC_USER_CURVES
59
60 #define HAVE_ECC192
61 #define HAVE_ECC224
62 #undef NO_ECC256
63 #define HAVE_ECC384
64 #define HAVE_ECC521
65
66 /* Fixed point cache (speeds repeated operations against same private key) */
67 #undef FP_ECC
68 //#define FP_ECC
69 #ifdef FP_ECC
70 /* Bits / Entries */
71 #undef FP_ENTRIES
72 #define FP_ENTRIES 2
73 #undef FP_LUT
74 #define FP_LUT 4
75 #endif
76
77 /* Optional ECC calculation method */
78 /* Note: doubles heap usage, but slightly faster */
79 #undef ECC_SHAMIR
80 #define ECC_SHAMIR
81
82 /* Reduces heap usage, but slower */
83 #undef ECC_TIMING_RESISTANT
84 #define ECC_TIMING_RESISTANT
85
86 #ifdef USE_FAST_MATH
87 /* Max ECC bits (curve size * 8). ECC521 is (66*8) = 528. */
88 #undef ALT_ECC_SIZE
89 #define ALT_ECC_SIZE
90 #undef FP_MAX_BITS_ECC
91 #define FP_MAX_BITS_ECC 528
92
93 /* Enable TFM optimizations for ECC */
94 #define TFM_ECC192
95 #define TFM_ECC224
96 #define TFM_ECC256
97 #define TFM_ECC384
98 #define TFM_ECC521
99 #endif
100#endif
101
102/* RSA */
103#undef NO_RSA
104#if 1
105 #ifdef USE_FAST_MATH
106 /* Maximum math bits (Max RSA key bits * 2) */
107 #undef FP_MAX_BITS
108 #define FP_MAX_BITS 4096
109 #endif
110
111 /* half as much memory but twice as slow */
112 #undef RSA_LOW_MEM
113 //#define RSA_LOW_MEM
114#else
115 #define NO_RSA
116#endif
117
118/* AES */
119#undef NO_AES
120#if 1
121 #undef HAVE_AESGCM
122 #define HAVE_AESGCM
123
124 /* GCM Method: GCM_SMALL, GCM_WORD32 or GCM_TABLE */
125 #undef GCM_SMALL
126 #define GCM_SMALL
127#else
128 #define NO_AES
129#endif
130
131/* ChaCha20 / Poly1305 */
132#undef HAVE_CHACHA
133#undef HAVE_POLY1305
134#if 1
135 #define HAVE_CHACHA
136 #define HAVE_POLY1305
137
138 /* Needed for Poly1305 */
139 #undef HAVE_ONE_TIME_AUTH
140 #define HAVE_ONE_TIME_AUTH
141#endif
142
143
144/* ------------------------------------------------------------------------- */
145/* Hashing */
146/* ------------------------------------------------------------------------- */
147/* Sha */
148#undef NO_SHA
149#if 1
150#else
151 #define NO_SHA
152#endif
153
154/* Sha256 */
155#undef NO_SHA256
156#if 1
157 /* over twice as small, but 50% slower */
158 //#define USE_SLOW_SHA2
159#else
160 #define NO_SHA256
161#endif
162
163/* Sha512 */
164#undef WOLFSSL_SHA512
165#if 1
166 #define WOLFSSL_SHA512
167
168 /* Sha384 */
169 #undef WOLFSSL_SHA384
170 #if 1
171 #define WOLFSSL_SHA384
172 #endif
173#endif
174
175/* MD5 */
176#undef NO_MD5
177#if 1
178 #define NO_MD5
179#endif
180
181/* ------------------------------------------------------------------------- */
182/* Benchmark / Test */
183/* ------------------------------------------------------------------------- */
184/* Use reduced benchmark / test sizes */
185#undef BENCH_EMBEDDED
186#define BENCH_EMBEDDED
187
188#undef USE_CERT_BUFFERS_2048
189#define USE_CERT_BUFFERS_2048
190
191#endif /* _EMBOS_USER_SETTINGS_H_ */