One of the ways to foster engagement in Computer Science is to come up with interesting topics that grab student attention. One of my favourite student activities was writing a program to encode and decode messages.

We used to watch a movie showing various techniques used over the years and then talked about how to develop an algorithm using simple rotation to encode messages. A becomes B, B becomes C, etc. and then various adjustments from there. It’s actually an easy topic because of the interest “Hey, I can send you an encrypted message and the teacher can’t read it” and simply because most kids had done the activity in class on paper lest the paper the message is written on get intercepted.

In the movie that I showed, it talked about the Enigma Machine and how it was used in the Second World War and how Alan Turing became involved in decoding the messages. The computing activity usually took longer than I anticipated, not because we were using all that sophisticated code, but just because it was so interesting and students would want to take the time and effort to really polish off their code. Win all the way around!

Now you can get into the Enigma Machine in great detail here. It’s a great visual representation of how encryption works with all kinds of adjustments plus a history of the machine and how it works.

Of course, the real machine was all mechanical but modern coding makes for a great visualization and the internet makes the resource available everywhere you’re connected.

Did I say code?

By clicking in the left margin, you can see the source code that makes it all happen.

Of course, that opens all kinds of other opportunities.

We’ve come a long way from the days of finding the VCR tape, booking the television, watching the movie all at once, and then taking notes!

## 4 thoughts on “Your own Enigma machine”

1. I love cryptography. Some years ago I had a student who did an independent study with my on the topic and that only fueled my interest. As a student I used to come up with simple substitution cyphers which at the time seemed hard to crack. I know better now.

I have had students program Caesar cyphers which are of course simple rotation cyphers. This reminds me – do you remember ROT-13 which in the early days of the Internet was used to hide spoilers of all sorts in messages? Seems like everyone had a piece of code to encode or decode ROT-13 back then. Today’s kids will probably never know this trick.

Like

This site uses Akismet to reduce spam. Learn how your comment data is processed.