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

how to derive eddsa method #298

Closed
malingzhao opened this issue Jul 8, 2024 · 4 comments
Closed

how to derive eddsa method #298

malingzhao opened this issue Jul 8, 2024 · 4 comments

Comments

@malingzhao
Copy link

nc DeriveChildKeyFromHierarchy(indicesHierarchy []uint32, pk *ExtendedKey, mod *big.Int, curve elliptic.Curve) (*big.Int, *ExtendedKey, error) {
var k = pk
var err error
var childKey *ExtendedKey
mod_ := common.ModInt(mod)
ilNum := big.NewInt(0)
for index := range indicesHierarchy {
ilNumOld := ilNum
ilNum, childKey, err = DeriveChildKey(indicesHierarchy[index], k, curve)
if err != nil {
return nil, nil, err
}
k = childKey
ilNum = mod_.Add(ilNum, ilNumOld)
}
return ilNum, k, nil
}

how the eddsa derive

@malingzhao
Copy link
Author

and hot adjust the eddsa signing code

@felicityin
Copy link

I just submitted a PR, hoping it will be helpful: #299

@malingzhao
Copy link
Author

malingzhao commented Jul 9, 2024

thank you very much

@felicityin
Copy link

You need to adjust the public keys like ecdsa does: https://github.com/bnb-chain/tss-lib/blob/master/ecdsa/signing/local_party_test.go#L249

You also need to adjust the private key like ecdsa does: https://github.com/bnb-chain/tss-lib/blob/master/ecdsa/signing/round_1.go#L129

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

No branches or pull requests

2 participants