Skip to main content

Params

Struct Params 

Source
pub struct Params {
Show 14 fields pub id: ParamsId, pub kappa: u32, pub ell: u32, pub nu: u32, pub nu_leak: u32, pub n_rsa: u32, pub n_client: u32, pub r_mod: u32, pub r_df: u32, pub r_df_star: u32, pub ell0: u32, pub n_t_rho: u32, pub tough_count: u32, pub tough_bits: u32,
}
Expand description

Parameter profile. All sizes are in bits unless noted.

Fields§

§id: ParamsId§kappa: u32

Group order size κ.

§ell: u32

Soundness ℓ.

§nu: u32

Statistical noise ν.

§nu_leak: u32

Noise against subgroup leakage ν_leak.

§n_rsa: u32

Paillier / DF modulus size of the server.

§n_client: u32

Ephemeral DF modulus size of the client.

§r_mod: u32

Repetitions of Π_mod.

§r_df: u32

Repetitions of Π_df.

§r_df_star: u32

Repetitions of Π_df*.

§ell0: u32

Challenge size of Π_df* in bits (open question, spec §5).

§n_t_rho: u32

Randomness range of a DF commitment, n_tρ.

§tough_count: u32

Number of small primes in (p−1)/2 for tough primes.

§tough_bits: u32

Bit size of each small prime in tough primes.

Implementations§

Source§

impl Params

Source

pub const fn eps(&self) -> u32

Slack ε = ℓ + ν.

Source

pub const fn n_x(&self) -> u32

Range of x₂′: κ + ν_leak.

Source

pub const fn n_lambda(&self) -> u32

Range of β: 2ℓ + ν_leak.

Source

pub const fn n_b(&self) -> u32

Range of v: κ + ℓ + ν.

Source

pub const fn n_a(&self) -> u32

Range of u: n_x + ε + n_b + ν.

Source

pub const fn n_lambda0(&self) -> u32

Range of λ₀: n_λ + ε + n_b + ν.

Source

pub const fn is_consistent(&self) -> bool

Checks internal consistency of a profile.

Trait Implementations§

Source§

impl Clone for Params

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for Params

Source§

impl Debug for Params

Source§

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

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

impl Eq for Params

Source§

impl PartialEq for Params

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Params

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, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.