Legality
Legality, in respect of an act, agreement, or contract is the state of being consistent with the law or of being lawful or unlawful in a given jurisdiction, and the construct of power.

According to the Merriam-Webster Dictionary, legality is 1 : attachment to or observance of law. 2 : the quality or state of being legal  Businessdictionary.com, thelawdictionary.org, and mylawdictionary.org definition explains concept of attachment to law as Implied warranty that an act, agreement, or contract strictly adheres to the statutes of a particular jurisdiction. For example, in insurance contracts it is assumed that all risks covered under the policy are legal ventures.

Definitions 
Vicki Schultz states that we collectively have a shared knowledge about most concepts. How we interpret the reality of our actual understanding of a concept manifests itself through the different individual narratives that we tell about the origins and meanings of a particular concept. The difference in narratives, about the same set of facts, is what divides us. An individual has the ability to frame, or understand, something very differently than the next person. Evidence does not always lead to a clear attribution of the specific cause or meaning of an issue – meanings are derived through narratives. Reality, and the facts that surround it, are personally subjective and laden with assumptions based on clearly stated facts. Anna-Maria Marshall states, this shift in framing happens because our perceptions depend “on new information and experiences;” this very idea is the basis of Ewick and Sibley definition of legality – our everyday experiences shape our understanding of the law.

Ewik and Silbey define "legality" more broadly as, those meanings, sources of authority, and cultural practices that are in some sense legal although not necessarily approved or acknowledged by official law. The concept of legality the opportunity to consider "how where and with what effect law is produced in and through commonplace social interactions....How do our roles and statuses our relationships, our obligations, prerogatives and responsibilities, our identities and our behavoiurs bear the imprint of law. 

In a paper on Normative Phenomena of Morality, Ethics and Legality, legality is defined taking the state's role in to account  as, The system of laws and regulations of right and wrong behavior that are enforceable by the state (federal, state, or local governmental body in the U.S.) through the exercise of its policing powers and judicial process, with the threat and use of penalties, including its monopoly on the right to use physical violence.

Other related concepts 
Rule of law provides for availability of rules, laws and legal mechanism to implement them. Principle of legality checks for availability and quality of the laws. Legality checks for if certain behaviour is according to law or not. concept of Legitimacy of law looks for fairness or acceptability of fairness of process of implementation of law.

quality of being legal and observance to the law may pertain to lawfullness, i.e. being consistent to the law or it may get discussed in principle of legality or may be discussed as legal legitimacy.

Legality of purpose
In contract law, legality of purpose is required of every enforceable contract. One can not validate or enforce a contract to do activity with unlawful purpose.

Constitutional legality 
The principle of legality can be affected in different ways by different constitutional models. In the United States, laws may not violate the stated provisions of the United States Constitution which includes a prohibition on retrospective laws. In Britain under the doctrine of Parliamentary sovereignty, the legislature can (in theory) pass such retrospective laws as it sees fit, though article 7 of the European convention on human rights, which has legal force in Britain, forbids conviction for a crime which was not illegal at the time it was committed. Article 7 has already had an effect in a number of cases in the British courts.

In contrast many written constitutions prohibit the creation of  retroactive (normally criminal) laws. However the possibility of statutes being struck down creates its own problems. It is clearly more difficult to ascertain what is a valid statute when any number of statutes may have constitutional question marks hanging over them. When a statute is declared unconstitutional, the actions of public authorities and private individuals which were legal under the invalidated statute, are retrospectively tainted with illegality. Such a result could not occur under parliamentary sovereignty (or at least not before Factortame) as a statute was law and its validity could not be questioned in any court.

Principle of legality 

The principle that no one be convicted of a crime without a written legal text which clearly describes the crime, is widely accepted and codified in modern democratic states as a basic requirement of the rule of law. It is known in Latin as nulla poena sine lege.

International law

Legality, in its criminal aspect, is a principle of international human rights law, and is incorporated into the Universal Declaration of Human Rights, the International Covenant on Civil and Political Rights and the European Convention on Human Rights. However the imposition of penalties for offences illegal under international law or criminal according to "the general principles of law recognized by civilized nations" are normally excluded from its ambit. As such the trial and punishment for genocide, war crimes and crimes against humanity does not breach international law.

There is some debate about whether this is really a true exception or not. Some people would argue that it is a derogation or – perhaps somewhat more harshly – an infringement of the principle of legality. While others would argue that crimes such as genocide are contrary to natural law and as such are always illegal and always have been. Thus imposing punishment for them is always legitimate. The exception and the natural law justification for it can be seen as an attempt to justify the Nuremberg trials and the trial of Adolf Eichmann, both of which were criticized for applying retrospective criminal sanctions.

The territorial principle, generally confining national jurisdiction to a nation’s borders, has been expanded to accommodate extraterritorial, national interest.

In criminal law, the principle of legality assures the primacy of law in all criminal proceedings.

Bibliography 
 Kelsen, Hans. General Theory of Law and State (Cambridge, Massachusetts : Harvard University Press, c1945) (Cambridge, Massachusetts : Harvard University Press, 1949) (New York : Russell & Russell, 1961) (New Brunswick, New Jersey : Transaction Publishers, c2006).
 Kelsen, Hans. Principles of international law (New York : Rinehart, 1952) (New York : Holt, Rinehart & Winston, 1966) (Clark, New Jersey : Lawbook Exchange, 2003).
 Slaughter, Anne-Marie. A new world order (Princeton : Princeton University Press, c2004).
 Nye, Joseph S. Soft power (New York : Public Affairs, c2004).
 de Sousa Santos, Boaventura and César A. Rodríguez-Garavito, eds. Law and globalization from below : towards a cosmopolitan legality (Cambridge, UK : Cambridge University Press, 2005)
 Marsh, James L. Unjust legality : a critique of Habermas's philosophy of law (Lanham : Rowman & Littlefield Publishers, c2001).
 Sarat, Austin, et al., eds. The limits of law (Stanford : Stanford University Press, 2005).
 Milano, Enrico. Unlawful territorial situations in international law : reconciling effectiveness, legality and legitimacy (Leiden ; Boston : M. Nijhoff, c2006).
 Ackerman, Bruce, ed. Bush v. Gore : the question of legitimacy (New Haven : Yale University Press, c2002).
 Gabriel Hallevy A Modern Treatise on the Principle of Legality in Criminal Law (Heidelberg : Springer-Heidelberg, c2010).

See also 
 Analytical jurisprudence
 Legal positivism
 Principle of legality in French criminal law
 Sources of law
 Nullum crimen, nulla poena sine praevia lege poenali
 Socialist Legality
 Agent of Record

References

External links 

 Legality, generally:
 Cornell LII "Jurisprudence"
 Cornell LII "International law"
 YaleLS Avalon Project, "Documents in Law, History & Diplomacy" (many original documents, fulltexts online, defining The State and Legality)
 Legality in actual operation in International Law, examples:
 International Court of Justice
 International Criminal Court
 International Criminal Tribunal for the Former Yugoslavia
 International Criminal Tribunal for Rwanda
 International Tribunal for the Law of the Sea
 European Court of Human Rights
 Decisions of various international judicial and quasi-judicial bodies, including PCIJ, CACJ, CAT, CEDAW etc.
 Legality in actual operation in national Constitutional Law, examples:
 US Supreme Court
 Conseil Constitutionnel, France
 Law Lords, UK
 Supreme Court, UK (New!)

Legal doctrines and principles