An application should first initialize a pairing object. This causes PBC to setup curves, groups and other mathematical miscellany. After that, elements can be initialized and manipulated for cryptographic operations.
Parameters for various pairings are included with the PBC
library distribution in the param
subdirectory, and some are suitable for cryptographic use. Some
programs in the gen
subdirectory
may be used to generate parameters (see Chapter 7,
Bundled programs). Also, see the PBC website for
many more pairing parameters.
Pairings involve three groups of prime order. The PBC library calls them G1, G2, and GT, and calls the order r. The pairing is a bilinear map that takes two elements as input, one from G1 and one from G2, and outputs an element of GT.
The elements of G2 are at least as long as G1; G1 is
guaranteed to be the shorter of the two. Sometimes G1 and G2
are the same group (i.e. the pairing is symmetric) so their
elements can be mixed freely. In this case the pairing_is_symmetric
function returns 1.
Bilinear pairings are stored in the data type pairing_t
. Functions that operate on them
start with pairing_
.