Crypto for high schoolers

At one of our recent Kids Code Jeunesse meetings, my friend, high school programming teacher Stuart Spence (see his site and his YouTube channel) was telling us about what his students are into.

One of the things they get most excited about–especially, he says, the girls–is cryptography. They think it’s really cool that they can use their just-beginning programming skills to reverse-engineer passwords and crack codes and stuff like that.

Stuart says he gets them up & running in Python and this is one of the first “real” applications they try. He teaches them about hashes and string manipulation. He shows them how to put for loops to use in order to cycle through combinations of characters. And as a bonus, he pivots to personal internet security: they use Ghostery (a browser plugin) and start to understand web tracking and privacy first-hand.

New to me

I have to admit, it never would have occurred to me to teach security or cryptography to teenagers.

I would have assumed that crypto is strictly for kids who are naturally inclined toward codes, security (of a white-hat or black-hat pursuasion), or maybe pure math. Those kids exist, but they’re not the majority. And I would have assumed that everyone else would find that dry and uninteresting, and that they would much rather create interesting functional programs, games, or programmatic content (animation, etc.). But Stuart says no, this is a favorite in his classes.

Who knew? Cool!


2 thoughts on “Crypto for high schoolers”

  1. Mike,

    I too was surprised at what Stuart reported with regard to high schoolers’ interest in cryptography — “especially the girls.” I happen to have been very curious and “into” crypto starting at age 6 or 7 — well before I had access to a computer. I guess that kids like having some coded means of exchanging information “secretly,” witness the popularity of “decoder rings” back in the early 60s.

    Behind the allure of cracking those simple encoding methods — think ROT-13 — was the reward of outsmarting whomever devised the encoding scheme. (Yes, I was vain and had read about Alan Turing breaking the Germans’ Enigma encoder during WWII. He was a hero to me.)

    My interest in crypto never waned since then (I am now 58) and my first computer programs were all about encoding and decoding plain text, the latter using heuristics such as the frequency of occurrence of letters in English texts. From memory, I can still recall the first 12 in descending order of frequency: ETAOINSHRDLU.

    Having this information, I could easily crack any substitution-based encoding. This drove me to come up with more sophisticated encoding algorithms and learning about public/private key crypto (and how to break it), etc.

    Obviously, I used a personal computer to hack these things. I tried to interest fellow programmers but failed. Thus, I saw myself as an atypical (white-hat) coder who then went on to learn much about security, taking perverse pleasure in spotting holes at the University where I worked and privately notifying the appropriate people in the Data Security Department of these flaws. They were surprised that an ordinary programmer discovered what an entire team failed to identify.

    What I did was made possible by learning computer languages and I deplore that I came to Python so late in my career. That said, I have never used the GUI capabilities of any such language I learned, much preferring writing textual programs.

    This may be at variance with the received notion that kids’ first exposure to a computer language is to write programs with animated sprites and suchlike. However, Stuart’s report seems to contradict this stereotype.

    In my book, students should become proficient in at least one text-based computer language and then, if they are so inclined, move on to writing graphics-displaying ones, let alone being introduced to computer programming using a fully graphical development environment.

Leave a Reply

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