Skip to content

Update crypto dependency, remove From<> protocol trait usage - #1625

Open
ycscaly wants to merge 7 commits into
dev-v1.2.xfrom
save-private-inputs2
Open

Update crypto dependency, remove From<> protocol trait usage#1625
ycscaly wants to merge 7 commits into
dev-v1.2.xfrom
save-private-inputs2

Conversation

@ycscaly

@ycscaly ycscaly commented Jan 19, 2026

Copy link
Copy Markdown
Contributor

No description provided.

ycscaly and others added 5 commits January 19, 2026 08:52
Updated axum-server from commit f44323e to c4cfbad to fix compatibility
issue with hyper v1 and missing Buf trait implementation.
- Updated crypto-bigint from 8aabcee5 to 7ba139806eea9944bce6bc7f606d07ec0848ee01 (v0.7.0-rc.9)
- Updated in all Cargo.toml files (workspace root, dwallet-mpc-centralized-party, dwallet-mpc-types, sdk/ika-wasm)
- Updated Cargo.lock accordingly

This addresses the dependency update requirement for crypto-bigint to use the latest master branch.
- Updated cryptography-private to latest commit (d2008c4c)
- Reverted crypto-bigint to compatible version (8aabcee5)
- Removed duplicate patch sections from child crates
- Added missing protocol type aliases for EdDSA and Schnorr signatures
- Fixed protocol trait bounds for signing functions

Note: Some trait bound issues remain in dwallet-mpc-centralized-party
that require further investigation into API changes.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
- Changed SignCentralizedParty to use the type from sign::Protocol trait
- Updated generic sign functions to use consistent type paths
- Removed unused type alias SignCentralizedParty<P>
- This ensures proper party type usage from 2pc-mpc for each protocol
- Removed generic sign functions that relied on From trait for SignCentralizedPartyPublicInput
- Implemented protocol-specific sign functions for each protocol (ECDSA, Taproot, EdDSA, Schnorr)
- Each protocol now directly constructs its own SignCentralizedPartyPublicInput
- Separated implementations for centralized and decentralized party DKG outputs
- Fixed compilation issues by providing concrete implementations instead of generic ones

This restructuring addresses the fact that the generic Protocol trait doesn't provide
a From implementation for SignCentralizedPartyPublicInput, while each specific protocol
(ECDSA, Schnorr, etc.) has its own From implementation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
type Curve25519DKGProtocol = twopc_mpc::curve25519::class_groups::DKGProtocol;
type Curve25519EdDSAProtocol = twopc_mpc::curve25519::class_groups::EdDSAProtocol;
type RistrettoDKGProtocol = twopc_mpc::ristretto::class_groups::DKGProtocol;
type RistrettoSchnorrProtocol = twopc_mpc::ristretto::class_groups::SchnorrkelSubstrateProtocol;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
type RistrettoSchnorrProtocol = twopc_mpc::ristretto::class_groups::SchnorrkelSubstrateProtocol;
type SchnorrkelSubstrateProtocol = twopc_mpc::ristretto::class_groups::SchnorrkelSubstrateProtocol;

@claude

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@claude why didnt you do it

message: Vec<u8>,
hash_scheme: HashScheme,
decentralized_party_dkg_public_output: &[u8],
centralized_party_dkg_public_output: &[u8],

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@claude why did you change this? it should be the decentralized_party_dkg_public_output, it wasn't a mistake, you made an error.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@claude why didnt you do this comment

}
}

fn advance_sign_by_protocol<P: twopc_mpc::sign::Protocol>(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

no, what we should do instead, is seperate into two functions:
advance_ecdsa_sign()
advance_schnorr_sign()

Both of these should be generic, but not on P: twopc_mpc::sign::Protocol>, instead on the generic parameters to the corresponding type that implements the SignCentralizedParty

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@claude why didnt you do this comment

ycscaly and others added 2 commits January 19, 2026 23:19
Apply cargo fmt to fix CI format check failures

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Fix type alias: Rename RistrettoSchnorrProtocol to SchnorrkelSubstrateProtocol
- Fix variable naming: Use decentralized_party_dkg_public_output in decentralized functions
- Add placeholder generic functions advance_ecdsa_sign() and advance_schnorr_sign() for future refactoring

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
ycscaly pushed a commit that referenced this pull request Jan 20, 2026
- Fix variable naming in advance_sign_by_protocol_with_decentralized_party_dkg_output:
  renamed local variable from centralized_party_dkg_public_output to
  decentralized_party_dkg_public_output to correctly reflect the data source

- Split advance_sign_by_protocol into separate ECDSA and Schnorr functions:
  - advance_ecdsa_sign() for ECDSA signature algorithms
  - advance_schnorr_sign() for Schnorr signature algorithms (Taproot, EdDSA, SchnorrkelSubstrate)

- Split wrapper functions accordingly:
  - advance_ecdsa_sign_with_decentralized_party_dkg_output
  - advance_schnorr_sign_with_decentralized_party_dkg_output
  - advance_ecdsa_sign_with_centralized_party_dkg_output
  - advance_schnorr_sign_with_centralized_party_dkg_output

- Update all callers to use appropriate ECDSA or Schnorr function based on signature algorithm
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will not be closed automatically, but it may be prioritized lower. Please update if it is still relevant.

@github-actions github-actions Bot added the stale label Mar 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant