Struct sn_data_types::NodeKeypairs[][src]

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

This is used at a network node for holding the obligatory Ed25519 keypair needed as Adult, and then a BLS keypair share when being promoted to Elder. (Also the corresponding public keys). The Ed25519 is kept as Elder, in case it is demoted.

Implementations

Constructs a NodeKeypairs with a random Ed25519 keypair and no BLS keys.

Constructs a NodeKeypairs whose name is in the interval [start, end] (both endpoints inclusive).

Returns the BLS if any, else the Ed25519.

Returns the BLS public key set if any.

Signs with the BLS if any, else the Ed25519.

Creates a detached Ed25519 signature of data.

Creates a detached BLS signature share of data if the self holds a BLS keypair share.

Sets the NodeKeypairs’s BLS keypair share using the provided BLS secret key share.

Clears the NodeKeypairs’s BLS keypair share, i.e. sets it to None.

Trait Implementations

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. 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 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.