Name parameters for the safe prime generator call
`4` and `120*time.Seconds` were just some magic numbers in the code. We decided to move them to separate value declarations to make the code more self-explanatory.
This commit is contained in:
1 file changed
+3
-1
@@ -59,7 +59,9 @@ func GetThresholdKeyGenerator(nbits, TotalNumberOfDecryptionServers, Threshold i
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (tkg *ThresholdKeyGenerator) generateSafePrimes() (*big.Int, *big.Int, error) {
|
func (tkg *ThresholdKeyGenerator) generateSafePrimes() (*big.Int, *big.Int, error) {
|
||||||
return GenerateSafePrime(tkg.nbits, 4, 120*time.Second, tkg.Random)
|
concurrencyLevel := 4
|
||||||
|
timeout := 120 * time.Second
|
||||||
|
return GenerateSafePrime(tkg.nbits, concurrencyLevel, timeout, tkg.Random)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (tkg *ThresholdKeyGenerator) initPandP1() error {
|
func (tkg *ThresholdKeyGenerator) initPandP1() error {
|
||||||
|
|||||||
Reference in new issue
Block a user