Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cggmp21 deps, bump version #99

Merged
merged 3 commits into from
Apr 1, 2024
Merged

Update cggmp21 deps, bump version #99

merged 3 commits into from
Apr 1, 2024

Conversation

survived
Copy link
Contributor

@survived survived commented Apr 1, 2024

No description provided.

Copy link

github-actions bot commented Apr 1, 2024

Crate direct deps

Direct deps
cggmp21-keygen v0.1.0 (/home/runner/work/cggmp21/cggmp21/pr_branch/cggmp21-keygen)
digest v0.10.6
futures v0.3.24
generic-ec v0.2.3
generic-ec-zkp v0.2.0
hex v0.4.3
key-share v0.2.3 (/home/runner/work/cggmp21/cggmp21/pr_branch/key-share)
paillier-zk v0.2.0
rand_chacha v0.3.1
rand_core v0.6.4
round-based v0.2.0
serde v1.0.193
serde_with v2.3.3
sha2 v0.10.6
thiserror v1.0.48
udigest v0.1.0

Compared to base branch

Diff
--- direct-deps-base	2024-04-01 11:43:06.069896302 +0000
+++ direct-deps-pr	2024-04-01 11:43:06.329897674 +0000
@@ -1 +1 @@
-cggmp21-keygen v0.1.0 (/home/runner/work/cggmp21/cggmp21/base_branch/cggmp21-keygen)
+cggmp21-keygen v0.1.0 (/home/runner/work/cggmp21/cggmp21/pr_branch/cggmp21-keygen)
@@ -7 +7 @@
-key-share v0.2.3 (/home/runner/work/cggmp21/cggmp21/base_branch/key-share)
+key-share v0.2.3 (/home/runner/work/cggmp21/cggmp21/pr_branch/key-share)

All deps

cargo tree
cggmp21 v0.2.1 (/home/runner/work/cggmp21/cggmp21/pr_branch/cggmp21)
├── cggmp21-keygen v0.1.0 (/home/runner/work/cggmp21/cggmp21/pr_branch/cggmp21-keygen)
│   ├── digest v0.10.6
│   │   ├── block-buffer v0.10.3
│   │   │   └── generic-array v0.14.6
│   │   │       ├── serde v1.0.193
│   │   │       │   └── serde_derive v1.0.193 (proc-macro)
│   │   │       │       ├── proc-macro2 v1.0.66
│   │   │       │       │   └── unicode-ident v1.0.4
│   │   │       │       ├── quote v1.0.33
│   │   │       │       │   └── proc-macro2 v1.0.66 (*)
│   │   │       │       └── syn v2.0.32
│   │   │       │           ├── proc-macro2 v1.0.66 (*)
│   │   │       │           ├── quote v1.0.33 (*)
│   │   │       │           └── unicode-ident v1.0.4
│   │   │       └── typenum v1.15.0
│   │   └── crypto-common v0.1.6
│   │       ├── generic-array v0.14.6 (*)
│   │       └── typenum v1.15.0
│   ├── futures v0.3.24
│   │   ├── futures-channel v0.3.24
│   │   │   ├── futures-core v0.3.24
│   │   │   └── futures-sink v0.3.24
│   │   ├── futures-core v0.3.24
│   │   ├── futures-executor v0.3.24
│   │   │   ├── futures-core v0.3.24
│   │   │   ├── futures-task v0.3.24
│   │   │   └── futures-util v0.3.24
│   │   │       ├── futures-channel v0.3.24 (*)
│   │   │       ├── futures-core v0.3.24
│   │   │       ├── futures-io v0.3.24
│   │   │       ├── futures-macro v0.3.24 (proc-macro)
│   │   │       │   ├── proc-macro2 v1.0.66 (*)
│   │   │       │   ├── quote v1.0.33 (*)
│   │   │       │   └── syn v1.0.101
│   │   │       │       ├── proc-macro2 v1.0.66 (*)
│   │   │       │       ├── quote v1.0.33 (*)
│   │   │       │       └── unicode-ident v1.0.4
│   │   │       ├── futures-sink v0.3.24
│   │   │       ├── futures-task v0.3.24
│   │   │       ├── memchr v2.5.0
│   │   │       ├── pin-project-lite v0.2.9
│   │   │       ├── pin-utils v0.1.0
│   │   │       └── slab v0.4.7
│   │   ├── futures-io v0.3.24
│   │   ├── futures-sink v0.3.24
│   │   ├── futures-task v0.3.24
│   │   └── futures-util v0.3.24 (*)
│   ├── generic-ec v0.2.3
│   │   ├── generic-ec-core v0.1.3
│   │   │   ├── generic-array v0.14.6 (*)
│   │   │   ├── rand_core v0.6.4
│   │   │   ├── serde v1.0.193 (*)
│   │   │   ├── subtle v2.4.1
│   │   │   └── zeroize v1.6.0
│   │   │       └── zeroize_derive v1.3.2 (proc-macro)
│   │   │           ├── proc-macro2 v1.0.66 (*)
│   │   │           ├── quote v1.0.33 (*)
│   │   │           ├── syn v1.0.101 (*)
│   │   │           └── synstructure v0.12.6
│   │   │               ├── proc-macro2 v1.0.66 (*)
│   │   │               ├── quote v1.0.33 (*)
│   │   │               ├── syn v1.0.101 (*)
│   │   │               └── unicode-xid v0.2.4
│   │   ├── hex v0.4.3
│   │   │   └── serde v1.0.193 (*)
│   │   ├── phantom-type v0.4.2
│   │   │   └── educe v0.4.19 (proc-macro)
│   │   │       ├── enum-ordinalize v3.1.11 (proc-macro)
│   │   │       │   ├── num-bigint v0.4.3
│   │   │       │   │   ├── num-integer v0.1.45
│   │   │       │   │   │   └── num-traits v0.2.15
│   │   │       │   │   └── num-traits v0.2.15
│   │   │       │   ├── num-traits v0.2.15
│   │   │       │   ├── proc-macro2 v1.0.66 (*)
│   │   │       │   ├── quote v1.0.33 (*)
│   │   │       │   └── syn v1.0.101 (*)
│   │   │       ├── proc-macro2 v1.0.66 (*)
│   │   │       ├── quote v1.0.33 (*)
│   │   │       └── syn v1.0.101 (*)
│   │   ├── rand_core v0.6.4
│   │   ├── serde v1.0.193 (*)
│   │   ├── serde_with v2.3.3
│   │   │   ├── serde v1.0.193 (*)
│   │   │   └── serde_with_macros v2.3.3 (proc-macro)
│   │   │       ├── darling v0.20.1
│   │   │       │   ├── darling_core v0.20.1
│   │   │       │   │   ├── fnv v1.0.7
│   │   │       │   │   ├── ident_case v1.0.1
│   │   │       │   │   ├── proc-macro2 v1.0.66 (*)
│   │   │       │   │   ├── quote v1.0.33 (*)
│   │   │       │   │   ├── strsim v0.10.0
│   │   │       │   │   └── syn v2.0.32 (*)
│   │   │       │   └── darling_macro v0.20.1 (proc-macro)
│   │   │       │       ├── darling_core v0.20.1 (*)
│   │   │       │       ├── quote v1.0.33 (*)
│   │   │       │       └── syn v2.0.32 (*)
│   │   │       ├── proc-macro2 v1.0.66 (*)
│   │   │       ├── quote v1.0.33 (*)
│   │   │       └── syn v2.0.32 (*)
│   │   ├── subtle v2.4.1
│   │   ├── udigest v0.1.0
│   │   │   ├── digest v0.10.6 (*)
│   │   │   └── udigest-derive v0.1.0 (proc-macro)
│   │   │       ├── proc-macro2 v1.0.66 (*)
│   │   │       ├── quote v1.0.33 (*)
│   │   │       └── syn v2.0.32 (*)
│   │   └── zeroize v1.6.0 (*)
│   ├── generic-ec-zkp v0.2.0
│   │   ├── generic-array v0.14.6 (*)
│   │   ├── generic-ec v0.2.3 (*)
│   │   ├── rand_core v0.6.4
│   │   ├── serde v1.0.193 (*)
│   │   ├── subtle v2.4.1
│   │   └── udigest v0.1.0 (*)
│   ├── hex v0.4.3 (*)
│   ├── key-share v0.2.3 (/home/runner/work/cggmp21/cggmp21/pr_branch/key-share)
│   │   ├── displaydoc v0.2.4 (proc-macro)
│   │   │   ├── proc-macro2 v1.0.66 (*)
│   │   │   ├── quote v1.0.33 (*)
│   │   │   └── syn v2.0.32 (*)
│   │   ├── generic-ec v0.2.3 (*)
│   │   ├── generic-ec-zkp v0.2.0 (*)
│   │   ├── hex v0.4.3 (*)
│   │   ├── serde v1.0.193 (*)
│   │   ├── serde_with v2.3.3 (*)
│   │   └── thiserror v1.0.48
│   │       └── thiserror-impl v1.0.48 (proc-macro)
│   │           ├── proc-macro2 v1.0.66 (*)
│   │           ├── quote v1.0.33 (*)
│   │           └── syn v2.0.32 (*)
│   ├── rand_core v0.6.4
│   ├── round-based v0.2.0
│   │   ├── futures-util v0.3.24 (*)
│   │   ├── phantom-type v0.3.1
│   │   │   └── educe v0.4.19 (proc-macro) (*)
│   │   ├── round-based-derive v0.2.0 (proc-macro)
│   │   │   ├── proc-macro2 v1.0.66 (*)
│   │   │   ├── quote v1.0.33 (*)
│   │   │   └── syn v1.0.101 (*)
│   │   ├── thiserror v1.0.48 (*)
│   │   └── tracing v0.1.36
│   │       ├── cfg-if v1.0.0
│   │       ├── pin-project-lite v0.2.9
│   │       ├── tracing-attributes v0.1.22 (proc-macro)
│   │       │   ├── proc-macro2 v1.0.66 (*)
│   │       │   ├── quote v1.0.33 (*)
│   │       │   └── syn v1.0.101 (*)
│   │       └── tracing-core v0.1.29
│   │           └── once_cell v1.17.0
│   ├── serde v1.0.193 (*)
│   ├── serde_with v2.3.3 (*)
│   ├── sha2 v0.10.6
│   │   ├── cfg-if v1.0.0
│   │   ├── cpufeatures v0.2.12
│   │   └── digest v0.10.6 (*)
│   ├── thiserror v1.0.48 (*)
│   └── udigest v0.1.0 (*)
├── digest v0.10.6 (*)
├── futures v0.3.24 (*)
├── generic-ec v0.2.3 (*)
├── generic-ec-zkp v0.2.0 (*)
├── hex v0.4.3 (*)
├── key-share v0.2.3 (/home/runner/work/cggmp21/cggmp21/pr_branch/key-share) (*)
├── paillier-zk v0.2.0
│   ├── digest v0.10.6 (*)
│   ├── fast-paillier v0.1.0
│   │   ├── bytemuck v1.13.1
│   │   │   └── bytemuck_derive v1.4.1 (proc-macro)
│   │   │       ├── proc-macro2 v1.0.66 (*)
│   │   │       ├── quote v1.0.33 (*)
│   │   │       └── syn v2.0.32 (*)
│   │   ├── rand_core v0.6.4
│   │   ├── rug v1.21.0
│   │   │   ├── az v1.2.1
│   │   │   ├── gmp-mpfr-sys v1.6.1
│   │   │   │   └── libc v0.2.153
│   │   │   ├── libc v0.2.153
│   │   │   └── serde v1.0.193 (*)
│   │   ├── serde v1.0.193 (*)
│   │   └── thiserror v1.0.48 (*)
│   ├── generic-ec v0.2.3 (*)
│   ├── rand_core v0.6.4
│   ├── rug v1.21.0 (*)
│   ├── serde v1.0.193 (*)
│   ├── serde_with v3.0.0
│   │   ├── serde v1.0.193 (*)
│   │   └── serde_with_macros v3.0.0 (proc-macro)
│   │       ├── darling v0.20.1 (*)
│   │       ├── proc-macro2 v1.0.66 (*)
│   │       ├── quote v1.0.33 (*)
│   │       └── syn v2.0.32 (*)
│   └── thiserror v1.0.48 (*)
├── rand_chacha v0.3.1
│   ├── ppv-lite86 v0.2.17
│   └── rand_core v0.6.4
├── rand_core v0.6.4
├── round-based v0.2.0 (*)
├── serde v1.0.193 (*)
├── serde_with v2.3.3 (*)
├── sha2 v0.10.6 (*)
├── thiserror v1.0.48 (*)
└── udigest v0.1.0 (*)

Compared to base branch

Diff
--- all-deps-base	2024-04-01 11:43:06.197896977 +0000
+++ all-deps-pr	2024-04-01 11:43:06.457898349 +0000
@@ -6 +6 @@
-cggmp21-keygen v0.1.0 (/home/runner/work/cggmp21/cggmp21/base_branch/cggmp21-keygen)
+cggmp21-keygen v0.1.0 (/home/runner/work/cggmp21/cggmp21/pr_branch/cggmp21-keygen)
@@ -34 +34 @@
-key-share v0.2.3 (/home/runner/work/cggmp21/cggmp21/base_branch/key-share)
+key-share v0.2.3 (/home/runner/work/cggmp21/cggmp21/pr_branch/key-share)

Copy link

github-actions bot commented Apr 1, 2024

Benchmark Result

Benchmarks
RUST_TESTS_SEED=139b6d3429d65e6e893d54af3bebdf687c4169378dce9b8ef280cb80f4b4cd3e
n = 3

Non-threshold DKG
Protocol Performance:
  - Protocol took 470.57µs to complete
In particular:
  - Stage: 11.05µs
    - Setup networking: 10.86µs (98.3%)
    - Unstaged: 190.00ns (1.7%)
  - Round 1: 150.72µs
    - Compute execution id: 7.23µs (4.8%)
    - Sample x_i, rid_i, chain_code: 66.52µs (44.1%)
    - Sample schnorr commitment: 59.59µs (39.5%)
    - Commit to public data: 17.07µs (11.3%)
    - Unstaged: 311.00ns (0.2%)
  - Round 2: 2.82µs
    - Hash received msgs (reliability check): 2.60µs (92.5%)
    - Unstaged: 212.00ns (7.5%)
  - Round 3: 301.00ns
    - Assert other parties hashed messages (reliability check): 180.00ns (59.8%)
    - Unstaged: 121.00ns (40.2%)
  - Round 4: 33.66µs
    - Validate decommitments: 31.01µs (92.1%)
    - Calculate chain_code: 681.00ns (2.0%)
    - Calculate challege rid: 1.57µs (4.7%)
    - Prove knowledge of `x_i`: 251.00ns (0.7%)
    - Unstaged: 152.00ns (0.5%)
  - Round 5: 272.02µs
    - Validate schnorr proofs: 271.75µs (99.9%)
    - Unstaged: 271.00ns (0.1%)


Threshold DKG
Protocol Performance:
  - Protocol took 1.25ms to complete
In particular:
  - Stage: 1.97µs
    - Setup networking: 1.89µs (95.9%)
    - Unstaged: 81.00ns (4.1%)
  - Round 1: 204.24µs
    - Compute execution id: 1.03µs (0.5%)
    - Sample rid_i, schnorr commitment, polynomial, chain_code: 180.19µs (88.2%)
    - Commit to public data: 22.72µs (11.1%)
    - Unstaged: 302.00ns (0.1%)
  - Round 2: 1.14µs
    - Hash received msgs (reliability check): 962.00ns (84.2%)
    - Unstaged: 180.00ns (15.8%)
  - Round 3: 410.00ns
    - Assert other parties hashed messages (reliability check): 280.00ns (68.3%)
    - Unstaged: 130.00ns (31.7%)
  - Round 4: 780.04µs
    - Validate decommitments: 44.80µs (5.7%)
    - Validate data size: 391.00ns (0.1%)
    - Validate Feldmann VSS: 356.52µs (45.7%)
    - Compute rid: 380.00ns (0.0%)
    - Compute chain_code: 671.00ns (0.1%)
    - Compute Ys: 361.81µs (46.4%)
    - Compute sigma: 390.00ns (0.0%)
    - Calculate challenge: 14.57µs (1.9%)
    - Prove knowledge of `sigma_i`: 371.00ns (0.0%)
    - Unstaged: 150.00ns (0.0%)
  - Round 5: 266.64µs
    - Validate schnorr proofs: 265.11µs (99.4%)
    - Derive resulting public key and other data: 1.34µs (0.5%)
    - Unstaged: 181.00ns (0.1%)


Auxiliary data generation protocol
Protocol Performance:
  - Protocol took 9.48s to complete
In particular:
  - Stage: 11.26µs
    - Retrieve auxiliary data: 181.00ns (1.6%)
    - Setup networking: 10.01µs (88.9%)
    - Precompute execution id and shared state: 952.00ns (8.5%)
    - Unstaged: 120.00ns (1.1%)
  - Round 1: 1.19s
    - Retrieve primes (p and q): 70.00ns (0.0%)
    - Compute paillier decryption key (N): 5.15µs (0.0%)
    - Generate auxiliary params r, λ, t, s: 9.01ms (0.8%)
    - Prove Πprm (ψˆ_i): 1.18s (99.2%)
    - Sample random bytes: 2.40µs (0.0%)
    - Compute hash commitment and sample decommitment: 298.32µs (0.0%)
    - Unstaged: 240.00ns (0.0%)
  - Round 2: 1.42µs
    - Hash received msgs (reliability check): 1.03µs (72.6%)
    - Unstaged: 390.00ns (27.4%)
  - Round 3: 371.00ns
    - Assert other parties hashed messages (reliability check): 201.00ns (54.2%)
    - Unstaged: 170.00ns (45.8%)
  - Round 4: 5.84s
    - Validate round 1 decommitments: 592.63µs (0.0%)
    - Validate П_prm (ψ_i): 2.26s (38.7%)
    - Add together shared random bytes: 2.01µs (0.0%)
    - Compute П_mod (ψ_i): 3.41s (58.3%)
    - Assemble security params for П_fac (ф_i): 6.13µs (0.0%)
    - Compute П_fac (ф_i^j): 171.49ms (2.9%)
    - Unstaged: 1.08µs (0.0%)
  - Round 5: 2.45s
    - Validate ψ_j (П_mod): 2.28s (93.0%)
    - Validate ф_j (П_fac): 171.48ms (7.0%)
    - Assemble auxiliary info: 144.91µs (0.0%)
    - Unstaged: 661.00ns (0.0%)


Signing protocol
Protocol Performance:
  - Protocol took 4.14s to complete
In particular:
  - Stage: 136.77µs
    - Map t-out-of-n protocol to t-out-of-t: 66.74µs (48.8%)
    - Retrieve auxiliary data: 65.93µs (48.2%)
    - Precompute execution id and security params: 521.00ns (0.4%)
    - Setup networking: 3.46µs (2.5%)
    - Unstaged: 120.00ns (0.1%)
  - Round 1: 187.94ms
    - Generate local ephemeral secrets (k_i, y_i, p_i, v_i): 48.46µs (0.0%)
    - Encrypt G_i and K_i: 107.21ms (57.0%)
    - Prove ψ0_j: 80.68ms (42.9%)
    - Unstaged: 871.00ns (0.0%)
  - Round 2: 15.20µs
    - Hash received msgs (reliability check): 14.99µs (98.6%)
    - Unstaged: 211.00ns (1.4%)
  - Round 3: 2.21s
    - Assert other parties hashed messages (reliability check): 651.00ns (0.0%)
    - Verify psi0 proofs: 268.40ms (12.1%)
    - Sample random r, hat_r, s, hat_s, beta, hat_beta: 42.50µs (0.0%)
    - Encrypt D_ji: 70.33ms (3.2%)
    - Encrypt F_ji: 35.72ms (1.6%)
    - Encrypt hat_D_ji: 558.17ms (25.2%)
    - Encrypt hat_F_ji: 35.71ms (1.6%)
    - Prove psi_ji: 783.51ms (35.4%)
    - Prove psiˆ_ji: 208.09ms (9.4%)
    - Prove psi_prime_ji : 252.15ms (11.4%)
    - Unstaged: 2.05µs (0.0%)
  - Round 4: 1.55s
    - Retrieve auxiliary data: 4.93µs (0.0%)
    - Validate psi: 164.64ms (10.6%)
    - Validate hat_psi: 163.54ms (10.5%)
    - Validate psi_prime: 927.83ms (59.8%)
    - Compute Gamma, Delta_i, delta_i, chi_i: 214.65ms (13.8%)
    - Prove psi_prime_prime: 80.81ms (5.2%)
    - Unstaged: 661.00ns (0.0%)
  - Presig output: 184.60ms
    - Validate psi_prime_prime: 184.46ms (99.9%)
    - Calculate presignature: 135.27µs (0.1%)
    - Unstaged: 1.04µs (0.0%)
  - Partial signing: 9.27µs
  - Signature reconstruction: 211.33µs


Copy link

github-actions bot commented Apr 1, 2024

The spec was successfully compiled. PDF is available here.

@survived survived requested a review from maurges April 1, 2024 11:43
@survived survived marked this pull request as ready for review April 1, 2024 11:43
@survived survived merged commit 33320b9 into m Apr 1, 2024
19 checks passed
@survived survived deleted the bump-cggmp21 branch April 1, 2024 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants