Lines Matching refs:k

1896     unsigned int i, k, loopargs_len = 0, async_jobs = 0;  in speed_main()  local
2806 for (k = 0; k < 3; k++) { in speed_main()
2807 algindex = D_CBC_128_AES + k; in speed_main()
2811 keylen = 16 + k * 8; in speed_main()
2833 for (k = 0; k < 3; k++) { in speed_main()
2834 algindex = D_CBC_128_CML + k; in speed_main()
2838 keylen = 16 + k * 8; in speed_main()
2973 for (k = 0; k < loopargs_len; k++) { in speed_main()
2974 loopargs[k].ctx = EVP_CIPHER_CTX_new(); in speed_main()
2975 if (loopargs[k].ctx == NULL) { in speed_main()
2986 if (!EVP_CipherInit_ex(loopargs[k].ctx, evp_cipher, NULL, in speed_main()
2994 EVP_CIPHER_CTX_set_padding(loopargs[k].ctx, 0); in speed_main()
2996 keylen = EVP_CIPHER_CTX_get_key_length(loopargs[k].ctx); in speed_main()
2997 loopargs[k].key = app_malloc(keylen, "evp_cipher key"); in speed_main()
2998 EVP_CIPHER_CTX_rand_key(loopargs[k].ctx, loopargs[k].key); in speed_main()
3001 if (!EVP_CipherInit_ex(loopargs[k].ctx, NULL, NULL, in speed_main()
3002 loopargs[k].key, NULL, -1)) { in speed_main()
3009 EVP_CIPHER_CTX_ctrl(loopargs[k].ctx, in speed_main()
3015 if (!EVP_CIPHER_CTX_ctrl(loopargs[k].ctx, in speed_main()
3027 if (!EVP_CIPHER_CTX_ctrl(loopargs[k].ctx, in speed_main()
3036 if (!EVP_CipherInit_ex(loopargs[k].ctx, NULL, NULL, in speed_main()
3037 loopargs[k].key, aead_iv, -1)) { in speed_main()
3044 if (!EVP_EncryptUpdate(loopargs[k].ctx, NULL, in speed_main()
3054 if (!EVP_EncryptUpdate(loopargs[k].ctx, NULL, in speed_main()
3062 if (!EVP_EncryptUpdate(loopargs[k].ctx, loopargs[k].buf, in speed_main()
3063 &outlen, loopargs[k].buf, in speed_main()
3071 if (!EVP_EncryptFinal_ex(loopargs[k].ctx, in speed_main()
3072 loopargs[k].buf, &outlen)) { in speed_main()
3079 if (!EVP_CIPHER_CTX_ctrl(loopargs[k].ctx, EVP_CTRL_AEAD_GET_TAG, in speed_main()
3080 TAG_LEN, &loopargs[k].tag)) { in speed_main()
3086 EVP_CIPHER_CTX_free(loopargs[k].ctx); in speed_main()
3087 loopargs[k].ctx = EVP_CIPHER_CTX_new(); in speed_main()
3088 if (loopargs[k].ctx == NULL) { in speed_main()
3093 if (!EVP_CipherInit_ex(loopargs[k].ctx, evp_cipher, in speed_main()
3101 EVP_CIPHER_CTX_set_padding(loopargs[k].ctx, 0); in speed_main()
3106 EVP_CIPHER_CTX_ctrl(loopargs[k].ctx, in speed_main()
3114 for (k = 0; k < loopargs_len; k++) { in speed_main()
3115 OPENSSL_clear_free(loopargs[k].key, keylen); in speed_main()
3116 EVP_CIPHER_CTX_free(loopargs[k].ctx); in speed_main()
4442 for (k = 0; k < ALGOR_NUM; k++) { in speed_main()
4443 const char *alg_name = names[k]; in speed_main()
4445 if (!doit[k]) in speed_main()
4448 if (k == D_EVP) { in speed_main()
4456 printf("+F:%u:%s", k, alg_name); 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()
4468 for (k = 0; k < RSA_NUM; k++) { in speed_main()
4469 if (!rsa_doit[k]) in speed_main()
4477 k, rsa_keys[k].bits, rsa_results[k][0], rsa_results[k][1], in speed_main()
4478 rsa_results[k][2], rsa_results[k][3]); in speed_main()
4481 rsa_keys[k].bits, 1.0 / rsa_results[k][0], in speed_main()
4482 1.0 / rsa_results[k][1], 1.0 / rsa_results[k][2], in speed_main()
4483 1.0 / rsa_results[k][3], in speed_main()
4484 rsa_results[k][0], rsa_results[k][1], in speed_main()
4485 rsa_results[k][2], rsa_results[k][3]); in speed_main()
4489 for (k = 0; k < DSA_NUM; k++) { in speed_main()
4490 if (!dsa_doit[k]) in speed_main()
4498 k, dsa_bits[k], dsa_results[k][0], dsa_results[k][1]); in speed_main()
4501 dsa_bits[k], 1.0 / dsa_results[k][0], 1.0 / dsa_results[k][1], in speed_main()
4502 dsa_results[k][0], dsa_results[k][1]); in speed_main()
4506 for (k = 0; k < OSSL_NELEM(ecdsa_doit); k++) { in speed_main()
4507 if (!ecdsa_doit[k]) in speed_main()
4516 k, ec_curves[k].bits, in speed_main()
4517 ecdsa_results[k][0], ecdsa_results[k][1]); in speed_main()
4520 ec_curves[k].bits, ec_curves[k].name, in speed_main()
4521 1.0 / ecdsa_results[k][0], 1.0 / ecdsa_results[k][1], in speed_main()
4522 ecdsa_results[k][0], ecdsa_results[k][1]); in speed_main()
4526 for (k = 0; k < EC_NUM; k++) { in speed_main()
4527 if (!ecdh_doit[k]) in speed_main()
4535 k, ec_curves[k].bits, in speed_main()
4536 ecdh_results[k][0], 1.0 / ecdh_results[k][0]); in speed_main()
4540 ec_curves[k].bits, ec_curves[k].name, in speed_main()
4541 1.0 / ecdh_results[k][0], ecdh_results[k][0]); in speed_main()
4546 for (k = 0; k < OSSL_NELEM(eddsa_doit); k++) { in speed_main()
4547 if (!eddsa_doit[k]) in speed_main()
4556 k, ed_curves[k].bits, ed_curves[k].name, in speed_main()
4557 eddsa_results[k][0], eddsa_results[k][1]); in speed_main()
4560 ed_curves[k].bits, ed_curves[k].name, in speed_main()
4561 1.0 / eddsa_results[k][0], 1.0 / eddsa_results[k][1], in speed_main()
4562 eddsa_results[k][0], eddsa_results[k][1]); in speed_main()
4568 for (k = 0; k < OSSL_NELEM(sm2_doit); k++) { in speed_main()
4569 if (!sm2_doit[k]) in speed_main()
4578 k, sm2_curves[k].bits, sm2_curves[k].name, in speed_main()
4579 sm2_results[k][0], sm2_results[k][1]); in speed_main()
4582 sm2_curves[k].bits, sm2_curves[k].name, in speed_main()
4583 1.0 / sm2_results[k][0], 1.0 / sm2_results[k][1], in speed_main()
4584 sm2_results[k][0], sm2_results[k][1]); in speed_main()
4589 for (k = 0; k < FFDH_NUM; k++) { in speed_main()
4590 if (!ffdh_doit[k]) in speed_main()
4598 k, ffdh_params[k].bits, in speed_main()
4599 ffdh_results[k][0], 1.0 / ffdh_results[k][0]); in speed_main()
4603 ffdh_params[k].bits, in speed_main()
4604 1.0 / ffdh_results[k][0], ffdh_results[k][0]); in speed_main()
4609 for (k = 0; k < kems_algs_len; k++) { in speed_main()
4610 const char *kem_name = kems_algname[k]; in speed_main()
4612 if (!kems_doit[k] || !do_kems) in speed_main()
4620 k, kems_results[k][0], kems_results[k][1], in speed_main()
4621 kems_results[k][2]); in speed_main()
4624 1.0 / kems_results[k][0], in speed_main()
4625 1.0 / kems_results[k][1], 1.0 / kems_results[k][2], in speed_main()
4626 kems_results[k][0], kems_results[k][1], kems_results[k][2]); in speed_main()
4631 for (k = 0; k < sigs_algs_len; k++) { in speed_main()
4632 const char *sig_name = sigs_algname[k]; in speed_main()
4634 if (!sigs_doit[k] || !do_sigs) in speed_main()
4642 k, sigs_results[k][0], sigs_results[k][1], in speed_main()
4643 sigs_results[k][2]); in speed_main()
4646 1.0 / sigs_results[k][0], 1.0 / sigs_results[k][1], in speed_main()
4647 1.0 / sigs_results[k][2], sigs_results[k][0], in speed_main()
4648 sigs_results[k][1], sigs_results[k][2]); in speed_main()
4662 for (k = 0; k < RSA_NUM; k++) { in speed_main()
4663 EVP_PKEY_CTX_free(loopargs[i].rsa_sign_ctx[k]); in speed_main()
4664 EVP_PKEY_CTX_free(loopargs[i].rsa_verify_ctx[k]); in speed_main()
4665 EVP_PKEY_CTX_free(loopargs[i].rsa_encrypt_ctx[k]); in speed_main()
4666 EVP_PKEY_CTX_free(loopargs[i].rsa_decrypt_ctx[k]); in speed_main()
4671 for (k = 0; k < FFDH_NUM; k++) in speed_main()
4672 EVP_PKEY_CTX_free(loopargs[i].ffdh_ctx[k]); in speed_main()
4675 for (k = 0; k < DSA_NUM; k++) { in speed_main()
4676 EVP_PKEY_CTX_free(loopargs[i].dsa_sign_ctx[k]); in speed_main()
4677 EVP_PKEY_CTX_free(loopargs[i].dsa_verify_ctx[k]); in speed_main()
4680 for (k = 0; k < ECDSA_NUM; k++) { in speed_main()
4681 EVP_PKEY_CTX_free(loopargs[i].ecdsa_sign_ctx[k]); in speed_main()
4682 EVP_PKEY_CTX_free(loopargs[i].ecdsa_verify_ctx[k]); in speed_main()
4684 for (k = 0; k < EC_NUM; k++) in speed_main()
4685 EVP_PKEY_CTX_free(loopargs[i].ecdh_ctx[k]); in speed_main()
4687 for (k = 0; k < EdDSA_NUM; k++) { in speed_main()
4688 EVP_MD_CTX_free(loopargs[i].eddsa_ctx[k]); in speed_main()
4689 EVP_MD_CTX_free(loopargs[i].eddsa_ctx2[k]); in speed_main()
4693 for (k = 0; k < SM2_NUM; k++) { in speed_main()
4697 if (loopargs[i].sm2_ctx[k] != NULL in speed_main()
4698 && (pctx = EVP_MD_CTX_get_pkey_ctx(loopargs[i].sm2_ctx[k])) != NULL) in speed_main()
4700 EVP_MD_CTX_free(loopargs[i].sm2_ctx[k]); in speed_main()
4702 if (loopargs[i].sm2_vfy_ctx[k] != NULL in speed_main()
4703 && (pctx = EVP_MD_CTX_get_pkey_ctx(loopargs[i].sm2_vfy_ctx[k])) != NULL) in speed_main()
4705 EVP_MD_CTX_free(loopargs[i].sm2_vfy_ctx[k]); in speed_main()
4707 EVP_PKEY_free(loopargs[i].sm2_pkey[k]); in speed_main()
4710 for (k = 0; k < kems_algs_len; k++) { in speed_main()
4711 EVP_PKEY_CTX_free(loopargs[i].kem_gen_ctx[k]); in speed_main()
4712 EVP_PKEY_CTX_free(loopargs[i].kem_encaps_ctx[k]); in speed_main()
4713 EVP_PKEY_CTX_free(loopargs[i].kem_decaps_ctx[k]); in speed_main()
4714 OPENSSL_free(loopargs[i].kem_out[k]); in speed_main()
4715 OPENSSL_free(loopargs[i].kem_send_secret[k]); in speed_main()
4716 OPENSSL_free(loopargs[i].kem_rcv_secret[k]); in speed_main()
4718 for (k = 0; k < sigs_algs_len; k++) { in speed_main()
4719 EVP_PKEY_CTX_free(loopargs[i].sig_gen_ctx[k]); in speed_main()
4720 EVP_PKEY_CTX_free(loopargs[i].sig_sign_ctx[k]); in speed_main()
4721 EVP_PKEY_CTX_free(loopargs[i].sig_verify_ctx[k]); in speed_main()
4722 OPENSSL_free(loopargs[i].sig_sig[k]); in speed_main()
4729 for (k = 0; k < kems_algs_len; k++) in speed_main()
4730 OPENSSL_free(kems_algname[k]); in speed_main()
4733 for (k = 0; k < sigs_algs_len; k++) in speed_main()
4734 OPENSSL_free(sigs_algname[k]); in speed_main()
4881 int k; in do_multi() local
4913 if (strtoint(tk, 0, OSSL_NELEM(rsa_results), &k)) { in do_multi()
4917 rsa_results[k][0] += d; in do_multi()
4920 rsa_results[k][1] += d; in do_multi()
4923 rsa_results[k][2] += d; in do_multi()
4926 rsa_results[k][3] += d; in do_multi()
4931 if (strtoint(tk, 0, OSSL_NELEM(dsa_results), &k)) { in do_multi()
4935 dsa_results[k][0] += d; in do_multi()
4938 dsa_results[k][1] += d; in do_multi()
4943 if (strtoint(tk, 0, OSSL_NELEM(ecdsa_results), &k)) { in do_multi()
4947 ecdsa_results[k][0] += d; in do_multi()
4950 ecdsa_results[k][1] += d; in do_multi()
4954 if (strtoint(tk, 0, OSSL_NELEM(ecdh_results), &k)) { in do_multi()
4958 ecdh_results[k][0] += d; in do_multi()
4963 if (strtoint(tk, 0, OSSL_NELEM(eddsa_results), &k)) { in do_multi()
4968 eddsa_results[k][0] += d; in do_multi()
4971 eddsa_results[k][1] += d; in do_multi()
4977 if (strtoint(tk, 0, OSSL_NELEM(sm2_results), &k)) { in do_multi()
4982 sm2_results[k][0] += d; in do_multi()
4985 sm2_results[k][1] += d; in do_multi()
4991 if (strtoint(tk, 0, OSSL_NELEM(ffdh_results), &k)) { in do_multi()
4995 ffdh_results[k][0] += d; in do_multi()
5000 if (strtoint(tk, 0, OSSL_NELEM(kems_results), &k)) { in do_multi()
5002 kems_results[k][0] += d; in do_multi()
5005 kems_results[k][1] += d; in do_multi()
5008 kems_results[k][2] += d; in do_multi()
5012 if (strtoint(tk, 0, OSSL_NELEM(sigs_results), &k)) { in do_multi()
5014 sigs_results[k][0] += d; in do_multi()
5017 sigs_results[k][1] += d; in do_multi()
5020 sigs_results[k][2] += d; in do_multi()