ecc.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /* ecc.h
  2. *
  3. * Copyright (C) 2006-2017 wolfSSL Inc.
  4. *
  5. * This file is part of wolfSSL.
  6. *
  7. * wolfSSL is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * wolfSSL is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
  20. */
  21. #ifdef HAVE_ECC
  22. #ifndef CTAO_CRYPT_ECC_H
  23. #define CTAO_CRYPT_ECC_H
  24. #include <wolfssl/wolfcrypt/ecc.h>
  25. /* includes for compatibility */
  26. #include <cyassl/ctaocrypt/types.h>
  27. #include <cyassl/ctaocrypt/integer.h>
  28. #include <cyassl/ctaocrypt/random.h>
  29. /* for ecc reverse compatibility */
  30. #ifdef HAVE_ECC
  31. #define ecc_make_key wc_ecc_make_key
  32. #define ecc_shared_secret wc_ecc_shared_secret
  33. #define ecc_sign_hash wc_ecc_sign_hash
  34. #define ecc_verify_hash wc_ecc_verify_hash
  35. #define ecc_init wc_ecc_init
  36. #define ecc_free wc_ecc_free
  37. #define ecc_fp_free wc_ecc_fp_free
  38. #define ecc_export_x963 wc_ecc_export_x963
  39. #define ecc_size wc_ecc_size
  40. #define ecc_sig_size wc_ecc_sig_size
  41. #define ecc_export_x963_ex wc_ecc_export_x963_ex
  42. #define ecc_import_x963 wc_ecc_import_x963
  43. #define ecc_import_private_key wc_ecc_import_private_key
  44. #define ecc_rs_to_sig wc_ecc_rs_to_sig
  45. #define ecc_import_raw wc_ecc_import_raw
  46. #define ecc_export_private_only wc_ecc_export_private_only
  47. #ifdef HAVE_ECC_ENCRYPT
  48. /* ecc encrypt */
  49. #define ecc_ctx_new wc_ecc_ctx_new
  50. #define ecc_ctx_free wc_ecc_ctx_free
  51. #define ecc_ctx_reset wc_ecc_ctx_reset
  52. #define ecc_ctx_get_own_salt wc_ecc_ctx_get_own_salt
  53. #define ecc_ctx_set_peer_salt wc_ecc_ctx_set_peer_salt
  54. #define ecc_ctx_set_info wc_ecc_ctx_set_info
  55. #define ecc_encrypt wc_ecc_encrypt
  56. #define ecc_decrypt wc_ecc_decrypt
  57. #endif /* HAVE_ECC_ENCRYPT */
  58. #endif
  59. #endif /* CTAO_CRYPT_ECC_H */
  60. #endif /* HAVE_ECC */