taurushq-io / multi-party-sig

Implementation of protocols for threshold signatures
Apache License 2.0
312 stars 120 forks source link

ChainKey is not saved at the end of Frost keygen #114

Open lucky1024 opened 11 months ago

lucky1024 commented 11 months ago

ChainKey is not saved at the end of Frost keygen:

func (r *round3) Finalize(chan<- *round.Message) (round.Session, error) {
    ChainKey := types.EmptyRID()
    for _, j := range r.PartyIDs() {
        ChainKey.XOR(r.ChainKeys[j])
    }

The variable ChainKey is never used later.

https://github.com/taurusgroup/multi-party-sig/blob/4d84aafb57b437da1b933db9a265fb7ce4e7c138/protocols/frost/keygen/round3.go#L99C1-L103C3

The expected result: save ChainKey into TaprootConfig/Config.