Struct paillier::core::Randomness
source · pub struct Randomness(pub BigInt);
Tuple Fields
0: BigInt
Implementations
sourceimpl Randomness
impl Randomness
pub fn sample(ek: &EncryptionKey) -> Randomness
Trait Implementations
sourceimpl Debug for Randomness
impl Debug for Randomness
sourceimpl<'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>
sourceimpl<'m, 'r, 'd> EncryptWithChosenRandomness<EncryptionKey, RawPlaintext<'m>, &'r Randomness, RawCiphertext<'d>> for Paillier
impl<'m, 'r, 'd> EncryptWithChosenRandomness<EncryptionKey, RawPlaintext<'m>, &'r Randomness, RawCiphertext<'d>> for Paillier
fn encrypt_with_chosen_randomness(
ek: &EncryptionKey,
m: RawPlaintext<'m>,
r: &'r Randomness
) -> RawCiphertext<'d>
sourceimpl<'b> From<&'b BigInt> for Randomness
impl<'b> From<&'b BigInt> for Randomness
sourcefn from(x: &'b BigInt) -> Randomness
fn from(x: &'b BigInt) -> Randomness
Converts to this type from the input type.
sourceimpl From<BigInt> for Randomness
impl From<BigInt> for Randomness
sourcefn from(x: BigInt) -> Randomness
fn from(x: BigInt) -> Randomness
Converts to this type from the input type.
sourceimpl<'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
sourcefn 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.sourceimpl<'c, 'm> Open<DecryptionKey, RawCiphertext<'c>, RawPlaintext<'m>, Randomness> for Paillier
impl<'c, 'm> Open<DecryptionKey, RawCiphertext<'c>, RawPlaintext<'m>, Randomness> for Paillier
sourcefn 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.sourceimpl PartialEq<Randomness> for Randomness
impl PartialEq<Randomness> for Randomness
sourcefn eq(&self, other: &Randomness) -> bool
fn eq(&self, other: &Randomness) -> bool
impl StructuralPartialEq for Randomness
Auto Trait Implementations
impl RefUnwindSafe for Randomness
impl Send for Randomness
impl Sync for Randomness
impl Unpin for Randomness
impl UnwindSafe for Randomness
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