commit 47c2c79f7fe0553ed28f5f6e22c960d947e5ffb8 Author: EvilMuffinHa Date: Sun May 21 15:05:39 2023 -0400 first commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4fffb2f --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/target +/Cargo.lock diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..e45f6d6 --- /dev/null +++ b/Cargo.toml @@ -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"] diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..036e36d --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,2 @@ +#[cfg(feature = "naive")] +pub mod naive; diff --git a/src/naive/mod.rs b/src/naive/mod.rs new file mode 100644 index 0000000..139597f --- /dev/null +++ b/src/naive/mod.rs @@ -0,0 +1,2 @@ + + diff --git a/src/sig.rs b/src/sig.rs new file mode 100644 index 0000000..90f6680 --- /dev/null +++ b/src/sig.rs @@ -0,0 +1,9 @@ +pub trait Signer { + fn gen() -> Self; + + fn sign(&self, msg: &[u8]) -> S; +} + +pub trait Verifier { + fn verify(&self, sig: &S, msg: &[u8]) -> bool; +}