Pairing Parameters Generators

JPBC provides a set of interfaces and classes to generate and manage the parameters that describe a pairing setting. The PairingParametersGenerator interface is the starting point. Once an instance of such interface has been created then pairing parameters can be generated by invoking the generate method as follow.

import it.unisa.dia.gas.jpbc.PairingParametersGenerator;
import it.unisa.dia.gas.jpbc.PairingParameters;

// Initialize the pairing parameters generator.
ParametersGenerator parametersGenerator = ...

// Then, generate the parameters by invoking the generate method.
PairingParameters params = parametersGenerator.generate();
                

The generate method returns an instance of the PairingParameters interface that maps the pairing parameters to specific values that can be accessed by calling specialized methods.
The way the parameters can be saved to a file for later use depends on the specific generator. Anyway, in most of the cases the toString method can used to obtain a string representation of the parameters that can be stored directly to a file.

Once the parameters are generated, an instance of Pairing interface can be obtained as shown here.

JPBC provides pairing parameters generators for bilinear (based on elliptic curves) and multilinear maps.
Pregenerated parameters can be found in the params folder of the distro package.