Crypt::OpenSSL::ECDSA - Perl extension for OpenSSL ECDSA (Elliptic Curve Digital Signature Algorithm)
use Crypt::OpenSSL::ECDSA; $sig = Crypt::OpenSSL::ECDSA::ECDSA_do_sign( $digest, $eckey ); $r = $sig->get_r; $s = $sig->get_s; $sig = Crypt::OpenSSL::ECDSA::ECDSA_SIG->new(); $sig->set_r($r); $sig->set_s($s); Crypt::OpenSSL::ECDSA::ECDSA_do_verify( $digest, $sig, $eckey );
This module provides an interface to the ECDSA (Elliptic Curve Digital Signature Algorithm) functions in OpenSSL
Tested against OpenSSL 1.0.2
None by default.
ECDSA_F_ECDSA_CHECK ECDSA_F_ECDSA_DATA_NEW_METHOD ECDSA_F_ECDSA_DO_SIGN ECDSA_F_ECDSA_DO_VERIFY ECDSA_F_ECDSA_SIGN_SETUP ECDSA_R_BAD_SIGNATURE ECDSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE ECDSA_R_ERR_EC_LIB ECDSA_R_MISSING_PARAMETERS ECDSA_R_NEED_NEW_SETUP_VALUES ECDSA_R_NON_FIPS_METHOD ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED ECDSA_R_SIGNATURE_MALLOC_FAILED
$sig = Crypt::OpenSSL::ECDSA::ECDSA_SIG->new();
Create a new ECDSA Signature Object.
The internal "r" and "s" components are undefined.
$r = $sig->get_r;
Gets signature "r" component.
The method returns a string representing a binary integer in network (big-endian) byte order.
$s = $sig->get_s;
Gets signature "s" component.
$sig->set_r($r);
Sets signature "r" component.
The argument is a string representing a binary integer in network (big-endian) byte order.
$sig->set_r($s);
Sets signature "s" component.
OpenSSL documentation, Crypt::OpenSSL::EC,
Mike McCauley, <mikem@airspayce.com>
Copyright (C) 2014 by Mike McCauley
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.18.1 or, at your option, any later version of Perl 5 you may have available.
4 POD Errors
The following errors were encountered while parsing the POD:
'=item' outside of any '=over'
You forgot a '=back' before '=head1'
To install Crypt::OpenSSL::ECDSA, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Crypt::OpenSSL::ECDSA
CPAN shell
perl -MCPAN -e shell install Crypt::OpenSSL::ECDSA
For more information on module installation, please visit the detailed CPAN module installation guide.