Struct kzen_paillier::Keypair
source · Expand description
Keypair from which encryption and decryption keys can be derived.
Fields§
§p: BigInt
§q: BigInt
Implementations§
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).