pub struct CommonRandomPoly { /* private fields */ }Expand description
A polynomial sampled from a random common reference string.
Implementations§
Source§impl CommonRandomPoly
impl CommonRandomPoly
Sourcepub fn new<R: RngCore + CryptoRng>(
par: &Arc<BfvParameters>,
rng: &mut R,
) -> Result<Self>
pub fn new<R: RngCore + CryptoRng>( par: &Arc<BfvParameters>, rng: &mut R, ) -> Result<Self>
Generate a new random CRP.
Sourcepub fn new_vec<R: RngCore + CryptoRng>(
par: &Arc<BfvParameters>,
rng: &mut R,
) -> Result<Vec<Self>>
pub fn new_vec<R: RngCore + CryptoRng>( par: &Arc<BfvParameters>, rng: &mut R, ) -> Result<Vec<Self>>
Generate a new random CRP vector.
The size of the vector is equal to the number of ciphertext moduli, as required for the relinearization key generation protocol.
Sourcepub fn new_leveled<R: RngCore + CryptoRng>(
par: &Arc<BfvParameters>,
level: usize,
rng: &mut R,
) -> Result<Self>
pub fn new_leveled<R: RngCore + CryptoRng>( par: &Arc<BfvParameters>, level: usize, rng: &mut R, ) -> Result<Self>
Generate a new random leveled CRP.
Trait Implementations§
Source§impl Clone for CommonRandomPoly
impl Clone for CommonRandomPoly
Source§fn clone(&self) -> CommonRandomPoly
fn clone(&self) -> CommonRandomPoly
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CommonRandomPoly
impl Debug for CommonRandomPoly
Source§impl PartialEq for CommonRandomPoly
impl PartialEq for CommonRandomPoly
impl Eq for CommonRandomPoly
impl StructuralPartialEq for CommonRandomPoly
Auto Trait Implementations§
impl Freeze for CommonRandomPoly
impl RefUnwindSafe for CommonRandomPoly
impl Send for CommonRandomPoly
impl Sync for CommonRandomPoly
impl Unpin for CommonRandomPoly
impl UnwindSafe for CommonRandomPoly
Blanket Implementations§
Source§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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