> But for many user input data, there is a point at which a longer value is complete nonsense.
The reason I still prefer arbitrary length fields is that I otherwise have to determine the limit myself. And finding reasonable limits isn't always that easy. For example, quite a few sites have about 20 chars as maximum password lengths. Using xkcd's correct-battery-horse-staple method (or formerly most commonly known as diceware) this assumption already fails. Also, what is the correct maximum length for a surname? (See Janice Keihanaikukauakahihuliheekahaunaele.) And then there are these ridiculously short text fields for complaints or questions on sites like UPS that only allow like 400 characters (how these are encoded into bytes raises other questions about how reasonable that limit is). I'd argue it's more work to find out the right limits than to implement arbitrary length fields.
In the case of PBKDF2 I would say it's the primitive's (PBKDF2's) fault for allowing a DOS on long passwords. I do not blame the designers though. I have read its definition several times and have never though about DOS attacks, too. Like with padding oracle or length extension attacks this should go on the check list for future designs and PBKDF2 should be phased out.
The reason I still prefer arbitrary length fields is that I otherwise have to determine the limit myself. And finding reasonable limits isn't always that easy. For example, quite a few sites have about 20 chars as maximum password lengths. Using xkcd's correct-battery-horse-staple method (or formerly most commonly known as diceware) this assumption already fails. Also, what is the correct maximum length for a surname? (See Janice Keihanaikukauakahihuliheekahaunaele.) And then there are these ridiculously short text fields for complaints or questions on sites like UPS that only allow like 400 characters (how these are encoded into bytes raises other questions about how reasonable that limit is). I'd argue it's more work to find out the right limits than to implement arbitrary length fields.
In the case of PBKDF2 I would say it's the primitive's (PBKDF2's) fault for allowing a DOS on long passwords. I do not blame the designers though. I have read its definition several times and have never though about DOS attacks, too. Like with padding oracle or length extension attacks this should go on the check list for future designs and PBKDF2 should be phased out.