pub struct ServerSetupSecret { /* private fields */ }Expand description
Secret output of the server setup. Zeroized on drop (the key zeroizes itself).
Implementations§
Source§impl ServerSetupSecret
impl ServerSetupSecret
pub fn paillier_sk(&self) -> &PaillierSk
Sourcepub fn export_secret(&self, params: &Params) -> Result<Zeroizing<Vec<u8>>>
pub fn export_secret(&self, params: &Params) -> Result<Zeroizing<Vec<u8>>>
Explicit export for a SecretStore: version ‖ p ‖ q, each n_rsa/16 bytes.
Sourcepub fn import_secret(bytes: &[u8], data: &SetupData) -> Result<Self>
pub fn import_secret(bytes: &[u8], data: &SetupData) -> Result<Self>
Restores the secret exported by Self::export_secret; rejects it unless p·q is the
Paillier modulus N of data, so a secret cannot be paired with a foreign setup.
Trait Implementations§
Source§impl Debug for ServerSetupSecret
impl Debug for ServerSetupSecret
Source§impl Drop for ServerSetupSecret
impl Drop for ServerSetupSecret
Auto Trait Implementations§
impl Freeze for ServerSetupSecret
impl RefUnwindSafe for ServerSetupSecret
impl Send for ServerSetupSecret
impl Sync for ServerSetupSecret
impl Unpin for ServerSetupSecret
impl UnsafeUnpin for ServerSetupSecret
impl UnwindSafe for ServerSetupSecret
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