# Teaching RSA in high school

By this point I’ve taught simplified versions of the RSA algorithm to ten different cohorts of teens: four years’ worth of Honors Algebra II students at Weston High School, juniors for four summers at Crimson Summer Academy, and two years’ worth of college-prep Algebra II students at Weston. Tweaking the details as I’ve gone along, and benefitting from changes in technology, I’ve learned a lot from these experiences.

There are several types of benefits for the students. Some benefits are conceptual, involving understanding ideas about public-key cryptography, ranging from technical questions like how a cryptosystem can use a public key, why that’s necessary, and why it’s secure, to public-interest issues like whether we can trust so-called “secure” financial transactions on the Internet. I could have predicted these benefits; the unit was designed to try to achieve them, after all. And I could have predicted the success of some of the more concrete mathematical benefits as well, since RSA involves exponentiation, prime numbers, modular arithmetic, factoring, representation of characters as integers, and other operations with numbers. But a third type of benefit is more of a surprise: because the technical details are complicated, and even a single mistake can doom the effort to failure, most of my students have been doggedly persistent in paying attention to details and getting them right. Too often we can fall into the trap parodied by Tom Lehrer: “The important thing is to understand what you’re doing rather than to get the right answer.” We give so much partial credit that a student can get a B without ever producing a correct result. Part of the way that my colleagues and I have avoided this trap with RSA is that our sequence of activities and assignments concludes with a two-way exchange of messages: each student sends me a message using my public key, and I reply with a message using the student’s public key. This gives everyone practice in figuring out their private and public keys, enciphering, and deciphering. But fewer than half the kids get it right the first time, since there are so many opportunities to make mistakes. Unlike the usual math problem, they can’t settle for having a couple of points taken off; the message simply won’t work. So they try over and over again — sometimes four or five times — in order to get it right. If they don’t, I can’t read their message, or they can’t read mine.

If you’re interested in checking out how I’ve simplified RSA so it can be studied at the level of Algebra II, take a look at my worksheets, starting at RSA Phase One. (If you keep incrementing the “1” in that URL, you’ll find the next three worksheets at the expected URLs.)

Categories: Math, Teaching & Learning, Technology