pub struct Keypair {
pub p: BigInt,
pub q: BigInt,
}Expand description
Keypair from which encryption and decryption keys can be derived.
Fields§
§p: BigInt§q: BigIntImplementations§
Source§impl Keypair
impl Keypair
Sourcepub fn keys(&self) -> (EncryptionKey, DecryptionKey)
pub fn keys(&self) -> (EncryptionKey, DecryptionKey)
Generate default encryption and decryption keys.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Keypair
impl<'de> Deserialize<'de> for Keypair
Source§fn 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
Source§impl<'kp> From<&'kp Keypair> for DecryptionKey
impl<'kp> From<&'kp Keypair> for DecryptionKey
Source§fn from(keypair: &'kp Keypair) -> DecryptionKey
fn from(keypair: &'kp Keypair) -> DecryptionKey
Converts to this type from the input type.
Source§impl<'kp> From<&'kp Keypair> for EncryptionKey
impl<'kp> From<&'kp Keypair> for EncryptionKey
Source§impl<'kp> From<&'kp Keypair> for MinimalDecryptionKey
impl<'kp> From<&'kp Keypair> for MinimalDecryptionKey
Source§impl<'kp> From<&'kp Keypair> for MinimalEncryptionKey
impl<'kp> From<&'kp Keypair> for MinimalEncryptionKey
Source§impl KeyGeneration<Keypair> for Paillier
impl KeyGeneration<Keypair> for Paillier
Source§fn 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
Source§fn 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 Freeze for Keypair
impl RefUnwindSafe for Keypair
impl Send for Keypair
impl Sync for Keypair
impl Unpin for Keypair
impl UnwindSafe for Keypair
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