Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: configurable ecdsa curve and support secp256k1 #45

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

LanfordCai
Copy link

This pull request introduces support for different elliptic curves in the mpc/binance/ecdsa package. The changes primarily involve modifying the party struct and related methods to accept and utilize an elliptic curve parameter. Additionally, the test files are updated to accommodate these changes.

@LanfordCai LanfordCai force-pushed the feature/configurable_ecdsa_curve branch from 2bf1e67 to 581781f Compare December 28, 2024 03:23
@@ -108,9 +109,9 @@ func (parties parties) Mapping() map[string]*tss.PartyID {
}

func TestTSS(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

we should add another test which initializes it with secp256k1.

Perhaps add a loop that iterates over both curve options?

Copy link
Author

Choose a reason for hiding this comment

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

I have added a loop to iterate over the curves

@@ -31,18 +36,20 @@ func TestFastThresholdBinanceECDSA(t *testing.T) {
var signatureAlgorithms func([]*commLogger) (func(uint16) KeyGenerator, func(uint16) Signer)

verifySig = verifySignatureECDSA
signatureAlgorithms = ecdsaKeygenAndSign
signatureAlgorithms = func(loggers []*commLogger) (func(uint16) KeyGenerator, func(uint16) Signer) {
return ecdsaKeygenAndSign(elliptic.P256(), loggers)
Copy link
Contributor

Choose a reason for hiding this comment

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

same thing, let's have a test case which initializes an instance with secp256k1.

Copy link
Author

Choose a reason for hiding this comment

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

I have added a loop to iterate over the curves

@LanfordCai LanfordCai force-pushed the feature/configurable_ecdsa_curve branch from 29e6d04 to 2657fed Compare December 29, 2024 10:49
@@ -49,6 +49,8 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace github.com/IBM/TSS/mpc/binance/ecdsa => ../mpc/binance/ecdsa
Copy link
Contributor

Choose a reason for hiding this comment

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

no, let's not do this.

You can make a change to the mpc/binance/ecdsa package in this PR, and then wait for this PR to be merged, and then make a new PR that would just take the latest version into the go.mod of the test module.

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