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
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Chapter 5. Param functions<br />
Pairings are initialized from pairing parameters, which are objects of type pbc_param_t. Some<br />
applications can ignore this data type because pairing_init_set_str() handles it behind the scenes:<br />
it reads a string as a pbc_param_t, then initializes a pairing with these parameters.<br />
int pbc_param_init_set_str(pbc_param_t par, const char *s)<br />
Initializes pairing parameters from the string s. Returns 0 if successful, 1 otherwise.<br />
int pbc_param_init_set_buf(pbc_param_t par, const char *s, size_t len)<br />
Same, but read at most len bytes. If len is 0, it behaves as the previous function. Returns 0 if successful, 1<br />
otherwise.<br />
void pbc_param_out_str(FILE *stream, pbc_param_t p)<br />
Write pairing parameters to ’stream’ in a text format.<br />
void pbc_param_clear(pbc_param_t p)<br />
Clear p. Call after p is no longer needed.<br />
5.1. Param generation<br />
These were used to prepare the sample parameters in the param subdirectory.<br />
We label the pairing families with capital letters roughly in the order of discovery, so we can refer to<br />
them easily. Type A is fastest. Type D is a good choice when elements should be short but is slower. Type<br />
F has even shorter elements but is slower still. The speed differences are hardware-dependent, and also<br />
change when preprocessing is used. Type B and C are unimplemented.<br />
The pbc_cm_t data type holds CM parameters that are used to generate type D and G curves.<br />
24