Crypt::PBC::Element

OO interface for the Stanford PBC library
Download

Crypt::PBC::Element Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Paul Miller
  • Publisher web site:
  • http://search.cpan.org/~jettero/

Crypt::PBC::Element Tags


Crypt::PBC::Element Description

OO interface for the Stanford PBC library Crypt::PBC::Element is an OO interface for the Stanford PBC library.SYNOPSIS use Crypt::PBC; my $pairing = new Crypt::PBC("params_d.txt"); my $G1 = $pairing->init_G1->random; my $G2 = $pairing->init_G2->random->double->square; my $GT = $pairing->init_GT->pairing_apply( $G1, $G2 );OverviewThroughout the entire OO interface I have attempted to be consistant that the Element return itself where it isn't immediately obvious that some other thing should be returned instead. my $x = $pairing->init_G1; # $x is an element $x->random; # randomize the element. $x->set0; # set element to 0 $x->set_to_hash("lol!"); # set element to lol ... # All the above can instead be written as: my $x = $pairing->init_G1->random->set0->set_to_hash("lol!");However, functions that return something else ... dont' return elements. $string (below) is a MIME encoded string, not an element. my $string = $x->as_base64;For more help seting up a new Pairing, see the Crypt::PBC manpage (under new). Requirements: · Perl


Crypt::PBC::Element Related Software