8000 Simon/passive robust ecdsa by SimonRastikian · Pull Request #15 · near/threshold-signatures · GitHub
[go: up one dir, main page]

Skip to content

Conversation

SimonRastikian
Copy link
Contributor
@SimonRastikian SimonRastikian commented Jul 21, 2025

This massive PR includes:

  • the implementation of the Robust ECDSA scheme with passive security
  • small amendmend to the ot-based ecdsa and dkg to ensure higher level of security
  • a unification of types (no more CSCurve trait)
  • an isolation of crypto functions
  • a deletion of compat folder, constant.rs and math.rs files
  • a generalization of testing functions (more to come in a future PR)
  • Closes [Task] Add a proper LICENSE file #19

The review might go smoother if it is isolated into reviewing one algorithm at a time (EdDSA folder, OT-based ECDSA (old cait-sith), and the robust-ecdsa)

< 10000 /task-lists>

@SimonRastikian SimonRastikian self-assigned this Jul 21, 2025
@SimonRastikian SimonRastikian marked this pull request as draft July 21, 2025 13:02
@SimonRastikian SimonRastikian force-pushed the simon/passive-robust-ecdsa branch from e5790a6 to 8d1fc35 Compare July 21, 2025 13:14
@SimonRastikian SimonRastikian force-pushed the simon/passive-robust-ecdsa branch from 8d1fc35 to c6b1ed1 Compare July 21, 2025 14:21
Check that me is in participant list of presign and sign
@SimonRastikian SimonRastikian force-pushed the simon/passive-robust-ecdsa branch from c6b1ed1 to a4cb954 Compare July 21, 2025 14:29
@SimonRastikian SimonRastikian force-pushed the simon/passive-robust-ecdsa branch from a4cb954 to 3bcc578 Compare July 21, 2025 14:34
@SimonRastikian SimonRastikian force-pushed the simon/passive-robust-ecdsa branch from 3bcc578 to f58abe6 Compare July 21, 2025 15:09
@netrome netrome requested a review from Copilot July 23, 2025 11:12
Copy link
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This massive PR implements the Robust ECDSA scheme with passive security and restructures the codebase with major architectural changes. The changes include implementing a new robust ECDSA algorithm, unifying type systems, isolating crypto functions, and generalizing testing infrastructure.

  • Implementation of Robust ECDSA scheme with passive security alongside existing OT-based ECDSA
  • Removal of the CSCurve trait in favor of unified Frost library types (Secp256K1Sha256)
  • Reorganization of crypto functions into dedicated modules with cleaner separation

Reviewed Changes

Copilot reviewed 54 out of 67 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/serde.rs Complete removal of custom serialization utilities
src/protocol/mod.rs Updated imports and added new error types for robust ECDSA
src/protocol/internal.rs Inlined encoding functions and updated deserialization calls
src/participants.rs Unified lagrange coefficient calculation and improved method signatures
src/lib.rs Stripped library documentation and removed legacy module exports
src/generic_dkg.rs Major refactoring to use Frost types and new polynomial/commitment system
src/ecdsa/robust_ecdsa/* New implementation of passive robust ECDSA scheme
src/ecdsa/ot_based_ecdsa/* Refactored OT-based ECDSA to use unified types
Comments suppressed due to low confidence (1)

src/generic_dkg.rs:362

  • [nitpick] Variable name 'all_full_commitments' is inconsistent with the previous 'all_commitments'. Consider using a more descriptive name that clearly indicates this contains commitments with proper threshold size.
    let mut all_full_commitments = ParticipantMap::new(&participants);

Return type should be &[Participant] instead of &Vec to provide a more flexible API that doesn't expose the underlying container type.
@SimonRastikian SimonRastikian force-pushed the simon/passive-robust-ecdsa branch from 0102933 to f788f81 Compare July 23, 2025 11:32
Copy link
Collaborator
@netrome netrome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Partial review, but already a few things that should be addressed. Please add the license, fix the panic in Polynomial::eval_on_zero and add unit tests for the polynomial module.

Copy link
Contributor
@kevindeforth kevindeforth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a partial review, trying to get acquainted with the code.

README.md Outdated
This repository offers a cryptographic implementation of **threshold ECDSA** and **threshold EdDSA**. The implementation has undergone professional <ins>audit</ins> and supports arbitrary numbers
of signing parties and thresholds.

The former implementation is imported from the [Cait-Sith](https://github.com/cronokirby/cait-sith) library and amended to meet our industrial needs. This includes modifying parts of the code to improve the performance, augment the security, and generalize functions' syntax.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nit and a follow-up, but it would be nice to have a more specific tldr of the changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree! how about we push this to when closing #5?

@netrome netrome self-requested a review July 25, 2025 22:23
Copy link
Collaborator
@netrome netrome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have to leave this review now as I'm out until August 13. Due to the size and complexity of this PR, I expect the remaining reviewing work to be a major effort. I wish you all the best in uncovering the best way forward for this PR.

Simon Rastikian added 2 commits July 28, 2025 14:32
…f and derefmut traits to prevent exposing the coefficients and popping elements from the polynomial
@SimonRastikian
Copy link
Contributor Author

Now I close this PR as I created instead PRs #21 #22 #23

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.

[Task] Add a proper LICENSE file
7 participants
0