Struct libpaillier::DecryptionKey[][src]

pub struct DecryptionKey { /* fields omitted */ }
Expand description

A Paillier decryption key

Implementations

Create a new random key

Create a new key from two safe primes. p and q are checked if prime

Create a new key from two safe primes, p and q are not checked to see if they are safe primes

Reverse ciphertext to plaintext

Get this key’s byte representation.

This measures about (n * 4) + 4 bytes or i.e. for a 2048 bit modulus == 1032 bytes.

Convert a byte representation to a decryption key

The Paillier modulus

The Paillier lambda

The Paillier totient

The Paillier u

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Executes the destructor for this type. Read more

Performs the conversion.

Serialize this value into the given Serde serializer. Read more

Zero out this object from memory using Rust intrinsics which ensure the zeroization operation is not “optimized away” by the compiler. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.