pub struct KeyGenerator {
    pub spend: PublicKey,
    pub rv: PublicKey,
}
Expand description

Helper to generate onetime public keys (ephemeral keys) used in transactions.

Fields

spend: PublicKey

Spend public key S.

rv: PublicKey

Intermediate key v*8*R or r*8*V used during the generation process.

Implementations

Construct a onetime key generator from public keys and secret random, this is used to generate onetime keys for output indexes from an address when sending funds.

Construct a onetime key generator from private keys and public random (tx pubkey), this is used to scan if some outputs contains onetime keys owned by the view pair.

Compute the onetime public key P = Hn(r*8*V || n)*G + S for the indexed output n.

Check if key P is equal to indexed key P', if true the output is own by the address, used when scanning transaction outputs, if true the onetime key is related to the keys.

Computes Hn(v*8*R || n) and interpret it as a scalar.

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

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

Returns the argument unchanged.

Calls U::from(self).

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

Should always be Self

The resulting type after obtaining ownership.

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

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.