pub struct CurveElGamalPK { /* private fields */ }
Expand description

Encryption key for curve-based ElGamal

Implementations

Precompute values for the encryption key to speed-up future encryptions

Trait Implementations

‘Enriches’ a ciphertext by associating it with a corresponding public key. This allows to overlead operators for homomorphic operations.

Formats the value using the given formatter. Read more

Decrypt the ciphertext using the secret key and its related public key.

Decrypt the associated ciphertext using the secret key.

Combine $t$ decryption shares belonging to distinct partial keys to finish decryption. It is the responsibility of the programmer to supply the right number of decryption shares to this function. Read more

Combine $t$ decryption shares belonging to distinct partial keys to finish decryption. It is the responsibility of the programmer to supply the right number of decryption shares to this function. Read more

Input is the type used to multiply additive ciphertexts or exponentiate multiplicative ciphertexts.

The type of the plaintext to be encrypted.

The type of an encrypted plaintext, i.e. a ciphertext.

Encrypt the plaintext using the public key and a cryptographic RNG.

Encrypt the plaintext using the public key and a cryptographic RNG and immediately associate it with the public key.

Combines two ciphertexts so that their decrypted value reflects some addition operation

Applies some operation on a ciphertext so that the decrypted value reflects some multiplication with input

The type of the decryption share. If enough decryption shares of different keys are combined, they output the correct decryption.

Partially decrypts a ciphertext, returning a valid decryption share.

Partially decrypts a ciphertext, returning a valid decryption share.

The type of the decryption share. If enough decryption shares of different keys are combined, they output the correct decryption.

Partially decrypts a ciphertext, returning a valid decryption share.

Partially decrypts a ciphertext, returning a valid decryption share.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Casts the value.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Casts the value.

Casts the value.

Casts the value.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Casts the value.

OverflowingCasts the value.

Should always be Self

Casts the value.

Casts the value.

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.

Casts the value.

UnwrappedCasts the value.

Casts the value.

WrappingCasts the value.