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.
void pbc_cm_init(pbc_cm_t cm)<br />
Initializes cm.<br />
void pbc_cm_clear(pbc_cm_t cm)<br />
Clears cm.<br />
Chapter 5. Param functions<br />
int pbc_cm_search_d(int (*callback)(pbc_cm_t, void *), void *data, unsigned int D, unsigned int<br />
bitlimit)<br />
For a given discriminant D, searches for type D pairings suitable for cryptography (MNT curves of embedding<br />
degree 6). The group order is at most bitlimit bits. For each set of CM parameters found, call callback with<br />
pbc_cm_t and given void *. If the callback returns nonzero, stops search and returns that value. Otherwise<br />
returns 0.<br />
int pbc_cm_search_g(int (*callback)(pbc_cm_t, void *), void *data, unsigned int D, unsigned int<br />
bitlimit)<br />
For a given discriminant D, searches for type G pairings suitable for cryptography (Freeman curve). The group<br />
order is at most bitlimit bits. For each set of CM parameters found, call callback with pbc_cm_t and given<br />
void *. If the callback returns nonzero, stops search and returns that value. Otherwise returns 0.<br />
void pbc_param_init_a_gen(pbc_param_t par, int rbits, int qbits)<br />
Generate type A pairing parameters and store them in p, where the group order r is rbits long, and the order of<br />
the base field q is qbits long. Elements take qbits to represent.<br />
To be secure, generic discrete log algorithms must be infeasible in groups of order r, and finite field discrete log<br />
algorithms must be infeasible in finite fields of order q^2, e.g. rbits = 160, qbits = 512.<br />
The file param/a.param contains parameters for a type A pairing suitable for cryptographic use.<br />
void pbc_param_init_a1_gen(pbc_param_t param, mpz_t n)<br />
25