Principle of legality in criminal law
The principle of legality in criminal law was developed in the eighteenth century by the Italian criminal lawyer Cesare Beccaria and holds that no one can be convicted of a crime without a previously published legal text which clearly describes the crime (). This principle is accepted and codified in modern democratic states as a basic requirement of the rule of law. It has been described as "one of the most 'widely held value-judgement[s] in the entire history of human thought'". By country

Canada 

In Canada, the principle of legality in penal law is found in Article 9 of the Canadian Criminal Code which declares that criminal infractions must fall under Canadian law, and that no one may be found guilty of a criminal infraction under common law. The principle of legality is also mentioned in Article 11g: "Every defendant has a right to not be found guilty of an action or omission which, at the moment it took place, did not constitute an infraction under the internal law of Canada..." Article 11g does however make an exception for  crimes unanimously considered in international law to be genocide or crimes against humanity. France 

The principle of legality in France () goes back to the Penal Code of 1791 adopted during the French Revolution. The principle has its origins in the 1789 Declaration of the Rights of Man and of the Citizen, which endows it with constitutional force and limits the conditions in which citizens may be punished for infractions.,

Germany 
In Germany, Article 103, paragraph 2 of the Basic Law for the Federal Republic of Germany (German Constitution) bans retroactive criminality: 

Enacted after the fall of the Nazi régime, it was reaffirmed in a court decision concerning the actions of East German officials. Switzerland 
Article 1 of the Swiss Criminal Code provides that a penalty may only be pronounced for an action expressly forbidden by law. An "illegal" action may be "licit" in Switzerland if there is a justifying circumstance, such as legitimate defense or necessity. United States
In the United States, the Fifth Amendment of the Constitution of the United States contains the concept of due process. Retroactive criminal laws are forbidden in Article I of the Constitution, section 10, paragraph 1. See also 

 Nulla poena sine lege
 Principle of legality in French criminal law

References 

Notes

Works cited 

 

 

 

 

 

 

 

 

Legal doctrines and principles