-
Notifications
You must be signed in to change notification settings - Fork 220
Expand file tree
/
Copy pathmod.rs
More file actions
37 lines (35 loc) · 1.1 KB
/
mod.rs
File metadata and controls
37 lines (35 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//! Ed25519 implementation of the [crate::Verifier] and [crate::Signer] traits.
//!
//! # Validation Rules (ZIP215)
//!
//! This crate follows the [ZIP215](https://zips.z.cash/zip-0215) specification
//! for Ed25519 signature validation. You can read more about the rationale for
//! this [here](https://hdevalence.ca/blog/2020-10-04-its-25519am).
//!
//! # Example
//! ```rust
//! use commonware_cryptography::{ed25519, PrivateKey, PublicKey, Signature, Verifier as _, Signer as _};
//! use commonware_math::algebra::Random;
//! use rand::rngs::OsRng;
//!
//! // Generate a new private key
//! let mut signer = ed25519::PrivateKey::random(&mut OsRng);
//!
//! // Create a message to sign
//! let namespace = b"demo";
//! let msg = b"hello, world!";
//!
//! // Sign the message
//! let signature = signer.sign(namespace, msg);
//!
//! // Verify the signature
//! assert!(signer.public_key().verify(namespace, msg, &signature));
//! ```
pub mod certificate;
pub(in crate::ed25519) mod core;
mod scheme;
#[cfg(test)]
mod wycheproof;
#[cfg(test)]
mod wycheproof_vectors;
pub use scheme::{Batch, PrivateKey, PublicKey, Signature};