user_settings_verbose_example.h 4.2 KB

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