:orange_book: Heavily optimized cryptography algorithms for embedded devices. https://github.com/trezor/trezor-crypto
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

95 lines
2.4KB

  1. /**
  2. * Copyright (c) 2013-2014 Pavol Rusnak
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining
  5. * a copy of this software and associated documentation files (the "Software"),
  6. * to deal in the Software without restriction, including without limitation
  7. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8. * and/or sell copies of the Software, and to permit persons to whom the
  9. * Software is furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice shall be included
  12. * in all copies or substantial portions of the Software.
  13. *
  14. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  15. * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  17. * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
  18. * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  19. * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  20. * OTHER DEALINGS IN THE SOFTWARE.
  21. */
  22. #ifndef __OPTIONS_H__
  23. #define __OPTIONS_H__
  24. // use precomputed Curve Points (some scalar multiples of curve base point G)
  25. #ifndef USE_PRECOMPUTED_CP
  26. #define USE_PRECOMPUTED_CP 1
  27. #endif
  28. // use fast inverse method
  29. #ifndef USE_INVERSE_FAST
  30. #define USE_INVERSE_FAST 1
  31. #endif
  32. // support for printing bignum256 structures via printf
  33. #ifndef USE_BN_PRINT
  34. #define USE_BN_PRINT 0
  35. #endif
  36. // use deterministic signatures
  37. #ifndef USE_RFC6979
  38. #define USE_RFC6979 1
  39. #endif
  40. // implement BIP32 caching
  41. #ifndef USE_BIP32_CACHE
  42. #define USE_BIP32_CACHE 1
  43. #define BIP32_CACHE_SIZE 10
  44. #define BIP32_CACHE_MAXDEPTH 8
  45. #endif
  46. // support constructing BIP32 nodes from ed25519 and curve25519 curves.
  47. #ifndef USE_BIP32_25519_CURVES
  48. #define USE_BIP32_25519_CURVES 1
  49. #endif
  50. // implement BIP39 caching
  51. #ifndef USE_BIP39_CACHE
  52. #define USE_BIP39_CACHE 1
  53. #define BIP39_CACHE_SIZE 4
  54. #endif
  55. // support Ethereum operations
  56. #ifndef USE_ETHEREUM
  57. #define USE_ETHEREUM 0
  58. #endif
  59. // support Graphene operations (STEEM, BitShares)
  60. #ifndef USE_GRAPHENE
  61. #define USE_GRAPHENE 0
  62. #endif
  63. // support NEM operations
  64. #ifndef USE_NEM
  65. #define USE_NEM 0
  66. #endif
  67. // support MONERO operations
  68. #ifndef USE_MONERO
  69. #define USE_MONERO 0
  70. #endif
  71. // support Keccak hashing
  72. #ifndef USE_KECCAK
  73. #define USE_KECCAK 1
  74. #endif
  75. // add way how to mark confidential data
  76. #ifndef CONFIDENTIAL
  77. #define CONFIDENTIAL
  78. #endif
  79. #endif