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

FF3: redundant maxLen check #34

@bschoening

Description

@bschoening

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions