Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 50 additions & 2 deletions IDE/IAR-EWARM/Projects/user_settings.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#define NO_MAIN_DRIVER
#define BENCH_EMBEDDED
#define NO_WRITEV
Expand All @@ -17,10 +16,59 @@

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

#define TFM_TIMING_RESISTANT
/* A few examples of different math options below.
*
* See examples/configs/user_settings_template.h for a more
* detailed template. */
#if 1
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section for single precision can exist all on its own. It can be used regardless of the 3 multi-precision math library options as long as WOLFSSL_SP_MATH is not defined.

/* Use only single precision (SP) math and algorithms.
* SP math is written to accelerate specific/common key
* sizes and curves. This adds code from sp_c32.c, or one of the specific
* assembly implementations like sp_cortexm.c. This code is faster than the
* multi-precision support because it's optimized for the key/curve.
* The SP math can be used together with any multi-precision math library
* if WOLFSSL_SP_MATH is removed. If only standard keys/curves are being
* used the multi-precision math is not required.
*/
#define WOLFSSL_SP_MATH
/* Enable SP ECC support */
#define WOLFSSL_HAVE_SP_ECC
/* Enable SP RSA support */
#define WOLFSSL_HAVE_SP_RSA
/* Enable SP DH support */
#define WOLFSSL_HAVE_SP_DH
/* Reduce stack use specifically in SP implementation. */
#define WOLFSSL_SP_SMALL_STACK
/* use smaller version of code */
#define WOLFSSL_SP_SMALL
/* Assembly optimized version - sp_cortexm.c */
//#define WOLFSSL_SP_ARM_CORTEX_M_ASM
#elif 1
/* Use SP math for all key sizes and curves. This will use
* the multi-precision (MP) math implementation in sp_int.c */
#define WOLFSSL_SP_MATH_ALL
/* Disable use of dynamic stack items */
#define WOLFSSL_SP_NO_DYN_STACK
/* use smaller version of code */
#define WOLFSSL_SP_SMALL
#elif 1
/* Fast Math (tfm.c) (stack based and timing resistant) */
#define USE_FAST_MATH
/* Enable Fast Math Timing Resistance */
#define TFM_TIMING_RESISTANT
#else
/* Normal (integer.c) (heap based, not timing resistant) - not recommended*/
#define USE_INTEGER_HEAP_MATH
#endif

/* Enable ECC Timing Resistance */
#define ECC_TIMING_RESISTANT
/* Enables blinding mode, to prevent timing attacks */
#define WC_RSA_BLINDING

/* reduce stack use. For variables over 100 bytes allocate from heap */
#define WOLFSSL_SMALL_STACK
/* disable mutex locking */
#define SINGLE_THREADED /* or define RTOS option */
/* #define WOLFSSL_CMSIS_RTOS */
#define NO_FILESYSTEM
Expand Down