14.07.2013 Views

PBC Library Manual 0.5.11 - Stanford Crypto Group

PBC Library Manual 0.5.11 - Stanford Crypto Group

PBC Library Manual 0.5.11 - Stanford Crypto Group

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

nd(G)<br />

init_pairing_A();<br />

Other sample pairings can be used by replacing A with one of D, E, F, G.<br />

Returns a random element of an algebraic structure G, e.g:<br />

g := rnd(Zr);<br />

Synonym: random.<br />

pairing(g, h)<br />

G(g)<br />

Chapter 7. Bundled programs<br />

Returns the pairing applied to g and h. The element g must be an element of G1 and h of G2, e.g:<br />

pairing(rnd(G1), rnd(G2));<br />

Maps an element g to element of the field G, e.g:<br />

Zr(123);<br />

GT([456, 789]);<br />

7.2. Parameter generation<br />

Programs that generate pairing parameters are located in the gen subdirectory. Some of the programs are<br />

already functional enough to be used to find parameters for real applications. I need to write more<br />

documentation first; for now, read the source!<br />

listmnt<br />

Searches for discriminants D that lead to MNT curves with subgroups of prime order.<br />

genaparam, gena1param, gendparam, geneparam, genfparam, gengparam<br />

Prints parameters for a curve suitable for computing pairings of a given type. The output can be fed<br />

to some of the other test programs. The programs gendparam and gengparam should be given a<br />

discriminant as the first argument.<br />

hilbertpoly<br />

Prints the Hilbert polynomial for a given range of discriminants. Computing the Hilbert polynomial<br />

is an intermediate step when generating type D parameters.<br />

32

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!