Skip to content
This repository has been archived by the owner on Feb 2, 2022. It is now read-only.

FF3: redundant maxLen check #34

Open
bschoening opened this issue Mar 7, 2021 · 0 comments
Open

FF3: redundant maxLen check #34

bschoening opened this issue Mar 7, 2021 · 0 comments

Comments

@bschoening
Copy link

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”)
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant