- SEE ALSO
- LICENSE AND COPYRIGHT
Crypt::EC_DSA - Elliptic Curve Digital Signature Algorithm (ECDSA)
$Revision: 1.009 $ $Date: Tue Oct 16 23:22:27 PDT 2018 $
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 );
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.
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.
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 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 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).
Set true to emit helpful messages for debugging purposes, false otherwise. Default is false.
The elliptic curve to use (a Math::EllipticCurve::Prime object).
A digital signature scheme with deterministic signatures.
<crypt-ecdsa at hash.neo.tc>
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.
You can find documentation for this module with the perldoc command.
You can also look for information at:
RT: CPAN's request tracker
AnnoCPAN: Annotated CPAN documentation
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.