tomcrypt_test.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /* LibTomCrypt, modular cryptographic library -- Tom St Denis
  2. *
  3. * LibTomCrypt is a library that provides various cryptographic
  4. * algorithms in a highly modular and flexible manner.
  5. *
  6. * The library is free for all purposes without any express
  7. * guarantee it works.
  8. */
  9. #ifndef __TEST_H_
  10. #define __TEST_H_
  11. #include <tomcrypt.h>
  12. #include "common.h"
  13. #ifdef USE_LTM
  14. /* Use libtommath as MPI provider */
  15. #define LTC_TEST_MPI
  16. #elif defined(USE_TFM)
  17. /* Use tomsfastmath as MPI provider */
  18. #define LTC_TEST_MPI
  19. #elif defined(USE_GMP)
  20. /* Use GNU Multiple Precision Arithmetic Library as MPI provider */
  21. #define LTC_TEST_MPI
  22. #elif defined(EXT_MATH_LIB)
  23. /* The user must define his own MPI provider! */
  24. #define LTC_TEST_MPI
  25. #endif
  26. typedef struct {
  27. char *name, *prov, *req;
  28. int (*entry)(void);
  29. } test_entry;
  30. /* TESTS */
  31. int cipher_hash_test(void);
  32. int modes_test(void);
  33. int mac_test(void);
  34. int pkcs_1_test(void);
  35. int pkcs_1_pss_test(void);
  36. int pkcs_1_oaep_test(void);
  37. int pkcs_1_emsa_test(void);
  38. int pkcs_1_eme_test(void);
  39. int store_test(void);
  40. int rotate_test(void);
  41. int rsa_test(void);
  42. int dh_test(void);
  43. int katja_test(void);
  44. int ecc_tests(void);
  45. int dsa_test(void);
  46. int der_test(void);
  47. int misc_test(void);
  48. int base64_test(void);
  49. int file_test(void);
  50. int multi_test(void);
  51. int prng_test(void);
  52. int mpi_test(void);
  53. #ifdef LTC_PKCS_1
  54. struct ltc_prng_descriptor* no_prng_desc_get(void);
  55. void no_prng_desc_free(struct ltc_prng_descriptor*);
  56. #endif
  57. #endif
  58. /* ref: $Format:%D$ */
  59. /* git commit: $Format:%H$ */
  60. /* commit time: $Format:%ai$ */