From d5973f86a763735dc6d08a343b6cc67778376e3c Mon Sep 17 00:00:00 2001 From: Piotr Dyraga Date: Wed, 8 Aug 2018 10:56:26 +0200 Subject: [PATCH] Improved GetThresholdKeyGenerator documentation Added information about the required minimum bit length of the public key. Removed the threshold information as we are not sure now if it's valid. We'll investigate it separately and make sure a proper validation for threshold is made. --- thresholdkey_generator.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/thresholdkey_generator.go b/thresholdkey_generator.go index 79e22d0..70819d4 100644 --- a/thresholdkey_generator.go +++ b/thresholdkey_generator.go @@ -46,10 +46,11 @@ type ThresholdKeyGenerator struct { polynomialCoefficients []*big.Int } -// Preferable way to construct the ThresholdKeyGenerator. No verification -// is done on the input values. You need to be sure that nbits is big enough -// and that Threshold > TotalNumberOfDecryptionServers / 2. -// The plaintext space for the key will be Z_n. +// 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. +// The plaintext space for the key will be `Z_N`. func GetThresholdKeyGenerator( publicKeyBitLength int, totalNumberOfDecryptionServers int,