CiFEr
|
Vectors of elements of an elliptic curve struct and operations on it. More...
Go to the source code of this file.
Data Structures | |
struct | cfe_vec_G1 |
struct | cfe_vec_G2 |
struct | cfe_vec_GT |
struct | cfe_vec_octet |
Typedefs | |
typedef struct cfe_vec_G1 | cfe_vec_G1 |
typedef struct cfe_vec_G2 | cfe_vec_G2 |
typedef struct cfe_vec_GT | cfe_vec_GT |
typedef struct cfe_vec_octet | cfe_vec_octet |
Functions | |
void | cfe_vec_G1_init (cfe_vec_G1 *v, size_t size) |
void | cfe_vec_G1_inf (cfe_vec_G1 *v) |
void | cfe_vec_mul_G1 (cfe_vec_G1 *v, cfe_vec *u) |
void | cfe_vec_mul_vec_G1 (cfe_vec_G1 *res, cfe_vec *u, cfe_vec_G1 *v) |
void | cfe_vec_G2_init (cfe_vec_G2 *v, size_t size) |
void | cfe_vec_G2_inf (cfe_vec_G2 *v) |
void | cfe_vec_mul_G2 (cfe_vec_G2 *v, cfe_vec *u) |
void | cfe_vec_mul_vec_G2 (cfe_vec_G2 *res, cfe_vec *u, cfe_vec_G2 *v) |
void | cfe_vec_GT_init (cfe_vec_GT *v, size_t size) |
void | cfe_vec_GT_inf (cfe_vec_GT *v) |
void | cfe_vec_mul_GT (cfe_vec_GT *v, cfe_vec *u) |
void | cfe_vec_G1_free (cfe_vec_G1 *v) |
void | cfe_vec_G2_free (cfe_vec_G2 *v) |
void | cfe_vec_GT_free (cfe_vec_GT *v) |
void | cfe_vec_octet_init (cfe_vec_octet *v, size_t size) |
void | cfe_vec_octet_free (cfe_vec_octet *v) |
Vectors of elements of an elliptic curve struct and operations on it.
typedef struct cfe_vec_G1 cfe_vec_G1 |
Vector of ECP_BN254 elements.
typedef struct cfe_vec_G2 cfe_vec_G2 |
Vector of ECP2_BN254 elements.
typedef struct cfe_vec_GT cfe_vec_GT |
Vector of FP12_BN254 elements.
typedef struct cfe_vec_octet cfe_vec_octet |
Vector of octets elements.
void cfe_vec_G1_init | ( | cfe_vec_G1 * | v, |
size_t | size | ||
) |
Initializes a vector of ECP_BN254 elements of given size.
v | A pointer to an uninitialized cfe_vec_G1 vector |
size | Size of the vector |
void cfe_vec_G1_inf | ( | cfe_vec_G1 * | v | ) |
Sets all the values of a vector to the identity element.
v | A pointer to an initialized cfe_vec_G1 vector |
void cfe_vec_mul_G1 | ( | cfe_vec_G1 * | v, |
cfe_vec * | u | ||
) |
Creates a vector whose i-th element equals u[i] * g, where g is the generator of ECP_BN254. The sizes of v and u must match.
v | A pointer to an initialized cfe_vec_G1 vector |
u | A pointer to vector of integers |
void cfe_vec_mul_vec_G1 | ( | cfe_vec_G1 * | res, |
cfe_vec * | u, | ||
cfe_vec_G1 * | v | ||
) |
Creates a vector whose i-th element equals u[i] * v[i], where v[i] is an element in ECP_BN254. The sizes of res, v and u must match.
res | A pointer to an initialized cfe_vec_G1 vector, the result will be saved here |
u | A pointer to vector of integers |
v | A pointer to a cfe_vec_G1 vector |
void cfe_vec_G2_init | ( | cfe_vec_G2 * | v, |
size_t | size | ||
) |
Initializes a vector of ECP2_BN254 elements of given size.
v | A pointer to an uninitialized cfe_vec_G2 vector |
size | Size of the vector |
void cfe_vec_G2_inf | ( | cfe_vec_G2 * | v | ) |
Sets all the values of a vector to the identity element.
v | A pointer to an initialized cfe_vec_G2 vector |
void cfe_vec_mul_G2 | ( | cfe_vec_G2 * | v, |
cfe_vec * | u | ||
) |
Creates a vector whose i-th element equals u[i] * g, where g is the generator of ECP2_BN254. The sizes of v and u must match.
v | A pointer to an initialized cfe_vec_G2 vector |
u | A pointer to vector of integers. |
void cfe_vec_mul_vec_G2 | ( | cfe_vec_G2 * | res, |
cfe_vec * | u, | ||
cfe_vec_G2 * | v | ||
) |
Creates a vector whose i-th element equals u[i] * v[i], where v[i] is an element in ECP2_BN254. The sizes of res, v and u must match.
res | A pointer to an initialized cfe_vec_G2 vector, the result will be saved here |
u | A pointer to vector of integers |
v | A pointer to a cfe_vec_G2 vector |
void cfe_vec_GT_init | ( | cfe_vec_GT * | v, |
size_t | size | ||
) |
Initializes a vector of FP12_BN254 elements of given size.
v | A pointer to an uninitialized cfe_vec_GT vector |
size | Size of the vector |
void cfe_vec_GT_inf | ( | cfe_vec_GT * | v | ) |
Sets all the values of a vector to the identity element.
v | A pointer to an initialized cfe_vec_GT vector |
void cfe_vec_mul_GT | ( | cfe_vec_GT * | v, |
cfe_vec * | u | ||
) |
Creates a vector whose i-th element equals u[i] * g, where g is the generator of FP12_BN254. The sizes of v and u must match.
v | A pointer to an initialized cfe_vec_GT vector |
u | A pointer to vector of integers. |
void cfe_vec_G1_free | ( | cfe_vec_G1 * | v | ) |
Frees the memory occupied by the struct members. It does not free memory occupied by the struct itself.
v | A pointer to a vector (initialized cfe_vec_G1 struct) |
void cfe_vec_G2_free | ( | cfe_vec_G2 * | v | ) |
Frees the memory occupied by the struct members. It does not free memory occupied by the struct itself.
v | A pointer to a vector (initialized cfe_vec_G2 struct) |
void cfe_vec_GT_free | ( | cfe_vec_GT * | v | ) |
Frees the memory occupied by the struct members. It does not free memory occupied by the struct itself.
v | A pointer to a vector (initialized cfe_vec_GT struct) |
void cfe_vec_octet_init | ( | cfe_vec_octet * | v, |
size_t | size | ||
) |
Initializes a vector of octet elements of given size.
v | A pointer to an uninitialized cfe_vec_G1 vector |
size | Size of the vector |
void cfe_vec_octet_free | ( | cfe_vec_octet * | v | ) |
Frees the memory occupied by the struct members. It does not free memory occupied by the struct itself.
v | A pointer to a vector (initialized cfe_vec_octet struct) |