first commit
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
/target
|
||||||
|
/Cargo.lock
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
[package]
|
||||||
|
name = "mayo"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
tiny-keccak = { version = "2.0", features = ["shake"] }
|
||||||
|
nalgebra = { version = "0.32.2", optional = true }
|
||||||
|
|
||||||
|
[features]
|
||||||
|
default = ["naive"]
|
||||||
|
naive = ["dep:nalgebra"]
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
#[cfg(feature = "naive")]
|
||||||
|
pub mod naive;
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
pub trait Signer<S> {
|
||||||
|
fn gen() -> Self;
|
||||||
|
|
||||||
|
fn sign(&self, msg: &[u8]) -> S;
|
||||||
|
}
|
||||||
|
|
||||||
|
pub trait Verifier<S> {
|
||||||
|
fn verify(&self, sig: &S, msg: &[u8]) -> bool;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user