group->validate_point = &ec_GFp_validate_point;
ECGroup_consGFp_mont(const mp_int *irr, const mp_int *curvea,					 const mp_int *curveb, const mp_int *genx,					 const mp_int *geny, const mp_int *order, int cofactor){	mp_err res = MP_OKAY;	ECGroup *group = NULL;	group = ECGroup_new();	if (group == NULL)		return NULL;	group->meth = GFMethod_consGFp_mont(irr);	if (group->meth == NULL) {		res = MP_MEM;		goto CLEANUP;	}	MP_CHECKOK(group->meth->			   field_enc(curvea, &group->curvea, group->meth));	MP_CHECKOK(group->meth->			   field_enc(curveb, &group->curveb, group->meth));	MP_CHECKOK(group->meth->field_enc(genx, &group->genx, group->meth));	MP_CHECKOK(group->meth->field_enc(geny, &group->geny, group->meth));	MP_CHECKOK(mp_copy(order, &group->order));	group->cofactor = cofactor;	group->point_add = &ec_GFp_pt_add_aff;	group->point_sub = &ec_GFp_pt_sub_aff;	group->point_dbl = &ec_GFp_pt_dbl_aff;	group->point_mul = &ec_GFp_pt_mul_jm_wNAF;	group->base_point_mul = NULL;	group->points_mul = &ec_GFp_pts_mul_jac;  CLEANUP:	if (res != MP_OKAY) {		ECGroup_free(group);		return NULL;	}	return group;}