CRS
Isogeny-based post-quantum Diffie-Hellman protocol.
|
#include <gmp.h>
#include <flint/fmpz.h>
#include <flint/fq.h>
#include <flint/fq_poly.h>
Go to the source code of this file.
Classes | |
struct | fq_poly_bcell_t |
struct | fq_poly_btree_t |
Typedefs | |
typedef struct fq_poly_bcell_t | fq_poly_bcell_t |
typedef struct fq_poly_btree_t | fq_poly_btree_t |
Functions | |
void | fq_poly_bcell_init (fq_poly_bcell_t *, const fq_ctx_t *) |
void | fq_poly_bcell_set (fq_poly_bcell_t *, fq_poly_t) |
void | fq_poly_bcell_set_ (fq_poly_bcell_t *, fq_poly_bcell_t *, fq_poly_bcell_t *, fq_poly_t) |
int | fq_poly_bcell_set_right (fq_poly_bcell_t *, fq_poly_bcell_t *) |
int | fq_poly_bcell_set_left (fq_poly_bcell_t *, fq_poly_bcell_t *) |
void | fq_poly_bcell_clear (fq_poly_bcell_t *) |
void | fq_poly_btree_init (fq_poly_btree_t *, const fq_ctx_t *) |
void | fq_poly_btree_set (fq_poly_btree_t *, fq_poly_bcell_t *) |
void | fq_poly_btree_clear (fq_poly_btree_t *) |
typedef struct fq_poly_bcell_t fq_poly_bcell_t |
Representation of binary links with fq_poly as nodes.
typedef struct fq_poly_btree_t fq_poly_btree_t |
Representation of binary tree with fq_poly_bcell_t nodes.
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