Enum winterfell::FieldExtension
[−]#[repr(u8)]
pub enum FieldExtension {
None,
Quadratic,
Cubic,
}
Expand description
Defines an extension field for the composition polynomial.
Choice of a field for a composition polynomial may impact proof soundness, and can also have a non-negligible impact on proof generation time and proof size. Specifically, for small fields, security offered by the base field itself may be inadequate or insufficient, and an extension of the base field may need to be used.
For example, if the size of base field is ~64-bits, a quadratic extension must be use to achieve ~100 bits of soundness, and a cubic extension must be used to achieve 128+ bits of soundness.
However, increasing extension degree will increase proof generation time and proof size by as much as 50%.
Variants
None
Composition polynomial is constructed in the base field.
Quadratic
Composition polynomial is constructed in the quadratic extension of the base field.
Cubic
Composition polynomial is constructed in the cubic extension of the base field.
Implementations
impl FieldExtension
impl FieldExtension
Trait Implementations
impl Clone for FieldExtension
impl Clone for FieldExtension
fn clone(&self) -> FieldExtension
fn clone(&self) -> FieldExtension
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for FieldExtension
impl Debug for FieldExtension
impl Deserializable for FieldExtension
impl Deserializable for FieldExtension
fn read_from<R>(source: &mut R) -> Result<FieldExtension, DeserializationError> where
R: ByteReader,
fn read_from<R>(source: &mut R) -> Result<FieldExtension, DeserializationError> where
R: ByteReader,
Reads a field extension enum from the specified source
.
fn read_batch_from<R>(
source: &mut R,
num_elements: usize
) -> Result<Vec<Self, Global>, DeserializationError> where
R: ByteReader,
fn read_batch_from<R>(
source: &mut R,
num_elements: usize
) -> Result<Vec<Self, Global>, DeserializationError> where
R: ByteReader,
Reads a sequence of bytes from the provided source
, attempts to deserialize these bytes
into a vector with the specified number of Self
elements, and returns the result. Read more
impl PartialEq<FieldExtension> for FieldExtension
impl PartialEq<FieldExtension> for FieldExtension
impl Serializable for FieldExtension
impl Serializable for FieldExtension
fn write_into<W>(&self, target: &mut W) where
W: ByteWriter,
fn write_into<W>(&self, target: &mut W) where
W: ByteWriter,
Serializes self
and writes the resulting bytes into the target
.
fn write_batch_into<W>(source: &[Self], target: &mut W) where
W: ByteWriter,
fn write_batch_into<W>(source: &[Self], target: &mut W) where
W: ByteWriter,
Serializes all elements of the source
and writes these bytes into the target
. Read more
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 Copy for FieldExtension
impl Eq for FieldExtension
impl StructuralEq for FieldExtension
impl StructuralPartialEq for FieldExtension
Auto Trait Implementations
impl RefUnwindSafe for FieldExtension
impl Send for FieldExtension
impl Sync for FieldExtension
impl Unpin for FieldExtension
impl UnwindSafe for FieldExtension
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more