Spying was not considered a gentlemanly activity during the Napoleonic War
Britain has a murky record of official secrecy which stretches back to the Elizabethan era.
Elizabeth I was obsessed that Spanish-backed Catholic plotters, loyal to her half-sister Mary, were attempting to overthrow her.
The Virgin Queen's spymaster, Francis Walsingham, famously trapped Mary into making a move against Elizabeth through a series of faked letters from her supporters.
Many secret documents were disguised as business transactions.
A letter to Sir Robert Cecil in 1591 about a cargo of wines was actually a coded description of the Spanish fleet.
Spies were not seen as the glamorous playboys they are today.
During the war with Napoleonic France spying was thought of as being contrary to the conduct of "gentlemen" and against the rules of war.
Despite this the Duke of Wellington's often heavily outnumbered army relied on a network of spies and codebreakers, especially during the Peninsula Campaign.
The growth of the mass media and increasing literacy throughout the 19th Century meant information was potentially far more damaging once it had been leaked by civil servants.
But the government usually resorted to the civil courts to pursue the media as there was no legislation with which to prosecute the leakers.
Even when a young draughtsman named Terry Young was suspected of selling warship designs to the French in 1887, there was no law under which to prosecute him.
The modern age of government secrecy began with the wide-ranging Official Secrets Act of 1911.
Born of fears of increasing German military power, the act did not differentiate between secrets and made it an offence to reveal any government information.
Government officials joked at the time that even the menu in the Civil Service canteen was secret - and in fact it was under the act, which remained on the statute books until 1989.
During the inter-war period the government began to use the secret services as an important tool, not only to protect itself against espionage by foreign powers but also against political groups it saw as a threat.
The British establishment, shaken by the fate of the Russian royal family at the hands of the Bolsheviks, targeted left-wing groups.
The Zinoviev letter, which purported to reveal links between the Labour Party and the Soviet Union, was alleged to have been circulated by MI6 to newspapers to discredit Labour on the eve of the 1924 general election.
The letter was later revealed to have been a forgery.
The secret service was strengthened during World War II by an enthusiastic Winston Churchill.
Primitive computers were used by codebreakers at Bletchley Park
The successes of the Bletchley Park codebreakers, who cracked the German Enigma code, led to the founding of GCHQ, which began intercepting communications from around the world.
During the 1950s the government began to recognise that the public wanted access to government documents and introduced the Public Records Act of 1958.
But people interested in government secrets would have to wait 50 years before the documents were released to the public.
The act was reviewed in 1967 and the waiting time was reduced to 30 years.
Despite this government secrecy around the development of its nuclear programme was particularly tight during the Cold War.
D notices, which the government used to prevent the press from revealing military and other secrets, were widely issued.
In 1979 all Cabinet papers on atomic energy were made exempt from disclosure under the 30-year rule.
In 1993 the D notice system was replaced with standing Defence Advisory (DA) notices, which cover five areas - military operations and plans; nuclear weapons; ciphers and codes; installations and home addresses; and the intelligence services and special forces.
Several media organisations were reminded of these standing notices recently, during the Iraq conflict, especially with regard to the operations of the SAS and SBS.
A media blackout was arranged in Sierre Leone in 2000
In 2000 a media blackout was agreed to prevent rebels in Sierra Leone learning about a pending SAS operation which eventually freed a group of captured British soldiers.
Access to information
As our lives have come under increased scrutiny from the government so the campaign for access to that information has intensified.
The Campaign for Freedom of Information, Liberty and Charter 88 have successfully lobbied government for the right of individuals to access the data held on them by government and private companies.
The Official Secrets Act of 1989, while de-classifying a great deal of government information, was seen as a backwards step by campaigners as it introduced drastic new controls on the media, including powers to prevent publication.
The government had been worried by the 1985 Spycatcher affair, in which retired MI5 agent Peter Wright published memoirs containing embarrassing revelations about the security services.
More recently the case of David Shayler has revealed the lengths the government will go to protect its secrets.
Labour came to power in 1997, having committed itself to introducing Freedom of Information legislation.
When the Freedom of Information Bill was actually presented to the Commons in 2000, ministers retained significant powers to withhold information at their discretion and the bill was criticised for maintaining the culture of secrecy many believe still exists within the corridors of Whitehall.