Skip to content

Commit

Permalink
feat: a simple gm encryption halo2 circuit
Browse files Browse the repository at this point in the history
  • Loading branch information
0xisk committed Aug 6, 2024
1 parent 2f36778 commit fae12ec
Show file tree
Hide file tree
Showing 25 changed files with 210 additions and 783 deletions.
9 changes: 9 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"cSpell.words": [
"biguint",
"ciphertext",
"Goldwasser",
"Micali",
"probabilisticpubkey"
]
}
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ resolver = "2"
members = [
"packages/circuits",
"packages/cli",
"packages/probabilistic-encryption"
]

# Dev / testing mode. We make opt-level = 3 to improve proving times (otherwise it is really slow)
Expand Down
11 changes: 7 additions & 4 deletions packages/circuits/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,22 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
anyhow = "1.0.81"
env_logger = "=0.10"
serde = { version = "=1.0", default-features = false, features = ["derive"] }
serde_json = "=1.0"
rand = "=0.8"
clap = { version = "=4.0", features = ["derive"] }
clap-num = "=1.0.2"
cli = { path = "../cli" }
probabilistic-encryption = { path = "../probabilistic-encryption" }
num-bigint = "0.4.4"

# halo2
halo2_proofs = { git = "https://github.com/privacy-scaling-explorations/halo2.git", tag = "v2023_02_02" }

# Axiom's helper API with basic functions
halo2-base = { git = "https://github.com/axiom-crypto/halo2-lib", branch = "community-edition" }
halo2-ecc = { version = "0.4.1", default-features = false, features = ["halo2-axiom"] }
halo2-base = { version = "0.4.1", default-features = false, features = ["halo2-axiom"] }
halo2-wasm = { version = "0.3.4" }
wasm-bindgen = "0.2.89"
snark-verifier-sdk = { git = "https://github.com/axiom-crypto/snark-verifier.git", branch = "community-edition" }

[dev-dependencies]
Expand Down
Empty file added packages/circuits/README.md
Empty file.
8 changes: 8 additions & 0 deletions packages/circuits/configs/gm_encryption.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"k": 15,
"numAdvice": 34,
"numLookupAdvice": 3,
"numInstance": 1,
"numLookupBits": 14,
"numVirtualInstance": 0
}
3 changes: 0 additions & 3 deletions packages/circuits/data/fixed_len_keccak-1.in

This file was deleted.

3 changes: 0 additions & 3 deletions packages/circuits/data/fixed_len_keccak.in

This file was deleted.

3 changes: 0 additions & 3 deletions packages/circuits/data/halo2_lib.0.in

This file was deleted.

3 changes: 0 additions & 3 deletions packages/circuits/data/halo2_lib.in

This file was deleted.

3 changes: 0 additions & 3 deletions packages/circuits/data/poseidon.in

This file was deleted.

3 changes: 0 additions & 3 deletions packages/circuits/data/range.in

This file was deleted.

4 changes: 0 additions & 4 deletions packages/circuits/data/var_len_keccak.1.in

This file was deleted.

4 changes: 0 additions & 4 deletions packages/circuits/data/var_len_keccak.in

This file was deleted.

78 changes: 0 additions & 78 deletions packages/circuits/examples/builder.rs

This file was deleted.

78 changes: 0 additions & 78 deletions packages/circuits/examples/halo2_lib.rs

This file was deleted.

50 changes: 0 additions & 50 deletions packages/circuits/examples/poseidon.rs

This file was deleted.

47 changes: 0 additions & 47 deletions packages/circuits/examples/range.rs

This file was deleted.

1 change: 1 addition & 0 deletions packages/circuits/src/consts.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub const CONTEXT_PHASE: usize = 0;
Loading

0 comments on commit fae12ec

Please sign in to comment.