Struct ring::signature::Ed25519KeyPair [] [src]

pub struct Ed25519KeyPair {
    // some fields omitted
}

An Ed25519 key pair, for signing.

Methods

impl<'a> Ed25519KeyPair
[src]

Generates a new random key pair. There is no way to extract the private key bytes to save them. If you need to save the private key bytes for future use then use generate_serializable() instead.

Generates a new key pair and returns the key pair as both an Ed25519KeyPair and a Ed25519KeyPairBytes. There is no way to extract the private key bytes from an Ed25519KeyPair, so extracting the values from the Ed25519KeyPairBytes is the only way to get them.

Copies key data from the given slices to create a new key pair. The first slice must hold the private key and the second slice must hold the public key. Both slices must contain 32 little-endian-encoded bytes.

This is intended for use by code that deserializes key pairs.

The private and public keys will be verified to be consistent. This helps protect, for example, against the accidental swapping of the public and private components of the key pair. This also detects corruption that might have occurred during storage of the key pair.

Returns a reference to the little-endian-encoded public key bytes.

Returns the signature of the message msg.