NAME
Crypt::RSA::Blind - Blind RSA signatures
VERSION
$Revision: 1.010 $
$Date: Sat Oct 27 21:19:50 PDT 2018 $
SYNOPSIS
use Crypt::RSA::Blind;
my $rsab = new Crypt::RSA::Blind;
my ($pubkey, $seckey) = $rsab->keygen(Size => 1024);
my $msg = "Hello, world!";
my $init = $rsab->init;
my $req = $rsab->request( Key => $pubkey, Init => $init,
Message => $msg );
my $blindsig = $rsab->sign( Key => $seckey, Plaintext => $req );
my $sig = $rsab->unblind( Key => $pubkey, Init => $init,
Signature => $blindsig );
print "OK\n" if $rsab->verify( Key => $pubkey, Message => $msg,
Signature => $sig );
METHODS
new
Creates and returns a new Crypt::RSA::Blind object.
keygen
Generates and returns an RSA key-pair of specified bitsize. This is a synonym for Crypt::RSA::Key::generate(). Parameters and return values are described in the Crypt::RSA::Key(3) manpage.
init
Generates and returns an initialization vector for the blind signing. The initialization vector should be passed in to the req(), and unblind() methods in the Init named parameter.
The RSA blind signature protocol doesn't actually require the use of initialization vectors, and this module can be used just fine with the Init parameter set to 1 or any number. However, this module uses the initialization vector to keep track of the blinding factor for different requests, so it is necessary to use initialization vectors when creating multiple interlaved signing requests.
request
Generates and returns a blind-signing request. The following named parameters are required:
Init - The initialization vector from init()
Key - The public key of the signer
Message - The message to be blind signed
sign
Generates and returns a blind signature. The following named parameters are required:
Key - The private key of the signer
Plaintext - The blind-signing request
unblind
Unblinds a blind signature and returns a verifiable signature. The following named parameters are required:
Init - The initialization vector from init()
Key - The public key of the signer
Signature - The blind signature
verify
Verify a signature. The following named parameters are required:
Key - The public key of the signer
Signature - The blind signature
Message - The message that was signed
errstr
Crypt::RSA::Blind relies on Crypt::RSA, which uses an error handling method implemented in Crypt::RSA::Errorhandler. When a method fails it returns undef and saves the error message. This error message is available to the caller through the errstr() method. For more details see the Crypt::RSA::Errorhandler(3) manpage.
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).
hashsize
The bitsize of the full-domain hash that will be generated from the message to be blind-signed.
initsize
The bitsize of the init vector.
blindsize
The bitsize of the blinding factor.
AUTHOR
Ashish Gulhati, <crypt-rsab at hash.neo.tc>
BUGS
Please report any bugs or feature requests to bug-crypt-rsa-blind at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Crypt-RSA-Blind. 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::RSA::Blind
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.