MPHELL  5.0.0
Data Fields
amns Struct Reference

Define a AMNS. More...

#include <mphell-amns.h>

Data Fields

number p
 
uint16_t p_size
 
amns_elt E
 
uint8_t k
 
number gamma
 
uint16_t gamma_size
 
uint8_t n
 
uint8_t rho
 
amns_block max_digit
 
amns_block min_digit
 
amns_block max_digit_delta
 
amns_block min_digit_delta
 
uint8_t amns_block_size
 
amns_llong max_amns_block
 
amns_block lambda
 
uint8_t lambda_bit
 
bool lambda_sign
 
uint8_t nb_add_max
 
amns_eltMti
 
amns_eltMtiprime
 
amns_eltTi
 
number * gi
 
amns_elt pool_1 [POOL_SIZE_AMNS]
 
uint8_t i_1
 
void(* amns_elt_mul )(amns_elt_ptr, amns_elt_srcptr, amns_elt_srcptr, const struct amns *)
 
void(* amns_elt_sqr )(amns_elt_ptr, amns_elt_srcptr, const struct amns *)
 
void(* amns_elt_add )(amns_elt_ptr, amns_elt_srcptr, amns_elt_srcptr, const struct amns *)
 
void(* amns_elt_sub )(amns_elt_ptr, amns_elt_srcptr, amns_elt_srcptr, const struct amns *)
 
void(* amns_elt_neg )(amns_elt_ptr, amns_elt_srcptr, const struct amns *)
 
void(* amns_internal_red )(amns_elt_ptr, amns_llong *, const struct amns *)
 
bool(* amns_elt_is_reduced )(amns_elt_srcptr, const struct amns *)
 

Detailed Description

Define a AMNS.

Definition at line 80 of file mphell-amns.h.

Field Documentation

◆ amns_block_size

uint8_t amns_block_size

Size in bits of the amns_block

Definition at line 94 of file mphell-amns.h.

◆ E

External reduction polynomial, E = X^n + alpha_k.X^k + alpha_1.X + alpha_0 ; k <= n/2

Definition at line 84 of file mphell-amns.h.

◆ gamma

number gamma

Root of the reduction polynomial E

Definition at line 86 of file mphell-amns.h.

◆ gamma_size

uint16_t gamma_size

Size in bits of gamma

Definition at line 87 of file mphell-amns.h.

◆ gi

number* gi

gi[i]=gamma^i mod p, used for conversion AMNS -> Binary

Definition at line 107 of file mphell-amns.h.

◆ i_1

uint8_t i_1

Index for pool 1

Definition at line 110 of file mphell-amns.h.

◆ k

uint8_t k

k <= n/2; indice of the last non zero term of E before X^n

Definition at line 85 of file mphell-amns.h.

◆ lambda

amns_block lambda

Define the AMNS reduction polynomial E = X^n - lambda

Definition at line 97 of file mphell-amns.h.

◆ lambda_bit

uint8_t lambda_bit

If lambda = 2^l, then lambda_bit = l

Definition at line 98 of file mphell-amns.h.

◆ lambda_sign

bool lambda_sign

True if lambda > 0, false otherwise

Definition at line 99 of file mphell-amns.h.

◆ max_amns_block

amns_llong max_amns_block

Biggest interger that can be represented by a amns_block (2^63-1 for int64_t, 2^53 for double, ...)

Definition at line 95 of file mphell-amns.h.

◆ max_digit

amns_block max_digit

2^rho

Definition at line 90 of file mphell-amns.h.

◆ max_digit_delta

amns_block max_digit_delta

nb_add_max * 2^rho = maximum size of coeff before a multiplication

Definition at line 92 of file mphell-amns.h.

◆ min_digit

amns_block min_digit

-2^rho

Definition at line 91 of file mphell-amns.h.

◆ min_digit_delta

amns_block min_digit_delta

-nb_add_max * 2^rho = minimum size of coeff before a multiplication

Definition at line 93 of file mphell-amns.h.

◆ Mti

amns_elt* Mti

Internal reduction polynomials with precalculated multiplication by lambda

Definition at line 103 of file mphell-amns.h.

◆ Mtiprime

amns_elt* Mtiprime

-M^(-1) mod(E, phi) with precalculated multiplication by lambda

Definition at line 104 of file mphell-amns.h.

◆ n

uint8_t n

Degree of the external reduction polynomial E

Definition at line 88 of file mphell-amns.h.

◆ nb_add_max

uint8_t nb_add_max

Maximum number of addition / substraction in between multiplication without to call a costly internal reduction

Definition at line 101 of file mphell-amns.h.

◆ p

number p

Prime number, define the finite field Fp

Definition at line 82 of file mphell-amns.h.

◆ p_size

uint16_t p_size

Size in bits of p

Definition at line 83 of file mphell-amns.h.

◆ pool_1

amns_elt pool_1[POOL_SIZE_AMNS]

Pool of already initialised amns element to accelerate amns operations, use when STACK_1 is specified

Definition at line 109 of file mphell-amns.h.

◆ rho

uint8_t rho

The digits a_i of the AMNS element are |a_i| < 2^rho

Definition at line 89 of file mphell-amns.h.

◆ Ti

amns_elt* Ti

Polynomial representation of 2^(rho.i) * phi^2; 0 <= i < n : Ti(gamma) = 2^(rho.i)*phi^2

Definition at line 106 of file mphell-amns.h.


The documentation for this struct was generated from the following file: