tomcrypt_test.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #ifndef __TEST_H_
  2. #define __TEST_H_
  3. #include <tomcrypt.h>
  4. #include "common.h"
  5. #ifdef USE_LTM
  6. /* Use libtommath as MPI provider */
  7. #elif defined(USE_TFM)
  8. /* Use tomsfastmath as MPI provider */
  9. #elif defined(USE_GMP)
  10. /* Use GNU Multiple Precision Arithmetic Library as MPI provider */
  11. #else
  12. /* The user must define his own MPI provider! */
  13. #ifndef EXT_MATH_LIB
  14. /*
  15. * Yes, you're right, you could also name your instance of the MPI provider
  16. * "EXT_MATH_LIB" and you wouldn't need to define it, but most users won't do
  17. * this and so it's treated as an error and you have to comment out the
  18. * following statement :)
  19. */
  20. #error EXT_MATH_LIB is required to be defined
  21. #endif
  22. #endif
  23. typedef struct {
  24. char *name, *prov, *req;
  25. int (*entry)(void);
  26. } test_entry;
  27. /* TESTS */
  28. int cipher_hash_test(void);
  29. int modes_test(void);
  30. int mac_test(void);
  31. int pkcs_1_test(void);
  32. int pkcs_1_pss_test(void);
  33. int pkcs_1_oaep_test(void);
  34. int pkcs_1_emsa_test(void);
  35. int pkcs_1_eme_test(void);
  36. int store_test(void);
  37. int rotate_test(void);
  38. int rsa_test(void);
  39. int dh_test(void);
  40. int katja_test(void);
  41. int ecc_tests(void);
  42. int dsa_test(void);
  43. int der_tests(void);
  44. int misc_test(void);
  45. int base64_test(void);
  46. int file_test(void);
  47. int multi_test(void);
  48. #ifdef LTC_PKCS_1
  49. extern const struct ltc_prng_descriptor no_prng_desc;
  50. #endif
  51. #endif
  52. /* $Source$ */
  53. /* $Revision$ */
  54. /* $Date$ */