ECn::sub
sub定义在ecn.h,实现在ecn.cpp
int sub(const ECn&,big *,big *ex1=NULL,big *ex2=NULL) const;
函数功能:椭圆曲线上两点之和。
参数b:ECn类型数据。
参数lam:big类型数据。
参数ex1:big类型数据。
参数ex2:big类型数据。
1. 源码分析
int ECn::sub(const ECn& b,big *lam,big *ex1,big *ex2) const
{
int r=ecurve_sub(b.p,p); *lam=get_mip()->w8;
if (ex1!=NULL) *ex1=get_mip()->w7;
if (ex2!=NULL) *ex2=get_mip()->w6;
return r;
}
ecurve_sub减法运算。