libtc  20160415
Threshold Cryptography functions library
Classes | Typedefs | Functions
mathutils.h File Reference
#include <gmp.h>

Go to the source code of this file.

Classes

struct  poly
 

Typedefs

typedef void(* random_fn) (mpz_t rop, int bit_len)
 
typedef struct poly poly_t
 

Functions

void random_dev (mpz_t rop, int bit_len)
 
void random_prime (mpz_t rop, int bit_len, random_fn random)
 
poly_tcreate_random_poly (mpz_t d, size_t size, mpz_t m)
 
void clear_poly (poly_t *poly)
 
void poly_eval (mpz_t rop, poly_t *poly, mpz_t op)
 
void poly_eval_ui (mpz_t rop, poly_t *poly, unsigned long op)
 

Typedef Documentation

typedef struct poly poly_t
typedef void(* random_fn) (mpz_t rop, int bit_len)

Definition at line 6 of file mathutils.h.

Function Documentation

void clear_poly ( poly_t poly)

Definition at line 35 of file poly.c.

poly_t* create_random_poly ( mpz_t  d,
size_t  size,
mpz_t  m 
)

GMP-based polynomial library

Definition at line 9 of file poly.c.

void poly_eval ( mpz_t  rop,
poly_t poly,
mpz_t  op 
)

Definition at line 49 of file poly.c.

void poly_eval_ui ( mpz_t  rop,
poly_t poly,
unsigned long  op 
)

Definition at line 70 of file poly.c.

void random_dev ( mpz_t  rop,
int  bit_len 
)

Definition at line 8 of file random.c.

void random_prime ( mpz_t  rop,
int  bit_len,
random_fn  random 
)

Definition at line 26 of file random.c.