I think `ValueError` is ok, but the error string shoudl give the developer a bit more actionable advice. "Use a bigger  key" or somethig.