mayo/src/sig.rs

14 lines
246 B
Rust
Raw Normal View History

2023-05-27 00:04:40 -04:00
use rand::RngCore;
pub trait KeyGen<'a, P> {
fn gen(params: P, rand: &'a mut dyn RngCore) -> Self;
2023-05-24 14:50:54 -04:00
}
2023-05-21 15:05:39 -04:00
2023-05-24 14:50:54 -04:00
pub trait Signer<S> {
2023-05-21 15:05:39 -04:00
fn sign(&self, msg: &[u8]) -> S;
}
pub trait Verifier<S> {
fn verify(&self, sig: &S, msg: &[u8]) -> bool;
}