
Crypt::ECDSA::Curve -- Base class for ECC curves

These are for use with Crypt::ECDSA and require Math::BigInt::GMP.

Constructor. Takes the following named pair arguments:
standard => 'standard-curve-name'
Used for named standard curves such as the NIST standard curves.
Preferentially, these are invoked by classes which inherit
from Crypt::ECDSA::Curve, such as Crypt::ECDSA::Curve::Prime,
Crypt::ECDSA::Curve::Binary, or Crypt::ECDSA::Curve::Koblitz.
See US govenment standard publications FIPS 186-2 or FIPS 186-3.
used as:
new(standard => 'standard curve name'), where curve name is one of:
Crypt::ECDSA::Curve::Prime->new( standard =>
[ one of 'ECP-192', 'ECP-224', 'ECP-256', 'ECP-384', 'ECP-521' ] )
Crypt::ECDSA::Curve::Koblitz->new( standard =>
[ one of 'EC2N-163', 'EC2N-233', 'EC2N-283', 'EC2N-409', 'EC2N-571' ] )
Koblitz curves are a special case of binary curves, with a simpler equation.
Non-standard curve types are supported either via specifying parameters and algorithm,
or by specifying a generic "standard" via specifying in new the pair:
standard => 'generic_prime' or standard => 'generic_binary'.
The following are used mainly for non-standard curve types. They are
gotten from pre-defined values for named curves:
p => $p , sets curve modulus ( for prime curve over F(p) )
a => $a, sets curve param a
b => $b, sets curve param b
N => the exponent in 2**N, where 2**N is a binary curve modulus
( for binary or Koblitz curve over F(2**N) )
h => curve cofactor for the point order
r => base point G order for prime curves
n => base point G order for binary curves
G_x => $x, a base point x coordinate
G_y => $y, a base point y coordinate
irreducible => binary curve irreducible basis polynimial in binary integer
format, so that x**233 + x**74 + 1 becomes
polynomial => [ 233, 74, 0 ] and irreducible =>
'0x20000000000000000000000000000000000000004000000000000000001'
my $param = $curve->a; Returns parameter a in the elliptic equation.
my $param = $curve->b; Returns parameter b in the elliptic equation.
my $param = $curve->p; returns parameter p in the equation-- this is the field modulus parameter for prime curves
my $param = $curve->order; Returns the curve base point G order if known.
my $param = $curve->curve_order; Returns the curve order if known. This might calculate the order some day. It does not in this version.
my $divisor = $curve->modulus; Returns the mathmetical divisor used to reduce numbers in the field. This is either the prime of an Fp field curve or the irreducible polynomial of a binary field curve.
my $inf = $curve->infinity; Returns a valid point at infinity for the curve.
my $param = $curve->standard; Returns the 'standard' type of the curve, if defined for the instance.

William Herrera B<wherrera@skylightview.com>.

Questions, feature requests and bug reports should go to <wherrera@skylightview.com>.

Copyright (c) 2007 William Herrera. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.