|
NAMEMath::Prime::Util::ECProjectivePoint - Elliptic curve operations for projective pointsVERSIONVersion 0.73SYNOPSIS# Create a point on a curve (a,b,n) with coordinates 0,1 my $ECP = Math::Prime::Util::ECProjectivePoint->new($c, $n, 0, 1); # scalar multiplication by $k. $ECP->mul($k); # add two points on the same curve $ECP->add($ECP2); say "P = O" if $ECP->is_infinity(); DESCRIPTIONThis really should just be in Math::EllipticCurve.To write. FUNCTIONSnew$point = Math::Prime::Util::ECProjectivePoint->new(c, n, x, z); Returns a new point on the curve defined by the Montgomery parameter c. cnReturns the "c", "d", or "n" values that describe the curve.dReturns the precalculated value of "int( (c + 2) / 4 )".xzReturns the "x" or "z" values that define the point on the curve.fReturns a possible factor found after "normalize".addTakes another point on the same curve as an argument and adds it this point.doubleDouble the current point on the curve.mulTakes an integer and performs scalar multiplication of the point.is_infinityReturns true if the point is (0,1), which is the point at infinity for the affine coordinates.copyReturns a copy of the point.normalizePerforms an extended GCD operation to make "z=1". If a factor of "n" is found it is put in "f".SEE ALSOMath::EllipticCurve::PrimeThis really should just be in a Math::EllipticCurve module. AUTHORSDana Jacobsen <dana@acm.org>COPYRIGHTCopyright 2012-2013 by Dana Jacobsen <dana@acm.org>This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Visit the GSP FreeBSD Man Page Interface. |