-
Notifications
You must be signed in to change notification settings - Fork 273
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
Comments
and hot adjust the eddsa signing code |
I just submitted a PR, hoping it will be helpful: #299 |
thank you very much |
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 |
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
The text was updated successfully, but these errors were encountered: