pub struct WhirParams {
pub k: usize,
pub log_final_poly_len: usize,
pub query_phase_pow_bits: usize,
pub proximity: WhirProximityStrategy,
pub folding_pow_bits: usize,
pub mu_pow_bits: usize,
}Expand description
Configurable parameters that are used to determine the WhirConfig for a target security level.
The *_pow_bits fields set proof-of-work grinding difficulty in bits, i.e. hash evaluations.
The security those bits provide depends on the cost of the grinding hash (the transcript hash):
cheaper hashes make each grinding attempt cheaper for an attacker. When changing the
configuration—especially the hash function—revisit the PoW difficulty so it still meets the
intended security against an attacker grinding with that hash. See crate::soundness.
Fields§
§k: usize§log_final_poly_len: usizeWHIR rounds will stop as soon as log2 of the final polynomial length is <= log_final_poly_len.
query_phase_pow_bits: usize§proximity: WhirProximityStrategyProximity regime to use within each WHIR round. This is used to determine the number of queries in each round for a target security level.
folding_pow_bits: usizeNumber of bits of grinding to increase security of each folding step.
mu_pow_bits: usizeNumber of bits of grinding before sampling the μ batching challenge.
Trait Implementations§
Source§impl Clone for WhirParams
impl Clone for WhirParams
Source§fn clone(&self) -> WhirParams
fn clone(&self) -> WhirParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for WhirParams
Source§impl Debug for WhirParams
impl Debug for WhirParams
Source§impl<'de> Deserialize<'de> for WhirParams
impl<'de> Deserialize<'de> for WhirParams
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for WhirParams
Source§impl PartialEq for WhirParams
impl PartialEq for WhirParams
Source§impl Serialize for WhirParams
impl Serialize for WhirParams
impl StructuralPartialEq for WhirParams
Auto Trait Implementations§
impl Freeze for WhirParams
impl RefUnwindSafe for WhirParams
impl Send for WhirParams
impl Sync for WhirParams
impl Unpin for WhirParams
impl UnsafeUnpin for WhirParams
impl UnwindSafe for WhirParams
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more