func GetThresholdKeyGenerator(
	publicKeyBitLength int,
	totalNumberOfDecryptionServers int,
	threshold int,
	random io.Reader,
) (*ThresholdKeyGenerator, error) {
	if publicKeyBitLength%2 == 1 {
		return nil, errors.New("Public key bit length must be an even number")
	}
	if publicKeyBitLength < 18 {
		return nil, errors.New("Public key bit length must be at least 18 bits")
	}
	return &ThresholdKeyGenerator{
		PublicKeyBitLength:             publicKeyBitLength,
		TotalNumberOfDecryptionServers: totalNumberOfDecryptionServers,
		Threshold:                      threshold,
		random:                         random,
	}, nil
}
GetThresholdKeyGenerator is a preferable way to construct the
ThresholdKeyGenerator.
Due to the various properties that must be met for the threshold key to be
considered valid, the minimum public key `N` bit length is 18 bits and the
public key bit length should be an even number.
The plaintext space for the key will be `Z_N`.
package paillier
import (
	"crypto/rand"
	"errors"
	"io"
	"math/big"
	"time"
)
type ThresholdKeyGenerator struct {
	PublicKeyBitLength             int
	TotalNumberOfDecryptionServers int
	Threshold                      int
	random                         io.Reader
	p *big.Int  
	q *big.Int  
	p1 *big.Int  
	q1 *big.Int  
	n       *big.Int  
	m       *big.Int  
	nSquare *big.Int  
	nm      *big.Int  
	d *big.Int
	v *big.Int
	polynomialCoefficients []*big.Int
}