NAME
Crypt::EC_DSA - Elliptic Curve Digital Signature Algorithm (ECDSA)
VERSION
$Revision: 1.009 $
$Date: Tue Oct 16 23:22:27 PDT 2018 $
SYNOPSIS
Elliptic Curve Digital Signature Algorithm (ECDSA)
use Crypt::EC_DSA;
my $ecdsa = new Crypt::EC_DSA;
my ($pubkey, $seckey) = $ecdsa->keygen;
my $msg = 'Hello, world!';
my $signature = $ecdsa->sign( Message => $msg, Key => $seckey );
print "Verified\n" if $ecdsa->verify( Message => $msg, Key => $pubkey,
Signature => $signature );
METHODS
new
Creates and returns a new Crypt::EC_DSA object. The following optional named parameters can be provided:
Curve - The name of the elliptic curve to use. Defaults to 'secp256k1'. To use an unnamed curve, set the curve using the curve accessor.
Debug - Set to a true value to have the module emit messages useful for debugging.
keygen
Generates and returns an ECDSA key-pair as a two-element list, with the public key as the first element and the secret key as the second.
sign
Generates and returns an ECDSA signature. The following named parameters are required:
Key - The private key of the signer
Message - The message to be signed
verify
Verify a signature. Returns a true value if the verification succeeds and false otherwise. The following named parameters are required:
Key - The public key of the signer
Signature - The signature
Message - The message that was signed
ACCESSORS
Accessors can be called with no arguments to query the value of an object property, or with a single argument, to set the property to a specific value (unless it is read-only).
debug
Set true to emit helpful messages for debugging purposes, false otherwise. Default is false.
curve
The elliptic curve to use (a Math::EllipticCurve::Prime object).
SEE ALSO
-
A digital signature scheme with deterministic signatures.
AUTHOR
Ashish Gulhati, <crypt-ecdsa at hash.neo.tc>
BUGS
Please report any bugs or feature requests to bug-crypt-ecdsa at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Crypt-EC_DSA. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Crypt::EC_DSA
You can also look for information at:
RT: CPAN's request tracker
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
LICENSE AND COPYRIGHT
Copyright (c) Ashish Gulhati.
This software package is Open Software; you can use, redistribute, and/or modify it under the terms of the Open Artistic License 2.0.
Please see http://www.opensoftwr.org/oal20.txt for the full license terms, and ensure that the license grant applies to you before using or modifying this software. By using or modifying this software, you indicate your agreement with the license terms.