pub struct SignaturePoly(pub Polynomial<FalconFelt>);Expand description
A polynomial used as the s2 component of the signature.
Tuple Fields§
§0: Polynomial<FalconFelt>Methods from Deref<Target = Polynomial<FalconFelt>>§
Sourcepub fn hadamard_mul(&self, other: &Polynomial<F>) -> Polynomial<F>
pub fn hadamard_mul(&self, other: &Polynomial<F>) -> Polynomial<F>
Multiplies two polynomials coefficient-wise (Hadamard multiplication).
Sourcepub fn hadamard_div(&self, other: &Polynomial<F>) -> Polynomial<F>
pub fn hadamard_div(&self, other: &Polynomial<F>) -> Polynomial<F>
Divides two polynomials coefficient-wise (Hadamard division).
Sourcepub fn hadamard_inv(&self) -> Polynomial<F>
pub fn hadamard_inv(&self) -> Polynomial<F>
Computes the coefficient-wise inverse (Hadamard inverse).
Sourcepub fn reduce_by_cyclotomic(&self, n: usize) -> Polynomial<F>
pub fn reduce_by_cyclotomic(&self, n: usize) -> Polynomial<F>
Reduce the polynomial by X^n + 1.
Sourcepub fn field_norm(&self) -> Polynomial<F>
pub fn field_norm(&self) -> Polynomial<F>
Computes the field norm of the polynomial as an element of the cyclotomic ring F[ X ] / <X^n + 1 > relative to one of half the size, i.e., F[ X ] / <X^(n/2) + 1> .
Corresponds to formula 3.25 in the spec [1, p.30].
Sourcepub fn lift_next_cyclotomic(&self) -> Polynomial<F>
pub fn lift_next_cyclotomic(&self) -> Polynomial<F>
Lifts an element from a cyclotomic polynomial ring to one of double the size.
Sourcepub fn galois_adjoint(&self) -> Polynomial<F>
pub fn galois_adjoint(&self) -> Polynomial<F>
Computes the galois adjoint of the polynomial in the cyclotomic ring F[ X ] / < X^n + 1 > , which corresponds to f(x^2).
Sourcepub fn karatsuba(&self, other: &Polynomial<F>) -> Polynomial<F>
pub fn karatsuba(&self, other: &Polynomial<F>) -> Polynomial<F>
Multiply two polynomials using Karatsuba’s divide-and-conquer algorithm.
Sourcepub fn shift(&self, shamt: usize) -> Polynomial<F>
pub fn shift(&self, shamt: usize) -> Polynomial<F>
Shifts the polynomial by the specified amount (adds leading zeros).
Sourcepub fn map<G, C>(&self, closure: C) -> Polynomial<G>
pub fn map<G, C>(&self, closure: C) -> Polynomial<G>
Applies a function to each coefficient and returns a new polynomial.
Sourcepub fn fold<G, C>(&self, initial_value: G, closure: C) -> G
pub fn fold<G, C>(&self, initial_value: G, closure: C) -> G
Folds the coefficients using the provided function and initial value.
Sourcepub fn norm_squared(&self) -> u64
pub fn norm_squared(&self) -> u64
Computes the squared L2 norm of the polynomial.
Sourcepub fn to_elements(&self) -> Vec<BaseElement>
pub fn to_elements(&self) -> Vec<BaseElement>
Returns the coefficients of this polynomial as field elements.
Trait Implementations§
Source§impl Clone for SignaturePoly
impl Clone for SignaturePoly
Source§fn clone(&self) -> SignaturePoly
fn clone(&self) -> SignaturePoly
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SignaturePoly
impl Debug for SignaturePoly
Source§impl Deref for SignaturePoly
impl Deref for SignaturePoly
Source§type Target = Polynomial<FalconFelt>
type Target = Polynomial<FalconFelt>
Source§impl Deserializable for SignaturePoly
impl Deserializable for SignaturePoly
Source§fn read_from<R>(source: &mut R) -> Result<SignaturePoly, DeserializationError>where
R: ByteReader,
fn read_from<R>(source: &mut R) -> Result<SignaturePoly, DeserializationError>where
R: ByteReader,
source, attempts to deserialize these bytes
into Self, and returns the result. Read moreSource§fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
Source§impl From<Polynomial<FalconFelt>> for SignaturePoly
impl From<Polynomial<FalconFelt>> for SignaturePoly
Source§fn from(pk_poly: Polynomial<FalconFelt>) -> SignaturePoly
fn from(pk_poly: Polynomial<FalconFelt>) -> SignaturePoly
Source§impl PartialEq for SignaturePoly
impl PartialEq for SignaturePoly
Source§impl Serializable for &SignaturePoly
impl Serializable for &SignaturePoly
Source§fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
self into bytes and writes these bytes into the target.