miden_crypto::dsa::rpo_falcon512

Struct SignaturePoly

source
pub struct SignaturePoly(pub Polynomial<FalconFelt>);

Tuple Fields§

§0: Polynomial<FalconFelt>

Methods from Deref<Target = Polynomial<FalconFelt>>§

source

pub fn hadamard_mul(&self, other: &Self) -> Self

source

pub fn hadamard_div(&self, other: &Self) -> Self

source

pub fn hadamard_inv(&self) -> Self

source

pub fn degree(&self) -> Option<usize>

source

pub fn lc(&self) -> F

source

pub fn reduce_by_cyclotomic(&self, n: usize) -> Self

Reduce the polynomial by X^n + 1.

source

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].

source

pub fn lift_next_cyclotomic(&self) -> Self

Lifts an element from a cyclotomic polynomial ring to one of double the size.

source

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).

source

pub fn karatsuba(&self, other: &Self) -> Self

Multiply two polynomials using Karatsuba’s divide-and-conquer algorithm.

source

pub fn shift(&self, shamt: usize) -> Self

source

pub fn map<G: Clone, C: FnMut(&F) -> G>(&self, closure: C) -> Polynomial<G>

source

pub fn fold<G, C: FnMut(G, &F) -> G + Clone>( &self, initial_value: G, closure: C, ) -> G

source

pub fn norm_squared(&self) -> u64

source

pub fn to_elements(&self) -> Vec<Felt>

Returns the coefficients of this polynomial as field elements.

Trait Implementations§

source§

impl Clone for SignaturePoly

source§

fn clone(&self) -> SignaturePoly

Returns a copy of the value. Read more
1.6.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SignaturePoly

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Deref for SignaturePoly

source§

type Target = Polynomial<FalconFelt>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl Deserializable for SignaturePoly

source§

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 more
source§

fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>

Attempts to deserialize the provided bytes into Self and returns the result. Read more
source§

impl From<Polynomial<FalconFelt>> for SignaturePoly

source§

fn from(pk_poly: Polynomial<FalconFelt>) -> Self

Converts to this type from the input type.
source§

impl PartialEq for SignaturePoly

source§

fn eq(&self, other: &SignaturePoly) -> bool

Tests for self and other values to be equal, and is used by ==.
1.6.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serializable for &SignaturePoly

source§

fn write_into<W: ByteWriter>(&self, target: &mut W)

Serializes self into bytes and writes these bytes into the target.
source§

fn to_bytes(&self) -> Vec<u8>

Serializes self into a vector of bytes.
source§

fn get_size_hint(&self) -> usize

Returns an estimate of how many bytes are needed to represent self. Read more
source§

impl TryFrom<&[i16; 512]> for SignaturePoly

source§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(coefficients: &[i16; 512]) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl Eq for SignaturePoly

source§

impl StructuralPartialEq for SignaturePoly

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

source§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V