pub struct ElGamalKeypair {
    pub public: ElGamalPubkey,
    pub secret: ElGamalSecretKey,
}
Expand description

A (twisted) ElGamal encryption keypair.

Fields

public: ElGamalPubkey

The public half of this keypair.

secret: ElGamalSecretKey

The secret half of this keypair.

Implementations

Generates the public and secret keys for ElGamal encryption from Ed25519 signing key and an address.

Generates the public and secret keys for ElGamal encryption.

On input a randomness generator, the function generates the public and secret keys for ElGamal encryption.

Reads a JSON-encoded keypair from a Reader implementor

Reads keypair from a file

Writes to a Write implementer with JSON-encoding

Write keypair to a file with JSON-encoding

Trait Implementations

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

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 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.