Lines Matching refs:testnum

586 static unsigned int testnum;  variable
651 for (count = 0; COND(c[algindex][testnum]); count++) { in EVP_Digest_loop()
653 || !EVP_DigestUpdate(ctx, buf, (size_t)lengths[testnum]) in EVP_Digest_loop()
660 for (count = 0; COND(c[algindex][testnum]); count++) { in EVP_Digest_loop()
661 if (!EVP_Digest(buf, (size_t)lengths[testnum], digest, NULL, md, in EVP_Digest_loop()
742 for (count = 0; COND(c[algindex][testnum]); count++) { in EVP_MAC_loop()
746 || !EVP_MAC_update(mctx, buf, lengths[testnum]) in EVP_MAC_loop()
808 for (count = 0; COND(c[algindex][testnum]); count++) in EVP_Cipher_loop()
809 if (EVP_Cipher(tempargs->ctx, buf, buf, (size_t)lengths[testnum]) <= 0) in EVP_Cipher_loop()
822 for (count = 0; COND(c[D_GHASH][testnum]); count++) { in GHASH_loop()
823 if (!EVP_MAC_update(mctx, buf, lengths[testnum])) in GHASH_loop()
875 for (count = 0; COND(c[D_RAND][testnum]); count++) in RAND_bytes_loop()
876 RAND_bytes(buf, lengths[testnum]); in RAND_bytes_loop()
889 for (count = 0; COND(c[D_EVP][testnum]); count++) { in EVP_Update_loop()
890 rc = EVP_DecryptUpdate(ctx, buf, &outl, buf, lengths[testnum]); in EVP_Update_loop()
897 for (count = 0; COND(c[D_EVP][testnum]); count++) { in EVP_Update_loop()
898 rc = EVP_EncryptUpdate(ctx, buf, &outl, buf, lengths[testnum]); in EVP_Update_loop()
931 for (count = 0; COND(c[D_EVP][testnum]); count++) { in EVP_Update_loop_aead_enc()
960 NULL, lengths[testnum])) { in EVP_Update_loop_aead_enc()
973 if (!EVP_EncryptUpdate(ctx, buf, &outl, buf, lengths[testnum])) { in EVP_Update_loop_aead_enc()
1003 for (count = 0; COND(c[D_EVP][testnum]); count++) { in EVP_Update_loop_aead_dec()
1049 NULL, lengths[testnum])) { in EVP_Update_loop_aead_dec()
1062 if (!EVP_DecryptUpdate(ctx, outbuf, &outl, buf, lengths[testnum])) { in EVP_Update_loop_aead_dec()
1082 for (count = 0; COND(rsa_c[testnum][0]); count++) { in RSA_sign_loop()
1084 ret = EVP_PKEY_sign(rsa_sign_ctx[testnum], buf2, rsa_num, buf, 36); in RSA_sign_loop()
1104 for (count = 0; COND(rsa_c[testnum][1]); count++) { in RSA_verify_loop()
1105 ret = EVP_PKEY_verify(rsa_verify_ctx[testnum], buf2, rsa_num, buf, 36); in RSA_verify_loop()
1125 for (count = 0; COND(rsa_c[testnum][2]); count++) { in RSA_encrypt_loop()
1127 ret = EVP_PKEY_encrypt(rsa_encrypt_ctx[testnum], buf2, rsa_num, buf, 36); in RSA_encrypt_loop()
1147 for (count = 0; COND(rsa_c[testnum][3]); count++) { in RSA_decrypt_loop()
1149 ret = EVP_PKEY_decrypt(rsa_decrypt_ctx[testnum], buf, &rsa_num, buf2, tempargs->encsize); in RSA_decrypt_loop()
1165 EVP_PKEY_CTX *ffdh_ctx = tempargs->ffdh_ctx[testnum]; in FFDH_derive_key_loop()
1169 for (count = 0; COND(ffdh_c[testnum][0]); count++) { in FFDH_derive_key_loop()
1189 for (count = 0; COND(dsa_c[testnum][0]); count++) { in DSA_sign_loop()
1191 ret = EVP_PKEY_sign(dsa_sign_ctx[testnum], buf2, dsa_num, buf, 20); in DSA_sign_loop()
1211 for (count = 0; COND(dsa_c[testnum][1]); count++) { in DSA_verify_loop()
1212 ret = EVP_PKEY_verify(dsa_verify_ctx[testnum], buf2, dsa_num, buf, 20); in DSA_verify_loop()
1233 for (count = 0; COND(ecdsa_c[testnum][0]); count++) { in ECDSA_sign_loop()
1235 ret = EVP_PKEY_sign(ecdsa_sign_ctx[testnum], buf2, ecdsa_num, buf, 20); in ECDSA_sign_loop()
1255 for (count = 0; COND(ecdsa_c[testnum][1]); count++) { in ECDSA_verify_loop()
1256 ret = EVP_PKEY_verify(ecdsa_verify_ctx[testnum], buf2, ecdsa_num, in ECDSA_verify_loop()
1273 EVP_PKEY_CTX *ctx = tempargs->ecdh_ctx[testnum]; in ECDH_EVP_derive_key_loop()
1276 size_t *outlen = &(tempargs->outlen[testnum]); in ECDH_EVP_derive_key_loop()
1278 for (count = 0; COND(ecdh_c[testnum][0]); count++) in ECDH_EVP_derive_key_loop()
1294 for (count = 0; COND(eddsa_c[testnum][0]); count++) { in EdDSA_sign_loop()
1295 ret = EVP_DigestSignInit(edctx[testnum], NULL, NULL, NULL, NULL); in EdDSA_sign_loop()
1302 ret = EVP_DigestSign(edctx[testnum], eddsasig, eddsasigsize, buf, 20); in EdDSA_sign_loop()
1322 for (count = 0; COND(eddsa_c[testnum][1]); count++) { in EdDSA_verify_loop()
1323 ret = EVP_DigestVerifyInit(edctx[testnum], NULL, NULL, NULL, NULL); in EdDSA_verify_loop()
1330 ret = EVP_DigestVerify(edctx[testnum], eddsasig, eddsasigsize, buf, 20); in EdDSA_verify_loop()
1352 const size_t max_size = EVP_PKEY_get_size(sm2_pkey[testnum]); in SM2_sign_loop()
1354 for (count = 0; COND(sm2_c[testnum][0]); count++) { in SM2_sign_loop()
1357 if (!EVP_DigestSignInit(sm2ctx[testnum], NULL, EVP_sm3(), in SM2_sign_loop()
1358 NULL, sm2_pkey[testnum])) { in SM2_sign_loop()
1364 ret = EVP_DigestSign(sm2ctx[testnum], sm2sig, &sm2sigsize, in SM2_sign_loop()
1389 for (count = 0; COND(sm2_c[testnum][1]); count++) { in SM2_verify_loop()
1390 if (!EVP_DigestVerifyInit(sm2ctx[testnum], NULL, EVP_sm3(), in SM2_verify_loop()
1391 NULL, sm2_pkey[testnum])) { in SM2_verify_loop()
1397 ret = EVP_DigestVerify(sm2ctx[testnum], sm2sig, sm2sigsize, in SM2_verify_loop()
1413 EVP_PKEY_CTX *ctx = tempargs->kem_gen_ctx[testnum]; in KEM_keygen_loop()
1417 for (count = 0; COND(kems_c[testnum][0]); count++) { in KEM_keygen_loop()
1436 EVP_PKEY_CTX *ctx = tempargs->kem_encaps_ctx[testnum]; in KEM_encaps_loop()
1437 size_t out_len = tempargs->kem_out_len[testnum]; in KEM_encaps_loop()
1438 size_t secret_len = tempargs->kem_secret_len[testnum]; in KEM_encaps_loop()
1439 unsigned char *out = tempargs->kem_out[testnum]; in KEM_encaps_loop()
1440 unsigned char *secret = tempargs->kem_send_secret[testnum]; in KEM_encaps_loop()
1443 for (count = 0; COND(kems_c[testnum][1]); count++) { in KEM_encaps_loop()
1453 EVP_PKEY_CTX *ctx = tempargs->kem_decaps_ctx[testnum]; in KEM_decaps_loop()
1454 size_t out_len = tempargs->kem_out_len[testnum]; in KEM_decaps_loop()
1455 size_t secret_len = tempargs->kem_secret_len[testnum]; in KEM_decaps_loop()
1456 unsigned char *out = tempargs->kem_out[testnum]; in KEM_decaps_loop()
1457 unsigned char *secret = tempargs->kem_send_secret[testnum]; in KEM_decaps_loop()
1460 for (count = 0; COND(kems_c[testnum][2]); count++) { in KEM_decaps_loop()
1470 EVP_PKEY_CTX *ctx = tempargs->sig_gen_ctx[testnum]; in SIG_keygen_loop()
1474 for (count = 0; COND(kems_c[testnum][0]); count++) { in SIG_keygen_loop()
1486 EVP_PKEY_CTX *ctx = tempargs->sig_sign_ctx[testnum]; in SIG_sign_loop()
1488 unsigned char *sig = app_malloc(tempargs->sig_max_sig_len[testnum], in SIG_sign_loop()
1494 for (count = 0; COND(kems_c[testnum][1]); count++) { in SIG_sign_loop()
1495 size_t sig_len = tempargs->sig_max_sig_len[testnum]; in SIG_sign_loop()
1512 EVP_PKEY_CTX *ctx = tempargs->sig_verify_ctx[testnum]; in SIG_verify_loop()
1513 size_t sig_len = tempargs->sig_act_sig_len[testnum]; in SIG_verify_loop()
1514 unsigned char *sig = tempargs->sig_sig[testnum]; in SIG_verify_loop()
1519 for (count = 0; COND(kems_c[testnum][2]); count++) { in SIG_verify_loop()
2620 for (testnum = 0; testnum < size_num; testnum++) { in speed_main()
2621 print_message(names[D_MD2], lengths[testnum], seconds.sym); in speed_main()
2625 print_result(D_MD2, testnum, count, d); in speed_main()
2632 for (testnum = 0; testnum < size_num; testnum++) { in speed_main()
2633 print_message(names[D_MDC2], lengths[testnum], seconds.sym); in speed_main()
2637 print_result(D_MDC2, testnum, count, d); in speed_main()
2644 for (testnum = 0; testnum < size_num; testnum++) { in speed_main()
2645 print_message(names[D_MD4], lengths[testnum], seconds.sym); in speed_main()
2649 print_result(D_MD4, testnum, count, d); in speed_main()
2656 for (testnum = 0; testnum < size_num; testnum++) { in speed_main()
2657 print_message(names[D_MD5], lengths[testnum], seconds.sym); in speed_main()
2661 print_result(D_MD5, testnum, count, d); in speed_main()
2668 for (testnum = 0; testnum < size_num; testnum++) { in speed_main()
2669 print_message(names[D_SHA1], lengths[testnum], seconds.sym); in speed_main()
2673 print_result(D_SHA1, testnum, count, d); in speed_main()
2680 for (testnum = 0; testnum < size_num; testnum++) { in speed_main()
2681 print_message(names[D_SHA256], lengths[testnum], seconds.sym); in speed_main()
2685 print_result(D_SHA256, testnum, count, d); in speed_main()
2692 for (testnum = 0; testnum < size_num; testnum++) { in speed_main()
2693 print_message(names[D_SHA512], lengths[testnum], seconds.sym); in speed_main()
2697 print_result(D_SHA512, testnum, count, d); in speed_main()
2704 for (testnum = 0; testnum < size_num; testnum++) { in speed_main()
2705 print_message(names[D_WHIRLPOOL], lengths[testnum], seconds.sym); in speed_main()
2709 print_result(D_WHIRLPOOL, testnum, count, d); in speed_main()
2716 for (testnum = 0; testnum < size_num; testnum++) { in speed_main()
2717 print_message(names[D_RMD160], lengths[testnum], seconds.sym); in speed_main()
2721 print_result(D_RMD160, testnum, count, d); in speed_main()
2749 for (testnum = 0; testnum < size_num; testnum++) { in speed_main()
2750 print_message(names[D_HMAC], lengths[testnum], seconds.sym); in speed_main()
2754 print_result(D_HMAC, testnum, count, d); in speed_main()
2770 for (testnum = 0; st && testnum < size_num; testnum++) { in speed_main()
2771 if (!check_block_size(loopargs[0].ctx, lengths[testnum])) in speed_main()
2773 print_message(names[D_CBC_DES], lengths[testnum], seconds.sym); in speed_main()
2777 print_result(D_CBC_DES, testnum, count, d); in speed_main()
2792 for (testnum = 0; st && testnum < size_num; testnum++) { in speed_main()
2793 if (!check_block_size(loopargs[0].ctx, lengths[testnum])) in speed_main()
2795 print_message(names[D_EDE3_DES], lengths[testnum], seconds.sym); in speed_main()
2800 print_result(D_EDE3_DES, testnum, count, d); in speed_main()
2818 for (testnum = 0; st && testnum < size_num; testnum++) { in speed_main()
2819 if (!check_block_size(loopargs[0].ctx, lengths[testnum])) in speed_main()
2821 print_message(names[algindex], lengths[testnum], seconds.sym); in speed_main()
2826 print_result(algindex, testnum, count, d); in speed_main()
2845 for (testnum = 0; st && testnum < size_num; testnum++) { in speed_main()
2846 if (!check_block_size(loopargs[0].ctx, lengths[testnum])) in speed_main()
2848 print_message(names[algindex], lengths[testnum], seconds.sym); in speed_main()
2853 print_result(algindex, testnum, count, d); in speed_main()
2871 for (testnum = 0; st && testnum < size_num; testnum++) { in speed_main()
2872 if (!check_block_size(loopargs[0].ctx, lengths[testnum])) in speed_main()
2874 print_message(names[algindex], lengths[testnum], seconds.sym); in speed_main()
2879 print_result(algindex, testnum, count, d); in speed_main()
2905 for (testnum = 0; testnum < size_num; testnum++) { in speed_main()
2906 print_message(names[D_GHASH], lengths[testnum], seconds.sym); in speed_main()
2910 print_result(D_GHASH, testnum, count, d); in speed_main()
2918 for (testnum = 0; testnum < size_num; testnum++) { in speed_main()
2919 print_message(names[D_RAND], lengths[testnum], seconds.sym); in speed_main()
2923 print_result(D_RAND, testnum, count, d); in speed_main()
2970 for (testnum = 0; testnum < size_num; testnum++) { in speed_main()
2971 print_message(names[D_EVP], lengths[testnum], seconds.sym); in speed_main()
3046 lengths[testnum])) { in speed_main()
3064 lengths[testnum])) { in speed_main()
3118 print_result(D_EVP, testnum, count, d); in speed_main()
3123 for (testnum = 0; testnum < size_num; testnum++) { in speed_main()
3124 print_message(names[D_EVP], lengths[testnum], seconds.sym); in speed_main()
3128 print_result(D_EVP, testnum, count, d); in speed_main()
3161 for (testnum = 0; testnum < size_num; testnum++) { in speed_main()
3162 print_message(names[D_EVP_CMAC], lengths[testnum], seconds.sym); in speed_main()
3166 print_result(D_EVP_CMAC, testnum, count, d); in speed_main()
3182 for (testnum = 0; testnum < size_num; testnum++) { in speed_main()
3183 print_message(names[D_KMAC128], lengths[testnum], seconds.sym); in speed_main()
3187 print_result(D_KMAC128, testnum, count, d); in speed_main()
3203 for (testnum = 0; testnum < size_num; testnum++) { in speed_main()
3204 print_message(names[D_KMAC256], lengths[testnum], seconds.sym); in speed_main()
3208 print_result(D_KMAC256, testnum, count, d); in speed_main()
3219 for (testnum = 0; testnum < RSA_NUM; testnum++) { in speed_main()
3223 if (!rsa_doit[testnum]) in speed_main()
3232 && EVP_PKEY_CTX_set_rsa_keygen_bits(genctx, rsa_keys[testnum].bits) > 0 in speed_main()
3241 const unsigned char *p = rsa_keys[testnum].data; in speed_main()
3244 rsa_keys[testnum].length)) != NULL; in speed_main()
3248 loopargs[i].rsa_sign_ctx[testnum] = EVP_PKEY_CTX_new(rsa_key, NULL); in speed_main()
3250 if (loopargs[i].rsa_sign_ctx[testnum] == NULL in speed_main()
3251 || EVP_PKEY_sign_init(loopargs[i].rsa_sign_ctx[testnum]) <= 0 in speed_main()
3252 || EVP_PKEY_sign(loopargs[i].rsa_sign_ctx[testnum], in speed_main()
3265 rsa_keys[testnum].bits, seconds.rsa); in speed_main()
3273 count, rsa_keys[testnum].bits, d); in speed_main()
3274 rsa_results[testnum][0] = (double)count / d; in speed_main()
3279 loopargs[i].rsa_verify_ctx[testnum] = EVP_PKEY_CTX_new(rsa_key, in speed_main()
3281 if (loopargs[i].rsa_verify_ctx[testnum] == NULL in speed_main()
3282 || EVP_PKEY_verify_init(loopargs[i].rsa_verify_ctx[testnum]) <= 0 in speed_main()
3283 || EVP_PKEY_verify(loopargs[i].rsa_verify_ctx[testnum], in speed_main()
3293 rsa_doit[testnum] = 0; in speed_main()
3296 rsa_keys[testnum].bits, seconds.rsa); in speed_main()
3303 count, rsa_keys[testnum].bits, d); in speed_main()
3304 rsa_results[testnum][1] = (double)count / d; in speed_main()
3308 loopargs[i].rsa_encrypt_ctx[testnum] = EVP_PKEY_CTX_new(rsa_key, NULL); in speed_main()
3310 if (loopargs[i].rsa_encrypt_ctx[testnum] == NULL in speed_main()
3311 || EVP_PKEY_encrypt_init(loopargs[i].rsa_encrypt_ctx[testnum]) <= 0 in speed_main()
3312 || EVP_PKEY_encrypt(loopargs[i].rsa_encrypt_ctx[testnum], in speed_main()
3325 rsa_keys[testnum].bits, seconds.rsa); in speed_main()
3333 count, rsa_keys[testnum].bits, d); in speed_main()
3334 rsa_results[testnum][2] = (double)count / d; in speed_main()
3339 loopargs[i].rsa_decrypt_ctx[testnum] = EVP_PKEY_CTX_new(rsa_key, NULL); in speed_main()
3341 if (loopargs[i].rsa_decrypt_ctx[testnum] == NULL in speed_main()
3342 || EVP_PKEY_decrypt_init(loopargs[i].rsa_decrypt_ctx[testnum]) <= 0 in speed_main()
3343 || EVP_PKEY_decrypt(loopargs[i].rsa_decrypt_ctx[testnum], in speed_main()
3357 rsa_keys[testnum].bits, seconds.rsa); in speed_main()
3365 count, rsa_keys[testnum].bits, d); in speed_main()
3366 rsa_results[testnum][3] = (double)count / d; in speed_main()
3372 stop_it(rsa_doit, testnum); in speed_main()
3378 for (testnum = 0; testnum < DSA_NUM; testnum++) { in speed_main()
3382 if (!dsa_doit[testnum]) in speed_main()
3385 st = (dsa_key = get_dsa(dsa_bits[testnum])) != NULL; in speed_main()
3388 loopargs[i].dsa_sign_ctx[testnum] = EVP_PKEY_CTX_new(dsa_key, in speed_main()
3391 if (loopargs[i].dsa_sign_ctx[testnum] == NULL in speed_main()
3392 || EVP_PKEY_sign_init(loopargs[i].dsa_sign_ctx[testnum]) <= 0 in speed_main()
3393 || EVP_PKEY_sign(loopargs[i].dsa_sign_ctx[testnum], in speed_main()
3406 dsa_bits[testnum], seconds.dsa); in speed_main()
3413 count, dsa_bits[testnum], d); in speed_main()
3414 dsa_results[testnum][0] = (double)count / d; in speed_main()
3419 loopargs[i].dsa_verify_ctx[testnum] = EVP_PKEY_CTX_new(dsa_key, in speed_main()
3421 if (loopargs[i].dsa_verify_ctx[testnum] == NULL in speed_main()
3422 || EVP_PKEY_verify_init(loopargs[i].dsa_verify_ctx[testnum]) <= 0 in speed_main()
3423 || EVP_PKEY_verify(loopargs[i].dsa_verify_ctx[testnum], in speed_main()
3433 dsa_doit[testnum] = 0; in speed_main()
3436 dsa_bits[testnum], seconds.dsa); in speed_main()
3443 count, dsa_bits[testnum], d); in speed_main()
3444 dsa_results[testnum][1] = (double)count / d; in speed_main()
3449 stop_it(dsa_doit, testnum); in speed_main()
3455 for (testnum = 0; testnum < ECDSA_NUM; testnum++) { in speed_main()
3459 if (!ecdsa_doit[testnum]) in speed_main()
3462 st = (ecdsa_key = get_ecdsa(&ec_curves[testnum])) != NULL; in speed_main()
3465 loopargs[i].ecdsa_sign_ctx[testnum] = EVP_PKEY_CTX_new(ecdsa_key, in speed_main()
3468 if (loopargs[i].ecdsa_sign_ctx[testnum] == NULL in speed_main()
3469 || EVP_PKEY_sign_init(loopargs[i].ecdsa_sign_ctx[testnum]) <= 0 in speed_main()
3470 || EVP_PKEY_sign(loopargs[i].ecdsa_sign_ctx[testnum], in speed_main()
3483 ec_curves[testnum].bits, seconds.ecdsa); in speed_main()
3490 count, ec_curves[testnum].bits, d); in speed_main()
3491 ecdsa_results[testnum][0] = (double)count / d; in speed_main()
3496 loopargs[i].ecdsa_verify_ctx[testnum] = EVP_PKEY_CTX_new(ecdsa_key, in speed_main()
3498 if (loopargs[i].ecdsa_verify_ctx[testnum] == NULL in speed_main()
3499 || EVP_PKEY_verify_init(loopargs[i].ecdsa_verify_ctx[testnum]) <= 0 in speed_main()
3500 || EVP_PKEY_verify(loopargs[i].ecdsa_verify_ctx[testnum], in speed_main()
3510 ecdsa_doit[testnum] = 0; in speed_main()
3513 ec_curves[testnum].bits, seconds.ecdsa); in speed_main()
3520 count, ec_curves[testnum].bits, d); in speed_main()
3521 ecdsa_results[testnum][1] = (double)count / d; in speed_main()
3526 stop_it(ecdsa_doit, testnum); in speed_main()
3531 for (testnum = 0; testnum < EC_NUM; testnum++) { in speed_main()
3534 if (!ecdh_doit[testnum]) in speed_main()
3545 if ((key_A = get_ecdsa(&ec_curves[testnum])) == NULL /* generate secret key A */ in speed_main()
3546 || (key_B = get_ecdsa(&ec_curves[testnum])) == NULL /* generate secret key B */ in speed_main()
3590 loopargs[i].ecdh_ctx[testnum] = ctx; in speed_main()
3591 loopargs[i].outlen[testnum] = outlen; in speed_main()
3600 ec_curves[testnum].bits, seconds.ecdh); in speed_main()
3608 ec_curves[testnum].bits, d); in speed_main()
3609 ecdh_results[testnum][0] = (double)count / d; in speed_main()
3615 stop_it(ecdh_doit, testnum); in speed_main()
3620 for (testnum = 0; testnum < EdDSA_NUM; testnum++) { in speed_main()
3625 if (!eddsa_doit[testnum]) in speed_main()
3628 loopargs[i].eddsa_ctx[testnum] = EVP_MD_CTX_new(); in speed_main()
3629 if (loopargs[i].eddsa_ctx[testnum] == NULL) { in speed_main()
3633 loopargs[i].eddsa_ctx2[testnum] = EVP_MD_CTX_new(); in speed_main()
3634 if (loopargs[i].eddsa_ctx2[testnum] == NULL) { in speed_main()
3639 if ((ed_pctx = EVP_PKEY_CTX_new_id(ed_curves[testnum].nid, in speed_main()
3649 if (!EVP_DigestSignInit(loopargs[i].eddsa_ctx[testnum], NULL, NULL, in speed_main()
3655 if (!EVP_DigestVerifyInit(loopargs[i].eddsa_ctx2[testnum], NULL, in speed_main()
3672 loopargs[i].sigsize = ed_curves[testnum].sigsize; in speed_main()
3673 st = EVP_DigestSign(loopargs[i].eddsa_ctx[testnum], in speed_main()
3685 pkey_print_message("sign", ed_curves[testnum].name, in speed_main()
3686 ed_curves[testnum].bits, seconds.eddsa); in speed_main()
3694 count, ed_curves[testnum].bits, in speed_main()
3695 ed_curves[testnum].name, d); in speed_main()
3696 eddsa_results[testnum][0] = (double)count / d; in speed_main()
3701 st = EVP_DigestVerify(loopargs[i].eddsa_ctx2[testnum], in speed_main()
3711 eddsa_doit[testnum] = 0; in speed_main()
3713 pkey_print_message("verify", ed_curves[testnum].name, in speed_main()
3714 ed_curves[testnum].bits, seconds.eddsa); in speed_main()
3721 count, ed_curves[testnum].bits, in speed_main()
3722 ed_curves[testnum].name, d); in speed_main()
3723 eddsa_results[testnum][1] = (double)count / d; in speed_main()
3728 stop_it(eddsa_doit, testnum); in speed_main()
3735 for (testnum = 0; testnum < SM2_NUM; testnum++) { in speed_main()
3739 if (!sm2_doit[testnum]) in speed_main()
3748 loopargs[i].sm2_ctx[testnum] = EVP_MD_CTX_new(); in speed_main()
3749 loopargs[i].sm2_vfy_ctx[testnum] = EVP_MD_CTX_new(); in speed_main()
3750 if (loopargs[i].sm2_ctx[testnum] == NULL in speed_main()
3751 || loopargs[i].sm2_vfy_ctx[testnum] == NULL) in speed_main()
3759 sm2_curves[testnum].nid) <= 0 in speed_main()
3767 loopargs[i].sm2_pkey[testnum] = sm2_pkey; in speed_main()
3778 EVP_MD_CTX_set_pkey_ctx(loopargs[i].sm2_ctx[testnum], sm2_pctx); in speed_main()
3779 EVP_MD_CTX_set_pkey_ctx(loopargs[i].sm2_vfy_ctx[testnum], sm2_vfy_pctx); in speed_main()
3789 if (!EVP_DigestSignInit(loopargs[i].sm2_ctx[testnum], NULL, in speed_main()
3792 if (!EVP_DigestVerifyInit(loopargs[i].sm2_vfy_ctx[testnum], NULL, in speed_main()
3804 st = EVP_DigestSign(loopargs[i].sm2_ctx[testnum], in speed_main()
3816 pkey_print_message("sign", sm2_curves[testnum].name, in speed_main()
3817 sm2_curves[testnum].bits, seconds.sm2); in speed_main()
3825 count, sm2_curves[testnum].bits, in speed_main()
3826 sm2_curves[testnum].name, d); in speed_main()
3827 sm2_results[testnum][0] = (double)count / d; in speed_main()
3833 st = EVP_DigestVerify(loopargs[i].sm2_vfy_ctx[testnum], in speed_main()
3843 sm2_doit[testnum] = 0; in speed_main()
3845 pkey_print_message("verify", sm2_curves[testnum].name, in speed_main()
3846 sm2_curves[testnum].bits, seconds.sm2); in speed_main()
3853 count, sm2_curves[testnum].bits, in speed_main()
3854 sm2_curves[testnum].name, d); in speed_main()
3855 sm2_results[testnum][1] = (double)count / d; in speed_main()
3860 for (testnum++; testnum < SM2_NUM; testnum++) in speed_main()
3861 sm2_doit[testnum] = 0; in speed_main()
3868 for (testnum = 0; testnum < FFDH_NUM; testnum++) { in speed_main()
3871 if (!ffdh_doit[testnum]) in speed_main()
3922 if (EVP_PKEY_CTX_set_dh_nid(ffdh_ctx, ffdh_params[testnum].nid) <= 0) { in speed_main()
4020 loopargs[i].ffdh_ctx[testnum] = ffdh_ctx; in speed_main()
4031 ffdh_params[testnum].bits, seconds.ffdh); in speed_main()
4039 ffdh_params[testnum].bits, d); in speed_main()
4040 ffdh_results[testnum][0] = (double)count / d; in speed_main()
4045 stop_it(ffdh_doit, testnum); in speed_main()
4050 for (testnum = 0; testnum < kems_algs_len; testnum++) { in speed_main()
4052 const char *kem_name = kems_algname[testnum]; in speed_main()
4054 if (!kems_doit[testnum] || !do_kems) in speed_main()
4180 loopargs[i].kem_gen_ctx[testnum] = kem_gen_ctx; in speed_main()
4181 loopargs[i].kem_encaps_ctx[testnum] = kem_encaps_ctx; in speed_main()
4182 loopargs[i].kem_decaps_ctx[testnum] = kem_decaps_ctx; in speed_main()
4183 loopargs[i].kem_out_len[testnum] = out_len; in speed_main()
4184 loopargs[i].kem_secret_len[testnum] = send_secret_len; in speed_main()
4185 loopargs[i].kem_out[testnum] = out; in speed_main()
4186 loopargs[i].kem_send_secret[testnum] = send_secret; in speed_main()
4187 loopargs[i].kem_rcv_secret[testnum] = rcv_secret; in speed_main()
4209 kems_results[testnum][0] = (double)count / d; in speed_main()
4220 kems_results[testnum][1] = (double)count / d; in speed_main()
4231 kems_results[testnum][2] = (double)count / d; in speed_main()
4236 stop_it(kems_doit, testnum); in speed_main()
4240 for (testnum = 0; testnum < sigs_algs_len; testnum++) { in speed_main()
4242 const char *sig_name = sigs_algname[testnum]; in speed_main()
4244 if (!sigs_doit[testnum] || !do_sigs) in speed_main()
4362 loopargs[i].sig_gen_ctx[testnum] = sig_gen_ctx; in speed_main()
4363 loopargs[i].sig_sign_ctx[testnum] = sig_sign_ctx; in speed_main()
4364 loopargs[i].sig_verify_ctx[testnum] = sig_verify_ctx; in speed_main()
4365 loopargs[i].sig_max_sig_len[testnum] = max_sig_len; in speed_main()
4366 loopargs[i].sig_act_sig_len[testnum] = sig_len; in speed_main()
4367 loopargs[i].sig_sig[testnum] = sig; in speed_main()
4389 sigs_results[testnum][0] = (double)count / d; in speed_main()
4400 sigs_results[testnum][1] = (double)count / d; in speed_main()
4412 sigs_results[testnum][2] = (double)count / d; in speed_main()
4416 stop_it(sigs_doit, testnum); in speed_main()
4437 for (testnum = 0; testnum < size_num; testnum++) in speed_main()
4438 printf(mr ? ":%d" : "%7d bytes", lengths[testnum]); in speed_main()
4459 for (testnum = 0; testnum < size_num; testnum++) { in speed_main()
4460 if (results[k][testnum] > 10000 && !mr) in speed_main()
4461 printf(" %11.2fk", results[k][testnum] / 1e3); in speed_main()
4463 printf(mr ? ":%.2f" : " %11.2f ", results[k][testnum]); in speed_main()
4467 testnum = 1; in speed_main()
4471 if (testnum && !mr) { in speed_main()
4473 testnum = 0; in speed_main()
4487 testnum = 1; in speed_main()
4492 if (testnum && !mr) { in speed_main()
4494 testnum = 0; in speed_main()
4505 testnum = 1; in speed_main()
4509 if (testnum && !mr) { in speed_main()
4511 testnum = 0; in speed_main()
4525 testnum = 1; in speed_main()
4529 if (testnum && !mr) { in speed_main()
4531 testnum = 0; in speed_main()
4545 testnum = 1; in speed_main()
4549 if (testnum && !mr) { in speed_main()
4551 testnum = 0; in speed_main()
4567 testnum = 1; in speed_main()
4571 if (testnum && !mr) { in speed_main()
4573 testnum = 0; in speed_main()
4588 testnum = 1; in speed_main()
4592 if (testnum && !mr) { in speed_main()
4594 testnum = 0; in speed_main()
4608 testnum = 1; in speed_main()
4614 if (testnum && !mr) { in speed_main()
4616 testnum = 0; in speed_main()
4630 testnum = 1; in speed_main()
4636 if (testnum && !mr) { in speed_main()
4638 testnum = 0; in speed_main()