Lines Matching refs:montgomery_crv

294 int curve_montgomery_to_shortw(ec_montgomery_crv_src_t montgomery_crv, ec_shortw_crv_t shortw_crv)  in curve_montgomery_to_shortw()  argument
300 ret = ec_montgomery_crv_check_initialized(montgomery_crv); EG(ret, err); in curve_montgomery_to_shortw()
302 ret = fp_init(&tmp, montgomery_crv->A.ctx); EG(ret, err); in curve_montgomery_to_shortw()
303 ret = fp_init(&tmp2, montgomery_crv->A.ctx); EG(ret, err); in curve_montgomery_to_shortw()
304 ret = fp_init(&a, montgomery_crv->A.ctx); EG(ret, err); in curve_montgomery_to_shortw()
305 ret = fp_init(&b, montgomery_crv->A.ctx); EG(ret, err); in curve_montgomery_to_shortw()
308 ret = fp_sqr(&tmp, &(montgomery_crv->B)); EG(ret, err); in curve_montgomery_to_shortw()
316 ret = fp_sqr(&tmp2, &(montgomery_crv->A)); EG(ret, err); in curve_montgomery_to_shortw()
323 ret = fp_sqr(&tmp, &(montgomery_crv->B)); EG(ret, err); in curve_montgomery_to_shortw()
324 ret = fp_mul(&tmp, &tmp, &(montgomery_crv->B)); EG(ret, err); in curve_montgomery_to_shortw()
333 ret = fp_mul(&tmp2, &tmp2, &(montgomery_crv->A)); EG(ret, err); in curve_montgomery_to_shortw()
334 ret = fp_mul(&tmp2, &tmp2, &(montgomery_crv->A)); EG(ret, err); in curve_montgomery_to_shortw()
335 ret = fp_mul(&tmp2, &tmp2, &(montgomery_crv->A)); EG(ret, err); in curve_montgomery_to_shortw()
338 ret = fp_mul(&b, &b, &(montgomery_crv->A)); EG(ret, err); in curve_montgomery_to_shortw()
344 ret = ec_shortw_crv_init(shortw_crv, &a, &b, &(montgomery_crv->order)); in curve_montgomery_to_shortw()
360 int curve_montgomery_shortw_check(ec_montgomery_crv_src_t montgomery_crv, in curve_montgomery_shortw_check() argument
368 ret = curve_montgomery_to_shortw(montgomery_crv, &check); EG(ret, err); in curve_montgomery_shortw_check()
392 ec_montgomery_crv_t montgomery_crv, in curve_shortw_to_montgomery() argument
427 ret = ec_montgomery_crv_init(montgomery_crv, &A, &gamma_inv, &(shortw_crv->order)); in curve_shortw_to_montgomery()
496 ec_montgomery_crv_src_t montgomery_crv, in aff_pt_shortw_to_montgomery() argument
503 ret = ec_montgomery_crv_check_initialized(montgomery_crv); EG(ret, err); in aff_pt_shortw_to_montgomery()
511 ret = curve_montgomery_shortw_check(montgomery_crv, in_shortw->crv); EG(ret, err); in aff_pt_shortw_to_montgomery()
513 ret = aff_pt_montgomery_init(out_montgomery, montgomery_crv); EG(ret, err); in aff_pt_shortw_to_montgomery()
517 ret = fp_mul(&tmp, &tmp, &(montgomery_crv->A)); EG(ret, err); in aff_pt_shortw_to_montgomery()
520 ret = fp_mul(&tmp2, &(montgomery_crv->B), &(in_shortw->x)); EG(ret, err); in aff_pt_shortw_to_montgomery()
526 ret = fp_mul(&(out_montgomery->v), &(montgomery_crv->B), &(in_shortw->y)); EG(ret, err); in aff_pt_shortw_to_montgomery()