Go to the source code of this file.
◆ test_aes()
Definition at line 752 of file test_aes.c.
753{
754 printf
755 ("Testing AES (Known answer tests) ......................................... ");
756 fflush(stdout);
757 makeKATs(
"ecb_vk.txt",
"ecb_vt.txt",
"ecb_tbl.txt",
"ecb_iv.txt");
758 compare_files(
"ecb_vk.txt",
"test/test_aes.results.ecb_vk.txt");
759 compare_files(
"ecb_vt.txt",
"test/test_aes.results.ecb_vt.txt");
760 compare_files(
"ecb_tbl.txt",
"test/test_aes.results.ecb_tbl.txt");
761 compare_files(
"ecb_iv.txt",
"test/test_aes.results.ecb_iv.txt");
762 printf("Ok\n");
763
764 printf
765 ("Testing AES (Monte Carlo tests) ..............................");
766 fflush(stdout);
767 makeMCTs(
"ecb_e_m.txt",
"ecb_d_m.txt",
"cbc_e_m.txt",
"cbc_d_m.txt");
768 compare_files(
"ecb_e_m.txt",
"test/test_aes.results.ecb_e_m.txt");
769 compare_files(
"ecb_d_m.txt",
"test/test_aes.results.ecb_d_m.txt");
770 compare_files(
"cbc_e_m.txt",
"test/test_aes.results.cbc_e_m.txt");
771 compare_files(
"cbc_d_m.txt",
"test/test_aes.results.cbc_d_m.txt");
772 printf(" Ok\n");
773 return 0;
774}
static void compare_files(char *nfile_n, char *ofile_n)
static void makeKATs(const char *vkFile, const char *vtFile, const char *tblFile, const char *ivFile)
static void makeMCTs(const char *ecbEncryptionFile, const char *ecbDecryptionFile, const char *cbcEncryptionFile, const char *cbcDecryptionFile)
References compare_files(), makeKATs(), and makeMCTs().