first commit
This commit is contained in:
commit
47c2c79f7f
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
/target
|
||||||
|
/Cargo.lock
|
14
Cargo.toml
Normal file
14
Cargo.toml
Normal file
|
@ -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"]
|
2
src/lib.rs
Normal file
2
src/lib.rs
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
#[cfg(feature = "naive")]
|
||||||
|
pub mod naive;
|
2
src/naive/mod.rs
Normal file
2
src/naive/mod.rs
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
|
||||||
|
|
9
src/sig.rs
Normal file
9
src/sig.rs
Normal file
|
@ -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;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user