Open bschoening opened 3 years ago
In the FF3 constructor. The 3rd check in the ‘if’ statement looks redundant. It seems to test if maxLen > maxLen, which must always be false?
maxLen := uint32(math.Floor((192 / math.Log2(float64(radix)))))
// Make sure 2 <= minLength <= maxLength < 2*floor(log base radix of 2^96) is satisfied if (minLen < 2) || (maxLen < minLen) || (float64(maxLen) > (192 / math.Log2(float64(radix)))) { return newCipher, errors.New("minLen or maxLen invalid, adjust your radix”) }
Description of Issue
In the FF3 constructor. The 3rd check in the ‘if’ statement looks redundant. It seems to test if maxLen > maxLen, which must always be false?
maxLen := uint32(math.Floor((192 / math.Log2(float64(radix)))))
// Make sure 2 <= minLength <= maxLength < 2*floor(log base radix of 2^96) is satisfied if (minLen < 2) || (maxLen < minLen) || (float64(maxLen) > (192 / math.Log2(float64(radix)))) { return newCipher, errors.New("minLen or maxLen invalid, adjust your radix”) }