Module ed25519

Module ed25519 

Source
Expand description

This module contains an implementation of the Ed25519 signature scheme.

Messages can be signed and the signature can be verified again:

use rand::thread_rng;
let kp = Ed25519KeyPair::generate(&mut thread_rng());
let message: &[u8] = b"Hello, world!";
let signature = kp.sign(message);
assert!(kp.public().verify(message, &signature).is_ok());

Structs§

Ed25519AggregateSignature
Aggregation of multiple Ed25519 signatures.
Ed25519KeyPair
Ed25519 key pair.
Ed25519PrivateKey
Ed25519 private key.
Ed25519PublicKey
Ed25519 public key.
Ed25519Signature
Ed25519 signature.
SingleSignature

Constants§

ED25519_KEYPAIR_LENGTH
The key pair bytes length is the same as the private key length. This enforces deserialization to always derive the public key from the private key.
ED25519_PRIVATE_KEY_LENGTH
The length of a private key in bytes.
ED25519_PUBLIC_KEY_LENGTH
The length of a public key in bytes.
ED25519_SIGNATURE_LENGTH
The length of a signature in bytes.

Type Aliases§

Ed25519PublicKeyAsBytes
Ed25519SignatureAsBytes