Lines Matching refs:m_crv

361 				   ec_montgomery_crv_src_t m_crv,  in curve_edwards_montgomery_check()  argument
368 ret = ec_montgomery_crv_check_initialized(m_crv); EG(ret, err); in curve_edwards_montgomery_check()
372 MUST_HAVE((!fp_cmp(&(check.A), &(m_crv->A), &cmp)) && (!cmp), ret, err); in curve_edwards_montgomery_check()
373 MUST_HAVE((!fp_cmp(&(check.B), &(m_crv->B), &cmp)) && (!cmp), ret, err); in curve_edwards_montgomery_check()
374 MUST_HAVE((!nn_cmp(&(check.order), &(m_crv->order), &cmp)) && (!cmp), ret, err); in curve_edwards_montgomery_check()
393 int curve_montgomery_to_edwards(ec_montgomery_crv_src_t m_crv, in curve_montgomery_to_edwards() argument
401 ret = ec_montgomery_crv_check_initialized(m_crv); EG(ret, err); in curve_montgomery_to_edwards()
403 MUST_HAVE((m_crv->A.ctx == alpha_edwards->ctx), ret, err); in curve_montgomery_to_edwards()
405 ret = fp_init(&tmp, m_crv->A.ctx); EG(ret, err); in curve_montgomery_to_edwards()
406 ret = fp_init(&tmp2, m_crv->A.ctx); EG(ret, err); in curve_montgomery_to_edwards()
407 ret = fp_init(&a, m_crv->A.ctx); EG(ret, err); in curve_montgomery_to_edwards()
408 ret = fp_init(&d, m_crv->A.ctx); EG(ret, err); in curve_montgomery_to_edwards()
411 ret = fp_mul(&tmp2, &(m_crv->B), alpha_edwards); EG(ret, err); in curve_montgomery_to_edwards()
416 ret = fp_add(&a, &(m_crv->A), &tmp); EG(ret, err); in curve_montgomery_to_edwards()
420 ret = fp_sub(&d, &(m_crv->A), &tmp); EG(ret, err); in curve_montgomery_to_edwards()
428 ret = ec_edwards_crv_init(e_crv, &d, &a, &(m_crv->order)); in curve_montgomery_to_edwards()
430 ret = ec_edwards_crv_init(e_crv, &a, &d, &(m_crv->order)); in curve_montgomery_to_edwards()