CRS
Isogeny-based post-quantum Diffie-Hellman protocol.
|
#include "binary_trees.h"
Functions | |
void | fq_poly_bcell_init (fq_poly_bcell_t *b, const fq_ctx_t *F) |
void | fq_poly_bcell_set (fq_poly_bcell_t *b, fq_poly_t p) |
void | fq_poly_bcell_set_ (fq_poly_bcell_t *b, fq_poly_bcell_t *left, fq_poly_bcell_t *right, fq_poly_t p) |
int | fq_poly_bcell_set_right (fq_poly_bcell_t *b1, fq_poly_bcell_t *b2) |
int | fq_poly_bcell_set_left (fq_poly_bcell_t *b1, fq_poly_bcell_t *b2) |
void | fq_poly_bcell_clear (fq_poly_bcell_t *b) |
void | fq_poly_btree_init (fq_poly_btree_t *t, const fq_ctx_t *F) |
void | fq_poly_btree_set (fq_poly_btree_t *t, fq_poly_bcell_t *b) |
void | fq_poly_btree_clear (fq_poly_btree_t *t) |
void fq_poly_bcell_clear | ( | fq_poly_bcell_t * | b | ) |
Recursively clears the given bcell, releasing any memory used. It must be reinitialised in order to be used again.
void fq_poly_bcell_init | ( | fq_poly_bcell_t * | b, |
const fq_ctx_t * | F | ||
) |
Initializes b for use, with context F, and setting its childs to NULL. A corresponding call to fq_poly_bcell_clear() must be made after finishing with the fq_poly_bcell_t to free the memory used by the cell.
void fq_poly_bcell_set | ( | fq_poly_bcell_t * | b, |
fq_poly_t | p | ||
) |
Sets b to bcell with data p.
void fq_poly_bcell_set_ | ( | fq_poly_bcell_t * | b, |
fq_poly_bcell_t * | left, | ||
fq_poly_bcell_t * | right, | ||
fq_poly_t | p | ||
) |
Sets b to bcell with data p and childs left/right.
int fq_poly_bcell_set_left | ( | fq_poly_bcell_t * | b1, |
fq_poly_bcell_t * | b2 | ||
) |
Sets left child of b1 to b2. Returns -1 if b1 already has a left child.
int fq_poly_bcell_set_right | ( | fq_poly_bcell_t * | b1, |
fq_poly_bcell_t * | b2 | ||
) |
Sets right child of b1 to b2. Returns -1 if b1 already has a right child.
void fq_poly_btree_clear | ( | fq_poly_btree_t * | t | ) |
Recursively clears the given tree and its bcells, releasing any memory used. It must be reinitialised in order to be used again.
void fq_poly_btree_init | ( | fq_poly_btree_t * | t, |
const fq_ctx_t * | F | ||
) |
Initializes t for use, with context F. A corresponding call to fq_poly_btree_clear() must be made after finishing with the fq_poly_btree_t to free the memory used by the tree.
void fq_poly_btree_set | ( | fq_poly_btree_t * | t, |
fq_poly_bcell_t * | b | ||
) |
Sets t to tree with head bcell b. TODO: check ctx