func (r *round4) MessageContent() round.Content {
	return &message4{
		ProofLog: zklogstar.Empty(r.Group()),
	}
}
MessageContent implements round.Round.
package sign
import (
	"errors"
	"github.com/taurusgroup/multi-party-sig/internal/round"
	"github.com/taurusgroup/multi-party-sig/pkg/math/curve"
	"github.com/taurusgroup/multi-party-sig/pkg/party"
	zklogstar "github.com/taurusgroup/multi-party-sig/pkg/zk/logstar"
)
var _ round.Round = (*round4)(nil)
type round4 struct {
	*round3
	DeltaShares map[party.ID]curve.Scalar
	BigDeltaShares map[party.ID]curve.Point
	Gamma curve.Point
	ChiShare curve.Scalar
}
type message4 struct {
	ProofLog *zklogstar.Proof
}
type broadcast4 struct {
	round.NormalBroadcastContent
	DeltaShare curve.Scalar
	BigDeltaShare curve.Point
}
func (r *round4) StoreBroadcastMessage(msg round.Message) error {
	body, ok := msg.Content.(*broadcast4)
	if !ok || body == nil {
		return round.ErrInvalidContent
	}
	if body.DeltaShare.IsZero() || body.BigDeltaShare.IsIdentity() {
		return round.ErrNilFields
	}
	r.BigDeltaShares[msg.From] = body.BigDeltaShare
	r.DeltaShares[msg.From] = body.DeltaShare
	return nil
}
func (r *round4) VerifyMessage(msg round.Message) error {
	from, to := msg.From, msg.To
	body, ok := msg.Content.(*message4)
	if !ok || body == nil {
		return round.ErrInvalidContent
	}
	zkLogPublic := zklogstar.Public{
		C:      r.K[from],
		X:      r.BigDeltaShares[from],
		G:      r.Gamma,
		Prover: r.Paillier[from],
		Aux:    r.Pedersen[to],
	}
	if !body.ProofLog.Verify(r.HashForID(from), zkLogPublic) {
		return errors.New("failed to validate log proof")
	}
	return nil
}
func (round4) StoreMessage(round.Message) error {
	return nil
}
func (r *round4) Finalize(out chan<- *round.Message) (round.Session, error) {
	Delta := r.Group().NewScalar()
	BigDelta := r.Group().NewPoint()
	for _, j := range r.PartyIDs() {
		Delta.Add(r.DeltaShares[j])
		BigDelta = BigDelta.Add(r.BigDeltaShares[j])
	}
	deltaComputed := Delta.ActOnBase()
	if !deltaComputed.Equal(BigDelta) {
		return r.AbortRound(errors.New("computed Δ is inconsistent with [δ]G")), nil
	}
	deltaInv := r.Group().NewScalar().Set(Delta).Invert()  
	BigR := deltaInv.Act(r.Gamma)                          
	R := BigR.XScalar()                                    
	km := curve.FromHash(r.Group(), r.Message)
	km.Mul(r.KShare)
	SigmaShare := r.Group().NewScalar().Set(R).Mul(r.ChiShare).Add(km)
	err := r.BroadcastMessage(out, &broadcast5{SigmaShare: SigmaShare})
	if err != nil {
		return r, err
	}
	return &round5{
		round4:      r,
		SigmaShares: map[party.ID]curve.Scalar{r.SelfID(): SigmaShare},
		Delta:       Delta,
		BigDelta:    BigDelta,
		BigR:        BigR,
		R:           R,
	}, nil
}
func (message4) RoundNumber() round.Number { return 4 }