@@ -213,14 +213,17 @@ extern ${variable.value} ${variable.name};
213213/* ------------------------------------------------------------------------- */
214214/* Math Configuration */
215215/* ------------------------------------------------------------------------- */
216- /* 1=Fast (stack)
217- * 2=Normal (heap)
218- * 3=Single Precision C (only common curves/key sizes)
219- * 4=Single Precision ASM Cortex-M3+
220- * 5=Single Precision ASM Cortex-M0 (Generic Thumb)
221- * 6=Single Precision C all small
222- * 7=Single Precision C all big
216+ /* 1=Fast (stack) (tfm.c)
217+ * 2=Normal (heap) (integer.c)
218+ * 3-5=Single Precision: only common curves/key sizes:
219+ * (ECC 256/384/521 and RSA/DH 2048/3072/4096)
220+ * 3=Single Precision C (sp_c32.c)
221+ * 4=Single Precision ASM Cortex-M3+ (sp_cortexm.c)
222+ * 5=Single Precision ASM Cortex-M0 (sp_armthumb.c)
223+ * 6=Wolf multi-precision C small (sp_int.c)
224+ * 7=Wolf multi-precision C big (sp_int.c)
223225 */
226+
224227#if defined(WOLF_CONF_MATH) && WOLF_CONF_MATH == 1
225228 /* fast (stack) math - tfm.c */
226229 #define USE_FAST_MATH
@@ -246,19 +249,26 @@ extern ${variable.value} ${variable.name};
246249 #endif
247250 #if defined(WOLF_CONF_RSA) && WOLF_CONF_RSA == 1
248251 #define WOLFSSL_HAVE_SP_RSA
252+ //#define WOLFSSL_SP_NO_2048
253+ //#define WOLFSSL_SP_NO_3072
254+ //#define WOLFSSL_SP_4096
249255 #endif
250256 #if defined(WOLF_CONF_DH) && WOLF_CONF_DH == 1
251257 #define WOLFSSL_HAVE_SP_DH
252258 #endif
253259 #if defined(WOLF_CONF_ECC) && WOLF_CONF_ECC == 1
254260 #define WOLFSSL_HAVE_SP_ECC
261+ //#define WOLFSSL_SP_NO_256
262+ //#define WOLFSSL_SP_384
263+ //#define WOLFSSL_SP_521
255264 #endif
256265 #if WOLF_CONF_MATH == 6 || WOLF_CONF_MATH == 7
257266 #define WOLFSSL_SP_MATH_ALL /* use sp_int.c multi precision math */
267+ //#define WOLFSSL_SP_ARM_THUMB /* enable ARM Thumb ASM speedups */
258268 #else
259269 #define WOLFSSL_SP_MATH /* disable non-standard curves / key sizes */
260270 #endif
261- #define SP_WORD_SIZE 32
271+ #define SP_WORD_SIZE 32 /* force 32-bit mode */
262272
263273 /* Enable to put all math on stack (no heap) */
264274 //#define WOLFSSL_SP_NO_MALLOC
0 commit comments