.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Crypt::OpenSSL::EC 3pm" .TH Crypt::OpenSSL::EC 3pm "2020-11-09" "perl v5.32.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Crypt::OpenSSL::EC \- Perl extension for OpenSSL EC (Elliptic Curves) library .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& use Crypt::OpenSSL::EC; \& use Crypt::OpenSSL::Bignum::CTX; \& \& # Use of $ctx is optional in all calls, here we demonstrate its use. \& # If it is provided it will increase performance. \& my $ctx = Crypt::OpenSSL::Bignum::CTX\->new(); \& \& my $method = Crypt::OpenSSL::EC::EC_GFp_mont_method(); \& my $group = Crypt::OpenSSL::EC::EC_GROUP::new($method); \& Crypt::OpenSSL::EC::EC_GROUP::set_curve_GFp($group, $p, $a, $b, $ctx); \& my $method = Crypt::OpenSSL::EC::EC_GROUP::method_of($group); \& Crypt::OpenSSL::EC::EC_GROUP::copy($tmp, $group); \& Crypt::OpenSSL::EC::EC_GROUP::get_curve_GFp($group, $p, $a, $b, $ctx); \& \& $Crypt::OpenSSL::EC::trace = 1; \& Crypt::OpenSSL::EC::print_errs(); \& my $P = Crypt::OpenSSL::EC::EC_POINT::new($group); \& \& \& Crypt::OpenSSL::EC::EC_POINT_set_to_infinity($group, $P); \& my $bool = Crypt::OpenSSL::EC::EC_POINT::is_at_infinity($group, $P); \& \& my $buf = Crypt::OpenSSL::EC::EC_POINT::point2oct($group, $Q, &Crypt::OpenSSL::EC::POINT_CONVERSION_COMPRESSED, $ctx); \& Crypt::OpenSSL::EC::EC_POINT::oct2point($group, $P, $buf, $ctx); \& Crypt::OpenSSL::EC::EC_POINT::add($group, $P, $P, $Q, $ctx); \& \& Crypt::OpenSSL::EC::EC_POINT::set_compressed_coordinates_GFp($group, $Q, $x, 1, $ctx)); \& my $bool = Crypt::OpenSSL::EC::EC_POINT::is_on_curve($group, $Q, $ctx)); \& Crypt::OpenSSL::EC::EC_POINT::copy($R, $P); \& my $result = Crypt::OpenSSL::EC::EC_POINT::cmp($group, $P, $Q, $ctx); \& Crypt::OpenSSL::EC::EC_POINT::set_affine_coordinates_GFp($group, $P, $x, $y, $ctx); \& Crypt::OpenSSL::EC::EC_POINT::get_affine_coordinates_GFp($group, $P, $x, $y, $ctx); \& Crypt::OpenSSL::EC::EC_GROUP::set_generator($group, $P, $z, Crypt::OpenSSL::Bignum\->one()); \& my $degree = Crypt::OpenSSL::EC::EC_GROUP::get_degree($group) \& my $order = Crypt::OpenSSL::EC::EC_GROUP::get_order($group, $order, $ctx); \& Crypt::OpenSSL::EC::EC_POINT::mul($group, $Q, $order, $P, $n1, $ctx)); \& Crypt::OpenSSL::EC::EC_POINT::free($P); \& Crypt::OpenSSL::EC::EC_GROUP::free($group); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module provides a standard (non-OO) interface to the OpenSSL \s-1EC\s0 (Elliptic Curve) library. Some \s-1OO\s0 Calls are supported. .PP Most of the functions described in openssl/ec.h are supported. .PP It provides the Crypt::OpenSSL::EC class which defines some high level functions and constants. At also provides 4 other classes for managing \s-1EC\s0 objects: .IP "Crypt::OpenSSL::EC::EC_GROUP" 4 .IX Item "Crypt::OpenSSL::EC::EC_GROUP" .PD 0 .IP "Crypt::OpenSSL::EC::EC_POINT" 4 .IX Item "Crypt::OpenSSL::EC::EC_POINT" .IP "Crypt::OpenSSL::EC::EC_KEY" 4 .IX Item "Crypt::OpenSSL::EC::EC_KEY" .IP "Crypt::OpenSSL::EC::EC_METHOD" 4 .IX Item "Crypt::OpenSSL::EC::EC_METHOD" .PD .PP All objects created by these 4 classes are implemented as blessed Perl mortal references. This ensures they will be auto-destroyed when the Perl variable becomes unreferenced. ASlo the approproae \s-1EC\s0 free function wil be called to free the underlying \s-1EC\s0 object. .PP Further, it means that many of the functions below can be called using O\-O methods. If a method's first argument is the same as the class the method is in, then it can be called O\-O style. For example the following 2 calls are equivalent: .ie n .IP "my $newgroup = Crypt::OpenSSL::EC::EC_GROUP::dup($group);" 4 .el .IP "my \f(CW$newgroup\fR = Crypt::OpenSSL::EC::EC_GROUP::dup($group);" 4 .IX Item "my $newgroup = Crypt::OpenSSL::EC::EC_GROUP::dup($group);" .PD 0 .ie n .IP "my $newgroup = $group\->\fBdup()\fR;" 4 .el .IP "my \f(CW$newgroup\fR = \f(CW$group\fR\->\fBdup()\fR;" 4 .IX Item "my $newgroup = $group->dup();" .IP "\fBCrypt::OpenSSL::EC::EC_GFp_simple_method()\fR;" 4 .IX Item "Crypt::OpenSSL::EC::EC_GFp_simple_method();" .PD Returns the basic GFp ec methods which provides the basis for the optimized methods. .IP "\fBCrypt::OpenSSL::EC::EC_GFp_mont_method()\fR;" 4 .IX Item "Crypt::OpenSSL::EC::EC_GFp_mont_method();" Returns GFp methods using montgomery multiplication. .IP "\fBCrypt::OpenSSL::EC::EC_GFp_nist_method()\fR;" 4 .IX Item "Crypt::OpenSSL::EC::EC_GFp_nist_method();" Returns GFp methods using optimized methods for \s-1NIST\s0 recommended curves .IP "\fBCrypt::OpenSSL::EC::EC_GF2m_simple_method()\fR;" 4 .IX Item "Crypt::OpenSSL::EC::EC_GF2m_simple_method();" Not available if \s-1OPENSSL_NO_EC2M\s0 is defined in OpenSSL. .Sp Returns the basic GF2m ec method .IP "Crypt::OpenSSL::EC::EC_GROUP::new($method);" 4 .IX Item "Crypt::OpenSSL::EC::EC_GROUP::new($method);" Creates a new \s-1EC_GROUP\s0 object \&\f(CW$method\fR is the method to use .ie n .IP "Crypt::OpenSSL::EC::EC_GROUP::set_curve_GFp($group, $p, $a, $b, $ctx);" 4 .el .IP "Crypt::OpenSSL::EC::EC_GROUP::set_curve_GFp($group, \f(CW$p\fR, \f(CW$a\fR, \f(CW$b\fR, \f(CW$ctx\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_GROUP::set_curve_GFp($group, $p, $a, $b, $ctx);" Sets the parameter of a ec over GFp defined by y^2 = x^3 + a*x + b group \s-1EC_GROUP\s0 object p \s-1BIGNUM\s0 with the prime number a \s-1BIGNUM\s0 with parameter a of the equation b \s-1BIGNUM\s0 with parameter b of the equation ctx \s-1BN_CTX\s0 object (optional) return 1 on success and 0 if an error occurred .IP "Crypt::OpenSSL::EC::EC_GROUP::method_of($group);" 4 .IX Item "Crypt::OpenSSL::EC::EC_GROUP::method_of($group);" Returns the \s-1EC_METHOD\s0 of the \s-1EC_GROUP\s0 object. .IP "Crypt::OpenSSL::EC::EC_METHOD::get_field_type($method)" 4 .IX Item "Crypt::OpenSSL::EC::EC_METHOD::get_field_type($method)" Returns the field type of the \s-1EC_METHOD.\s0 .ie n .IP "Crypt::OpenSSL::EC::EC_GROUP::copy($dst, $src);" 4 .el .IP "Crypt::OpenSSL::EC::EC_GROUP::copy($dst, \f(CW$src\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_GROUP::copy($dst, $src);" Copies \s-1EC_GROUP\s0 objects. Note: both EC_GROUPs must use the same \s-1EC_METHOD.\s0 return newly created \s-1EC_GROUP\s0 object or \s-1NULL\s0 in case of an error. .IP "Crypt::OpenSSL::EC::EC_GROUP::dup($src);" 4 .IX Item "Crypt::OpenSSL::EC::EC_GROUP::dup($src);" Creates a new \s-1EC_GROUP\s0 object and copies the copies the content form src to the newly created \s-1EC_GROUP\s0 object. return newly created \s-1EC_GROUP\s0 object or \s-1NULL\s0 in case of an error. .ie n .IP "Crypt::OpenSSL::EC::EC_GROUP::get_curve_GFp($group, $p, $a, $b, $ctx);" 4 .el .IP "Crypt::OpenSSL::EC::EC_GROUP::get_curve_GFp($group, \f(CW$p\fR, \f(CW$a\fR, \f(CW$b\fR, \f(CW$ctx\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_GROUP::get_curve_GFp($group, $p, $a, $b, $ctx);" Gets the parameter of the ec over GFp defined by y^2 = x^3 + a*x + b group \s-1EC_GROUP\s0 object p \s-1BIGNUM\s0 for the prime number a \s-1BIGNUM\s0 for parameter a of the equation b \s-1BIGNUM\s0 for parameter b of the equation ctx \s-1BN_CTX\s0 object (optional) return 1 on success and 0 if an error occurred .ie n .IP "Crypt::OpenSSL::EC::EC_GROUP::set_curve_GF2m($group, $p, $a, $b, $ctx);" 4 .el .IP "Crypt::OpenSSL::EC::EC_GROUP::set_curve_GF2m($group, \f(CW$p\fR, \f(CW$a\fR, \f(CW$b\fR, \f(CW$ctx\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_GROUP::set_curve_GF2m($group, $p, $a, $b, $ctx);" Not available if \s-1OPENSSL_NO_EC2M\s0 is defined in OpenSSL. .Sp Sets the parameter of a ec over GF2m defined by y^2 + x*y = x^3 + a*x^2 + b group \s-1EC_GROUP\s0 object p \s-1BIGNUM\s0 with the polynomial defining the underlying field a \s-1BIGNUM\s0 with parameter a of the equation b \s-1BIGNUM\s0 with parameter b of the equation ctx \s-1BN_CTX\s0 object (optional) return 1 on success and 0 if an error occurred .ie n .IP "Crypt::OpenSSL::EC::EC_GROUP::get_curve_GF2m($group, $p, $a, $b, $ctx);" 4 .el .IP "Crypt::OpenSSL::EC::EC_GROUP::get_curve_GF2m($group, \f(CW$p\fR, \f(CW$a\fR, \f(CW$b\fR, \f(CW$ctx\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_GROUP::get_curve_GF2m($group, $p, $a, $b, $ctx);" Not available if \s-1OPENSSL_NO_EC2M\s0 is defined in OpenSSL. .Sp Gets the parameter of the ec over GF2m defined by y^2 + x*y = x^3 + a*x^2 + b group \s-1EC_GROUP\s0 object p \s-1BIGNUM\s0 for the polynomial defining the underlying field a \s-1BIGNUM\s0 for parameter a of the equation b \s-1BIGNUM\s0 for parameter b of the equation ctx \s-1BN_CTX\s0 object (optional) return 1 on success and 0 if an error occurred .IP "\fBCrypt::OpenSSL::EC::print_errs()\fR;" 4 .IX Item "Crypt::OpenSSL::EC::print_errs();" .PD 0 .IP "Crypt::OpenSSL::EC::EC_POINT::new($group);" 4 .IX Item "Crypt::OpenSSL::EC::EC_POINT::new($group);" .PD Creates a new \s-1EC_POINT\s0 object for the specified \s-1EC_GROUP\s0 group \s-1EC_GROUP\s0 the underlying \s-1EC_GROUP\s0 object return newly created \s-1EC_POINT\s0 object or \s-1NULL\s0 if an error occurred .IP "Crypt::OpenSSL::EC::EC_POINT::free($point);" 4 .IX Item "Crypt::OpenSSL::EC::EC_POINT::free($point);" Frees a \s-1EC_POINT\s0 object point \s-1EC_POINT\s0 object to be freed This should normally not be called from Perl, since \s-1EC_POINT\s0 objects created by this library are auto-destroyed when they become unreferenced. .IP "Crypt::OpenSSL::EC::EC_POINT::clear_free($point);" 4 .IX Item "Crypt::OpenSSL::EC::EC_POINT::clear_free($point);" Clears and frees a \s-1EC_POINT\s0 object point \s-1EC_POINT\s0 object to be cleared and freed This should normally not be called from Perl, since \s-1EC_POINT\s0 objects created by this library are auto-destroyed when they become unreferenced. .ie n .IP "Crypt::OpenSSL::EC::EC_POINT::copy($dst, $src);" 4 .el .IP "Crypt::OpenSSL::EC::EC_POINT::copy($dst, \f(CW$src\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_POINT::copy($dst, $src);" Copies \s-1EC_POINT\s0 object dst destination \s-1EC_POINT\s0 object src source \s-1EC_POINT\s0 object return 1 on success and 0 if an error occurred .ie n .IP "Crypt::OpenSSL::EC::EC_POINT::dup($src, $group);" 4 .el .IP "Crypt::OpenSSL::EC::EC_POINT::dup($src, \f(CW$group\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_POINT::dup($src, $group);" Creates a new \s-1EC_POINT\s0 object and copies the content of the supplied \&\s-1EC_POINT\s0 src source \s-1EC_POINT\s0 object group underlying the \s-1EC_GROUP\s0 object return newly created \s-1EC_POINT\s0 object or \s-1NULL\s0 if an error occurred .ie n .IP "Crypt::OpenSSL::EC::EC_POINT::set_to_infinity($group, $point);" 4 .el .IP "Crypt::OpenSSL::EC::EC_POINT::set_to_infinity($group, \f(CW$point\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_POINT::set_to_infinity($group, $point);" Sets a point to infinity (neutral element) group underlying \s-1EC_GROUP\s0 object point \s-1EC_POINT\s0 to set to infinity return 1 on success and 0 if an error occurred .ie n .IP "Crypt::OpenSSL::EC::EC_POINT::get_Jprojective_coordinates_GFp($group, $p, $x, $y, $z, $ctx);" 4 .el .IP "Crypt::OpenSSL::EC::EC_POINT::get_Jprojective_coordinates_GFp($group, \f(CW$p\fR, \f(CW$x\fR, \f(CW$y\fR, \f(CW$z\fR, \f(CW$ctx\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_POINT::get_Jprojective_coordinates_GFp($group, $p, $x, $y, $z, $ctx);" Gets the jacobian projective coordinates of a \s-1EC_POINT\s0 over GFp group underlying \s-1EC_GROUP\s0 object p \s-1EC_POINT\s0 object x \s-1BIGNUM\s0 for the x\-coordinate y \s-1BIGNUM\s0 for the y\-coordinate z \s-1BIGNUM\s0 for the z\-coordinate ctx \s-1BN_CTX\s0 object (optional) return 1 on success and 0 if an error occurred .ie n .IP "Crypt::OpenSSL::EC::EC_POINT::set_affine_coordinates_GFp($group, $p, $x, $y, $ctx);" 4 .el .IP "Crypt::OpenSSL::EC::EC_POINT::set_affine_coordinates_GFp($group, \f(CW$p\fR, \f(CW$x\fR, \f(CW$y\fR, \f(CW$ctx\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_POINT::set_affine_coordinates_GFp($group, $p, $x, $y, $ctx);" Sets the affine coordinates of a \s-1EC_POINT\s0 over GFp group underlying \s-1EC_GROUP\s0 object p \s-1EC_POINT\s0 object x \s-1BIGNUM\s0 with the x\-coordinate y \s-1BIGNUM\s0 with the y\-coordinate ctx \s-1BN_CTX\s0 object (optional) return 1 on success and 0 if an error occurred .ie n .IP "Crypt::OpenSSL::EC::EC_POINT::get_affine_coordinates_GFp($group, $p, $x, $y, $ctx);" 4 .el .IP "Crypt::OpenSSL::EC::EC_POINT::get_affine_coordinates_GFp($group, \f(CW$p\fR, \f(CW$x\fR, \f(CW$y\fR, \f(CW$ctx\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_POINT::get_affine_coordinates_GFp($group, $p, $x, $y, $ctx);" Gets the affine coordinates of a \s-1EC_POINT\s0 over GFp group underlying \s-1EC_GROUP\s0 object p \s-1EC_POINT\s0 object x \s-1BIGNUM\s0 for the x\-coordinate y \s-1BIGNUM\s0 for the y\-coordinate ctx \s-1BN_CTX\s0 object (optional) return 1 on success and 0 if an error occurred .ie n .IP "Crypt::OpenSSL::EC::EC_POINT::set_compressed_coordinates_GFp($group, $p, $x, $y_bit, $ctx);" 4 .el .IP "Crypt::OpenSSL::EC::EC_POINT::set_compressed_coordinates_GFp($group, \f(CW$p\fR, \f(CW$x\fR, \f(CW$y_bit\fR, \f(CW$ctx\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_POINT::set_compressed_coordinates_GFp($group, $p, $x, $y_bit, $ctx);" Sets the x9.62 compressed coordinates of a \s-1EC_POINT\s0 over GFp group underlying \s-1EC_GROUP\s0 object p \s-1EC_POINT\s0 object x \s-1BIGNUM\s0 with x\-coordinate y_bit integer with the y\-Bit (either 0 or 1) ctx \s-1BN_CTX\s0 object (optional) return 1 on success and 0 if an error occurred .ie n .IP "Crypt::OpenSSL::EC::EC_POINT::set_affine_coordinates_GF2m($group, $p, $x, $y, $ctx);" 4 .el .IP "Crypt::OpenSSL::EC::EC_POINT::set_affine_coordinates_GF2m($group, \f(CW$p\fR, \f(CW$x\fR, \f(CW$y\fR, \f(CW$ctx\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_POINT::set_affine_coordinates_GF2m($group, $p, $x, $y, $ctx);" Not available if \s-1OPENSSL_NO_EC2M\s0 is defined in OpenSSL. .Sp Sets the affine coordinates of a \s-1EC_POINT\s0 over GF2m group underlying \s-1EC_GROUP\s0 object p \s-1EC_POINT\s0 object x \s-1BIGNUM\s0 with the x\-coordinate y \s-1BIGNUM\s0 with the y\-coordinate ctx \s-1BN_CTX\s0 object (optional) return 1 on success and 0 if an error occurred .ie n .IP "Crypt::OpenSSL::EC::EC_POINT::get_affine_coordinates_GF2m($group, $p, $x, $y, $ctx);" 4 .el .IP "Crypt::OpenSSL::EC::EC_POINT::get_affine_coordinates_GF2m($group, \f(CW$p\fR, \f(CW$x\fR, \f(CW$y\fR, \f(CW$ctx\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_POINT::get_affine_coordinates_GF2m($group, $p, $x, $y, $ctx);" Not available if \s-1OPENSSL_NO_EC2M\s0 is defined in OpenSSL. .Sp Gets the affine coordinates of a \s-1EC_POINT\s0 over GF2m group underlying \s-1EC_GROUP\s0 object p \s-1EC_POINT\s0 object x \s-1BIGNUM\s0 for the x\-coordinate y \s-1BIGNUM\s0 for the y\-coordinate ctx \s-1BN_CTX\s0 object (optional) return 1 on success and 0 if an error occurred .ie n .IP "Crypt::OpenSSL::EC::EC_POINT::set_compressed_coordinates_GF2m($group, $p, $x, $y_bit, $ctx);" 4 .el .IP "Crypt::OpenSSL::EC::EC_POINT::set_compressed_coordinates_GF2m($group, \f(CW$p\fR, \f(CW$x\fR, \f(CW$y_bit\fR, \f(CW$ctx\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_POINT::set_compressed_coordinates_GF2m($group, $p, $x, $y_bit, $ctx);" Not available if \s-1OPENSSL_NO_EC2M\s0 is defined in OpenSSL. .Sp Sets the x9.62 compressed coordinates of a \s-1EC_POINT\s0 over GF2m group underlying \s-1EC_GROUP\s0 object p \s-1EC_POINT\s0 object x \s-1BIGNUM\s0 with x\-coordinate y_bit integer with the y\-Bit (either 0 or 1) ctx \s-1BN_CTX\s0 object (optional) \ereturn 1 on success and 0 if an error occurred .ie n .IP "Crypt::OpenSSL::EC::EC_POINT::is_at_infinity($group, $p);" 4 .el .IP "Crypt::OpenSSL::EC::EC_POINT::is_at_infinity($group, \f(CW$p\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_POINT::is_at_infinity($group, $p);" Checks whether the point is the neutral element of the group group the underlying \s-1EC_GROUP\s0 object p \s-1EC_POINT\s0 object return 1 if the point is the neutral element and 0 otherwise .ie n .IP "Crypt::OpenSSL::EC::EC_POINT::point2oct($group, $p, $form, $ctx);" 4 .el .IP "Crypt::OpenSSL::EC::EC_POINT::point2oct($group, \f(CW$p\fR, \f(CW$form\fR, \f(CW$ctx\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_POINT::point2oct($group, $p, $form, $ctx);" Encodes a \s-1EC_POINT\s0 object to a octet string group underlying \s-1EC_GROUP\s0 object p \s-1EC_POINT\s0 object form point conversion form ctx \s-1BN_CTX\s0 object (optional) return the encoded \s-1EC\s0 point .ie n .IP "Crypt::OpenSSL::EC::EC_POINT::oct2point($group, $p, $buf, $ctx);" 4 .el .IP "Crypt::OpenSSL::EC::EC_POINT::oct2point($group, \f(CW$p\fR, \f(CW$buf\fR, \f(CW$ctx\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_POINT::oct2point($group, $p, $buf, $ctx);" Decodes a \s-1EC_POINT\s0 from a octet string group underlying \s-1EC_GROUP\s0 object p \s-1EC_POINT\s0 object buf buffer with the encoded ec point ctx \s-1BN_CTX\s0 object (optional) return 1 on success and 0 if an error occurred .ie n .IP "Crypt::OpenSSL::EC::EC_POINT::point2bn($group, $p, $form, $bn, $ctx);" 4 .el .IP "Crypt::OpenSSL::EC::EC_POINT::point2bn($group, \f(CW$p\fR, \f(CW$form\fR, \f(CW$bn\fR, \f(CW$ctx\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_POINT::point2bn($group, $p, $form, $bn, $ctx);" .PD 0 .ie n .IP "Crypt::OpenSSL::EC::EC_POINT::bn2point($group, $bn, $p, $ctx);" 4 .el .IP "Crypt::OpenSSL::EC::EC_POINT::bn2point($group, \f(CW$bn\fR, \f(CW$p\fR, \f(CW$ctx\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_POINT::bn2point($group, $bn, $p, $ctx);" .ie n .IP "Crypt::OpenSSL::EC::EC_POINT::point2hex($group, $p, $form, $bn, $ctx);" 4 .el .IP "Crypt::OpenSSL::EC::EC_POINT::point2hex($group, \f(CW$p\fR, \f(CW$form\fR, \f(CW$bn\fR, \f(CW$ctx\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_POINT::point2hex($group, $p, $form, $bn, $ctx);" .ie n .IP "Crypt::OpenSSL::EC::EC_POINT::hex2point($group, $bn, $p, $ctx);" 4 .el .IP "Crypt::OpenSSL::EC::EC_POINT::hex2point($group, \f(CW$bn\fR, \f(CW$p\fR, \f(CW$ctx\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_POINT::hex2point($group, $bn, $p, $ctx);" .ie n .IP "Crypt::OpenSSL::EC::EC_POINT::add($group, $r, $a, $b, $ctx);" 4 .el .IP "Crypt::OpenSSL::EC::EC_POINT::add($group, \f(CW$r\fR, \f(CW$a\fR, \f(CW$b\fR, \f(CW$ctx\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_POINT::add($group, $r, $a, $b, $ctx);" .PD .Vb 7 \& Computes the sum of two EC_POINT \& group underlying EC_GROUP object \& r EC_POINT object for the result (r = a + b) \& a EC_POINT object with the first summand \& b EC_POINT object with the second summand \& ctx BN_CTX object (optional) \& return 1 on success and 0 if an error occurred .Ve .ie n .IP "Crypt::OpenSSL::EC::EC_POINT::dbl($group, $r, $a, $ctx);" 4 .el .IP "Crypt::OpenSSL::EC::EC_POINT::dbl($group, \f(CW$r\fR, \f(CW$a\fR, \f(CW$ctx\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_POINT::dbl($group, $r, $a, $ctx);" Computes the double of a \s-1EC_POINT\s0 group underlying \s-1EC_GROUP\s0 object r \s-1EC_POINT\s0 object for the result (r = 2 * a) a \s-1EC_POINT\s0 object ctx \s-1BN_CTX\s0 object (optional) return 1 on success and 0 if an error occurred .ie n .IP "Crypt::OpenSSL::EC::EC_POINT::invert($group, $a, $ctx);" 4 .el .IP "Crypt::OpenSSL::EC::EC_POINT::invert($group, \f(CW$a\fR, \f(CW$ctx\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_POINT::invert($group, $a, $ctx);" Computes the inverse of a \s-1EC_POINT\s0 group underlying \s-1EC_GROUP\s0 object a \s-1EC_POINT\s0 object to be inverted (it's used for the result as well) ctx \s-1BN_CTX\s0 object (optional) return 1 on success and 0 if an error occurred .ie n .IP "Crypt::OpenSSL::EC::EC_POINT::is_on_curve($group, $point, $ctx));" 4 .el .IP "Crypt::OpenSSL::EC::EC_POINT::is_on_curve($group, \f(CW$point\fR, \f(CW$ctx\fR));" 4 .IX Item "Crypt::OpenSSL::EC::EC_POINT::is_on_curve($group, $point, $ctx));" Checks whether the point is on the curve group underlying \s-1EC_GROUP\s0 object point \s-1EC_POINT\s0 object to check ctx \s-1BN_CTX\s0 object (optional) return 1 if point if on the curve and 0 otherwise .ie n .IP "Crypt::OpenSSL::EC::EC_POINT::cmp($group, $a, $b, $ctx);" 4 .el .IP "Crypt::OpenSSL::EC::EC_POINT::cmp($group, \f(CW$a\fR, \f(CW$b\fR, \f(CW$ctx\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_POINT::cmp($group, $a, $b, $ctx);" Compares two EC_POINTs group underlying \s-1EC_GROUP\s0 object a first \s-1EC_POINT\s0 object b second \s-1EC_POINT\s0 object ctx \s-1BN_CTX\s0 object (optional) return 0 if both points are equal and a value != 0 otherwise .ie n .IP "Crypt::OpenSSL::EC::EC_POINT::make_affine($group, $point, $ct);" 4 .el .IP "Crypt::OpenSSL::EC::EC_POINT::make_affine($group, \f(CW$point\fR, \f(CW$ct\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_POINT::make_affine($group, $point, $ct);" .PD 0 .IP "Crypt::OpenSSL::EC::EC_POINTs::make_affine" 4 .IX Item "Crypt::OpenSSL::EC::EC_POINTs::make_affine" .PD Not Implemented .IP "Crypt::OpenSSL::EC::EC_POINTs::mul" 4 .IX Item "Crypt::OpenSSL::EC::EC_POINTs::mul" Not Implemented .ie n .IP "Crypt::OpenSSL::EC::EC_GROUP::set_generator($group, $generator, $order, $cofactor);" 4 .el .IP "Crypt::OpenSSL::EC::EC_GROUP::set_generator($group, \f(CW$generator\fR, \f(CW$order\fR, \f(CW$cofactor\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_GROUP::set_generator($group, $generator, $order, $cofactor);" Sets the generator and it's order/cofactor of a \s-1EC_GROUP\s0 object. group \s-1EC_GROUP\s0 object generator \s-1EC_POINT\s0 object with the generator. order the order of the group generated by the generator. cofactor the index of the sub-group generated by the generator in the group of all points on the elliptic curve. return 1 on success and 0 if an error occurred .IP "Crypt::OpenSSL::EC::EC_GROUP::get0_generator($group);" 4 .IX Item "Crypt::OpenSSL::EC::EC_GROUP::get0_generator($group);" Returns the generator of a \s-1EC_GROUP\s0 object. .Sp .Vb 1 \& group EC_GROUP object .Ve .Sp return the currently used generator (possibly \s-1NULL\s0). .IP "Crypt::OpenSSL::EC::EC_GROUP::get_degree($group)" 4 .IX Item "Crypt::OpenSSL::EC::EC_GROUP::get_degree($group)" Returns the number of bits needed to represent a field element group \s-1EC_GROUP\s0 object return number of bits needed to represent a field element .ie n .IP "Crypt::OpenSSL::EC::EC_GROUP::check($group, $ctx);" 4 .el .IP "Crypt::OpenSSL::EC::EC_GROUP::check($group, \f(CW$ctx\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_GROUP::check($group, $ctx);" Checks whether the parameter in the \s-1EC_GROUP\s0 define a valid ec group group \s-1EC_GROUP\s0 object ctx \s-1BN_CTX\s0 object (optional) return 1 if group is a valid ec group and 0 otherwise .ie n .IP "Crypt::OpenSSL::EC::EC_GROUP::check_discriminant($group, $ctx);" 4 .el .IP "Crypt::OpenSSL::EC::EC_GROUP::check_discriminant($group, \f(CW$ctx\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_GROUP::check_discriminant($group, $ctx);" Checks whether the discriminant of the elliptic curve is zero or not group \s-1EC_GROUP\s0 object ctx \s-1BN_CTX\s0 object (optional) return 1 if the discriminant is not zero and 0 otherwise .ie n .IP "Crypt::OpenSSL::EC:: EC_GROUP::cmp($a, $b, $ctx);" 4 .el .IP "Crypt::OpenSSL::EC:: EC_GROUP::cmp($a, \f(CW$b\fR, \f(CW$ctx\fR);" 4 .IX Item "Crypt::OpenSSL::EC:: EC_GROUP::cmp($a, $b, $ctx);" Compares two \s-1EC_GROUP\s0 objects a first \s-1EC_GROUP\s0 object b second \s-1EC_GROUP\s0 object ctx \s-1BN_CTX\s0 object (optional) return 0 if both groups are equal and 1 otherwise .ie n .IP "Crypt::OpenSSL::EC::EC::EC_GROUP::new_curve_GFp($p, $a, $b, $ctx);" 4 .el .IP "Crypt::OpenSSL::EC::EC::EC_GROUP::new_curve_GFp($p, \f(CW$a\fR, \f(CW$b\fR, \f(CW$ctx\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC::EC_GROUP::new_curve_GFp($p, $a, $b, $ctx);" Creates a new \s-1EC_GROUP\s0 object with the specified parameters defined over GFp (defined by the equation y^2 = x^3 + a*x + b) p \s-1BIGNUM\s0 with the prime number a \s-1BIGNUM\s0 with the parameter a of the equation b \s-1BIGNUM\s0 with the parameter b of the equation ctx \s-1BN_CTX\s0 object (optional) return newly created \s-1EC_GROUP\s0 object with the specified parameters .ie n .IP "Crypt::OpenSSL::EC::EC_GROUP::new_curve_GF2m($p, $a, $b, $ctx);" 4 .el .IP "Crypt::OpenSSL::EC::EC_GROUP::new_curve_GF2m($p, \f(CW$a\fR, \f(CW$b\fR, \f(CW$ctx\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_GROUP::new_curve_GF2m($p, $a, $b, $ctx);" Not available if \s-1OPENSSL_NO_EC2M\s0 is defined in OpenSSL. .Sp Creates a new \s-1EC_GROUP\s0 object with the specified parameters defined over GF2m (defined by the equation y^2 + x*y = x^3 + a*x^2 + b) p \s-1BIGNUM\s0 with the polynomial defining the underlying field a \s-1BIGNUM\s0 with the parameter a of the equation b \s-1BIGNUM\s0 with the parameter b of the equation ctx \s-1BN_CTX\s0 object (optional) return newly created \s-1EC_GROUP\s0 object with the specified parameters .IP "Crypt::OpenSSL::EC::EC_GROUP::new_by_curve_name($nid);" 4 .IX Item "Crypt::OpenSSL::EC::EC_GROUP::new_by_curve_name($nid);" Creates a \s-1EC_GROUP\s0 object with a curve specified by a \s-1NID\s0 nid \s-1NID\s0 of the \s-1OID\s0 of the curve name return newly created \s-1EC_GROUP\s0 object with specified curve or \s-1NULL\s0 if an error occurred .ie n .IP "Crypt::OpenSSL::EC::EC_get_builtin_curves($r, $nitems);" 4 .el .IP "Crypt::OpenSSL::EC::EC_get_builtin_curves($r, \f(CW$nitems\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_get_builtin_curves($r, $nitems);" EC_builtin_curves(EC_builtin_curve *r, size_t size) returns number of all available curves or zero if a error occurred. In case r ist not zero nitems EC_builtin_curve structures are filled with the data of the first nitems internal groups .ie n .IP "Crypt::OpenSSL::EC::EC_GROUP::get_order($group, $order, $ctx);" 4 .el .IP "Crypt::OpenSSL::EC::EC_GROUP::get_order($group, \f(CW$order\fR, \f(CW$ctx\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_GROUP::get_order($group, $order, $ctx);" Gets the order of a \s-1EC_GROUP\s0 .Sp .Vb 4 \& group EC_GROUP object \& order BIGNUM to which the order is copied \& ctx BN_CTX object (optional) \& return 1 on success and 0 if an error occurred .Ve .ie n .IP "Crypt::OpenSSL::EC::EC_GROUP::get_cofactor($group, $cofactopr, $ctx)" 4 .el .IP "Crypt::OpenSSL::EC::EC_GROUP::get_cofactor($group, \f(CW$cofactopr\fR, \f(CW$ctx\fR)" 4 .IX Item "Crypt::OpenSSL::EC::EC_GROUP::get_cofactor($group, $cofactopr, $ctx)" Gets the cofactor of a \s-1EC_GROUP\s0 .Sp .Vb 4 \& group EC_GROUP object \& cofactor BIGNUM to which the cofactor is copied \& ctx BN_CTX object (optional) \& return 1 on success and 0 if an error occurred .Ve .ie n .IP "Crypt::OpenSSL::EC::EC_GROUP::set_curve_name($group, $nid);" 4 .el .IP "Crypt::OpenSSL::EC::EC_GROUP::set_curve_name($group, \f(CW$nid\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_GROUP::set_curve_name($group, $nid);" Sets the name of a \s-1EC_GROUP\s0 object group \s-1EC_GROUP\s0 object nid \s-1NID\s0 of the curve name \s-1OID\s0 .IP "Crypt::OpenSSL::EC::EC_GROUP::get_curve_name($group);" 4 .IX Item "Crypt::OpenSSL::EC::EC_GROUP::get_curve_name($group);" Returns the curve name of a \s-1EC_GROUP\s0 object group \s-1EC_GROUP\s0 object return \s-1NID\s0 of the curve name \s-1OID\s0 or 0 if not set. .ie n .IP "Crypt::OpenSSL::EC::EC_GROUP::set_asn1_flag($group, $flag);" 4 .el .IP "Crypt::OpenSSL::EC::EC_GROUP::set_asn1_flag($group, \f(CW$flag\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_GROUP::set_asn1_flag($group, $flag);" Sets the \s-1ASN\s0 flag for the group .IP "Crypt::OpenSSL::EC::EC_GROUP::get_asn1_flag($group);" 4 .IX Item "Crypt::OpenSSL::EC::EC_GROUP::get_asn1_flag($group);" Returns the \s-1ASN\s0 flag for the group .ie n .IP "Crypt::OpenSSL::EC::EC_GROUP::set_point_conversion_form($group, $form);" 4 .el .IP "Crypt::OpenSSL::EC::EC_GROUP::set_point_conversion_form($group, \f(CW$form\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_GROUP::set_point_conversion_form($group, $form);" Sets the point conversion form. .IP "Crypt::OpenSSL::EC::EC_GROUP::get_point_conversion_form($group);" 4 .IX Item "Crypt::OpenSSL::EC::EC_GROUP::get_point_conversion_form($group);" Returns the point conversion for for the group .IP "Crypt::OpenSSL::EC::EC_GROUP::get0_seed($group);" 4 .IX Item "Crypt::OpenSSL::EC::EC_GROUP::get0_seed($group);" Returns the 0 seed .IP "Crypt::OpenSSL::EC::EC_GROUP::get_seed_len($group);" 4 .IX Item "Crypt::OpenSSL::EC::EC_GROUP::get_seed_len($group);" Returns the seed length .ie n .IP "Crypt::OpenSSL::EC::EC_GROUP::set_seed($group, $seed);" 4 .el .IP "Crypt::OpenSSL::EC::EC_GROUP::set_seed($group, \f(CW$seed\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_GROUP::set_seed($group, $seed);" Sets the group seed .ie n .IP "Crypt::OpenSSL::EC::EC_POINT::mul($group, $r, $n, $q, $m, $ctx));" 4 .el .IP "Crypt::OpenSSL::EC::EC_POINT::mul($group, \f(CW$r\fR, \f(CW$n\fR, \f(CW$q\fR, \f(CW$m\fR, \f(CW$ctx\fR));" 4 .IX Item "Crypt::OpenSSL::EC::EC_POINT::mul($group, $r, $n, $q, $m, $ctx));" Computes r = generator * n + q * m group underlying \s-1EC_GROUP\s0 object r \s-1EC_POINT\s0 object for the result n \s-1BIGNUM\s0 with the multiplier for the group generator (optional) q \s-1EC_POINT\s0 object with the first factor of the second summand m \s-1BIGNUM\s0 with the second factor of the second summand ctx \s-1BN_CTX\s0 object (optional) return 1 on success and 0 if an error occurred .ie n .IP "Crypt::OpenSSL::EC::EC_GROUP::precompute_mult($group, $ctx);" 4 .el .IP "Crypt::OpenSSL::EC::EC_GROUP::precompute_mult($group, \f(CW$ctx\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_GROUP::precompute_mult($group, $ctx);" Stores multiples of generator for faster point multiplication group \s-1EC_GROUP\s0 object ctx \s-1BN_CTX\s0 object (optional) return 1 on success and 0 if an error occurred .IP "Crypt::OpenSSL::EC::EC_GROUP::have_precompute_mult($group);" 4 .IX Item "Crypt::OpenSSL::EC::EC_GROUP::have_precompute_mult($group);" Reports whether a precomputation has been done group \s-1EC_GROUP\s0 object return 1 if a pre-computation has been done and 0 otherwise .IP "Crypt::OpenSSL::EC::EC_GROUP::get_basis_type($group);" 4 .IX Item "Crypt::OpenSSL::EC::EC_GROUP::get_basis_type($group);" \&\fBEC_GROUP_get_basis_type()\fR returns the \s-1NID\s0 of the basis type used to represent the field elements .ie n .IP "Crypt::OpenSSL::EC::EC_GROUP::get_trinomial_basis($group, $k);" 4 .el .IP "Crypt::OpenSSL::EC::EC_GROUP::get_trinomial_basis($group, \f(CW$k\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_GROUP::get_trinomial_basis($group, $k);" Not available if \s-1OPENSSL_NO_EC2M\s0 is defined in OpenSSL. .ie n .IP "Crypt::OpenSSL::EC:: EC_GROUP::get_pentanomial_basis($group, $k1, $k2, $k3);" 4 .el .IP "Crypt::OpenSSL::EC:: EC_GROUP::get_pentanomial_basis($group, \f(CW$k1\fR, \f(CW$k2\fR, \f(CW$k3\fR);" 4 .IX Item "Crypt::OpenSSL::EC:: EC_GROUP::get_pentanomial_basis($group, $k1, $k2, $k3);" Not available if \s-1OPENSSL_NO_EC2M\s0 is defined in OpenSSL. .IP "Crypt::OpenSSL::EC::EC_GROUP::free($group);" 4 .IX Item "Crypt::OpenSSL::EC::EC_GROUP::free($group);" Frees a \s-1EC_GROUP\s0 object. This should normally not be called from Perl, since \s-1EC_GROUP\s0 objects created by this library are auto-destroyed when they become unreferenced. .IP "Crypt::OpenSSL::EC::EC_GROUP::clear_free($group);" 4 .IX Item "Crypt::OpenSSL::EC::EC_GROUP::clear_free($group);" Clears and frees a \s-1EC_GROUP\s0 object This should normally not be called from Perl, since \s-1EC_GROUP\s0 objects created by this library are auto-destroyed when they become unreferenced. .IP "\fBCrypt::OpenSSL::EC::EC_KEY::new()\fR; Creates a new \s-1EC_KEY\s0 object. return \s-1EC_KEY\s0 object or \s-1NULL\s0 if an error occurred." 4 .IX Item "Crypt::OpenSSL::EC::EC_KEY::new(); Creates a new EC_KEY object. return EC_KEY object or NULL if an error occurred." .PD 0 .IP "Crypt::OpenSSL::EC::EC_KEY::new_by_curve_name($nid);" 4 .IX Item "Crypt::OpenSSL::EC::EC_KEY::new_by_curve_name($nid);" .PD Creates a new \s-1EC_KEY\s0 object using a named curve as underlying \&\s-1EC_GROUP\s0 object. nid \s-1NID\s0 of the named curve. return \s-1EC_KEY\s0 object or \s-1NULL\s0 if an error occurred. .IP "Crypt::OpenSSL::EC::EC_KEY::free($key);" 4 .IX Item "Crypt::OpenSSL::EC::EC_KEY::free($key);" Frees a \s-1EC_KEY\s0 object. key \s-1EC_KEY\s0 object to be freed. This should normally not be called from Perl, since \s-1EC_KEY\s0 objects created by this library are auto-destroyed when they become unreferenced. .ie n .IP "Crypt::OpenSSL::EC::EC_KEY::copy($dst, $src);" 4 .el .IP "Crypt::OpenSSL::EC::EC_KEY::copy($dst, \f(CW$src\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_KEY::copy($dst, $src);" Copies a \s-1EC_KEY\s0 object. dst destination \s-1EC_KEY\s0 object src src \s-1EC_KEY\s0 object return dst or \s-1NULL\s0 if an error occurred. .IP "Crypt::OpenSSL::EC::EC_KEY::dup($src);" 4 .IX Item "Crypt::OpenSSL::EC::EC_KEY::dup($src);" Creates a new \s-1EC_KEY\s0 object and copies the content from src to it. src the source \s-1EC_KEY\s0 object return newly created \s-1EC_KEY\s0 object or \s-1NULL\s0 if an error occurred. .IP "Crypt::OpenSSL::EC::EC_KEY::up_ref($key);" 4 .IX Item "Crypt::OpenSSL::EC::EC_KEY::up_ref($key);" Increases the internal reference count of a \s-1EC_KEY\s0 object. key \s-1EC_KEY\s0 object return 1 on success and 0 if an error occurred. .IP "Crypt::OpenSSL::EC::EC_KEY::get0_group($key);" 4 .IX Item "Crypt::OpenSSL::EC::EC_KEY::get0_group($key);" Returns the \s-1EC_GROUP\s0 object of a \s-1EC_KEY\s0 object key \s-1EC_KEY\s0 object \ereturn the \s-1EC_GROUP\s0 object (possibly \s-1NULL\s0). .ie n .IP "Crypt::OpenSSL::EC::EC_KEY::set_group($key, $group);" 4 .el .IP "Crypt::OpenSSL::EC::EC_KEY::set_group($key, \f(CW$group\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_KEY::set_group($key, $group);" Sets the \s-1EC_GROUP\s0 of a \s-1EC_KEY\s0 object. key \s-1EC_KEY\s0 object group \s-1EC_GROUP\s0 to use in the \s-1EC_KEY\s0 object (note: the \s-1EC_KEY\s0 object will use an own copy of the \s-1EC_GROUP\s0). return 1 on success and 0 if an error occurred. .ie n .IP "Crypt::OpenSSL::EC::EC_KEY::set_private_key($key, $prv);" 4 .el .IP "Crypt::OpenSSL::EC::EC_KEY::set_private_key($key, \f(CW$prv\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_KEY::set_private_key($key, $prv);" Sets the private key of a \s-1EC_KEY\s0 object. key \s-1EC_KEY\s0 object prv \s-1BIGNUM\s0 with the private key (note: the \s-1EC_KEY\s0 object will use an own copy of the \s-1BIGNUM\s0). return 1 on success and 0 if an error occurred. .IP "Crypt::OpenSSL::EC::EC_KEY::get0_public_key($key);" 4 .IX Item "Crypt::OpenSSL::EC::EC_KEY::get0_public_key($key);" Returns the public key of a \s-1EC_KEY\s0 object. key the \s-1EC_KEY\s0 object return a \s-1EC_POINT\s0 object with the public key (possibly \s-1NULL\s0) .ie n .IP "Crypt::OpenSSL::EC::EC_KEY::set_public_key($key, $pub);" 4 .el .IP "Crypt::OpenSSL::EC::EC_KEY::set_public_key($key, \f(CW$pub\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_KEY::set_public_key($key, $pub);" Sets the public key of a \s-1EC_KEY\s0 object. key \s-1EC_KEY\s0 object pub \s-1EC_POINT\s0 object with the public key (note: the \s-1EC_KEY\s0 object will use an own copy of the \s-1EC_POINT\s0 object). return 1 on success and 0 if an error occurred. .IP "Crypt::OpenSSL::EC::EC_KEY::get_enc_flags($key);" 4 .IX Item "Crypt::OpenSSL::EC::EC_KEY::get_enc_flags($key);" .PD 0 .ie n .IP "Crypt::OpenSSL::EC::EC_KEY::set_enc_flags($key, $flags);" 4 .el .IP "Crypt::OpenSSL::EC::EC_KEY::set_enc_flags($key, \f(CW$flags\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_KEY::set_enc_flags($key, $flags);" .IP "Crypt::OpenSSL::EC::EC_KEY::get_conv_form($key)" 4 .IX Item "Crypt::OpenSSL::EC::EC_KEY::get_conv_form($key)" .ie n .IP "Crypt::OpenSSL::EC::EC_KEY::set_conv_form($key, $form);" 4 .el .IP "Crypt::OpenSSL::EC::EC_KEY::set_conv_form($key, \f(CW$form\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_KEY::set_conv_form($key, $form);" .IP "Crypt::OpenSSL::EC::EC_KEY::get_key_method_data" 4 .IX Item "Crypt::OpenSSL::EC::EC_KEY::get_key_method_data" .PD Not Implemented .IP "Crypt::OpenSSL::EC::EC_KEY::insert_key_method_data" 4 .IX Item "Crypt::OpenSSL::EC::EC_KEY::insert_key_method_data" Not Implemented .ie n .IP "Crypt::OpenSSL::EC::EC_KEY::set_asn1_flag($key, $flag);" 4 .el .IP "Crypt::OpenSSL::EC::EC_KEY::set_asn1_flag($key, \f(CW$flag\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_KEY::set_asn1_flag($key, $flag);" .PD 0 .ie n .IP "Crypt::OpenSSL::EC::EC_KEY::precompute_mult($key, $ctx);" 4 .el .IP "Crypt::OpenSSL::EC::EC_KEY::precompute_mult($key, \f(CW$ctx\fR);" 4 .IX Item "Crypt::OpenSSL::EC::EC_KEY::precompute_mult($key, $ctx);" .PD Creates a table of pre-computed multiples of the generator to further \s-1EC_KEY\s0 operations. key \s-1EC_KEY\s0 object ctx \s-1BN_CTX\s0 object (optional) return 1 on success and 0 if an error occurred. .IP "Crypt::OpenSSL::EC::EC_KEY::generate_key($key);" 4 .IX Item "Crypt::OpenSSL::EC::EC_KEY::generate_key($key);" Creates a new ec private (and optional a new public) key. key \s-1EC_KEY\s0 object return 1 on success and 0 if an error occurred. .IP "Crypt::OpenSSL::EC::EC_KEY::check_key($key);" 4 .IX Item "Crypt::OpenSSL::EC::EC_KEY::check_key($key);" Verifies that a private and/or public key is valid. key the \s-1EC_KEY\s0 object return 1 on success and 0 otherwise. .SS "\s-1EXPORT\s0" .IX Subsection "EXPORT" None by default. .SS "Exportable constants" .IX Subsection "Exportable constants" .Vb 10 \& EC_F_COMPUTE_WNAF \& EC_F_D2I_ECPARAMETERS \& EC_F_D2I_ECPKPARAMETERS \& EC_F_D2I_ECPRIVATEKEY \& EC_F_DO_EC_KEY_PRINT \& EC_F_ECKEY_PARAM2TYPE \& EC_F_ECKEY_PARAM_DECODE \& EC_F_ECKEY_PRIV_DECODE \& EC_F_ECKEY_PRIV_ENCODE \& EC_F_ECKEY_PUB_DECODE \& EC_F_ECKEY_PUB_ENCODE \& EC_F_ECKEY_TYPE2PARAM \& EC_F_ECPARAMETERS_PRINT \& EC_F_ECPARAMETERS_PRINT_FP \& EC_F_ECPKPARAMETERS_PRINT \& EC_F_ECPKPARAMETERS_PRINT_FP \& EC_F_ECP_NIST_MOD_192 \& EC_F_ECP_NIST_MOD_224 \& EC_F_ECP_NIST_MOD_256 \& EC_F_ECP_NIST_MOD_521 \& EC_F_EC_ASN1_GROUP2CURVE \& EC_F_EC_ASN1_GROUP2FIELDID \& EC_F_EC_ASN1_GROUP2PARAMETERS \& EC_F_EC_ASN1_GROUP2PKPARAMETERS \& EC_F_EC_ASN1_PARAMETERS2GROUP \& EC_F_EC_ASN1_PKPARAMETERS2GROUP \& EC_F_EC_EX_DATA_SET_DATA \& EC_F_EC_GF2M_MONTGOMERY_POINT_MULTIPLY \& EC_F_EC_GF2M_SIMPLE_GROUP_CHECK_DISCRIMINANT \& EC_F_EC_GF2M_SIMPLE_GROUP_SET_CURVE \& EC_F_EC_GF2M_SIMPLE_OCT2POINT \& EC_F_EC_GF2M_SIMPLE_POINT2OCT \& EC_F_EC_GF2M_SIMPLE_POINT_GET_AFFINE_COORDINATES \& EC_F_EC_GF2M_SIMPLE_POINT_SET_AFFINE_COORDINATES \& EC_F_EC_GF2M_SIMPLE_SET_COMPRESSED_COORDINATES \& EC_F_EC_GFP_MONT_FIELD_DECODE \& EC_F_EC_GFP_MONT_FIELD_ENCODE \& EC_F_EC_GFP_MONT_FIELD_MUL \& EC_F_EC_GFP_MONT_FIELD_SET_TO_ONE \& EC_F_EC_GFP_MONT_FIELD_SQR \& EC_F_EC_GFP_MONT_GROUP_SET_CURVE \& EC_F_EC_GFP_MONT_GROUP_SET_CURVE_GFP \& EC_F_EC_GFP_NIST_FIELD_MUL \& EC_F_EC_GFP_NIST_FIELD_SQR \& EC_F_EC_GFP_NIST_GROUP_SET_CURVE \& EC_F_EC_GFP_SIMPLE_GROUP_CHECK_DISCRIMINANT \& EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE \& EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE_GFP \& EC_F_EC_GFP_SIMPLE_GROUP_SET_GENERATOR \& EC_F_EC_GFP_SIMPLE_MAKE_AFFINE \& EC_F_EC_GFP_SIMPLE_OCT2POINT \& EC_F_EC_GFP_SIMPLE_POINT2OCT \& EC_F_EC_GFP_SIMPLE_POINTS_MAKE_AFFINE \& EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES \& EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES_GFP \& EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES \& EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES_GFP \& EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES \& EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES_GFP \& EC_F_EC_GROUP_CHECK \& EC_F_EC_GROUP_CHECK_DISCRIMINANT \& EC_F_EC_GROUP_COPY \& EC_F_EC_GROUP_GET0_GENERATOR \& EC_F_EC_GROUP_GET_COFACTOR \& EC_F_EC_GROUP_GET_CURVE_GF2M \& EC_F_EC_GROUP_GET_CURVE_GFP \& EC_F_EC_GROUP_GET_DEGREE \& EC_F_EC_GROUP_GET_ORDER \& EC_F_EC_GROUP_GET_PENTANOMIAL_BASIS \& EC_F_EC_GROUP_GET_TRINOMIAL_BASIS \& EC_F_EC_GROUP_NEW \& EC_F_EC_GROUP_NEW_BY_CURVE_NAME \& EC_F_EC_GROUP_NEW_FROM_DATA \& EC_F_EC_GROUP_PRECOMPUTE_MULT \& EC_F_EC_GROUP_SET_CURVE_GF2M \& EC_F_EC_GROUP_SET_CURVE_GFP \& EC_F_EC_GROUP_SET_EXTRA_DATA \& EC_F_EC_GROUP_SET_GENERATOR \& EC_F_EC_KEY_CHECK_KEY \& EC_F_EC_KEY_COPY \& EC_F_EC_KEY_GENERATE_KEY \& EC_F_EC_KEY_NEW \& EC_F_EC_KEY_PRINT \& EC_F_EC_KEY_PRINT_FP \& EC_F_EC_POINTS_MAKE_AFFINE \& EC_F_EC_POINT_ADD \& EC_F_EC_POINT_CMP \& EC_F_EC_POINT_COPY \& EC_F_EC_POINT_DBL \& EC_F_EC_POINT_GET_AFFINE_COORDINATES_GF2Mg \& EC_F_EC_POINT_GET_AFFINE_COORDINATES_GFP \& EC_F_EC_POINT_GET_JPROJECTIVE_COORDINATES_GFP \& EC_F_EC_POINT_INVERT \& EC_F_EC_POINT_IS_AT_INFINITY \& EC_F_EC_POINT_IS_ON_CURVE \& EC_F_EC_POINT_MAKE_AFFINE \& EC_F_EC_POINT_MUL \& EC_F_EC_POINT_NEW \& EC_F_EC_POINT_OCT2POINT \& EC_F_EC_POINT_POINT2OCT \& EC_F_EC_POINT_SET_AFFINE_COORDINATES_GF2M \& EC_F_EC_POINT_SET_AFFINE_COORDINATES_GFP \& EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GF2M \& EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GFP \& EC_F_EC_POINT_SET_JPROJECTIVE_COORDINATES_GFP \& EC_F_EC_POINT_SET_TO_INFINITY \& EC_F_EC_PRE_COMP_DUP \& EC_F_EC_PRE_COMP_NEW \& EC_F_EC_WNAF_MUL \& EC_F_EC_WNAF_PRECOMPUTE_MULT \& EC_F_I2D_ECPARAMETERS \& EC_F_I2D_ECPKPARAMETERS \& EC_F_I2D_ECPRIVATEKEY \& EC_F_I2O_ECPUBLICKEY \& EC_F_O2I_ECPUBLICKEY \& EC_F_OLD_EC_PRIV_DECODE \& EC_F_PKEY_EC_CTRL \& EC_F_PKEY_EC_CTRL_STR \& EC_F_PKEY_EC_DERIVE \& EC_F_PKEY_EC_KEYGEN \& EC_F_PKEY_EC_PARAMGEN \& EC_F_PKEY_EC_SIGN \& EC_PKEY_NO_PARAMETERS \& EC_PKEY_NO_PUBKEY \& EC_R_ASN1_ERROR \& EC_R_ASN1_UNKNOWN_FIELD \& EC_R_BUFFER_TOO_SMALL \& EC_R_D2I_ECPKPARAMETERS_FAILURE \& EC_R_DECODE_ERROR \& EC_R_DISCRIMINANT_IS_ZERO \& EC_R_EC_GROUP_NEW_BY_NAME_FAILURE \& EC_R_FIELD_TOO_LARGE \& EC_R_GROUP2PKPARAMETERS_FAILURE \& EC_R_I2D_ECPKPARAMETERS_FAILURE \& EC_R_INCOMPATIBLE_OBJECTS \& EC_R_INVALID_ARGUMENT \& EC_R_INVALID_COMPRESSED_POINT \& EC_R_INVALID_COMPRESSION_BIT \& EC_R_INVALID_CURVE \& EC_R_INVALID_DIGEST_TYPE \& EC_R_INVALID_ENCODING \& EC_R_INVALID_FIELD \& EC_R_INVALID_FORM \& EC_R_INVALID_GROUP_ORDER \& EC_R_INVALID_PENTANOMIAL_BASIS \& EC_R_INVALID_PRIVATE_KEY \& EC_R_INVALID_TRINOMIAL_BASIS \& EC_R_KEYS_NOT_SET \& EC_R_MISSING_PARAMETERS \& EC_R_MISSING_PRIVATE_KEY \& EC_R_NOT_A_NIST_PRIME \& EC_R_NOT_A_SUPPORTED_NIST_PRIME \& EC_R_NOT_IMPLEMENTED \& EC_R_NOT_INITIALIZED \& EC_R_NO_FIELD_MOD \& EC_R_NO_PARAMETERS_SET \& EC_R_PASSED_NULL_PARAMETER \& EC_R_PKPARAMETERS2GROUP_FAILURE \& EC_R_POINT_AT_INFINITY \& EC_R_POINT_IS_NOT_ON_CURVE \& EC_R_SLOT_FULL \& EC_R_UNDEFINED_GENERATOR \& EC_R_UNDEFINED_ORDER \& EC_R_UNKNOWN_GROUP \& EC_R_UNKNOWN_ORDER \& EC_R_UNSUPPORTED_FIELD \& EC_R_WRONG_ORDER \& EVP_PKEY_CTRL_EC_PARAMGEN_CURVE_NID \& OPENSSL_ECC_MAX_FIELD_BITS \& OPENSSL_EC_NAMED_CURVE \& POINT_CONVERSION_COMPRESSED \& POINT_CONVERSION_HYBRID \& POINT_CONVERSION_UNCOMPRESSED .Ve .SH "SEE ALSO" .IX Header "SEE ALSO" Crypt::OpenSSL::Bignum .PP OpenSSL .SH "AUTHOR" .IX Header "AUTHOR" Mike McCauley, .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" Copyright (C) 2012 by Mike McCauley .PP This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.2 or, at your option, any later version of Perl 5 you may have available.