pub struct AjtaiScheme { /* private fields */ }
Expand description
Ajtai commitment scheme implementation with matrix-based operations
Implementations§
Source§impl AjtaiScheme
impl AjtaiScheme
pub fn new( norm_bound: Zq, random_matrix: RqMatrix, ) -> Result<Self, ParameterError>
Sourcepub fn commit(&self, witness: &RqVector) -> Result<RqVector, CommitError>
pub fn commit(&self, witness: &RqVector) -> Result<RqVector, CommitError>
Generates commitment and opening information with bounds checking
Sourcepub fn verify(
&self,
commitment: &RqVector,
opening: &RqVector,
) -> Result<(), VerificationError>
pub fn verify( &self, commitment: &RqVector, opening: &RqVector, ) -> Result<(), VerificationError>
Verifies commitment against opening information
Sourcepub fn norm_bound(&self) -> Zq
pub fn norm_bound(&self) -> Zq
Returns the norm bound
pub fn get_row_size(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AjtaiScheme
impl RefUnwindSafe for AjtaiScheme
impl Send for AjtaiScheme
impl Sync for AjtaiScheme
impl Unpin for AjtaiScheme
impl UnwindSafe for AjtaiScheme
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