pub struct ThresholdDecryption {
pub threshold: usize,
pub total_parties: usize,
/* private fields */
}Expand description
Threshold Decryption - Multi-party decryption
Fields§
§threshold: usizeThreshold (minimum parties needed)
total_parties: usizeTotal parties
Implementations§
Source§impl ThresholdDecryption
impl ThresholdDecryption
Sourcepub fn new(threshold: usize, total_parties: usize) -> Result<Self, FheError>
pub fn new(threshold: usize, total_parties: usize) -> Result<Self, FheError>
Create threshold decryption setup
Generate shares for all parties
Sourcepub fn add_partial_decryption(
&mut self,
partial: PartialDecryption,
) -> Result<(), FheError>
pub fn add_partial_decryption( &mut self, partial: PartialDecryption, ) -> Result<(), FheError>
Add partial decryption from a party
Sourcepub fn can_decrypt(&self) -> bool
pub fn can_decrypt(&self) -> bool
Check if we have enough shares to decrypt
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ThresholdDecryption
impl RefUnwindSafe for ThresholdDecryption
impl Send for ThresholdDecryption
impl Sync for ThresholdDecryption
impl Unpin for ThresholdDecryption
impl UnwindSafe for ThresholdDecryption
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