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.
int element_length_in_bytes_x_only(element_t e)<br />
Chapter 4. Element functions<br />
Assumes e is a point on an elliptic curve. Returns the length in bytes needed to hold the x-coordinate of e.<br />
int element_to_bytes_compressed(unsigned char *data, element_t e)<br />
If possible, outputs a compressed form of the element e to the buffer of bytes data. Currently only implemented<br />
for points on an elliptic curve.<br />
int element_from_bytes_compressed(element_t e, unsigned char *data)<br />
Sets element e to the element in compressed form in the buffer of bytes data. Currently only implemented for<br />
points on an elliptic curve.<br />
int element_length_in_bytes_compressed(element_t e)<br />
Returns the number of bytes needed to hold e in compressed form. Currently only implemented for points on<br />
an elliptic curve.<br />
int element_item_count(element_t e)<br />
For points, returns the number of coordinates. For polynomials, returns the number of coefficients. Otherwise<br />
returns zero.<br />
element_t element_item(element_t e, int i)<br />
For points, returns nth coordinate. For polynomials, returns coefficient of x n . Otherwise returns NULL. The<br />
element the return value points to may be modified.<br />
element_t element_x(element_t a)<br />
22