The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Crypt::OpenSSL::ECDSA - Perl extension for OpenSSL ECDSA (Elliptic Curve Digital Signature Algorithm)

SYNOPSIS

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 );

DESCRIPTION

This module provides an interface to the ECDSA (Elliptic Curve Digital Signature Algorithm) functions in OpenSSL

Tested against OpenSSL 1.0.2

Export

None by default.

Exportable constants

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

CLASS METHODS

new
$sig = Crypt::OpenSSL::ECDSA::ECDSA_SIG->new();

Create a new ECDSA Signature Object.

The internal "r" and "s" components are undefined.

OBJECT METHODS

get_r;
$r = $sig->get_r;

Gets signature "r" component.

The method returns a string representing a binary integer in network (big-endian) byte order.

get_s;
$s = $sig->get_s;

Gets signature "s" component.

The method returns a string representing a binary integer in network (big-endian) byte order.

set_r;
$sig->set_r($r);

Sets signature "r" component.

The argument is a string representing a binary integer in network (big-endian) byte order.

set_s;
$sig->set_r($s);

Sets signature "s" component.

The argument is a string representing a binary integer in network (big-endian) byte order.

SEE ALSO

OpenSSL documentation, Crypt::OpenSSL::EC,

AUTHOR

Mike McCauley, <mikem@airspayce.com>

COPYRIGHT AND LICENSE

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:

Around line 151:

'=item' outside of any '=over'

Around line 160:

You forgot a '=back' before '=head1'

Around line 162:

'=item' outside of any '=over'

Around line 201:

You forgot a '=back' before '=head1'