diff --git a/common/nym-compact-ecash/Cargo.toml b/common/nym-compact-ecash/Cargo.toml new file mode 100644 index 0000000000..e678081a14 --- /dev/null +++ b/common/nym-compact-ecash/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "nym-compact-ecash" +version = "0.1.0" +authors = ["Ania Piotrowska "] +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +bls12_381 = { version = "0.5", default-features = false, features = ["pairings", "alloc", "experimental"] } + +[dev-dependencies] +criterion = { version = "0.3", features = ["html_reports"] } \ No newline at end of file diff --git a/common/nym-compact-ecash/src/lib.rs b/common/nym-compact-ecash/src/lib.rs new file mode 100644 index 0000000000..3fbbea1744 --- /dev/null +++ b/common/nym-compact-ecash/src/lib.rs @@ -0,0 +1,2 @@ +mod proofs; +mod scheme; \ No newline at end of file diff --git a/common/nym-compact-ecash/src/main.rs b/common/nym-compact-ecash/src/main.rs new file mode 100644 index 0000000000..e7a11a969c --- /dev/null +++ b/common/nym-compact-ecash/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} diff --git a/common/nym-compact-ecash/src/scheme/aggregation.rs b/common/nym-compact-ecash/src/scheme/aggregation.rs new file mode 100644 index 0000000000..e69de29bb2 diff --git a/common/nym-compact-ecash/src/scheme/keygen.rs b/common/nym-compact-ecash/src/scheme/keygen.rs new file mode 100644 index 0000000000..e69de29bb2 diff --git a/common/nym-compact-ecash/src/scheme/mod.rs b/common/nym-compact-ecash/src/scheme/mod.rs new file mode 100644 index 0000000000..240ad88ce8 --- /dev/null +++ b/common/nym-compact-ecash/src/scheme/mod.rs @@ -0,0 +1,5 @@ +pub mod aggregation; +pub mod withdrawal; +pub mod keygen; +pub mod setup; +pub mod spend; \ No newline at end of file diff --git a/common/nym-compact-ecash/src/scheme/setup.rs b/common/nym-compact-ecash/src/scheme/setup.rs new file mode 100644 index 0000000000..9bc4972db9 --- /dev/null +++ b/common/nym-compact-ecash/src/scheme/setup.rs @@ -0,0 +1,12 @@ +use bls12_381::{G1Affine, G2Affine}; + +pub struct Parameters { + /// Generator of the G1 group + g1: G1Affine, + /// Generator of the G2 group + g2: G2Affine, + /// Additional generators of the G1 group + gammas: Vec, + /// Value of wallet + L: usize, +} \ No newline at end of file diff --git a/common/nym-compact-ecash/src/scheme/spend.rs b/common/nym-compact-ecash/src/scheme/spend.rs new file mode 100644 index 0000000000..e69de29bb2 diff --git a/common/nym-compact-ecash/src/scheme/withdrawal.rs b/common/nym-compact-ecash/src/scheme/withdrawal.rs new file mode 100644 index 0000000000..e69de29bb2