search.cpan.org is shutting down
Dana Jacobsen > Math-Prime-Util > Math::Prime::Util::ECAffinePoint

Math-Prime-Util-0.70.tar.gz

Dependencies

Annotate this POD

Website

# CPAN RT

 Open 0
View/Report Bugs
Module Version: 0.70

# NAME

Math::Prime::Util::ECAffinePoint - Elliptic curve operations for affine points

Version 0.70

# SYNOPSIS

```  # 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.
\$ECP->mul(\$k);

# add two points on the same curve

say "P = O" if \$ECP->is_infinity();```

# DESCRIPTION

This really should just be in Math::EllipticCurve.

To write.

# FUNCTIONS

## new

`  \$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)`.

## n

Returns the `a`, `b`, or `n` values that describe the curve.

## y

Returns the `x` or `y` values that define the point on the curve.

## f

Returns a possible factor found during EC multiplication.

Takes another point on the same curve as an argument and adds it this point.

## mul

Takes an integer and performs scalar multiplication of the point.

## is_infinity

Returns true if the point is (0,1), which is the point at infinity for the affine coordinates.

Math::EllipticCurve::Prime

This really should just be in a Math::EllipticCurve module.

# AUTHORS

Dana Jacobsen <dana@acm.org>