pub struct DfParams { /* private fields */ }Expand description
DF parameters (N̂, t, s₁, s₂) with optional fixed-base tables.
Implementations§
Source§impl DfParams
impl DfParams
pub fn new(modulus: Modulus, t: Residue, s1: Residue, s2: Residue) -> Self
pub fn modulus(&self) -> &Modulus
pub fn t(&self) -> &Residue
pub fn s1(&self) -> &Residue
pub fn s2(&self) -> &Residue
Sourcepub fn with_tables(self, max_bits: u32, window: u32) -> Self
pub fn with_tables(self, max_bits: u32, window: u32) -> Self
Builds comb tables for t, s₁, s₂ for exponents below 2^max_bits.
Sourcepub fn with_tables_sized(self, max_bits: [u32; 3], window: u32) -> Self
pub fn with_tables_sized(self, max_bits: [u32; 3], window: u32) -> Self
Like Self::with_tables with a separate exponent width per base: [t, s₁, s₂].
Sourcepub fn tables_size_bytes(&self) -> usize
pub fn tables_size_bytes(&self) -> usize
Memory held by precomputed tables, in bytes.
Sourcepub fn commit_ct(
&self,
a: &SBig,
b: &SBig,
r: &SBig,
bits: [u32; 3],
) -> Result<Residue>
pub fn commit_ct( &self, a: &SBig, b: &SBig, r: &SBig, bits: [u32; 3], ) -> Result<Residue>
s₁^{a} · s₂^{b} · t^{r} with secret exponents (prover side).
Auto Trait Implementations§
impl Freeze for DfParams
impl RefUnwindSafe for DfParams
impl Send for DfParams
impl Sync for DfParams
impl Unpin for DfParams
impl UnsafeUnpin for DfParams
impl UnwindSafe for DfParams
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
Mutably borrows from an owned value. Read more