Expand description
Keypair from which encryption and decryption keys can be derived.
Fields
p: BigInt
q: BigInt
Implementations
sourceimpl Keypair
impl Keypair
sourcepub fn keys(&self) -> (EncryptionKey, DecryptionKey)
pub fn keys(&self) -> (EncryptionKey, DecryptionKey)
Generate default encryption and decryption keys.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Keypair
impl<'de> Deserialize<'de> for Keypair
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<'kp> From<&'kp Keypair> for DecryptionKey
impl<'kp> From<&'kp Keypair> for DecryptionKey
sourcefn from(keypair: &'kp Keypair) -> DecryptionKey
fn from(keypair: &'kp Keypair) -> DecryptionKey
Converts to this type from the input type.
sourceimpl<'kp> From<&'kp Keypair> for EncryptionKey
impl<'kp> From<&'kp Keypair> for EncryptionKey
sourceimpl<'kp> From<&'kp Keypair> for MinimalDecryptionKey
impl<'kp> From<&'kp Keypair> for MinimalDecryptionKey
sourceimpl<'kp> From<&'kp Keypair> for MinimalEncryptionKey
impl<'kp> From<&'kp Keypair> for MinimalEncryptionKey
sourceimpl KeyGeneration<Keypair> for Paillier
impl KeyGeneration<Keypair> for Paillier
sourcefn keypair_with_modulus_size(bit_length: usize) -> Keypair
fn keypair_with_modulus_size(bit_length: usize) -> Keypair
Generate fresh key pair with security level specified as the
bit_length
of the modulus. Read morefn keypair_safe_primes_with_modulus_size(bit_length: usize) -> Keypair
sourcefn keypair() -> KP
fn keypair() -> KP
Generate fresh key pair with currently recommended security level (2048 bit modulus).
fn keypair_safe_primes() -> KP
impl StructuralPartialEq for Keypair
Auto Trait Implementations
impl RefUnwindSafe for Keypair
impl Send for Keypair
impl Sync for Keypair
impl Unpin for Keypair
impl UnwindSafe for Keypair
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more