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.

Chapter 3. Pairing functions<br />

Get ready to perform a pairing whose first input is in1, and store the results of time-saving precomputation in p.<br />

void pairing_pp_clear(pairing_pp_t p)<br />

Clear p. This should be called after p is no longer needed.<br />

void pairing_pp_apply(element_t out, element_t in2, pairing_pp_t p)<br />

Compute a pairing using in2 and the preprocessed information stored in p and store the output in out. The<br />

inputs to the pairing are the element previously used to initialize p and the element in2.<br />

void element_pairing(element_t out, element_t in1, element_t in2)<br />

Computes a pairing: out = e(in1, in2), where in1, in2, out must be in the groups G1, G2, GT.<br />

void element_prod_pairing(element_t out, element_t in1[], element_t in2[], int n)<br />

Computes the product of pairings, that is out = e(in1[0], in2[0]) . . . e(in1[n-1], in2[n-1]). The arrays in1, in2<br />

must have at least n elements belonging to the groups G1, G2 respectively, and out must belong to the group<br />

GT.<br />

3.3. Other pairing functions<br />

int pairing_is_symmetric(pairing_t pairing)<br />

Returns true if G1 and G2 are the same group.<br />

int pairing_length_in_bytes_G1(pairing_t pairing)<br />

Returns the length in bytes needed to represent an element of G1.<br />

10

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

Saved successfully!

Ooh no, something went wrong!