Monday, March 28, 2022

The Yangtze Incident And A Do-It-Yourself One Time Pad

The story of HMS Amethyst and the Yangtze Incident used to be well known, but is less so today. Briefly, during the Chinese Civil War HMS Amethyst was sailing up the Yangtze from Shanghai to Nanking to provide support to the British Embassy to the Chinese Nationalist government which was temporarily based there. The British frigate was fired on by Chinese communist forces and severely damaged, and was forced to anchor for ten weeks, every attempt to move provoking renewed fire from the communist batteries. On the night of 30 July 1949 Amethyst made a daring and successful 100 mile dash down the Yangtze and rejoined the fleet. there is a little known cryptographic footnote to this story. 

After being attacked, HMS Amethyst had prepared to scuttle herself and had destroyed all crypto materials. From comments made by the local communist commander during protracted negotiations, it was clear that his forces were intercepting the plain language traffic between Amethyst and CinC Far Eastern Station, so how could Amethyst and the CinC plan her escape?

The Chief Naval Signal Officer Far East (Cdr C R Williams RN) came up with a plan to create a One Time Pad (OTP) which would then be used to re-encipher message sent using the Government Telegraph Code, a copy of which was held by Amethyst but which was also known to be in the possession of the communists.

The OTP was created as follows: in a first column, the surnames of all RN officers and men on board were listed in alphabetical order.

Column two listed the first name of the next of kin of each of the people in column one.

Column three listed the placename in the address of the people in column two as given by the person in column one.

Column one was now discarded.

Working down column two, letters were converted into four figure groups – so JOAN became 1015 0114. Groups were written across the page, with five four figure groups on each line. Once column two was complete, the same process was used with column three.

This pad was only used for one message. In it, Amethyst was told the times, frequencies and indicator groups of a series of dummy messages which would be addressed to CinC FES on the Fleet broadcast. Amethyst should copy these messages and use the groups transmitted to make 'In' and 'Out' pads. She was also told how to use the pads without a codebook.

During the afternoon of 30 July Amethyst sent a Flash signal: "DTG 300657Z July. Top Secret. CinC info Concord from Amethyst. I am going to try and break out two two zero zero item repeat two two zero zero item tonight three zero July Concord set watch eight two nine zero." (HMS Concord was a destroyer sent up the Yangtze to support Amethyst's escape.)

A lot of people still think that the security that OTPs offer is based on their randomness: in fact it's based on their unpredictability. In this context, the Chinese communists' knowing how the single use OTP was constructed introduced significant weaknesses. Apart from the fact than an agent in London might have been able to access the list of crew and their next of kin, column three was likely to have a disproportionate number of repeats of "Portsmouth", "Plymouth" and "London". But even if they had been able to do break and read this one message, it is likely that there would have been a time lag, and during that period they would have had to have copied and saved every single message on the Fleet Broadcast, to have been able to reconstruct the OTPs built from the dummy traffic being broadcast.

I would like to be able to say that after a carefully carried-out risk assessment an expert panel decided that the risk was worth taking, but there is no record to suggest that this was the case. It is unlikely that we'll ever know, but my guess is that this was a piece of local ingenuity, which happened to turn out well.


No comments:

Post a Comment