Skip to content

Commit 9ea52c3

Browse files
committed
Update IAR-EWARM project user-settings.h.
1 parent 5c421d0 commit 9ea52c3

1 file changed

Lines changed: 50 additions & 2 deletions

File tree

IDE/IAR-EWARM/Projects/user_settings.h

Lines changed: 50 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
#define NO_MAIN_DRIVER
32
#define BENCH_EMBEDDED
43
#define NO_WRITEV
@@ -17,10 +16,59 @@
1716

1817
#define WOLFSSL_GENSEED_FORTEST /* Warning: define your own seed gen */
1918

20-
#define TFM_TIMING_RESISTANT
19+
/* A few examples of different math options below.
20+
*
21+
* See examples/configs/user_settings_template.h for a more
22+
* detailed template. */
23+
#if 1
24+
/* Use only single precision (SP) math and algorithms.
25+
* SP math is written to accelerate specific/common key
26+
* sizes and curves. This adds code from sp_c32.c, or one of the specific
27+
* assembly implementations like sp_cortexm.c. This code is faster than the
28+
* multi-precision support because it's optimized for the key/curve.
29+
* The SP math can be used together with any multi-precision math library
30+
* if WOLFSSL_SP_MATH is removed. If only standard keys/curves are being
31+
* used the multi-precision math is not required.
32+
*/
33+
#define WOLFSSL_SP_MATH
34+
/* Enable SP ECC support */
35+
#define WOLFSSL_HAVE_SP_ECC
36+
/* Enable SP RSA support */
37+
#define WOLFSSL_HAVE_SP_RSA
38+
/* Enable SP DH support */
39+
#define WOLFSSL_HAVE_SP_DH
40+
/* Reduce stack use specifically in SP implementation. */
41+
#define WOLFSSL_SP_SMALL_STACK
42+
/* use smaller version of code */
43+
#define WOLFSSL_SP_SMALL
44+
/* Assembly optimized version - sp_cortexm.c */
45+
//#define WOLFSSL_SP_ARM_CORTEX_M_ASM
46+
#elif 1
47+
/* Use SP math for all key sizes and curves. This will use
48+
* the multi-precision (MP) math implementation in sp_int.c */
49+
#define WOLFSSL_SP_MATH_ALL
50+
/* Disable use of dynamic stack items */
51+
#define WOLFSSL_SP_NO_DYN_STACK
52+
/* use smaller version of code */
53+
#define WOLFSSL_SP_SMALL
54+
#elif 1
55+
/* Fast Math (tfm.c) (stack based and timing resistant) */
56+
#define USE_FAST_MATH
57+
/* Enable Fast Math Timing Resistance */
58+
#define TFM_TIMING_RESISTANT
59+
#else
60+
/* Normal (integer.c) (heap based, not timing resistant) - not recommended*/
61+
#define USE_INTEGER_HEAP_MATH
62+
#endif
63+
64+
/* Enable ECC Timing Resistance */
2165
#define ECC_TIMING_RESISTANT
66+
/* Enables blinding mode, to prevent timing attacks */
2267
#define WC_RSA_BLINDING
2368

69+
/* reduce stack use. For variables over 100 bytes allocate from heap */
70+
#define WOLFSSL_SMALL_STACK
71+
/* disable mutex locking */
2472
#define SINGLE_THREADED /* or define RTOS option */
2573
/* #define WOLFSSL_CMSIS_RTOS */
2674
#define NO_FILESYSTEM

0 commit comments

Comments
 (0)