pub struct SystemParams {
pub l_skip: usize,
pub n_stack: usize,
pub w_stack: usize,
pub log_blowup: usize,
pub whir: WhirConfig,
pub logup: LogUpSecurityParameters,
pub max_constraint_degree: usize,
}Fields§
§l_skip: usize§n_stack: usize§w_stack: usizeMaximum number of stacked polynomials (i.e. stacked matrix width). This implies a max
stacked cell count of w_stack * 2^(n_stack + l_skip).
log_blowup: usize-log_2 of the rate for the initial Reed-Solomon code.
whir: WhirConfig§logup: LogUpSecurityParameters§max_constraint_degree: usizeGlobal max constraint degree enforced across all AIR and Interaction constraints
Implementations§
Source§impl SystemParams
impl SystemParams
Sourcepub fn new_for_testing(log_trace_height: usize) -> Self
pub fn new_for_testing(log_trace_height: usize) -> Self
Parameters for testing traces of height up to 2^log_trace_height with toy security
parameters for faster testing.
These parameters should not be used in production!
Source§impl SystemParams
impl SystemParams
pub fn whir(&self) -> &WhirConfig
Source§impl SystemParams
impl SystemParams
pub fn logup_pow_bits(&self) -> usize
pub fn k_whir(&self) -> usize
pub fn log_stacked_height(&self) -> usize
pub fn log_final_poly_len(&self) -> usize
pub fn num_whir_rounds(&self) -> usize
pub fn num_whir_sumcheck_rounds(&self) -> usize
Sourcepub fn new(
log_blowup: usize,
l_skip: usize,
n_stack: usize,
w_stack: usize,
log_final_poly_len: usize,
folding_pow_bits: usize,
mu_pow_bits: usize,
proximity: WhirProximityStrategy,
security_bits: usize,
logup: LogUpSecurityParameters,
max_constraint_degree: usize,
whir_query_phase_pow_bits: usize,
k_whir: usize,
) -> SystemParams
pub fn new( log_blowup: usize, l_skip: usize, n_stack: usize, w_stack: usize, log_final_poly_len: usize, folding_pow_bits: usize, mu_pow_bits: usize, proximity: WhirProximityStrategy, security_bits: usize, logup: LogUpSecurityParameters, max_constraint_degree: usize, whir_query_phase_pow_bits: usize, k_whir: usize, ) -> SystemParams
Constructor with many configuration options. Only k_whir, max_constraint_degree,
query_phase_pow_bits are preset with constants.
The security_bits is the target bits of security. It is used to select the number of WHIR
queries, but does not guarantee the target security level is achieved by the overall
protocol using these parameters. Use the soundness calculator to ensure the target security
level is met.
This function should only be used for internal cryptography libraries. Most users should instead use preset parameters provided in SDKs.
Trait Implementations§
Source§impl Clone for SystemParams
impl Clone for SystemParams
Source§fn clone(&self) -> SystemParams
fn clone(&self) -> SystemParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SystemParams
impl Debug for SystemParams
Source§impl<'de> Deserialize<'de> for SystemParams
impl<'de> Deserialize<'de> for SystemParams
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 SystemParams
Source§impl PartialEq for SystemParams
impl PartialEq for SystemParams
Source§impl Serialize for SystemParams
impl Serialize for SystemParams
impl StructuralPartialEq for SystemParams
Auto Trait Implementations§
impl Freeze for SystemParams
impl RefUnwindSafe for SystemParams
impl Send for SystemParams
impl Sync for SystemParams
impl Unpin for SystemParams
impl UnsafeUnpin for SystemParams
impl UnwindSafe for SystemParams
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