Ashish Gulhati
and 1 contributors

NAME

Crypt::RSA::Blind - Blind RSA signatures

VERSION

 $Revision: 1.009 $
 $Date: Sat Jun 10 00:16:58 PDT 2017 $

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:

LICENSE AND COPYRIGHT

Copyright (c) 2016-2017 Ashish Gulhati.

This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0.

See http://www.perlfoundation.org/artistic_license_2_0 for the full license terms.