UK legislation
An Official Secrets Act (OSA) is legislation that provides for the protection of state secrets and official information, mainly related to national security. However, in its unrevised form (based on the UK Official Secrets Act 1911), it can include all information held by government bodies.
OSAs are currently in-force in over 40 countries (mostly former British colonies) including Bangladesh, Kenya, Pakistan, Hong Kong, India, Ireland, Myanmar, Uganda, Malaysia, Singapore and the United Kingdom, and have previously existed in Canada and New Zealand.
There were earlier English and British precedents, long before the acts enumerated here. As early as the 16th Century, following Francis Drake's circumnavigation, Queen Elizabeth I declared that all written accounts of Drake's voyages were to become the "Queen's secrets of the Realm". In addition, Drake and the other participants of his voyages were sworn to their secrecy on the pain of death; the Queen intended to keep Drake's activities away from the eyes of rival Spain.
Countries and legislation.
Australia.
Australia previously had Part VII of the Crimes Act 1914 (Commonwealth), entitled "Official Secrets and Unlawful Soundings", since repealed and replaced with Part 5.6 – Secrecy of Information of the Criminal Code Act (1995).
Canada.
The British Official Secrets Act 1889 (52 &amp; 53 Vict. c. 52) was adopted in Canada with minor modifications in 1890. Its provisions became part of the Criminal Code in 1892. The "Official Secrets Act (Canada) 1939" replaced the Criminal Code provisions and utilised the provisions of the British Official Secrets Acts 1911 and 1920. Amendments were made in 1950, 1967, 1970 and 1973. The "Official Secrets Act (Canada) 1981" was the final version of that law adopted by the House of Commons. 
In 2001, the Act was repealed and replaced by the "Security of Information Act", created in the wake of September 11, 2001 attacks to replace the vaguely-worded Official Secrets Act.
Twenty-two prosecutions occurred under the "Official Secrets Act" in Canada, over half of which were in relation to the Gouzenko Affair. In 1989, Stephen Joseph Ratkai was charged and convicted under the Act, of espionage in relation to the SOSUS network site at Naval Station Argentia in Newfoundland.
Hong Kong.
Hong Kong has the Official Secrets Ordinance 1997 (Cap. 521), in which it is largely based on the British Official Secrets Acts 1911 to 1989.
Ireland.
Ireland has the Official Secrets Act 1963, that repealed the previous British legislation of 1911 and 1920. The Official Secrets Act, as amended, applies to all civil servants and potentially anyone within the state. A suit may only be instigated at the approval of the Attorney General of Ireland, additionally proceedings may occur in camera but the verdict and any sentence must occur in public.
Jersey.
Jersey has the Official Secrets (Jersey) Law 1952.
Malaysia.
Malaysia has the Official Secrets Act 1972, prohibiting the collection, possession or distribution of information marked as an official secret – an action which can be made by any public officer. The certification of a document as an official secret is not subject to judicial review, and a violation of the act is punishable with between one and seven years' imprisonment. The act has been controversial for its use to silence dissent and stifling anti-corruption activities.
New Zealand.
In New Zealand, the Official Secrets Act 1951 was repealed by the Official Information Act 1982.
Singapore.
In Singapore, the Official Secrets Act (Cap. 213, 2012 Rev. Ed.) prohibits the disclosure of official documents and information. 
The Act was first introduced to Singapore in 1935 as the Official Secrets Ordinance. Section 5 of the Act prohibits the wrongful communication of information that is considered sensitive by the government.
United Kingdom.
The Official Secrets Acts (OSA) of the UK comprise several laws aimed at the protection of state secrets and the prevention of espionage. The key Acts are the Official Secrets Act 1889, 1911, 1920, 1939 and 1989.
Individuals working with sensitive information are often required to sign a statement affirming their agreement to adhere to the restrictions of the OSA, colloquially known as "signing the Official Secrets Act". However, signing this statement does not alter the legal obligations, as the Act is a law, not a contract, and its provisions apply irrespective of whether an individual has signed the statement. The signature serves primarily as a reminder of the obligations under the Act.
The now-repealed Naval Discipline Act 1957 also played a role in protecting sensitive information by making it an offence to spy on-board Royal Navy ships or overseas bases, punishable by life imprisonment, and previously a capital offence until 1981.
Recent developments and criticism.
Jarvis provides a critical analysis of these Acts. He highlights that the laws have been criticised for being outdated and not adequately addressing contemporary issues related to information technology and modern espionage. Jarvis points out the lack of a 'public interest' defence in the current legislation, which has been a significant point of contention among legal experts, media, and public advocacy groups. 
According to Jarvis, the current framework allows the government to wield the OSA in a manner that can prevent politically embarrassing disclosures rather than purely safeguarding national security. This has led to calls for reform, including recommendations from the Law Commission to modernise the Acts, introduce clearer language, and incorporate provisions that balance state security with transparency and public interest.
National Security Act 2023.
In response to ongoing concerns and to address the evolving landscape of national security threats, the UK enacted the National Security Act 2023. This new legislation aims to modernise the country's approach to safeguarding official data and combating espionage, reflecting the recommendations put forth by the Law Commission and other stakeholders.
The National Security Act 2023 introduces several key features aimed at addressing contemporary security challenges. It modernises the language and definitions used in previous Official Secrets Acts, making them relevant to current threats and technologies. The Act expands the scope of espionage to include cyber threats and other modern tactics, ensuring comprehensive coverage of all potential security risks. Notably, it introduces a public interest defence for the first time, allowing individuals to argue that their disclosure was justified in the public interest, thereby protecting whistleblowers who expose government wrongdoing or illegal activities. Additionally, the Act imposes stricter penalties for breaches of national security, reflecting the gravity of these offences in today's context. To ensure accountability and transparency, an independent statutory commissioner is established to oversee investigations into alleged breaches of the Act.
United States.
The United States does not have a broad-reaching Official Secrets Act, although the Espionage Act of 1917 has similar components. Much of the Espionage Act remains in force, although some has been struck down by the Supreme Court as unconstitutional because of the First Amendment (see "United States v. The Progressive", "Brandenburg v. Ohio", "New York Times Co. v. United States").  § 798, enacted in 1951, makes dissemination of secret information involving cryptography, espionage, and surveillance illegal for all people, and is thus an "official secrets act" limited to those subjects.
Notes and references.
 ;templatestyles src="Reflist/styles.css" / ;