pub struct DecryptionKey {
pub p: BigInt,
pub q: BigInt,
}Expand description
Private decryption key.
Fields§
§p: BigInt§q: BigIntTrait Implementations§
Source§impl Clone for DecryptionKey
impl Clone for DecryptionKey
Source§fn clone(&self) -> DecryptionKey
fn clone(&self) -> DecryptionKey
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DecryptionKey
impl Debug for DecryptionKey
Source§impl<'c, 'm> Decrypt<DecryptionKey, &'c RawCiphertext<'c>, RawPlaintext<'m>> for Paillier
TODO
impl<'c, 'm> Decrypt<DecryptionKey, &'c RawCiphertext<'c>, RawPlaintext<'m>> for Paillier
TODO
Efficient decryption using CRT based on Paillier99, section 7
Source§fn decrypt(dk: &DecryptionKey, c: &'c RawCiphertext<'c>) -> RawPlaintext<'m>
fn decrypt(dk: &DecryptionKey, c: &'c RawCiphertext<'c>) -> RawPlaintext<'m>
Decrypt ciphertext
c using key dk into a plaintext.Source§impl<'c, 'm> Decrypt<DecryptionKey, RawCiphertext<'c>, RawPlaintext<'m>> for Paillier
TODO
impl<'c, 'm> Decrypt<DecryptionKey, RawCiphertext<'c>, RawPlaintext<'m>> for Paillier
TODO
Efficient decryption using CRT based on Paillier99, section 7
Source§fn decrypt(dk: &DecryptionKey, c: RawCiphertext<'c>) -> RawPlaintext<'m>
fn decrypt(dk: &DecryptionKey, c: RawCiphertext<'c>) -> RawPlaintext<'m>
Decrypt ciphertext
c using key dk into a plaintext.Source§impl<'de> Deserialize<'de> for DecryptionKey
impl<'de> Deserialize<'de> for DecryptionKey
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'m, 'd> Encrypt<DecryptionKey, RawPlaintext<'m>, RawCiphertext<'d>> for Paillier
impl<'m, 'd> Encrypt<DecryptionKey, RawPlaintext<'m>, RawCiphertext<'d>> for Paillier
Source§fn encrypt(dk: &DecryptionKey, m: RawPlaintext<'m>) -> RawCiphertext<'d>
fn encrypt(dk: &DecryptionKey, m: RawPlaintext<'m>) -> RawCiphertext<'d>
Encrypt plaintext
m under key ek into a ciphertext.Source§impl<'m, 'r, 'd> EncryptWithChosenRandomness<DecryptionKey, RawPlaintext<'m>, &'r PrecomputedRandomness, RawCiphertext<'d>> for Paillier
impl<'m, 'r, 'd> EncryptWithChosenRandomness<DecryptionKey, RawPlaintext<'m>, &'r PrecomputedRandomness, RawCiphertext<'d>> for Paillier
fn encrypt_with_chosen_randomness( dk: &DecryptionKey, m: RawPlaintext<'m>, rn: &'r PrecomputedRandomness, ) -> RawCiphertext<'d>
Source§impl<'m, 'r, 'd> EncryptWithChosenRandomness<DecryptionKey, RawPlaintext<'m>, &'r Randomness, RawCiphertext<'d>> for Paillier
impl<'m, 'r, 'd> EncryptWithChosenRandomness<DecryptionKey, RawPlaintext<'m>, &'r Randomness, RawCiphertext<'d>> for Paillier
fn encrypt_with_chosen_randomness( dk: &DecryptionKey, m: RawPlaintext<'m>, r: &'r Randomness, ) -> RawCiphertext<'d>
Source§impl<'e> From<&'e DecryptionKey> for MinimalDecryptionKey
impl<'e> From<&'e DecryptionKey> for MinimalDecryptionKey
Source§fn from(dk: &'e DecryptionKey) -> Self
fn from(dk: &'e DecryptionKey) -> Self
Converts to this type from the input type.
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<'e> From<MinimalDecryptionKey> for DecryptionKey
impl<'e> From<MinimalDecryptionKey> for DecryptionKey
Source§fn from(dk: MinimalDecryptionKey) -> Self
fn from(dk: MinimalDecryptionKey) -> Self
Converts to this type from the input type.
Source§impl<'c, 'm> Open<DecryptionKey, &'c RawCiphertext<'c>, RawPlaintext<'m>, Randomness> for Paillier
impl<'c, 'm> Open<DecryptionKey, &'c RawCiphertext<'c>, RawPlaintext<'m>, Randomness> for Paillier
Source§fn open(
dk: &DecryptionKey,
c: &'c RawCiphertext<'c>,
) -> (RawPlaintext<'m>, Randomness)
fn open( dk: &DecryptionKey, c: &'c RawCiphertext<'c>, ) -> (RawPlaintext<'m>, Randomness)
Open ciphertext
c using key dk into a plaintext and a randomness.Source§impl<'c, 'm> Open<DecryptionKey, RawCiphertext<'c>, RawPlaintext<'m>, Randomness> for Paillier
impl<'c, 'm> Open<DecryptionKey, RawCiphertext<'c>, RawPlaintext<'m>, Randomness> for Paillier
Source§fn open(
dk: &DecryptionKey,
c: RawCiphertext<'c>,
) -> (RawPlaintext<'m>, Randomness)
fn open( dk: &DecryptionKey, c: RawCiphertext<'c>, ) -> (RawPlaintext<'m>, Randomness)
Open ciphertext
c using key dk into a plaintext and a randomness.Source§impl PartialEq for DecryptionKey
impl PartialEq for DecryptionKey
Source§impl Serialize for DecryptionKey
impl Serialize for DecryptionKey
impl StructuralPartialEq for DecryptionKey
Auto Trait Implementations§
impl Freeze for DecryptionKey
impl RefUnwindSafe for DecryptionKey
impl Send for DecryptionKey
impl Sync for DecryptionKey
impl Unpin for DecryptionKey
impl UnwindSafe for DecryptionKey
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