Enum miden_air::FieldExtension
source · #[repr(u8)]pub enum FieldExtension {
None = 1,
Quadratic = 2,
Cubic = 3,
}
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 = 1
Composition polynomial is constructed in the base field.
Quadratic = 2
Composition polynomial is constructed in the quadratic extension of the base field.
Cubic = 3
Composition polynomial is constructed in the cubic extension of the base field.
Implementations§
Trait Implementations§
source§impl Clone for FieldExtension
impl Clone for FieldExtension
source§fn clone(&self) -> FieldExtension
fn clone(&self) -> FieldExtension
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for FieldExtension
impl Debug for FieldExtension
source§impl Deserializable for FieldExtension
impl Deserializable for FieldExtension
source§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
.
source§fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
source§impl PartialEq for FieldExtension
impl PartialEq for FieldExtension
source§fn eq(&self, other: &FieldExtension) -> bool
fn eq(&self, other: &FieldExtension) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serializable for FieldExtension
impl Serializable for FieldExtension
source§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
.
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.