Struct diem_crypto::multi_ed25519::MultiEd25519PublicKey[][src]

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

Vector of public keys in the multi-key Ed25519 structure along with the threshold.

Implementations

Construct a new MultiEd25519PublicKey. — Rules — a) threshold cannot be zero. b) public_keys.len() should be equal to or larger than threshold. c) support up to MAX_NUM_OF_KEYS public keys.

Getter public_keys

Getter threshold

Serialize a MultiEd25519PublicKey.

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

Formats the value using the given formatter. Read more

Implementing From<&PrivateKey<…>> allows to derive a public key in a more elegant fashion.

Performs the conversion.

Convenient method to create a MultiEd25519PublicKey from a single Ed25519PublicKey.

Performs the conversion.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

The serialized length of the data

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

This method tests for !=.

We deduce PublicKey from this.

We require public / private types to be coupled, i.e. their associated type is each other. Read more

Serialize this value into the given Serde serializer. Read more

Deserialize a MultiEd25519PublicKey. This method will also check for key and threshold validity, and will only deserialize keys that are safe against small subgroup attacks.

The type returned in the event of a conversion error.

Convert the valid crypto material to bytes.

We deduce VerifyingKey from pointing to the signature material we get the ability to do pubkey.validate(msg, signature)

The associated signing key type for this verifying key.

The associated signature type for this verifying key.

We provide the striaghtfoward implementation which dispatches to the signature.

We provide the implementation which dispatches to the signature.

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

Generates a hash used only for tests.

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

Converts the given value to a String. 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.

When trying to convert from bytes, we simply decode the string into bytes before checking if we can convert. Read more

A function to encode into hex-string after serializing.