Cryptography #iGCSE #ComputerScience

One of the nice and not-so-nice things about vague arrangements documents is that you have to work out how to best fill the gap.

Encryption methods are part of the Computer Security section of the course – symmetric and asymmetric encryption to be exact – and, while I could simply put two slides up on the screen and move on, I saw this as an opportunity to break away from exam style questions and have a little bit of practical fun with the students.

I introduced my Year 10 students to the Caesar cipher this week, surprised that very few of them had even heard of it. They caught on quickly though and were soon manually translating coded messages back into plaintext.

But as the lesson progressed the messages got longer and the students began to find translation very time consuming. So, after a bit of discussion, we decided it might be best to ask a computer to do the translation for us. We would still provide the ciper-text and shift key, and it would do the rest.

This allowed us (imagine that) to then recap on relevant pre-defined functions to translate characters into ASCII codes and then build an algorithm to apply the shift key to these ASCII codes. Once the codes were converted back to characters they were ready to display on the screen! Most students managed to get to this point, with some even working on alternatives (more on that later).

The next day the students returned and were given a tougher challenge: decryption without the shift key! We discussed the letter frequency graph shown above and tried to create an algorithm to accurately calculate the shift key.

The open-endedness of this task challenged everyone and the variety of solutions suggested touched on some of the actual decryption methods utilised.

A few students suggested a brute force decryption of a digest of the entire message, looking for a small number of short English words before comparing the calculated shift key to the frequency analysis graph. When challenged further they explained that this would decrease the processing time of the decryption algorithm as it wouldn’t have to translate as many characters. Some students had even had researched further to find out which were the most used English words in written text!

The students rounded off the lesson by creating a list of advantages and disadvantages of symmetric encryption. While students took longer on the concepts it gave them the opportunity to understand some of the ideas and issues with this type of encryption.

Next week we tackle asymmetric encryption. I can’t wait!

Leave a Reply

Your email address will not be published. Required fields are marked *