int main(void) { int x; reg_algs(); #ifdef USE_LTM ltc_mp = ltm_desc; #elif defined(USE_TFM) ltc_mp = tfm_desc; #elif defined(USE_GMP) ltc_mp = gmp_desc; #else extern ltc_math_descriptor EXT_MATH_LIB; ltc_mp = EXT_MATH_LIB; #endif printf("build == \n%s\n", crypt_build_settings); printf("\nstore_test...."); fflush(stdout); x = store_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE); printf("\ncipher_test..."); fflush(stdout); x = cipher_hash_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE); printf("\nmodes_test...."); fflush(stdout); x = modes_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE); printf("\nder_test......"); fflush(stdout); x = der_tests(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE); printf("\nmac_test......"); fflush(stdout); x = mac_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE); printf("\npkcs_1_test..."); fflush(stdout); x = pkcs_1_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE); printf("\nrsa_test......"); fflush(stdout); x = rsa_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE); printf("\necc_test......"); fflush(stdout); x = ecc_tests(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE); printf("\ndsa_test......"); fflush(stdout); x = dsa_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE); printf("\nkatja_test...."); fflush(stdout); x = katja_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE); printf("\n"); return EXIT_SUCCESS; }
static void * rpmltcInit(void) /*@*/ { static int oneshot; rpmltc ltc = xcalloc(1, sizeof(*ltc)); if (!oneshot) { reg_algs(); ltc_mp = ltm_desc; /* XXX tfm_desc */ oneshot++; } return (void *) ltc; }
int main(void) { reg_algs(); printf("Generating hash vectors..."); fflush(stdout); hash_gen(); printf("done\n"); printf("Generating cipher vectors..."); fflush(stdout); cipher_gen(); printf("done\n"); printf("Generating HMAC vectors..."); fflush(stdout); hmac_gen(); printf("done\n"); printf("Generating OMAC vectors..."); fflush(stdout); omac_gen(); printf("done\n"); printf("Generating PMAC vectors..."); fflush(stdout); pmac_gen(); printf("done\n"); printf("Generating EAX vectors..."); fflush(stdout); eax_gen(); printf("done\n"); printf("Generating OCB vectors..."); fflush(stdout); ocb_gen(); printf("done\n"); printf("Generating CCM vectors..."); fflush(stdout); ccm_gen(); printf("done\n"); printf("Generating GCM vectors..."); fflush(stdout); gcm_gen(); printf("done\n"); printf("Generating BASE64 vectors..."); fflush(stdout); base64_gen(); printf("done\n"); return 0; }
int main(void) { init_timer(); reg_algs(); time_keysched(); time_cipher(); time_cipher2(); time_cipher3(); time_hash(); time_macs(); time_encmacs(); time_prng(); time_mult(); time_sqr(); time_rsa(); time_ecc(); time_dh(); return EXIT_SUCCESS; }
int main(void) { init_timer(); reg_algs(); #ifdef USE_LTM ltc_mp = ltm_desc; #elif defined(USE_TFM) ltc_mp = tfm_desc; #elif defined(USE_GMP) ltc_mp = gmp_desc; #else extern ltc_math_descriptor EXT_MATH_LIB; ltc_mp = EXT_MATH_LIB; #endif time_keysched(); time_cipher(); time_cipher2(); time_cipher3(); time_cipher4(); time_hash(); time_macs(); time_encmacs(); time_prng(); time_mult(); time_sqr(); time_rsa(); time_ecc(); #ifdef USE_LTM time_katja(); #endif return EXIT_SUCCESS; }