I think it might be good to create a ValidationError that subclasses ValueError so that we can distinguish between the two kinds of errors that can be raised here (in the spirit of converting this to raise ValidationError if the checksum isn't correct.)