Closed malingzhao closed 3 months ago
and hot adjust the eddsa signing code
I just submitted a PR, hoping it will be helpful: https://github.com/bnb-chain/tss-lib/pull/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