// Checks if the number of received, unique shares is less than the
// required threshold.
// This method does not execute ZKP on received shares.
Checks if the number of received, unique shares is less than the
required threshold.
This method does not execute ZKP on received shares.
// Checks if the number of received unique shares is less than the // required threshold . // This method does not execute ZKP on received shares .
func (tk *ThresholdPublicKey) verifyPartialDecryptions(shares []*PartialDecryption) error {
	if len(shares) < tk.Threshold {
		return errors.New("Threshold not meet")
	}
	tmp := make(map[int]bool)
	for _, share := range shares {
		tmp[share.Id] = true
	}
	if len(tmp) != len(shares) {
		return errors.New("two shares has been created by the same server")
	}
	return nil
}
func ( tk * ThresholdPublicKey ) verifyPartialDecryptions ( shares [ ] * PartialDecryption ) error { if len ( shares ) < tk . Threshold { return errors . New ( " " ) } tmp := make ( map [ int ] bool ) for _ , share := range shares { tmp [ share . Id ] = true } if len ( tmp ) != len ( shares ) { return errors . New ( " " ) } return nil }
Checks if the number of received, unique shares is less than the
required threshold.
Checks if the number of received unique shares is less than the required threshold .