Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions circuits/benchmarks/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
"dkg/pk",
"dkg/sk_share_computation",
"dkg/e_sm_share_computation",
"dkg/sk_share_encryption",
"dkg/e_sm_share_encryption",
"dkg/sk_share_decryption",
"dkg/e_sm_share_decryption",
"dkg/share_encryption",
"dkg/share_decryption",
"threshold/user_data_encryption",
"threshold/pk_generation",
"threshold/pk_aggregation",
Expand Down
218 changes: 91 additions & 127 deletions circuits/benchmarks/results_insecure/report.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Enclave ZK Circuit Benchmarks

**Generated:** 2026-02-11 17:03:46 UTC
**Generated:** 2026-02-12 16:42:19 UTC

**Git Branch:** `main`
**Git Commit:** `286813a7ec2d8a0edeb34ae723bb06c38049b7af`
**Git Branch:** `refactor/input-computation`
**Git Commit:** `2b72de5d2b119a672a6da46c355db03862614ac7`

---

Expand All @@ -15,47 +15,43 @@

| Circuit | Compile | Execute | Prove | Verify |
| ---------------------- | ------- | ------- | ------ | ------ |
| e_sm_share_computation | 0.32 s | 0.53 s | 1.64 s | 0.03 s |
| e_sm_share_decryption | 0.28 s | 0.30 s | 0.24 s | 0.02 s |
| e_sm_share_encryption | 2.73 s | 0.45 s | 0.62 s | 0.03 s |
| pk | 0.26 s | 0.27 s | 0.12 s | 0.02 s |
| sk_share_computation | 0.33 s | 0.53 s | 1.64 s | 0.02 s |
| sk_share_decryption | 0.28 s | 0.31 s | 0.24 s | 0.02 s |
| sk_share_encryption | 2.68 s | 0.45 s | 0.63 s | 0.03 s |
| e_sm_share_computation | 0.23 s | 0.42 s | 1.71 s | 0.03 s |
| pk | 0.19 s | 0.19 s | 0.12 s | 0.02 s |
| share_decryption | 0.61 s | 0.23 s | 0.30 s | 0.03 s |
| share_encryption | 0.22 s | 0.36 s | 0.65 s | 0.03 s |
| sk_share_computation | 0.23 s | 0.42 s | 1.71 s | 0.03 s |

#### Size & Circuit Metrics

| Circuit | Opcodes | Gates | Circuit Size | Witness | VK Size | Proof Size |
| ---------------------- | ------- | ------- | ------------ | --------- | ------- | ---------- |
| e_sm_share_computation | 90956 | 328.74K | 1.39 MB | 477.90 KB | 3.59 KB | 15.88 KB |
| e_sm_share_decryption | 3093 | 28.72K | 158.28 KB | 148.87 KB | 3.59 KB | 15.88 KB |
| e_sm_share_encryption | 47758 | 127.69K | 798.23 KB | 512.41 KB | 3.59 KB | 15.88 KB |
| pk | 344 | 6.85K | 87.84 KB | 29.09 KB | 3.59 KB | 15.88 KB |
| sk_share_computation | 90827 | 326.14K | 1.38 MB | 463.59 KB | 3.59 KB | 15.88 KB |
| sk_share_decryption | 3093 | 28.72K | 158.27 KB | 148.89 KB | 3.59 KB | 15.88 KB |
| sk_share_encryption | 47758 | 127.69K | 798.23 KB | 512.31 KB | 3.59 KB | 15.88 KB |
| e_sm_share_computation | 90956 | 328.74K | 1.39 MB | 477.83 KB | 3.59 KB | 15.88 KB |
| pk | 344 | 6.85K | 87.81 KB | 29.06 KB | 3.59 KB | 15.88 KB |
| share_decryption | 3093 | 28.72K | 158.24 KB | 148.90 KB | 3.59 KB | 15.88 KB |
| share_encryption | 47758 | 127.69K | 798.18 KB | 512.13 KB | 3.59 KB | 15.88 KB |
| sk_share_computation | 90827 | 326.14K | 1.38 MB | 463.68 KB | 3.59 KB | 15.88 KB |

### Threshold

#### Timing Metrics

| Circuit | Compile | Execute | Prove | Verify |
| -------------------------------- | ------- | ------- | ------ | ------ |
| decrypted_shares_aggregation_mod | 0.29 s | 0.35 s | 0.48 s | 0.03 s |
| pk_aggregation | 0.30 s | 0.46 s | 0.98 s | 0.03 s |
| pk_generation | 0.29 s | 0.39 s | 0.50 s | 0.03 s |
| share_decryption | 0.30 s | 0.43 s | 0.56 s | 0.03 s |
| user_data_encryption | 0.31 s | 0.51 s | 0.60 s | 0.02 s |
| decrypted_shares_aggregation_mod | 0.21 s | 0.25 s | 0.51 s | 0.03 s |
| pk_aggregation | 0.22 s | 0.37 s | 0.95 s | 0.03 s |
| pk_generation | 0.21 s | 0.31 s | 0.55 s | 0.03 s |
| share_decryption | 0.21 s | 0.33 s | 0.58 s | 0.03 s |
| user_data_encryption | 0.23 s | 0.40 s | 0.64 s | 0.03 s |

#### Size & Circuit Metrics

| Circuit | Opcodes | Gates | Circuit Size | Witness | VK Size | Proof Size |
| -------------------------------- | ------- | ------- | ------------ | --------- | ------- | ---------- |
| decrypted_shares_aggregation_mod | 31544 | 80.74K | 509.84 KB | 77.52 KB | 3.59 KB | 15.88 KB |
| pk_aggregation | 47817 | 169.89K | 884.11 KB | 360.83 KB | 3.59 KB | 15.88 KB |
| pk_generation | 30019 | 65.61K | 542.16 KB | 447.07 KB | 3.59 KB | 15.88 KB |
| share_decryption | 30570 | 85.48K | 541.56 KB | 522.91 KB | 3.59 KB | 15.88 KB |
| user_data_encryption | 56601 | 106.72K | 847.68 KB | 691.27 KB | 3.59 KB | 15.88 KB |
| decrypted_shares_aggregation_mod | 31544 | 80.74K | 509.82 KB | 77.42 KB | 3.59 KB | 15.88 KB |
| pk_aggregation | 47817 | 169.89K | 884.07 KB | 360.64 KB | 3.59 KB | 15.88 KB |
| pk_generation | 30019 | 65.61K | 542.13 KB | 446.90 KB | 3.59 KB | 15.88 KB |
| share_decryption | 30570 | 85.48K | 541.52 KB | 522.88 KB | 3.59 KB | 15.88 KB |
| user_data_encryption | 56601 | 106.72K | 847.64 KB | 690.54 KB | 3.59 KB | 15.88 KB |

## Circuit Details

Expand All @@ -65,111 +61,79 @@

| Metric | Value |
| -------------------- | --------- |
| **Compilation** | 0.32 s |
| **Execution** | 0.53 s |
| **VK Generation** | 0.61 s |
| **Proof Generation** | 1.64 s |
| **Compilation** | 0.23 s |
| **Execution** | 0.42 s |
| **VK Generation** | 0.59 s |
| **Proof Generation** | 1.71 s |
| **Verification** | 0.03 s |
| **ACIR Opcodes** | "90956" |
| **Total Gates** | "328743" |
| **Circuit Size** | 1.39 MB |
| **Witness Size** | 477.90 KB |
| **VK Size** | 3.59 KB |
| **Proof Size** | 15.88 KB |

#### e_sm_share_decryption

| Metric | Value |
| -------------------- | --------- |
| **Compilation** | 0.28 s |
| **Execution** | 0.30 s |
| **VK Generation** | 0.09 s |
| **Proof Generation** | 0.24 s |
| **Verification** | 0.02 s |
| **ACIR Opcodes** | "3093" |
| **Total Gates** | "28720" |
| **Circuit Size** | 158.28 KB |
| **Witness Size** | 148.87 KB |
| **VK Size** | 3.59 KB |
| **Proof Size** | 15.88 KB |

#### e_sm_share_encryption

| Metric | Value |
| -------------------- | --------- |
| **Compilation** | 2.73 s |
| **Execution** | 0.45 s |
| **VK Generation** | 0.26 s |
| **Proof Generation** | 0.62 s |
| **Verification** | 0.03 s |
| **ACIR Opcodes** | "47758" |
| **Total Gates** | "127691" |
| **Circuit Size** | 798.23 KB |
| **Witness Size** | 512.41 KB |
| **Witness Size** | 477.83 KB |
| **VK Size** | 3.59 KB |
| **Proof Size** | 15.88 KB |

#### pk

| Metric | Value |
| -------------------- | -------- |
| **Compilation** | 0.26 s |
| **Execution** | 0.27 s |
| **Compilation** | 0.19 s |
| **Execution** | 0.19 s |
| **VK Generation** | 0.05 s |
| **Proof Generation** | 0.12 s |
| **Verification** | 0.02 s |
| **ACIR Opcodes** | "344" |
| **Total Gates** | "6846" |
| **Circuit Size** | 87.84 KB |
| **Witness Size** | 29.09 KB |
| **Circuit Size** | 87.81 KB |
| **Witness Size** | 29.06 KB |
| **VK Size** | 3.59 KB |
| **Proof Size** | 15.88 KB |

#### sk_share_computation

| Metric | Value |
| -------------------- | --------- |
| **Compilation** | 0.33 s |
| **Execution** | 0.53 s |
| **VK Generation** | 0.61 s |
| **Proof Generation** | 1.64 s |
| **Verification** | 0.02 s |
| **ACIR Opcodes** | "90827" |
| **Total Gates** | "326138" |
| **Circuit Size** | 1.38 MB |
| **Witness Size** | 463.59 KB |
| **VK Size** | 3.59 KB |
| **Proof Size** | 15.88 KB |

#### sk_share_decryption
#### share_decryption

| Metric | Value |
| -------------------- | --------- |
| **Compilation** | 0.28 s |
| **Execution** | 0.31 s |
| **Compilation** | 0.61 s |
| **Execution** | 0.23 s |
| **VK Generation** | 0.09 s |
| **Proof Generation** | 0.24 s |
| **Verification** | 0.02 s |
| **Proof Generation** | 0.30 s |
| **Verification** | 0.03 s |
| **ACIR Opcodes** | "3093" |
| **Total Gates** | "28720" |
| **Circuit Size** | 158.27 KB |
| **Witness Size** | 148.89 KB |
| **Circuit Size** | 158.24 KB |
| **Witness Size** | 148.90 KB |
| **VK Size** | 3.59 KB |
| **Proof Size** | 15.88 KB |

#### sk_share_encryption
#### share_encryption

| Metric | Value |
| -------------------- | --------- |
| **Compilation** | 2.68 s |
| **Execution** | 0.45 s |
| **Compilation** | 0.22 s |
| **Execution** | 0.36 s |
| **VK Generation** | 0.26 s |
| **Proof Generation** | 0.63 s |
| **Proof Generation** | 0.65 s |
| **Verification** | 0.03 s |
| **ACIR Opcodes** | "47758" |
| **Total Gates** | "127691" |
| **Circuit Size** | 798.23 KB |
| **Witness Size** | 512.31 KB |
| **Circuit Size** | 798.18 KB |
| **Witness Size** | 512.13 KB |
| **VK Size** | 3.59 KB |
| **Proof Size** | 15.88 KB |

#### sk_share_computation

| Metric | Value |
| -------------------- | --------- |
| **Compilation** | 0.23 s |
| **Execution** | 0.42 s |
| **VK Generation** | 0.62 s |
| **Proof Generation** | 1.71 s |
| **Verification** | 0.03 s |
| **ACIR Opcodes** | "90827" |
| **Total Gates** | "326138" |
| **Circuit Size** | 1.38 MB |
| **Witness Size** | 463.68 KB |
| **VK Size** | 3.59 KB |
| **Proof Size** | 15.88 KB |

Expand All @@ -179,79 +143,79 @@

| Metric | Value |
| -------------------- | --------- |
| **Compilation** | 0.29 s |
| **Execution** | 0.35 s |
| **Compilation** | 0.21 s |
| **Execution** | 0.25 s |
| **VK Generation** | 0.19 s |
| **Proof Generation** | 0.48 s |
| **Proof Generation** | 0.51 s |
| **Verification** | 0.03 s |
| **ACIR Opcodes** | "31544" |
| **Total Gates** | "80740" |
| **Circuit Size** | 509.84 KB |
| **Witness Size** | 77.52 KB |
| **Circuit Size** | 509.82 KB |
| **Witness Size** | 77.42 KB |
| **VK Size** | 3.59 KB |
| **Proof Size** | 15.88 KB |

#### pk_aggregation

| Metric | Value |
| -------------------- | --------- |
| **Compilation** | 0.30 s |
| **Execution** | 0.46 s |
| **Compilation** | 0.22 s |
| **Execution** | 0.37 s |
| **VK Generation** | 0.36 s |
| **Proof Generation** | 0.98 s |
| **Proof Generation** | 0.95 s |
| **Verification** | 0.03 s |
| **ACIR Opcodes** | "47817" |
| **Total Gates** | "169890" |
| **Circuit Size** | 884.11 KB |
| **Witness Size** | 360.83 KB |
| **Circuit Size** | 884.07 KB |
| **Witness Size** | 360.64 KB |
| **VK Size** | 3.59 KB |
| **Proof Size** | 15.88 KB |

#### pk_generation

| Metric | Value |
| -------------------- | --------- |
| **Compilation** | 0.29 s |
| **Execution** | 0.39 s |
| **VK Generation** | 0.17 s |
| **Proof Generation** | 0.50 s |
| **Compilation** | 0.21 s |
| **Execution** | 0.31 s |
| **VK Generation** | 0.18 s |
| **Proof Generation** | 0.55 s |
| **Verification** | 0.03 s |
| **ACIR Opcodes** | "30019" |
| **Total Gates** | "65606" |
| **Circuit Size** | 542.16 KB |
| **Witness Size** | 447.07 KB |
| **Circuit Size** | 542.13 KB |
| **Witness Size** | 446.90 KB |
| **VK Size** | 3.59 KB |
| **Proof Size** | 15.88 KB |

#### share_decryption

| Metric | Value |
| -------------------- | --------- |
| **Compilation** | 0.30 s |
| **Execution** | 0.43 s |
| **VK Generation** | 0.20 s |
| **Proof Generation** | 0.56 s |
| **Compilation** | 0.21 s |
| **Execution** | 0.33 s |
| **VK Generation** | 0.19 s |
| **Proof Generation** | 0.58 s |
| **Verification** | 0.03 s |
| **ACIR Opcodes** | "30570" |
| **Total Gates** | "85478" |
| **Circuit Size** | 541.56 KB |
| **Witness Size** | 522.91 KB |
| **Circuit Size** | 541.52 KB |
| **Witness Size** | 522.88 KB |
| **VK Size** | 3.59 KB |
| **Proof Size** | 15.88 KB |

#### user_data_encryption

| Metric | Value |
| -------------------- | --------- |
| **Compilation** | 0.31 s |
| **Execution** | 0.51 s |
| **Compilation** | 0.23 s |
| **Execution** | 0.40 s |
| **VK Generation** | 0.24 s |
| **Proof Generation** | 0.60 s |
| **Verification** | 0.02 s |
| **Proof Generation** | 0.64 s |
| **Verification** | 0.03 s |
| **ACIR Opcodes** | "56601" |
| **Total Gates** | "106725" |
| **Circuit Size** | 847.68 KB |
| **Witness Size** | 691.27 KB |
| **Circuit Size** | 847.64 KB |
| **Witness Size** | 690.54 KB |
| **VK Size** | 3.59 KB |
| **Proof Size** | 15.88 KB |

Expand All @@ -260,8 +224,8 @@
### Hardware

- **CPU:** Apple M4 Pro
- **CPU Cores:** 14
- **RAM:** 48.00 GB
- **CPU Cores:** 12
- **RAM:** 24.00 GB
- **OS:** Darwin
- **Architecture:** arm64

Expand Down
12 changes: 2 additions & 10 deletions circuits/benchmarks/scripts/generate_prover_toml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,14 @@ get_zk_args() {
echo "share-computation smudging-noise"
return
;;
dkg/sk_share_encryption)
dkg/share_encryption)
echo "share-encryption secret-key"
return
;;
dkg/e_sm_share_encryption)
echo "share-encryption smudging-noise"
return
;;
dkg/sk_share_decryption)
dkg/share_decryption)
echo "share-decryption secret-key"
return
;;
dkg/e_sm_share_decryption)
echo "share-decryption smudging-noise"
return
;;
threshold/user_data_encryption)
echo "user-data-encryption"
return
Expand Down
Loading
Loading