Showing posts with label turing. Show all posts
Showing posts with label turing. Show all posts

Saturday, August 24, 2024

Enigma and the Poles

Chris Smith (@spy_historian) tweeted a series of tweets about the Polish contribution to Enigma cryptanalysis this morning. I copy them here, adding some comments, and then write a bit more broadly about the issue. 

CS: Polish work on Enigma was truly impressive. They broke it while the British basically ignored it because they deemed it insoluble. A waste of time.

TC: The British had broken the commercial variant of Enigma early in 1927, and an improved solution was developed in time to exploit its use by the Spanish and Italian Navies during the Spanish Civil War and subsequently. I don't think it's fair to say that they thought the military variants insoluble, but up to 1939 they had no idea how to approach the problem. Put crudely, people who broke book-based codes, and simple electromechanical ciphers couldn't break more complex machine-based ciphers.

CS: They recognised the value of machine-based approaches. Though the Bomba was rapidly rendered obsolete by upgrades to Enigma systems, the Bomba was proof of concept. Use machines to break machines. I've argued elsewhere that Enigma and Bombas were an industrial revolution.

TC: Mechanical support to cryptanalysis wasn't new: Hollerith machines had been used in Room 40 during the First World War and other machines were being proposed in the second half of 1939 as GC&CS recruited from a deeper pool. The specific Polish breakthrough was to design, build and deploy a machine that mimicked Enigma. Following Turing's meeting in Parish with Rejewski he adopted the same concept for his (otherwise very different) Bombe.

CS: The contribution of the Poles, who shared their successes with the British, paved the way for upscaling that culminated in the SIGINT phenomenon that was #BletchleyPark. The BP Trust were right to create a Polish memorial, Prince Andrew was right to gift Poland an Enigma.

TC: Although the BP Trust were wrong to give one of the Enigmas GCHQ had loaned to them to Prince Andrew to gift to the Poles … !

CS: However, it has become a trope that this Polish contribution has been largely unrecognised in Britain and the US. My argument is that this is simply untrue. In fact, from the early days of Ultra becoming public knowledge - 1974 - the Poles were recognised.

CS: It is almost impossible to find a book that doesn't recognise their *massive* contribution. Yet these same texts often state that they have been under-recognised while recognising them. It is a weird, self-replicating myth. 

TC: The problem is that the nature, and particularly the source, of the Polish contribution was either ignored or grossly oversimplified (as largely was the case with the UK's own cryptanalytic work): so little was released by GCHQ in the first twenty years after the 1974 revelation that mythology filled the gaps. 

CS: So powerful is the myth, it has caused minor international spats. The Polish ambassador to the UK complained about Polish elision and misrepresentation (arguably rightly) in the 2001 film Enigma. In 2016, the Polish state commissioned a touring exhibition to correct the record.

TC: Both Enigma and The Irritation Game played their part in reinforcing the mythology (just as U-571 ignored the UK) but Hollywood blockbusters aren't documentaries.

CS: But the record didn't actually need correcting. The early British lit on BP/Ultra was clear that Poles did the lion share of early work. See: Lewin (1978), Calvocoressi (1979), Hinsley et al (1979), Collier (1982), etc.

------------------------------

Actually, Hinsley et al were wrong and their record did actually need correcting. Vol 3 pt 2 (1988), Appendix 30 (pp 945-939) was written by Joan Murray (née Clarke) and Henry Dryden, both wartime Siginters who had stayed on to work at GCHQ, and who were retained after retirement to update the version of the Polish contribution recounted in Appendix 1 of Vol 1 which was written on the basis of records and knowledge which was later proved – for example by the publication of Rejewski’s memoirs – to be incomplete. At best, I don't think it's unreasonable to have expected Hinsley et al to have done rather better first time.

CS: So where does this all come from? As ever Group Captain F.W. Winterbotham. His big splash book, The Ultra Secret (1974), which (sort of) revealed Ultra totally got the Polish work wrong. He was writing from memory and, besides, didn't know everything. Loads of that book is wrong.

CS: Yet as soon as it was published, key people in the know, not least Tadeus Lisicki, a wartime Polish intelligence officer and cryptanalyst, wrote to the papers, in 1974, to point out the Polish work. Lisicki compiled a dossier that formed the basis of important books by Poles.

TC: By Poles, in Polish, and while some were later translated, their impact was limited, not least because the authors weren't appearing at book festivals, on Radio 4 or in broadsheet review pages.

CS: Examples include Garlinski (1979), Woytak (1979) and Kozaczuk (1984). All of which have appeared in English. Newspapers, TV shows, radio comedies and even movies have made the point - though poorly in the case of Enigma. So why does this myth of anglo 'chauvinism' persist?

CS: None of this is to dispute the role Poles such as Marian Rejewski, Jerzy Różycki and Henryk Zygalski played. Quite the reverse. What fascinates me is the endurance of a myth that these pioneers have been elided from English language historiography. They haven't.

I remember telling a friend, when I became GCHQ's Historian-designate in 2008, that the two things I didn't see myself getting involved in were Enigma and VENONA. How wrong I was! Enigma remains a live issue for many – perhaps most – people outside the academic Intelligence Studies community who were interested in Intelligence history.

In the British public imagination the Bletchley Park story was the acme of the Boffinry: the British had been successful in the Second World War because they had out-thought their enemies. To the list of back-room boys coming up with Spitfire, Radar and bouncing bombs, was added the super-smart mathematicians who in complete secret helped win the war by breaking all German cryptographic systems. As with the Battle of Britain, Bletchley Park became part of a mythology of plucky little Britain fighting on alone and prevailing against all the odds, in spite of the evidence. The Polish contribution became merely transactional: a Pole handing over to the British an Enigma machine which was reverse engineered.

This popular narrative would not survive unchallenged the changes in Poland after 1989: the return to democracy, Poland joining NATO and the EU, and the move to the UK of younger Poles who had learned at least some of the story of Poland's contribution to the Enigma story. A Polish/UK Historical Commission reported in the first decade of the twenty-first century and described in English for the first time the breadth and depth of the Polish contribution to intelligence across the board, while GCHQ's massive 1994-2004 release of Second World War records had been absorbed and it was possible to begin to approach the question of Anglo-Franco-Polish cooperation on Enigma rather more reasonably than had been the case previously. Pioneering work by Dermot Turing and Marek Grajek also produced new accessible historical information that could be shared in English and Polish.

The problem I found as GCHQ Historian was that while 'the record' was becoming clearer, the Polish sense of their contribution having been slighted for so long had allowed a mythological counter-narrative to develop in which the UK and France would never have come near to solving Enigma without the Polish contribution. It was for that reason that I coined the term 'Enigma Relay' to try to make two points: first, that the credit of solving Enigma belonged to the allied team, the Poles, French, British and Americans each running separate laps and passing the baton; and second, that solving Enigma wasn't something worth 100 brownie points and that each of the four nations should scrabble to establish how many of the 100 they could each claim. International Intelligence cooperation doesn't work like that; solving Sigint problems doesn't work like that. I tried the 'Enigma Relay' out on a few people and then, when Polish, UK and French Sigint representatives agreed to meet in Warsaw in 2014 to celebrate the seventy-fifth anniversary of the tripartite meeting at which the three countries agreed to share all they knew, put the 'Enigma Relay' concept into the speech given there by Iain Lobban, Director GCHQ (https://www.gchq.gov.uk/news/director-gchq-commemorates-crucial-pre-war-enigma-information-sharing-meeting-poland).

Did this resolve all of the issues? No, of course not. Narratives and counter-narratives, and mythologies, have a life of their own and accurate history will always find it hard to compete against what non-historians would like a two dimensional 'truth' to look like. But reinforcing on every possible occasion the fact that success against Enigma took a lot more than a couple of very bright mathematicians thinking great thoughts, however crucial those great thoughts were, is part of the job. And making British audiences realise that most Sigint successes since 1939 are due to GCHQ's partnerships with Sigint agencies in other countries goes beyond mere intelligence history, and, hopefully, leads people to reflect that intelligence doesn't happen in a vacuum.

Monday, December 18, 2023

Secure Speech and Insecure Speech


The story of the inadequacy of allied communications security (Comsec) at the beginning of the Second World War and its gradual improvement tends to focus on signals carrying textual messages, the transition to machine-based rather than book-based encryption systems, and eventually to on-line encipherment, enabling the 'BRUSA Circuit' which linked the UK and US, Australia, Canada, and communications centres serving major allied commands around the world on secure HF radio. It was always possible, though, to deny adversaries any chance of intercepting a message by not transmitting it on a channel accessible to them. For example, transatlantic cables, while theoretically tappable, weren't vulnerable in practice. That meant that the most sensitive material could be sent between the UK and the US without danger of enemy interception. The material would still be encrypted so that as few as possible of the people handling the traffic would see the content, but the authorities on both sides of the Atlantic could be confident that the material would not be seen. This was incredibly expensive – at busy periods a million dollars a month just to US cable companies – but uninterceptable.

But what about telephone calls? There were no secure speech systems before SIGSALY was first used in July 1943. Instead, scrambler systems were used to invert the voice signal. For calls within the UK this was a weaker analogue of the cables: scrambling would be enough to stop operators at exchanges from overhearing the content of a call even though they would know that a call was taking place. There was no doubt that the Germans would be able to 'deinvert' the signal and hear the clear speech if they had access to the telephone lines, but the UK authorities were confident that they hadn't.

The one problem was international telephony. There were no voice grade cables across the Atlantic until the mid-1950s, so international calls had to be made a) on HF which was interceptable and b) protected only by a scrambler, which under certain conditions was processable by German Sigint. Add to the mix the fact that the Prime Minister and the President valued personal contact, and weren't prepared only to communicate in writing, and the potential for significant breaches of security was very high indeed.

Three days after Mussolini was sacked by the King Victor Emmanuel, and after the Italian Government had begun secretly to negotiate armistice terms with the allies, President and Prime Minister had a conversation which led to such a breach. Here is the German report:

'At 0100 hours a radiotelephone conversation between Churchill and Roosevelt was intercepted. It concerned a proclamation by Gen Eisenhower and an imminent armistice with Italy.

Churchill: "We do not wish any armistice terms to be recommended by us until we are formally requested to do so."

Roosevelt: "That's right."

Then they discussed the matter of British prisoners of war in the hands of the Italians with regard to preventing their (the British POW's) removal to the "land of the Huns". Therefore, Churchill wanted to send a dispatch to the King of Italy. Roosevelt took it upon himself to address a statement of his own to "Emmanuel". "I don't quite know just how I'm going to do it."

This is clear proof that secret negotiations between the Anglo-Saxon powers and Italy have been under way.

The Deputy Chief of the Armed Forces Operations Staff made the following observation on this subject: There are some 60,000 British POW's in Italy. The proposals of the Commander in Chief South that these POW's be evacuated from Sardinia and southern Italy have not been acted upon. The Office of Foreign Affairs has been requested to consider the matter.'

This was almost certainly not the first the Germans knew of Italian plans to request an armistice, and, anyway, they had begun to send more troops to Italy as soon as Mussolini had been deposed, but this was, as the German report of the conversation said, clear proof that Italy was ready to change sides.

When I was GCHQ Historian I liked to show a copy of this report to visitors and ask what they thought. The reaction was always the same: the President and the Prime Minister shouldn't have been allowed to speak on insecure links that the Germans could intercept and process. If I then asked who had the authority to tell them that they weren't allowed to speak to each other there was less certainty. It would be a brave official who would attempt to stop them and few people thought that Churchill would meekly accept such advice. 'The King?' one visitor said.

My reaction – at least my first reaction – is different: why was there no secure means for Churchill and Roosevelt to speak to each other? Why did it take until July 1943 (ironically, a fortnight before this particular conversation took place) to develop and field a workable system and why did the UK have to adopt a US system?

I've written enough about the fact that GC&CS didn't take Comsec seriously enough to explain this in part, but I think it's also the case that securing voice communications, which has to be done on-line, was too difficult, and was therefore left to one side until the UK heard that the US was working on a solution. At just about the same time as Alan Turing visited the Bell laboratories and was briefed on the progress of SIGSALY Tommy Flowers was proposing an entirely new sort of machine, Colossus – what would eventually become the computer – to solve the biggest cryptanalytical problem facing GC&CS, and the GPO effort required to make that work probably precluded similar investment in secure speech as well.

The British answer was to copy the US system, but a project (BANGLE) which began in 1944 and which aimed to build 20 machines, based on SIGSALY but miniaturised sufficiently to be used from a 4-ton truck, was unsuccessful and was eventually abandoned in 1953. PICKWICK at the end of the 1950s was the first entirely British system.

Wednesday, September 6, 2023

Postwar Development of New Cipher Machines in the UK

Typex Mark 22

Although there were a few other encryption machines available to the UK at the end of the Second World War (eg Rockex, Morsex and 5 UCO), Typex and the CCM were the only general purpose off-line cypher machines available to the British Services. A new machine was needed, though it was clear that this would take some time – years – to be delivered and so modifications were made to the Mark II Typex (the model in most extensive use) and it was rechristened the Mark 22, or Mark 23 when adapted to take a CCM adaptor. 

At GC&CS Gordon Welchman had thought about a successor to Typex and had devised a rotor scrambler both to replace it and to be field-deployable. A key security feature was a daily change carried out using multi-point plugs, but in January 1945 Alan Turing's investigations showed this to be practically impossible. Welchman therefore decided to dispense with plugboards and found a solution, which he embodied in a paper of 6th March 1945, describing his final specifications for a 26-way scrambler - the RM 26.

A Canadian Army officer, Lt Col B de F "Pat" Bayly had developed Rockex, a one-time tape machine during the war, and thought a small and light machine embodying Welchman's scrambler could be made for use in the field.  In November 1945 he signed a five year contract with the Foreign Office to develop such a machine from his base in Canada. Bayly was told in 1946 that there was no idea of tying him down to a specification, because the whole object of the contract was to enable him to do some free research into the electromechanical application of the RM 26 principles.

In August 1947, a further letter requested a technical write up of progress: the Services were looking on RM 26 with interest, and had asked how Bayly might react to a US development engineer's being seconded to work with him. Bayly replied promptly, saying that he had completed his progress report, and reminded GCHQ that he had been told that this was a long-term project. As there were so many innovations and as considerable improvement in reliability would be necessary before this machine would be useful, Bayly did not believe the machine would be ready to show the Americans for another three or four years. (He also believed it would be a bad thing to attach an American to him, as the result might be the development of a purely American machine incorporating RM 26 ideas.) Further delays were incurred due to a serious illness suffered by Mrs Bayly.

After a couple of visits by British specialists to the Canada, Bayly was asked to send the model he had made to the United Kingdom no later than the end of August 1948, together with a detailed statement setting out what items in the project had been incorporated in the model, what had been found impracticable, and what had not been attempted. British experts concluded that the RM 26 proposals used unnecessarily over-complicated mechanical arrangements and that conventional engineering was preferred; and that the project was not worth while pursuing unless there was a specific operational need for a machine operating on RM 26 principles. The experimental model offered little prospect of providing a successful solution. As a result of this report the project was cancelled.

RM 26 is a good example of how not to organise a project. The aim was changed twice and lost clarity in the process; direction was faulty and supervision inadequate; resources were lacking for proper research and development; and both time and money were wasted through delay in investigating the practicability of the design. It probably didn't help either that the work was being carried out in Canada. In terms of development of a Typex replacement, these years of development had been wasted.

Meanwhile, a member of GCHQ had spoken about the need for a small, secure cipher machine with a tape output to the GPO, which produced a draft specification (codenamed Fruitex Minor) of a battery-operated machine, which the services accepted in December 1947 as a basis for design effort, though with the more prosaic name of DUP 1 (Development Unit Project No 1). This quickly ran into trouble. Its specification proved to be over-fussy: if a reliable machine were ever produced from it, it would be too delicate for use in forward areas, and it would be impossible to mass produce. A new specification was drawn up, and subject to security endorsement which was given in December 1949, was offered as a basis for contract discussions. Early in 1950, the Creed company agreed that if a contract were signed by September 1950, it would deliver 5 units a week starting in September 1951, and that 150 units would be delivered by March 1952. This was subject to the prototype passing service acceptance trials and the specification not changing subsequently. In the event, the trials overran, and the specification was developed into four variants, under the overall codename of Portex, delaying production further.

In exchange for an offer from the US for the UK to inspect a pinwheel machine designed for use by merchant shipping, the US authorities were sent the details of Portex. However, in May 1952, a US security evaluation for Portex was issued, saying that it was too weak for its use to be allowed. It turned out that the security approval given in December 1949 should not have been granted, and more design work was need to correct the errors. In the event it was only in September 1954 that production of Portex began, just under seven years from its being proposed.

The specification for a new Typex replacement specification (DUP 2) was only agreed in January 1949. The basic requirements were:

(a) it must be suitable for UK/US communications, which entailed a 26-way keyboard and scrambler;

(b) since many ships in the Fleet could only carry one machine, it would be required for intra-Naval communications, as well as for communications between the Navy and the other two Services;

(c) for Naval use size and weight should be kept to a minimum, and for ease of maintenance it should be mechanically and electrically simple;

(d) in the Army and RAF it should provide a satisfactory replacement for Typex 22, and it should be suitable for use at higher formation headquarters, where page printing and 32-way operation, needed for the rapid handling of traffic, were more important than limitations on size and weight.

It was clear that the small machine that could satisfy (a), (b), and (c), was a different machine from (d). Work on the former began under the codename Singlet, while a new specification was to be drawn up for the second (codenamed Pendragon). This work was delayed because the US was designing a new CCM and there weren't enough British specialists to work on the two projects simultaneously.

A prototype Singlet was completed in 1951 according to the 1949 specification, but the specification was modified in 1951 and a new prototype had to be developed. A prototype Pendragon had been built, but no subsequent modification was carried out. By October 1952, the Service requirements for Pendragon had changed sufficiently that it was decided that while design work would continue on both Singlet and Pendragon, for delivery as soon as possible, planning for a successor to both of them, with an expected delivery date of some five to seven years, should begin under the codename Copperfield.

In the event Singlet deliveries began in 1959, ten years after its first specification was issued, while the requirements for both Pendragon and Copperfield were subsumed into Alvis (which in its first incarnation had been codenamed Cheapex).

This piece complements other posts here about Sir Edward Bridges' thinking about whether the security mission belonged inside GCHQ. None of the machines being used at the end of the war had been designed by GC&CS (indeed, in the case of Typex, GC&CS input had been sedulously avoided) and the project management of RM 26, Portex and Singlet was so deficient, that it is probably not hard to see members of the Cypher Policy Board dreading the agenda item 'Machine Development' at their meetings.

There was a similar lack of development of machinery to support cryptanalysis at GCHQ during this period, though this was because the machines which were moved from Bletchley to Eastcote, and subsequently to Cheltenham, were believed adequate to the tasks at hand, and it was only the development of General Purpose Computers later in the 1950s that began to change ideas about how computers could be used.

There was a requirement for better cipher security after the Second World War, but, separate from the status of communications security in a primarily signals intelligence organisation, the Services' grip on Comsec was much greater by 1946 than it was on Sigint, and the Cypher Policy Board, which was where GCHQ and the Services met to collaborate on security, operated at too high a level to be able to provide the detailed oversight of development activity.