Skip to main content

ps_ecc/polynomial/
mod.rs

1mod constants;
2mod implementations;
3mod methods;
4
5use constants::POLYNOMIAL_MAX_COEFFICIENTS;
6
7/// A polynomial over GF(256) with at most 255 coefficients.
8///
9/// Coefficients are stored from degree 0 upward in a fixed stack-allocated
10/// array, so the type is `Copy` and never allocates.
11#[derive(Clone, Copy, Eq)]
12pub struct Polynomial {
13    coefficients: [u8; POLYNOMIAL_MAX_COEFFICIENTS],
14    degree: u8,
15}