Math::Prime::Util::ECAffinePoint - Elliptic curve operations for affine points
# Create a point on a curve (a,b,n) with coordinates 0,1
my $ECP = Math::Prime::Util::ECAffinePoint->new($a, $b, $n, 0, 1);
# scalar multiplication by k.
# add two points on the same curve
say "P = O" if $ECP->is_infinity();
This really should just be in Math::EllipticCurve.
$point = Math::Prime::Util::ECAffinePoint->new(a, b, n, x, y);
Returns a new point at (x,y,1) on the curve (a,b,n).
Returns the a, b, or n values that describe the curve.
Returns the x or y values that define the point on the curve.
Returns a possible factor found during EC multiplication.
Takes another point on the same curve as an argument and adds it this point.
Takes an integer and performs scalar multiplication of the point.
Returns true if the point is (0,1), which is the point at infinity for the affine coordinates.
This really should just be in a Math::EllipticCurve module.
Dana Jacobsen <email@example.com>
Copyright 2012-2013 by Dana Jacobsen <firstname.lastname@example.org>
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Math::Prime::Util, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.