pub struct SignaturePoly(pub Polynomial<FalconFelt>);
Tuple Fields§
§0: Polynomial<FalconFelt>
Methods from Deref<Target = Polynomial<FalconFelt>>§
pub fn hadamard_mul(&self, other: &Self) -> Self
pub fn hadamard_div(&self, other: &Self) -> Self
pub fn hadamard_inv(&self) -> Self
pub fn degree(&self) -> Option<usize>
pub fn lc(&self) -> F
sourcepub fn reduce_by_cyclotomic(&self, n: usize) -> Self
pub fn reduce_by_cyclotomic(&self, n: usize) -> Self
Reduce the polynomial by X^n + 1.
sourcepub fn field_norm(&self) -> Self
pub fn field_norm(&self) -> Self
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) -> Self
pub fn lift_next_cyclotomic(&self) -> Self
Lifts an element from a cyclotomic polynomial ring to one of double the size.
sourcepub fn galois_adjoint(&self) -> Self
pub fn galois_adjoint(&self) -> Self
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: &Self) -> Self
pub fn karatsuba(&self, other: &Self) -> Self
Multiply two polynomials using Karatsuba’s divide-and-conquer algorithm.
pub fn shift(&self, shamt: usize) -> Self
pub fn map<G: Clone, C: FnMut(&F) -> G>(&self, closure: C) -> Polynomial<G>
pub fn fold<G, C: FnMut(G, &F) -> G + Clone>( &self, initial_value: G, closure: C, ) -> G
pub fn norm_squared(&self) -> u64
sourcepub fn to_elements(&self) -> Vec<Felt>
pub fn to_elements(&self) -> Vec<Felt>
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
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SignaturePoly
impl Debug for SignaturePoly
source§impl Deref for SignaturePoly
impl Deref for SignaturePoly
source§impl Deserializable for SignaturePoly
impl Deserializable for SignaturePoly
source§fn read_from<R: ByteReader>(
source: &mut R,
) -> Result<Self, DeserializationError>
fn read_from<R: ByteReader>( source: &mut R, ) -> Result<Self, DeserializationError>
Reads a sequence of bytes from the provided
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>) -> Self
fn from(pk_poly: Polynomial<FalconFelt>) -> Self
Converts to this type from the input type.
source§impl PartialEq for SignaturePoly
impl PartialEq for SignaturePoly
source§impl Serializable for &SignaturePoly
impl Serializable for &SignaturePoly
source§fn write_into<W: ByteWriter>(&self, target: &mut W)
fn write_into<W: ByteWriter>(&self, target: &mut W)
Serializes
self
into bytes and writes these bytes into the target
.source§fn get_size_hint(&self) -> usize
fn get_size_hint(&self) -> usize
Returns an estimate of how many bytes are needed to represent self. Read more
impl Eq for SignaturePoly
impl StructuralPartialEq for SignaturePoly
Auto Trait Implementations§
impl Freeze for SignaturePoly
impl RefUnwindSafe for SignaturePoly
impl Send for SignaturePoly
impl Sync for SignaturePoly
impl Unpin for SignaturePoly
impl UnwindSafe for SignaturePoly
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)