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§
- Ed25519
Aggregate Signature - Aggregation of multiple Ed25519 signatures.
- Ed25519
KeyPair - Ed25519 key pair.
- Ed25519
Private Key - Ed25519 private key.
- Ed25519
Public Key - Ed25519 public key.
- Ed25519
Signature - Ed25519 signature.
- Single
Signature
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.