ECn::add

add定义在ecn.h,实现在ecn.cpp

int add(const ECn&,big *,big *ex1=NULL,big *ex2=NULL) const;

函数功能:椭圆曲线上两点之和。

参数bECn类型数据。

参数lambig类型数据。

参数ex1big类型数据。

参数ex2big类型数据。

1. 源码分析

int ECn::add(const ECn& b,big *lam,big *ex1,big *ex2) const
{
    // p为epoint*,来源于外部调用
    int r=ecurve_add(b.p,p); *lam=get_mip()->w8; 
    if (ex1!=NULL) *ex1=get_mip()->w7; 
    if (ex2!=NULL) *ex2=get_mip()->w6; 
    return r;
}

ecurve_add完成椭圆曲线上的两个点相加,pa=pa+p

© phdlisl all right reserved,powered by GitbookUpdate in 2025-10-11

results matching ""

    No results matching ""