test_keys.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. Software License
  3. Copyright (C) 2021-05-24 Xoronos
  4. This program is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation, version 3.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program. If not, see <https://www.gnu.org/licenses/>.
  13. */
  14. /*
  15. Liabilities
  16. The software is provided "AS IS" without any warranty of any kind, either expressed,
  17. implied, or statutory, including, but not limited to, any warranty that the software
  18. will conform to specifications, any implied warranties of merchantability, fitness
  19. for a particular purpose, and freedom from infringement, and any warranty that the
  20. documentation will conform to the software, or any warranty that the software will
  21. be error free.
  22. In no event shall Xoronos be liable for any damages, including, but not limited to,
  23. direct, indirect, special or consequential damages, arising out of, resulting from,
  24. or in any way connected with this software, whether or not based upon warranty,
  25. contract, tort, or otherwise, whether or not injury was sustained by persons or
  26. property or otherwise, and whether or not loss was sustained from, or arose out of
  27. the results of, or use of, the software or services provided hereunder.
  28. To request the provided software under a different license you can contact us at
  29. support@xoronos.com
  30. */
  31. #ifndef XORON_TEST_KEYS_H
  32. #define XORON_TEST_KEYS_H
  33. #include <stdio.h>
  34. #include <stdint.h>
  35. #include <stdlib.h>
  36. #include <time.h>
  37. #include "xrn_settings.h"
  38. #include "xrn_common.h"
  39. #include "xrn_arithmetic.h"
  40. #include "xrn_arithmetic_backend.h"
  41. #include "xrn_core.h"
  42. #include "xrn_core_backend.h"
  43. #include "xrn_crypto.h"
  44. #include "xrn_crypto_backend.h"
  45. #include "xgenesis_bases_init.h"
  46. #include "xrn_encoder.h"
  47. int test_monomial_key_io(
  48. );
  49. int test_binomial_key_io(
  50. );
  51. int test_monomial_key_checksum(
  52. );
  53. int test_binomial_key_checksum(
  54. );
  55. int test_all_keys( FILE * fp, int runs, int non_block
  56. );
  57. #endif