What is the name of the constitutional protection that requires a government to show a legal basis for imprisoning someone?


an ex post facto law


the privileges and immunities clause


the writ of habeas corpus


a bill of attainder