Skip to content

feat: Add comprehensive Secp256K1-TR ciphersuite support for Bitcoin …#537

Open
wolfmcnally wants to merge 2 commits intoZcashFoundation:mainfrom
BlockchainCommons:secp256k1-tr-support
Open

feat: Add comprehensive Secp256K1-TR ciphersuite support for Bitcoin …#537
wolfmcnally wants to merge 2 commits intoZcashFoundation:mainfrom
BlockchainCommons:secp256k1-tr-support

Conversation

@wolfmcnally
Copy link
Copy Markdown

…taproot compatibility

This commit implements full support for the Secp256K1-TR ciphersuite across all FROST tools, enabling Bitcoin taproot-compatible threshold signatures alongside existing Ed25519 and RedPallas support.

Core Changes:

  • Dependency Management: Added frost-secp256k1-tr v2.1.0 to workspace and all relevant crates
  • CLI Integration: All command-line tools now accept secp256k1-tr as a ciphersuite option:
    • trusted-dealer: Generate threshold keys for Bitcoin taproot
    • dkg: Distributed key generation with Secp256K1-TR
    • coordinator: Coordinate signing sessions with taproot keys
    • participant: Participate in taproot threshold signing

Implementation Details:

  • Ciphersuite Helper: Extended ciphersuite_helper.rs to map Secp256K1Sha256TR::ID to helper implementations
  • CLI Dispatching: Added string-to-type mapping for "secp256k1-tr" across all CLI entry points
  • Trait Implementations: Implemented MaybeIntoEvenY trait for Secp256K1Sha256TR (no-op, as even Y conversion not required)
  • Type Safety: Added proper type dispatching based on ciphersuite ID in all coordinator and participant modules

Testing & Documentation:

  • Integration Tests: Added comprehensive test coverage for Secp256K1-TR in frostd integration tests
  • README Updates: Updated documentation to reflect three supported ciphersuites with usage examples
  • Supply Chain: Added frost-secp256k1-tr exemption to cargo-vet configuration

Files Modified:

  • Cargo.toml files across workspace for dependency management
  • CLI modules for string-to-ciphersuite mapping
  • Helper functions for ciphersuite-specific operations
  • Integration test suite for complete flow verification
  • Documentation reflecting new Bitcoin taproot support

Verification:

  • All existing tests continue to pass
  • New Secp256K1-TR integration test validates complete FROST signing flow
  • CLI tools accept and properly handle secp256k1-tr option across all workflows

This enhancement maintains backward compatibility while extending FROST tools to support Bitcoin taproot transactions through threshold signatures, completing the multi-blockchain support matrix.

…taproot compatibility

This commit implements full support for the Secp256K1-TR ciphersuite across all FROST tools,
enabling Bitcoin taproot-compatible threshold signatures alongside existing Ed25519 and RedPallas support.

### Core Changes:
- **Dependency Management**: Added frost-secp256k1-tr v2.1.0 to workspace and all relevant crates
- **CLI Integration**: All command-line tools now accept `secp256k1-tr` as a ciphersuite option:
  - trusted-dealer: Generate threshold keys for Bitcoin taproot
  - dkg: Distributed key generation with Secp256K1-TR
  - coordinator: Coordinate signing sessions with taproot keys
  - participant: Participate in taproot threshold signing

### Implementation Details:
- **Ciphersuite Helper**: Extended ciphersuite_helper.rs to map Secp256K1Sha256TR::ID to helper implementations
- **CLI Dispatching**: Added string-to-type mapping for "secp256k1-tr" across all CLI entry points
- **Trait Implementations**: Implemented MaybeIntoEvenY trait for Secp256K1Sha256TR (no-op, as even Y conversion not required)
- **Type Safety**: Added proper type dispatching based on ciphersuite ID in all coordinator and participant modules

### Testing & Documentation:
- **Integration Tests**: Added comprehensive test coverage for Secp256K1-TR in frostd integration tests
- **README Updates**: Updated documentation to reflect three supported ciphersuites with usage examples
- **Supply Chain**: Added frost-secp256k1-tr exemption to cargo-vet configuration

### Files Modified:
- Cargo.toml files across workspace for dependency management
- CLI modules for string-to-ciphersuite mapping
- Helper functions for ciphersuite-specific operations
- Integration test suite for complete flow verification
- Documentation reflecting new Bitcoin taproot support

### Verification:
- All existing tests continue to pass
- New Secp256K1-TR integration test validates complete FROST signing flow
- CLI tools accept and properly handle secp256k1-tr option across all workflows

This enhancement maintains backward compatibility while extending FROST tools to support Bitcoin
taproot transactions through threshold signatures, completing the multi-blockchain support matrix.
@natalieesk
Copy link
Copy Markdown
Contributor

Thank you for this. We will take a further look shortly.

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