Pass a public key bit length when creating a threshold key generator #11

Merged
pdyraga merged 16 commits from master into master 2018-08-10 06:50:47 -04:00
Showing only changes of commit 51b5bac262 - Show all commits
+6 -6
View File
@@ -69,12 +69,12 @@ func GetThresholdKeyGenerator(
return nil, errors.New("Public key bit length must be at least 18 bits")
}
generator := new(ThresholdKeyGenerator)
generator.publicKeyBitLength = publicKeyBitLength
generator.TotalNumberOfDecryptionServers = totalNumberOfDecryptionServers
generator.Threshold = threshold
generator.Random = random
return generator, nil
return &ThresholdKeyGenerator{
publicKeyBitLength: publicKeyBitLength,
TotalNumberOfDecryptionServers: totalNumberOfDecryptionServers,
Threshold: threshold,
Random: random,
}, nil
}
func (tkg *ThresholdKeyGenerator) generateSafePrimes() (*big.Int, *big.Int, error) {