Fail early for invalid key type and size combinations