Government Code and Cypher School

On the outbreak of the First World War the Admiralty established Room 40. People such as Alastair Denniston, Alfred Dilwyn Knox and Frank Birch were involved in intercepting, decrypting, and interpreting naval staff German and other enemy wireless and cable communications. Denniston later pointed out: "There were never more than 40 people working full time shifts on the deciphering work... Cryptographers did not exist, so far as one knew. A mathematical mind was alleged to be the best foundation... As time went on, when assistance of a less skilled nature was urgently required to work for these self-trained cryptographers who knew German, ladies with a university education and wounded officers unfit for active service were brought in." (1) The great success of Room 40 OB was decrypting the notorious Zimmermann Telegram in 1917. (2)

In 1919 Denniston was selected to lead the country's peacetime cryptanalytical effort as head of the Government Code and Cypher School (GCCS). Winston Churchill, insisted that Denniston should be given the post: "We should only consent to pool our staff with that of the War Office on condition that Commander A. G. Denniston is placed in charge of the new Department.... Denniston is not only the best man we have had, but he is the only one we have left with special genius for this work." (3) In 1920 it was transferred from the Navy to the Foreign Office. (4) He was allowed by the Treasury to employ thirty civilian assistants (as the high-level staff were called) and about fifty clerks and typists.

If you find this article useful, please feel free to share on websites like Reddit. You can follow John Simkin on Twitter, Google+ & Facebook or subscribe to our monthly newsletter.

Alfred Dilwyn Knox and Oliver Strachey, were two other senior figures in the organisation. (5) Francis Harry Hinsley has pointed out: "He (Denniston) supervised its formation as a small interdepartmental organization of twenty-five people recruited from Room 40 OB and its equivalent section in the War Office, MI1B. It included defectors from Russia, linguists, and talented amateurs of all kinds." (6)

Charles Langbridge Morgan joined the GCCS in October 1925: "Like many other recruits, I had heard of the job through a personal introduction - advertisement of posts was at that time unthinkable... I took an entrance exam which had been devised by Oliver Strachey, a former member of MI1b, and included a number of puzzles, such as filling in missing words in a mutilated newspaper article and simple mathematical problems calling for nothing more than arithmetic and a little ingenuity. I wasted a lot of time on these, thinking there must be some catch and so did not finish the paper. Nevertheless I got top marks." (7)

Denniston was one of the first to become aware that any future war, unlike the First World War, was going to be a war of movement. The development of mechanized vehicles in the 1920s and 1930s, whether on the ground or in the air, meant that they moved rapidly away from their bases and from each other. This problem was mainly solved by the development of radio communication during this period. It enabled a commander to communicate with his superiors, his men and his base, from wherever he might happen to be. However, this form of communication had a major disadvantage. It was impossible to be sure that your enemy could not hear what you were saying. In the vast majority of cases the secret communication of information was vital. This secrecy was achieved by cyphering.

A cypher is simply a way of making nonsense of a text to everybody who does not have a key to it. The Romans were the first to use ciphers (they called it secret writing). Julius Caesar sent messages to his fellow commanders in a code that they had agreed before the battle took place. (8) Suetonius tells us that Caesar simply replaced each letter in the message with the letter that is three places further down the alphabet. A cypher is the name given to any form of cryptographic substitution in which each letter is replaced by another letter or symbol. (9)

This type of cypher is easily broken and by the 1930s the intelligence services of the various countries were involved in developing a system that would be "unbreakable". The German government was convinced that by using the Enigma machine their military commanders would be able to communicate in secret. It was what became known as a transposition machine. That is to say, it turned every letter in a message into some other letter. The message stayed the same length but instead of being in German it became gobbledegook.

Enigma Machine

In 1926 Denniston purchased one of the original Enigma Machines developed by Arthur Scherbius. A version of the Enigma Machine was offered to the British Army but the apparatus was rejected as being "too ungainly for use in the field". The German Navy did purchase the machine and decided to adapt it for sending secret messages and in 1929 the German Army began using this improved version of Enigma. In Nazi Germany, the Luftwaffe, the Gestapo and the Schutzstaffel (SS) and vital services, like the railway system, also employed improved versions of the Enigma Machine.

Alastair Denniston
Alastair Denniston in 1934

The German government was convinced that by using the Enigma machine their military commanders would be able to communicate in secret. It became known as a transposition machine. That is to say, it turned every letter in a message into some other letter. The message stayed the same length but instead of being in German it became gobbledegook. The situation was explained by Francis Harry Hinsley: "By 1937 it was established that... the German Army, the German Navy and probably the Air Force, together with other state organizations like the railways and the SS used, for all except their tactical communications, different versions of the same cypher system - the Enigma machine which had been put on the market in the 1920s but which the Germans had rendered more secure by progressive modifications." (10)

As Peter Calvocoressi, the author of Top Secret Ultra (2001) has pointed out: "Over the years the Germans progressively altered and complicated the machine and kept everything about it more and more secret. The basic alterations from the commercial to the secret military model were completed by 1930/31 but further operating procedures continued to be introduced." (11)

One of the problems for Denniston is that he did not have the staff to deal with the increase of messages being sent by the German Army. This became an increasing problem during the Spanish Civil War. (12) In January 1937 he sent a memo to the Treasury pleading for more funds. "The situation in Spain... remains so uncertain that there is an actual increase in traffic to be handled since the height of the Ethiopian crisis, the figures for cables handled during the last three months of 1934, 1935 and 1936 being: 1934 (10,638); 1935 (12,696); 1936 (13,990). During the past month the existing staff has only been able to cope with the increase in traffic by working overtime." (13)

Alastair Denniston and Alan Turing

Denniston realised that in order to deal effectively with the increasing amount of secretly coded messages he had to recruit a number of academics to help with the work of the Government Code and Cypher School. One of Denniston's colleagues, Josh Cooper, told Michael Smith, the author of Station X: The Codebreakers of Bletchley Park (1998): "He (Denniston) dined at several high tables in Oxford and Cambridge and came home with promises from a number of dons to attend a territorial training course. It would be hard to exaggerate the importance of this course for the future development of GCCS. Not only had Denniston brought in scholars of the humanities of the type of many of his own permanent staff, but he had also invited mathematicians of a somewhat different type who were especially attracted by the Enigma problem." (14)

Francis Harry Hinsley later claimed: "Denniston... recruited the wartime staff from the universities with visits there in 1937 and 1938 (also 1939 when he recruited me and 20 other undergraduates within two months of the outbreak of war). I believe this was a major contribution to the wartime successes - going to the right places and choosing the right people showed great foresight." (15) According to codebreaker, Mavis Batey, the mathematician, Alan Turing, went to one of the first of the training courses on codes and ciphers at Broadway Buildings. Turing was put on Denniston's "emergency list" for call up in event of war and was invited to attend meetings being held by top codebreaker, Alfred Dilwyn Knox to "hear about progress with Enigma, which immediately interested him... unusually, considering Denniston's paranoia about secrecy, it is said that Turing was even allowed" to take away important documents back to the university. (16)

Gordon Welchman worked at Sidney Sussex College when he was contacted by Denniston. He recalls in his book, The Hut Six Story (1982): "Between the wars, Denniston, seeing the strategic value of what he and his group were doing, had kept the Room 40 activity alive... Alastair Denniston planned for the coming war.... He decided that the Universities of Oxford and Cambridge would be his first source of recruits. So he visited them and arranged for polite notes to be sent to many lecturers, including myself, asking whether we would be willing to serve our country in the event of war." (17)

The recruitment and employment of skilled academics was expensive and so, once again, Denniston had to write to the Treasury to ask for financial assistance: "For some days now we have been obliged to recruit from our emergency list men of the Professor type with the Treasury agreed to pay at the rate of £600 a year. I attach herewith a list of these gentleman already called up together with the dates of their joining." (18) R. V. Jones, one of those academics who Denniston recruited, later claimed that his actions during this period "laid the foundations of our brilliant cryptographic success". (19)

Francis Harry Hinsley, the author of British Intelligence in the Second World War (1979-1990) has pointed out: "In 1937 Denniston had begun to recruit a number of dons who were to join GCCS on the outbreak of war. His contacts with academics who had been members of Room 40 OB helped him to choose such men as Alan Turing and Gordon Welchman, who subsequently led the attack on Wehrmacht Enigma. Denniston's foresight, and his wise selection of the new staff, who for the first time included mathematicians, were the basis for many of GCCS's outstanding wartime successes, especially against Enigma... More than any other man, he helped it to maintain both the creative atmosphere which underlay its great contribution to British intelligence during the Second World War and the complete security which was no less an important precondition of its achievement." (20)

In June 1938, Sir Stewart Menzies, the chief of MI6, received a message that the Polish Intelligence Service had encountered a man who had worked as a mathematician and engineer at the factory in Berlin where the Germans were producing the Enigma Machine. The man, Richard Lewinski (not his real name), was a Polish Jew who had been expelled from Nazi Germany because of his religion. He offered to sell his knowledge of the machine in exchange for £10,000, a British passport and a French resident permit. Lewinski claimed that he knew enough about Enigma to build a replica, and to draw diagrams of the heart of the machine - the complicated wiring system in each of its rotors.

Menzies suspected that Lewinski was a German agent who wanted to "lure the small British cryptographic bureau down a blind alley while the Germans conducted their business free from surveillance". Menzies suggested that Alfred Dilwyn Knox, a senior figure at the Government Code and Cypher School, should go to interview Lewinski. He asked Alan Turing to go with him. They were soon convinced that he had a deep knowledge of the machine and he was taken to France to work on producing a model of the machine.

According to Anthony Cave Brown, the author of Bodyguard of Lies (1976): "Lewinski worked in an apartment on the Left Bank, and the machine he created was a joy of imitative engineering. It was about 24 inches square and 18 inches high, and was enclosed in a wooden box. It was connected to two electric typewriters, and to transform a plain-language signal into a cipher text, all the operator had to do was consult the book of keys, select the key for the time of the day, the day of the month, and the month of the quarter, plug in accordingly, and type the signal out on the left-hand typewriter. Electrical impulses entered the complex wiring of each of the rotors of the machine, the message was enciphered and then transmitted to the right-hand typewriter. When the enciphered text reached its destination, an operator set the keys of a similar apparatus according to an advisory contained in the message, typed the enciphered signal out on the left-hand machine, and the right hand machine duly delivered the plain text. Until the arrival of the machine cipher system, enciphering was done slowly and carefully by human hand. Now Enigma, as Knox and Turing discovered, could produce an almost infinite number of different cipher alphabets merely by changing the keying procedure. It was, or so it seemed, the ultimate secret writing machine." (21)

The Polish replica of the Enigma Machine was taken to the Government Code and Cypher School. In early 1939 the CCCS arranged for Alan Turing to meet with Marian Rejewski and Henryk Zygalski, mathematicians who had been working for the Polish Cypher Bureau. He had been trying for seven years to understand the workings of the Enigma machine. They told Turing that he had come to the conclusion that as the code had been generated by a machine it could be broken by a machine. In Poland they had built a machine that they named "bomba kryptologiczna" or "cryptological bomb". This machine took over 24 hours to translate a German message on an Enigma machine. Turing was impressed by what Rejewski and Zygalski had achieved but realised that they must find a way of achieving this in a shorter time period if this breakthrough was to be effective. (22)

On 25th July, 1939, Polish cryptologists held a meeting with French and British intelligence representatives in a meeting at Pyry, south of Warsaw. Britain was represented by Alastair Denniston and Alfred Dilwyn Knox. According to Mavis Batey, at first the Poles were reluctant to help the British because of their agreement with Adolf Hitler at Munich. (23) Eventually they importantly provided the information that Engima was breakable. Five weeks later the German Army invaded Poland.

Primary Sources

(1) Gordon Welchman, The Hut Six Story (1982)

Between the wars, Denniston, seeing the strategic value of what he and his group were doing, had kept the Room 40 activity alive. In 1920 the name of the organization was changed to "Government Code and Cypher School" (GCCS), and it was transferred from the Navy to the Foreign Office...

Alastair Denniston planned for the coming war. Following the example of his World War I chiefs, he decided that the Universities of Oxford and Cambridge would be his first source of recruits. So he visited them and arranged for polite notes to be sent to many lecturers, including myself, asking whether we would be willing to serve our country in the event of war. He chose Bletchley, 47 miles from London, as a wartime home for GCCS because it was a railway junction on the main line to the north from London's Euston Station and lay about halfway between Oxford and Cambridge with good train service to both. He acquired Bletchley Park, a large Victorian Tudor-Gothic mansion with ample grounds. The house had been renovated by a prosperous merchant, who had introduced what Dilly Knox's niece, Penelope Fitzgerald, in her family memoir The Knox Brothers, was to call "majestic plumbing."

In the planning for the wartime Bletchley Park, Denniston's principal helpers, in Robin's recollection, were Josh Cooper, Nigel de Grey, John Tiltman, Admiral Sinclair's sister, and Sir Stuart Menzies. Edward Travis, whose later performance as successor to Alastair Denniston at Bletchley Park was so significant, must have been involved, but he was not one of the "family" team that dated back so many years. Robin believes that, before joining GCCS, Travis was involved in encipherment rather than codebreaking.

As preparatory work was being done, Denniston visited the site frequently, and made plans for construction of the numerous huts that would be needed in the anticipated wartime expansion of GCCS activities. When war actually came, these wooden huts were constructed with amazing speed by a local building contractor, Captain Hubert Faulkner, who was also a keen horseman and would often appear on site in riding clothes.

The word "hut" has many meanings, so I had better explain that the Bletchley huts were single-story wooden structures of various shapes and sizes. Hut 6 was about 30 feet wide and 60 feet long. The inside walls and partitions were of plaster board. From a door at one end a central passage, with three small rooms on either side, led to two large rooms at the far end. There were no toilets; staff had to go to another building. The furniture consisted mostly of wooden trestle tables and wooden folding chairs, and the partitions were moved around in response to changing needs.

The final move of the GCCS organization to Bletchley was made in August 1939, only a few weeks before war was declared. As security cover the expedition, involving perhaps fifty people, was officially termed "Captain Ridley's Hunting Party," Captain Ridley being the man in charge of general administration. The name of the organization was changed from GCCS to "Government Communications Headquarters" or GCHQ.

The perimeter of the Bletchley Park grounds was wired, and guarded by the RAF regiment, whose NCOs warned the men that if they didn't look lively they would be sent "inside the Park," suggesting that it was now a kind of lunatic asylum.

Denniston was to remain in command until around June 1940, when hospitalization for a stone in his bladder forced him to undertake less exacting duties. After his recovery he returned to Bletchley for a time before moving to London in 1941 to work on diplomatic traffic. Travis, who had been head of the Naval Section of GCCS and second in command to Denniston, took his place and ran Bletchley Park for the rest of the war. In recognition of his achievements he became Sir Edward Travis in 1942.

In spite of his hospitalization, Denniston, on his own initiative, flew to America in 1941, made contact with leaders of the cryptological organizations, and laid the foundations for later cooperation. He established a close personal relationship with the great American cryptologist William Friedman, who visited him in England later. The air flights were dangerous. On Denniston's return journey a plane just ahead of his and one just behind were both shot down.

(2) Alan Hodges, Alan Turing: the Enigma (1983)

The director of GC and CS, Commander Alastair Denniston, was allowed by the Treasury to employ thirty civilian Assistants, as the high-level staff were called, and about fifty clerks and typists. For technical civil-service reasons, there were fifteen Senior and fifteen Junior Assistants. The Senior Assistants had all served in Room 40, except perhaps Feterlain, an exile from Russia who became head of the Russian section. There was Oliver Strachey, who was brother of Lytton Strachey and husband of Ray Strachey, the well-known feminist, and there was Dillwyn Knox, the classical scholar and Fellow of King's until the Great War. Strachey and Knox had both been members of the Keynesian circle at its Edwardian peak. The Junior Assistants had been recruited as the department expanded a little in the 1920s; the most recently appointed of them, A. M. Kendrick, had joined in 1932.

The work of GC and CS had played an important part in the politics of the 1920s. Russian intercepts leaked to the press helped to bring down the Labour government in 1924. But in protecting the British Empire from a revived Germany, the Code and Cypher School was less vigorous. There was a good deal of success in reading the communications of Italy and Japan, but the official history was to describe it as "unfortunate" that "despite the growing effort applied at GC and CS to military work after 1936, so little attention was devoted to the German problem."

One underlying reason for this was economic. Denniston had to plead for an increase in staff to match the military activity in the Mediterranean. In the autumn of 1935, the Treasury allowed an increase of thirteen clerks, although only on a temporary basis of six months at a time.

Student Activities

Alan Turing - School Student (Answer Commentary)


(1) Alastair Denniston, Room 40: 1914-15 (1919)

(2) Michael Smith, Station X: The Codebreakers of Bletchley Park (1998) page 11

(3) Winston Churchill, letter to Henry Charles Ponsonby Moore, 10th Earl of Drogheda (28th March, 1919)

(4) Gordon Welchman, The Hut Six Story (1982) page 8

(5) Alan Hodges, Alan Turing: the Enigma (1983) page 186

(6) Francis Harry Hinsley, Oxford Dictionary of National Biography (2004-2014)

(7) Charles Langbridge Morgan, quoted by Michael Smith, the author of Station X: The Codebreakers of Bletchley Park (1998) page 12

(8) Simon Singh, The Code Book: The Secret History of Codes & Code-Breaking (2000) pages 10-11

(9) Suetonius, The Twelve Caesars (c. AD 110) page 30

(10) Francis Harry Hinsley, British Intelligence in the Second World War: Volume One (1979-1990) page 53

(11) Peter Calvocoressi, Top Secret Ultra (1980) page 31

(12) Alan Hodges, Alan Turing: the Enigma (1983) page 186

(13) Alastair Denniston, memo to the Treasury (January, 1937)

(14) Michael Smith, Station X: The Codebreakers of Bletchley Park (1998) page 16

(15) Francis Harry Hinsley, quoted by Robin Denniston, the author of Thirty Secret Years (2007) page 24

(16) Mavis Batey, Dilly: The Man Who Broke Enigmas (2009) page 71

(17) Gordon Welchman, The Hut Six Story (1982) page 10

(18) Alastair Denniston, memo to the Treasury (September, 1937)

(19) R. V. Jones, Most Secret War: British Scientific Intelligence 1939-1945 (1978) page 98

(20) Francis Harry Hinsley, Oxford Dictionary of National Biography (2004-2014)

(21) Anthony Cave Brown, Bodyguard of Lies (1976) page 21

(22) Nigel Cawthorne, The Enigma Man (2014) page 55

(23) Mavis Batey, Dilly: The Man Who Broke Enigmas (2009) page 69