本文整理汇总了C++中ECn::get_point方法的典型用法代码示例。如果您正苦于以下问题:C++ ECn::get_point方法的具体用法?C++ ECn::get_point怎么用?C++ ECn::get_point使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ECn
的用法示例。
在下文中一共展示了ECn::get_point方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: force
void force(ZZn& x,ZZn& y,ZZn& z,ECn& A)
{ // A=(x,y,z)
copy(getbig(x),A.get_point()->X);
copy(getbig(y),A.get_point()->Y);
copy(getbig(z),A.get_point()->Z);
A.get_point()->marker=MR_EPOINT_GENERAL;
}
示例2: endomorph
void endomorph(ECn &A,ZZn &Beta)
{ // apply endomorphism (x,y) = (Beta*x,y) where Beta is cube root of unity
ZZn x;
x=(A.get_point())->X;
x*=Beta;
copy(getbig(x),(A.get_point())->X);
}
示例3: insert
void insert(ECn& A,ZZn& x,ZZn& y,ZZn &z)
{
copy(x.getzzn(),(A.get_point())->X);
copy(y.getzzn(),(A.get_point())->Y);
copy(z.getzzn(),(A.get_point())->Z);
A.get_point()->marker=MR_EPOINT_GENERAL;
}
示例4: extract
void extract(ECn& A,ZZn& x,ZZn& y,ZZn& z)
{
big t;
x=(A.get_point())->X;
y=(A.get_point())->Y;
t=(A.get_point())->Z;
if (A.get_status()!=MR_EPOINT_GENERAL) z=1;
else z=t;
}
示例5: endomorph
void endomorph(ECn &A,ZZn &Beta)
{ // apply endomorphism P(x,y) = (Beta*x,y) where Beta is cube root of unity
// Actually (Beta*x,-y) = x^2.P
ZZn x,y;
x=(A.get_point())->X;
y=(A.get_point())->Y;
y=-y;
x*=Beta;
copy(getbig(x),(A.get_point())->X);
copy(getbig(y),(A.get_point())->Y);
}
示例6: extractZ
void extractZ(ECn& A,ZZn& z)
{
big t;
t=(A.get_point())->Z;
if (A.get_status()!=MR_EPOINT_GENERAL) z=1;
else z=t;
}
示例7: SampleRandomPoint
void SampleRandomPoint(ECn &point, fparams* params) {
Big bigtmp;
int itmp = rand()%2;
do
{
bigtmp = rand(params->secparam, 2);
point = ECn(bigtmp, itmp);
}
while (point_at_infinity(point.get_point()));
}
示例8: extract
void extract(ECn& A,ZZn& x,ZZn& y)
{ // (x,y) <- A
x=(A.get_point())->X;
y=(A.get_point())->Y;
}
示例9: mul
ECn mul(const Big& e1,const ECn& p1,const Big& e2,const ECn& p2)
{
ECn t;
ecurve_mult2(e1.getbig(),p1.get_point(),e2.getbig(),p2.get_point(),t.get_point());
return t;
}