Lines Matching refs:bnctx

2700 	BN_CTX *bnctx;
2707 bnctx = BN_CTX_new();
2711 if (!bnctx || !sum || !q || !lx)
2729 if (EC_GROUP_get_order(group, q, bnctx) != 1 ||
2730 BN_mod_add(sum, bR_bn, pR_bn, q, bnctx) != 1)
2734 EC_POINT_mul(group, l, NULL, BI_point, sum, bnctx) != 1 ||
2736 bnctx) != 1) {
2756 BN_CTX_free(bnctx);
2767 BN_CTX *bnctx;
2774 bnctx = BN_CTX_new();
2776 if (!bnctx || !lx)
2795 EC_POINT_add(group, sum, BR_point, PR_point, bnctx) != 1 ||
2796 EC_POINT_mul(group, l, NULL, sum, bI_bn, bnctx) != 1 ||
2798 bnctx) != 1) {
2817 BN_CTX_free(bnctx);
6662 const char *identifier, BN_CTX *bnctx,
6721 EC_POINT_mul(group2, Qi, NULL, Pi_point, hash_bn, bnctx) != 1)
6746 const char *identifier, BN_CTX *bnctx,
6805 EC_POINT_mul(group2, Qr, NULL, Pr_point, hash_bn, bnctx) != 1)
6899 BN_CTX *bnctx = NULL;
6911 bnctx = BN_CTX_new();
6912 if (!bnctx)
6915 pkex->identifier, bnctx, &group);
6950 EC_POINT_add(group, M, X_point, Qi, bnctx) != 1 ||
6951 EC_POINT_get_affine_coordinates_GFp(group, M, Mx, My, bnctx) != 1)
7021 BN_CTX_free(bnctx);
7266 BN_CTX *bnctx = NULL;
7336 bnctx = BN_CTX_new();
7337 if (!bnctx)
7339 Qi = dpp_pkex_derive_Qi(curve, peer_mac, code, identifier, bnctx,
7350 EC_POINT_set_affine_coordinates_GFp(group, M, Mx, My, bnctx) != 1 ||
7352 !EC_POINT_is_on_curve(group, M, bnctx) ||
7353 EC_POINT_invert(group, Qi, bnctx) != 1 ||
7354 EC_POINT_add(group, X, M, Qi, bnctx) != 1 ||
7356 !EC_POINT_is_on_curve(group, X, bnctx)) {
7395 Qr = dpp_pkex_derive_Qr(curve, own_mac, code, identifier, bnctx, NULL);
7430 EC_POINT_add(group, N, Y_point, Qr, bnctx) != 1 ||
7431 EC_POINT_get_affine_coordinates_GFp(group, N, Nx, Ny, bnctx) != 1)
7460 BN_CTX_free(bnctx);
7602 BN_CTX *bnctx = NULL;
7678 bnctx = BN_CTX_new();
7679 if (!bnctx)
7682 pkex->identifier, bnctx, &group);
7692 EC_POINT_set_affine_coordinates_GFp(group, N, Nx, Ny, bnctx) != 1 ||
7694 !EC_POINT_is_on_curve(group, N, bnctx) ||
7695 EC_POINT_invert(group, Qr, bnctx) != 1 ||
7696 EC_POINT_add(group, Y, N, Qr, bnctx) != 1 ||
7698 !EC_POINT_is_on_curve(group, Y, bnctx)) {
7774 BN_CTX_free(bnctx);