# St Thomas of Canterbury, 5 July 2019

This was our showpiece week at Bletchley Juniors Codebreaking Club, as we tackled some frequency analysis. I promised the children I would show them how to decode a ciphertext without knowing the key, and this was it.

The plaintext was three paragraphs summarising what the children had learnt in the six months since we started this club. I used a Caesar cipher with a shift of 7, but kept this information from the children. (Why 7? It was a lucky number to the Ancient Greeks!). I explained that some letters in English texts occur much more frequently than others (E, T, A and O) and others letters occur very infrequently (X, Q and Z). I showed them a frequency distribution chart of the whole alphabet.

I got the children to count the frequency of the letters in the ciphertext. I wrote the answers on post-it notes. The children then arranged these in order: the most frequent were L, A, H and V.  I suggested it was very likely that L represented E, A was T, H was A and V was O. The children found every L in the ciphertext and wrote E above it. They repeated this for A, H and V.  I said it was very unlikely there would be an exact match between the frequency of our ciphertext and the frequency of English texts. I steered them towards a list of the most common three letter words that I had supplied them with. The children could predict where the word ‘the’ was in the ciphertext: they then found every O and wrote H above it. Returning to the list of three letter words, the children could predict where the word ‘and’ was in the ciphertext; they then found every U and wrote N above it, and found every K and wrote D above it.

From this point on it was a case of pointing the children towards some partially complete words in the ciphertext and encouraging them to work out what that word was, then transferring this knowledge to all of the ciphertext. There was a point when we felt we had reached the summit of the mountain, and it was all downhill from there. Eventually I was able to read out the whole plaintext message.

One thing that did not go well was the timing: we over ran by 20 minutes, as it proved impossible for me to predict how long the activity would take. I did gently push the children to get the activity finished before leaving. The lesson I learnt was that I could have split the activity across two weeks, or I could have written a shorter plaintext. Perhaps I was too ambitious: you live and learn.

One other thing to bear in mind was that it is very easy to miss letters when counting them, and when looking for them to write the real letter above them. I did this in practice, and the children did it during the session. I think the solution is to know that this will happen and to allow time to check the children’s work as they go along.

As we over ran there was no time to summarise what we had achieved in the session. One parent did tell me later that their child was intrigued by frequency analysis. It was good to know we had provided another enjoyable session.