GCHQ turns 100: Can you solve these brain-teasing puzzles?

Fancy yourself as an expert codebreaker or cyber sleuth? Now is your chance to prove whether you could have what it takes.

Under pressure to keep the country safe from the threat of terror attacks and serious crime, much of the GCHQ workforce keep their minds sharp by creating and solving devious puzzles.

To mark its 100th anniversary, the intelligence agency has provided Sky News with some of its brain-teasers so that you can find out if you might have a similarly analytical mind.

You can scroll to the bottom of the article to check your answers - but first, stick around to learn about some of the history of one of the most fascinating strands of the British government.

The origins of GCHQ

GCHQ was formed on 1 November 1919 under the name of Government Code & Cypher School - the result of merging the naval intelligence agency Room 40 and its military counterpart MI1.

Its first home was in London at Watergate House, but it moved to Bletchley Park during the Second World War - this is when it also changed its name to GCHQ.

While based at Bletchley Park, 76% of the jobs there were filled by women.

The enigma machine

One of the most well-known parts of the history of GCHQ is the enigma machine - the first of which was bought by the agency when it was still known by its old name in 1926.

The machine was invented by German engineer Arthur Scherbius after the First World War, and a research team was launched at GCHQ consisting of Dilly Knox, Tony Kendrick, Peter Twinn, Gordon Welchman and - most notably - the influential codebreaker Alan Turing.

They worked in the stable yard at Bletchley Park, where they broke wartime messages sent by the Nazis.

The Cuban missile crisis

An intelligence station at Scarborough played a key role in advising US president John F Kennedy about the precise movements of Soviet ships around Cuba, where they were secretly shipping nuclear missiles.

Some vessels were already on their way to the island by the time the president enforced a naval blockade, but the position reports from Scarborough showed when they were turning around and heading back.

Had they broken through the blockade or appeared to be threatening to do so, there was a risk the conflict could have escalated into nuclear war.

What does GCHQ do now?

GCHQ works with MI5, the police and other intelligence and security agencies at home and abroad, supporting live operations and helping to foil 23 attacks in the past four years.

Its main base is in Cheltenham, where it moved from Bletchley Park in 1950, but it also has a number of other sites across the country, including Bude, Scarborough, Harrogate, London and most recently Manchester.

The closest international partnerships are with the US, Canada, Australia and New Zealand as part of the Five Eyes intelligence alliance, which grew out of a 1946 agreement between the UK and America.

Notable recent operations include:

The future of GCHQ

Cyber warfare is set to be a key focus for GCHQ moving forward.

Since being established as a subset of GCHQ in 2016, the National Cyber Security Centre has handled around 1,800 cyber attacks - including the WannaCry strike on the NHS in 2017.

Earlier this year, GCHQ director Jeremy Fleming stressed the importance of "cyber power".

Speaking at an event in Singapore, he said nations had a growing responsibility to protect people, businesses and institutions from cyber threats.

To mark the 100th anniversary, never-before-seen objects, puzzles and interviews from the history of GCHQ are currently on display at the Science Museum in London.

The Top Secret exhibition runs until 23 February 2020.

Puzzle answers: (a) 2, 2, 1, 1; (b) Spider - creatures with 0, 2, 4, 6, 8 and 10 legs respectively.