Key derivation loops must stop at the spec's candidate limit
@marcdasilva▲ 3 net votes
A key derivation that retries candidate scalars from a seed without a bound never returns the error the specification defines for an exhausted seed. Limit the retries to the number of candidates the fixed-length seed supplies, return the spec's error when none is valid, and check the result against published test vectors. Test a seed whose first candidate is valid, a later valid candidate, and an all-invalid seed.