Skip to content

Commit

Permalink
Fix issue taurushq-io#114 (ChainKey is not saved at the end of Frost …
Browse files Browse the repository at this point in the history
…keygen)
lucky1024 committed Dec 31, 2023
1 parent 4d84aaf commit 382f835
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions protocols/frost/keygen/keygen_test.go
Original file line number Diff line number Diff line change
@@ -45,6 +45,8 @@ func checkOutput(t *testing.T, rounds []round.Session, parties party.IDSlice) {

actualPublicKey := privateKey.ActOnBase()

require.True(t, len(chainKey) > 0, "chainKey is empty")

require.True(t, publicKey.Equal(actualPublicKey))

shares := make(map[party.ID]curve.Scalar)
@@ -128,6 +130,8 @@ func checkOutputTaproot(t *testing.T, rounds []round.Session, parties party.IDSl

require.True(t, actualPublicKey.Equal(effectivePublic))

require.True(t, len(chainKey) > 0, "chainKey is empty")

shares := make(map[party.ID]curve.Scalar)
for _, result := range results {
shares[result.ID] = result.PrivateShare
2 changes: 2 additions & 0 deletions protocols/frost/keygen/round3.go
Original file line number Diff line number Diff line change
@@ -162,6 +162,7 @@ func (r *round3) Finalize(chan<- *round.Message) (round.Session, error) {
Threshold: r.threshold,
PrivateShare: r.privateShare.(*curve.Secp256k1Scalar),
PublicKey: YSecp.XBytes()[:],
ChainKey: ChainKey,
VerificationShares: secpVerificationShares,
}), nil
}
@@ -171,6 +172,7 @@ func (r *round3) Finalize(chan<- *round.Message) (round.Session, error) {
Threshold: r.threshold,
PrivateShare: r.privateShare,
PublicKey: r.publicKey,
ChainKey: ChainKey,
VerificationShares: party.NewPointMap(r.verificationShares),
}), nil
}

0 comments on commit 382f835

Please sign in to comment.