user_settings.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. /* Motenpoche
  2. *
  3. * (c) 2023 Daniele Lacamera <root@danielinux.net>
  4. *
  5. *
  6. * Motenpoche is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * Motenpoche is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
  19. *
  20. */
  21. /* user_settings.h for wolfcrypt */
  22. #ifndef H_USER_SETTINGS_
  23. #define H_USER_SETTINGS_
  24. /* System */
  25. #define WOLFSSL_GENERAL_ALIGNMENT 4
  26. #define SINGLE_THREADED
  27. //#define WOLFSSL_SMALL_STACK
  28. #define WOLFCRYPT_ONLY
  29. #define TFM_TIMING_RESISTANT
  30. #define HAVE_CHACHA
  31. #define WOLFSSL_CHACHA
  32. #define HAVE_SHA256
  33. #define WOLFSSL_SHA512
  34. #define HAVE_PBKDF2
  35. #define HAVE_AES
  36. #define HAVE_AES_CBC
  37. #define HAVE_AES_DECRYPT
  38. #define HAVE_ECC
  39. # define ECC_TIMING_RESISTANT
  40. # define ECC_USER_CURVES /* enables only 256-bit by default */
  41. /* ECC options disabled to reduce size */
  42. # define NO_ECC_SIGN
  43. # define NO_ECC_EXPORT
  44. # define NO_ECC_DHE
  45. # define NO_ECC_KEY_EXPORT
  46. # define HAVE_ECC256
  47. # define FP_MAX_BITS (256 + 32)
  48. # define SP_WORD_SIZE 32
  49. # ifndef ULLONG_MAX
  50. # define ULLONG_MAX 18446744073709551615ULL
  51. # endif
  52. # define WOLFSSL_SP
  53. # define WOLFSSL_SP_MATH
  54. # define WOLFSSL_HAVE_SP_ECC
  55. #define CUSTOM_RAND_GENERATE random_uint32
  56. #define CUSTOM_RAND_TYPE uint32_t
  57. #define ED25519_SMALL
  58. #define WOLFSSL_CURVE25519
  59. #define NO_INLINE
  60. #define WOLFSSL_SP
  61. #define WOLFSSL_SP_SMALL
  62. #define WOLFSSL_SP_MATH
  63. //#define WOLFSSL_SP_ARM_ARCH 4
  64. //#define WOLFSSL_SP_ARM_THUMB_ASM
  65. #define SP_WORD_SIZE 32
  66. #define SINGLE_THREADED
  67. /* Disables - For minimum wolfCrypt build */
  68. #define NO_CMAC
  69. #define NO_CODING
  70. #define NO_RSA
  71. #define NO_BIG_INT
  72. #define NO_ASN
  73. #define NO_RC4
  74. #define NO_SHA
  75. #define NO_DH
  76. #define NO_DSA
  77. #define NO_MD4
  78. #define NO_RABBIT
  79. #define NO_MD5
  80. #define NO_SIG_WRAPPER
  81. #define NO_CERT
  82. #define NO_SESSION_CACHE
  83. #define NO_HC128
  84. #define NO_DES3
  85. #define NO_WRITEV
  86. #define NO_DEV_RANDOM
  87. #define NO_FILESYSTEM
  88. #define NO_MAIN_DRIVER
  89. #define NO_OLD_RNGNAME
  90. #define NO_WOLFSSL_DIR
  91. #define WOLFSSL_NO_SOCK
  92. #define WOLFSSL_SP_NO_MALLOC
  93. #define WOLFSSL_SP_NO_DYN_STACK
  94. #endif /* !H_USER_SETTINGS_ */