Wednesday, March 24, 2010

Follow up - teaching crypto to children

This is a follow up to my blog post yesterday about teaching cryptography to 5th grades.

It turned out that my class consisted of four students each from grades 5, 6, 7 and 8, not just fifth graders. The makeup of the class, which included older kids than I expected, did not really change anything, and the class size of 16 was perfect for the exercise I had planned. As many people pointed out to me, I had way too much material for one hour. In fact, the lesson I had planned out was better suited to a four hour session.

My typical students at Hopkins are about 15-20 years older than the Schechter students, and I found the class refreshing and entertaining. My initial observation was that some of the older kids did not appear too happy to be there. I saw kids staring at the ceiling or off into space. The younger children on the other hand, the 5th and 6th graders, seemed eager for me to start and made much better eye contact with me than their older classmates. However, once I started the class, I had everyone's attention.

Paul Revere's ride and the issue of signaling a code in the absence of cellphones and radio provided for a lively discussion, and I realized right away that this was a particularly bright and engaging group of students. What a pleasure.

Next, I described Caesar's cipher and substitution ciphers in general, and I asked the class to come up with ideas for how to break a simple substitution cipher. I wrote the list on the board as they made suggestions.

  • Pairs of letters
  • Common combinations, such as th, ch, sh
  • Using letter frequency
  • Small words, A, I, the, you

    Next, I had the students break into teams and come up with a cipher and a plaintext sentence and encrypt the sentence. Unfortunately, this took quite a bit longer than I would have liked, and by the time they finished, there were only about 20 minutes left. So, I gave them 10 minutes to spend cryptanalyzing the messages, and I had to break things off before any group had made any real progress. The students had a lot of fun reading their messages to the class. One interesting thing that happened is during the cryptanalysis phase of the project was that two of the teams decided to trade revealing one letter of their choosing with the other group. I had not specified that such bartering was allowed, but I let them do it, hoping that they would be able to finish in time.

    With 10 minutes left, I went back to lecture mode and showed them how to build increasingly complex ciphers from the cipher wheels. I got some oohs and ahhs, and I think that the exercise of trying to break a simple substitution gave them an appreciation for how hard it would be to break a three wheel cipher with keyed rotations. One particularly bright student, one of the younger ones, who asked some great questions (wonder if there's room for him at JHU some day in our Ph.D. program) said that he thought all of the strategies that were on the board were useless once the wheels started rotating, and he did not accept that anyone could actually break such a cipher, even using a computer. I did my best to assure him that computers could try many combinations of rotations of the wheel and look for recognizable plaintext, but I don't think he bought it. Once I stated that in WWII, the real progress in breaking the Enigma happened when an encrypting machine was captured, he seemed satisfied.

    So, overall, I had a blast. The students were great, and of course, the material made it easy. I just wish I had had a longer session. Okay, now back to my "adult" students.