dfns / cggmp21

State-of-art threshold ECDSA in Rust
Apache License 2.0
41 stars 6 forks source link

Update changelog #86

Closed survived closed 3 months ago

github-actions[bot] commented 3 months ago

Benchmark Result

Benchmarks ```text RUST_TESTS_SEED=4d4869152350faa709f5a8ac26349352b6c1c593a5a6e1b6e95e0ae6d76c073e n = 3 Non-threshold DKG Protocol Performance: - Protocol took 473.54µs to complete In particular: - Stage: 14.24µs - Setup networking: 14.04µs (98.6%) - Unstaged: 201.00ns (1.4%) - Round 1: 146.57µs - Compute execution id: 6.08µs (4.1%) - Sample x_i, rid_i, chain_code: 64.00µs (43.7%) - Sample schnorr commitment: 59.46µs (40.6%) - Commit to public data: 16.68µs (11.4%) - Unstaged: 351.00ns (0.2%) - Round 2: 2.76µs - Hash received msgs (reliability check): 2.58µs (93.4%) - Unstaged: 181.00ns (6.6%) - Round 3: 300.00ns - Assert other parties hashed messages (reliability check): 160.00ns (53.3%) - Unstaged: 140.00ns (46.7%) - Round 4: 70.96µs - Validate decommitments: 64.24µs (90.5%) - Calculate chain_code: 1.11µs (1.6%) - Calculate challege rid: 5.15µs (7.3%) - Prove knowledge of `x_i`: 321.00ns (0.5%) - Unstaged: 140.00ns (0.2%) - Round 5: 238.71µs - Validate schnorr proofs: 238.35µs (99.8%) - Unstaged: 361.00ns (0.2%) Threshold DKG Protocol Performance: - Protocol took 1.32ms to complete In particular: - Stage: 1.68µs - Setup networking: 1.59µs (94.7%) - Unstaged: 90.00ns (5.3%) - Round 1: 207.17µs - Compute execution id: 1.31µs (0.6%) - Sample rid_i, schnorr commitment, polynomial, chain_code: 182.97µs (88.3%) - Commit to public data: 22.69µs (11.0%) - Unstaged: 190.00ns (0.1%) - Round 2: 1.10µs - Hash received msgs (reliability check): 941.00ns (85.4%) - Unstaged: 161.00ns (14.6%) - Round 3: 342.00ns - Assert other parties hashed messages (reliability check): 190.00ns (55.6%) - Unstaged: 152.00ns (44.4%) - Round 4: 844.06µs - Validate decommitments: 44.54µs (5.3%) - Validate data size: 291.00ns (0.0%) - Validate Feldmann VSS: 392.91µs (46.5%) - Compute rid: 491.00ns (0.1%) - Compute chain_code: 1.16µs (0.1%) - Compute Ys: 388.79µs (46.1%) - Compute sigma: 501.00ns (0.1%) - Calculate challenge: 14.81µs (1.8%) - Prove knowledge of `sigma_i`: 431.00ns (0.1%) - Unstaged: 140.00ns (0.0%) - Round 5: 268.50µs - Validate schnorr proofs: 267.03µs (99.5%) - Derive resulting public key and other data: 1.31µs (0.5%) - Unstaged: 161.00ns (0.1%) Auxiliary data generation protocol Protocol Performance: - Protocol took 9.54s to complete In particular: - Stage: 11.71µs - Retrieve auxiliary data: 240.00ns (2.0%) - Setup networking: 10.26µs (87.6%) - Precompute execution id and shared state: 1.13µs (9.7%) - Unstaged: 81.00ns (0.7%) - Round 1: 1.16s - Retrieve primes (p and q): 100.00ns (0.0%) - Compute paillier decryption key (N): 7.83µs (0.0%) - Generate auxiliary params r, λ, t, s: 9.02ms (0.8%) - Prove Πprm (ψˆ_i): 1.16s (99.2%) - Sample random bytes: 1.84µs (0.0%) - Compute hash commitment and sample decommitment: 273.91µs (0.0%) - Unstaged: 260.00ns (0.0%) - Round 2: 1.28µs - Hash received msgs (reliability check): 981.00ns (76.5%) - Unstaged: 301.00ns (23.5%) - Round 3: 361.00ns - Assert other parties hashed messages (reliability check): 200.00ns (55.4%) - Unstaged: 161.00ns (44.6%) - Round 4: 5.89s - Validate round 1 decommitments: 535.76µs (0.0%) - Validate П_prm (ψ_i): 2.28s (38.7%) - Add together shared random bytes: 1.99µs (0.0%) - Compute П_mod (ψ_i): 3.44s (58.4%) - Assemble security params for П_fac (ф_i): 17.01µs (0.0%) - Compute П_fac (ф_i^j): 171.35ms (2.9%) - Unstaged: 1.36µs (0.0%) - Round 5: 2.48s - Validate ψ_j (П_mod): 2.31s (93.0%) - Validate ф_j (П_fac): 172.42ms (6.9%) - Assemble auxiliary info: 144.19µs (0.0%) - Unstaged: 2.47µs (0.0%) Signing protocol Protocol Performance: - Protocol took 4.23s to complete In particular: - Stage: 136.46µs - Map t-out-of-n protocol to t-out-of-t: 65.59µs (48.1%) - Retrieve auxiliary data: 66.45µs (48.7%) - Precompute execution id and security params: 501.00ns (0.4%) - Setup networking: 3.82µs (2.8%) - Unstaged: 90.00ns (0.1%) - Round 1: 188.64ms - Generate local ephemeral secrets (k_i, y_i, p_i, v_i): 48.91µs (0.0%) - Encrypt G_i and K_i: 107.49ms (57.0%) - Prove ψ0_j: 81.10ms (43.0%) - Unstaged: 1.11µs (0.0%) - Round 2: 13.88µs - Hash received msgs (reliability check): 13.62µs (98.1%) - Unstaged: 261.00ns (1.9%) - Round 3: 2.30s - Assert other parties hashed messages (reliability check): 1.01µs (0.0%) - Verify psi0 proofs: 269.52ms (11.7%) - Sample random r, hat_r, s, hat_s, beta, hat_beta: 53.95µs (0.0%) - Encrypt D_ji: 71.59ms (3.1%) - Encrypt F_ji: 38.12ms (1.7%) - Encrypt hat_D_ji: 623.63ms (27.2%) - Encrypt hat_F_ji: 36.54ms (1.6%) - Prove psi_ji: 790.09ms (34.4%) - Prove psiˆ_ji: 208.79ms (9.1%) - Prove psi_prime_ji : 257.67ms (11.2%) - Unstaged: 3.15µs (0.0%) - Round 4: 1.56s - Retrieve auxiliary data: 5.81µs (0.0%) - Validate psi: 164.51ms (10.6%) - Validate hat_psi: 164.83ms (10.6%) - Validate psi_prime: 933.17ms (59.8%) - Compute Gamma, Delta_i, delta_i, chi_i: 215.33ms (13.8%) - Prove psi_prime_prime: 81.48ms (5.2%) - Unstaged: 600.00ns (0.0%) - Presig output: 184.92ms - Validate psi_prime_prime: 184.78ms (99.9%) - Calculate presignature: 134.63µs (0.1%) - Unstaged: 1.79µs (0.0%) - Partial signing: 9.96µs - Signature reconstruction: 200.98µs ```
github-actions[bot] commented 3 months ago

The spec was successfully compiled. PDF is available here.