#include <stdio.h>#include <stdlib.h>#include <string.h>#include "gf.h"#include "poly.h"

Go to the source code of this file.
Functions | |
| poly_t | poly_alloc (int d) |
| poly_t | poly_alloc_from_string (int d, const unsigned char *s) |
| poly_t | poly_copy (poly_t p) |
| void | poly_free (poly_t p) |
| void | poly_set_to_zero (poly_t p) |
| int | poly_calcule_deg (poly_t p) |
| void | poly_set (poly_t p, poly_t q) |
| gf_t | poly_eval_aux (gf_t *coeff, gf_t a, int d) |
| poly_t | poly_mul (poly_t p, poly_t q) |
| gf_t | poly_eval (poly_t p, gf_t a) |
| void | poly_rem (poly_t p, poly_t g) |
| void | poly_sqmod_init (poly_t g, poly_t *sq) |
| void | poly_sqmod (poly_t res, poly_t p, poly_t *sq, int d) |
| poly_t | poly_gcd_aux (poly_t p1, poly_t p2) |
| poly_t | poly_gcd (poly_t p1, poly_t p2) |
| poly_t | poly_quo (poly_t p, poly_t d) |
| int | poly_degppf (poly_t g) |
| void | poly_eeaux (poly_t *u, poly_t *v, poly_t p, poly_t g, int t) |
| poly_t | poly_randgen_irred (int t, int(*u8rnd)()) |
| void | poly_shiftmod (poly_t p, poly_t g) |
| poly_t * | poly_sqrtmod_init (poly_t g) |
| poly_t * | poly_syndrome_init (poly_t generator, gf_t *support, int n) |
| poly_t poly_alloc | ( | int | d | ) |
Definition at line 32 of file poly.c.
References polynome::coeff, polynome::deg, and polynome::size.
Referenced by decode(), poly_degppf(), poly_eeaux(), poly_mul(), poly_quo(), poly_randgen_irred(), poly_sqrtmod_init(), poly_syndrome_init(), roots_berl(), roots_berl_aux(), and syndrome().
| poly_t poly_alloc_from_string | ( | int | d, | |
| const unsigned char * | s | |||
| ) |
Definition at line 43 of file poly.c.
References polynome::coeff, polynome::deg, and polynome::size.
Referenced by sk_from_string().
| int poly_calcule_deg | ( | poly_t | p | ) |
Definition at line 74 of file poly.c.
References polynome::coeff, polynome::deg, gf_zero, and polynome::size.
Referenced by decode(), poly_degppf(), poly_mul(), poly_quo(), poly_set(), poly_sqrtmod_init(), roots_berl(), roots_berl_aux(), and syndrome().
Definition at line 53 of file poly.c.
References polynome::coeff, polynome::deg, and polynome::size.
Referenced by poly_gcd(), and poly_quo().
| int poly_degppf | ( | poly_t | g | ) |
Definition at line 251 of file poly.c.
References gf_extd, gf_unit, poly_addto_coeff, poly_alloc(), poly_calcule_deg(), poly_deg, poly_free(), poly_gcd(), poly_set_coeff, poly_set_deg, poly_sqmod(), and poly_sqmod_init().
Referenced by poly_randgen_irred().

Definition at line 299 of file poly.c.
References aux, gf_div, gf_mul_fast, gf_unit, gf_zero, poly_addto_coeff, poly_alloc(), poly_coeff, poly_deg, poly_free(), poly_set(), poly_set_coeff, poly_set_deg, and poly_set_to_zero().
Referenced by decode().

Definition at line 125 of file poly.c.
References polynome::coeff, poly_deg, and poly_eval_aux().
Referenced by key_genmat().

| void poly_free | ( | poly_t | p | ) |
Definition at line 64 of file poly.c.
References polynome::coeff.
Referenced by decode(), keypair(), poly_degppf(), poly_eeaux(), poly_gcd(), poly_quo(), poly_sqrtmod_init(), roots_berl(), and roots_berl_aux().
Definition at line 211 of file poly.c.
References poly_copy(), poly_deg, poly_free(), and poly_gcd_aux().
Referenced by poly_degppf(), and roots_berl_aux().

Definition at line 202 of file poly.c.
References poly_deg, and poly_rem().
Referenced by poly_gcd().

Definition at line 108 of file poly.c.
References gf_mul, poly_addto_coeff, poly_alloc(), poly_calcule_deg(), poly_coeff, and poly_deg.

Definition at line 225 of file poly.c.
References gf_inv, gf_mul_fast, gf_zero, poly_addto_coeff, poly_alloc(), poly_calcule_deg(), poly_coeff, poly_copy(), poly_free(), poly_set_coeff, and poly_set_deg.
Referenced by roots_berl_aux().

| poly_t poly_randgen_irred | ( | int | t, | |
| int(*)() | u8rnd | |||
| ) |
Definition at line 365 of file poly.c.
References g, gf_rand(), gf_unit, poly_alloc(), poly_degppf(), poly_set_coeff, poly_set_deg, and u8rnd().
Referenced by keypair().

Definition at line 130 of file poly.c.
References gf_inv, gf_mul_fast, gf_zero, poly_addto_coeff, poly_coeff, poly_deg, poly_set_coeff, poly_set_deg, and poly_tete.
Referenced by poly_gcd_aux(), and poly_sqmod_init().
Definition at line 83 of file poly.c.
References polynome::coeff, polynome::deg, poly_calcule_deg(), and polynome::size.
Referenced by poly_eeaux(), and poly_sqrtmod_init().

| void poly_set_to_zero | ( | poly_t | p | ) |
Definition at line 69 of file poly.c.
References polynome::coeff, polynome::deg, and polynome::size.
Referenced by poly_eeaux(), poly_sqmod(), poly_sqmod_init(), and poly_sqrtmod_init().
Definition at line 385 of file poly.c.
References polynome::coeff, gf_add, gf_div, gf_mul, and poly_deg.
Referenced by poly_sqrtmod_init().
Definition at line 176 of file poly.c.
References gf_mul_fast, gf_square, gf_zero, poly_addto_coeff, poly_coeff, poly_deg, poly_set_coeff, poly_set_deg, and poly_set_to_zero().
Referenced by poly_degppf(), poly_sqrtmod_init(), and roots_berl().

Definition at line 151 of file poly.c.
References gf_unit, poly_deg, poly_rem(), poly_set_coeff, poly_set_deg, and poly_set_to_zero().
Referenced by poly_degppf(), poly_sqrtmod_init(), and roots_berl().

Definition at line 396 of file poly.c.
References aux, polynome::coeff, polynome::deg, gf_extd, gf_unit, poly_alloc(), poly_calcule_deg(), poly_deg, poly_free(), poly_set(), poly_set_coeff, poly_set_deg, poly_set_to_zero(), poly_shiftmod(), poly_sqmod(), and poly_sqmod_init().
Referenced by keypair().

Definition at line 448 of file poly.c.
References gf_add, gf_div, gf_mul, gf_unit, poly_alloc(), poly_coeff, poly_deg, and poly_set_coeff.
Referenced by keypair().
