Skip to content

Conversation

sasikumar-bitgo
Copy link
Contributor

@sasikumar-bitgo sasikumar-bitgo commented Sep 29, 2025

Description

This pull request adds EdDSA multi-party schnorr Distributed Key Generation (DKG) support to the BitGoJS SDK, specifically within the sdk-lib-mpc module.
It introduces new dependencies for Silence Laboratories' EdDSA WASM libraries, implements the EdDSA DKG protocol for multi-party threshold key generation, and provides supporting types and utility functions.
The PR also includes comprehensive unit tests that cover key share generation, deterministic and random seeding, and utility behaviors.

Issue Number

TICKET: WP-6122

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Unit Testing

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My code compiles correctly for both Node and Browser environments
  • I have commented my code, particularly in hard-to-understand areas
  • My commits follow Conventional Commits and I have properly described any BREAKING CHANGES
  • The ticket or github issue was included in the commit message as a reference
  • I have made corresponding changes to the documentation and on any new/updated functions and/or methods - jsdoc
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@sasikumar-bitgo sasikumar-bitgo force-pushed the feat/WP-6122/eddsa-dkg branch 10 times, most recently from b400412 to 0a2b581 Compare October 6, 2025 04:44
@sasikumar-bitgo sasikumar-bitgo force-pushed the feat/WP-6122/eddsa-dkg branch 5 times, most recently from 81eae25 to 8fbb6dd Compare October 6, 2025 11:54
@sasikumar-bitgo sasikumar-bitgo marked this pull request as ready for review October 6, 2025 11:54
@sasikumar-bitgo sasikumar-bitgo requested review from a team as code owners October 6, 2025 11:54
@sasikumar-bitgo sasikumar-bitgo changed the title feat(sdk-lib-mpc): Added EdDsa DKG DKLs Impl feat(sdk-lib-mpc): Added EdDSA DKG multi-party schnorr Impl Oct 6, 2025
@sasikumar-bitgo sasikumar-bitgo force-pushed the feat/WP-6122/eddsa-dkg branch 2 times, most recently from d16e5d8 to e0a37eb Compare October 6, 2025 12:48
@pranavjain97 pranavjain97 requested a review from Copilot October 6, 2025 21:52
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 pull request adds EdDSA multi-party Schnorr Distributed Key Generation (DKG) support to the BitGoJS SDK's sdk-lib-mpc module, enabling threshold key generation using Silence Laboratories' EdDSA WASM libraries.

Key changes:

  • Introduces EdDSA DKG protocol implementation with support for 3-party, threshold-2 key generation
  • Adds comprehensive utility functions for key share management and byte concatenation
  • Includes extensive unit tests covering deterministic/random seeding, session management, and protocol execution

Reviewed Changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
modules/sdk-lib-mpc/src/tss/eddsa-mps/dkg.ts Core DKG class implementing the EdDSA multi-party Schnorr protocol
modules/sdk-lib-mpc/src/tss/eddsa-mps/types.ts Type definitions for EdDSA key shares and WASM module interfaces
modules/sdk-lib-mpc/src/tss/eddsa-mps/util.ts Utility functions for byte concatenation and key share processing
modules/sdk-lib-mpc/src/tss/eddsa-mps/index.ts Module exports for EdDSA MPS functionality
modules/sdk-lib-mpc/src/tss/index.ts Added export for eddsa-mps module
modules/sdk-lib-mpc/package.json Added dependencies for Silence Laboratories EdDSA WASM libraries
modules/sdk-lib-mpc/test/unit/tss/eddsa/dkg.ts Comprehensive unit tests for DKG protocol execution
modules/sdk-lib-mpc/test/unit/tss/eddsa/eddsa-utils.ts Unit tests for utility functions
modules/sdk-lib-mpc/test/unit/tss/eddsa/util.ts Test utility for generating EdDSA DKG key shares

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

TICKET: WP-6122
- Add EdDSA DKG DKLS implementation with core types and utilities
- Implement distributed key generation for EdDSA signatures
Copy link
Contributor

@pranavjain97 pranavjain97 left a comment

Choose a reason for hiding this comment

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

Nice work! You have a typo on eddsa-mps -> eddsa-mpc.

Comment on lines +33 to +34
/** DKG session has not been initialized */
Uninitialized = 'Uninitialized',
Copy link
Contributor

Choose a reason for hiding this comment

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

when would it be in this state? is it needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When the DKG class instance is created.

@sasikumar-bitgo
Copy link
Contributor Author

Nice work! You have a typo on eddsa-mps -> eddsa-mpc.

It was intentional MPS (multi party schnorr)

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.

3 participants