Appendix VI – Affine & Hill Ciphers

The Cryptogram, ND 2007

LIONEL

How Urban Elementary School Youth Struggling With Multiplication Tables Find Comfort In The Affine and Hill Cipher Types.

Principal Miss Rosemary cautioned, “Let me be honest up front. These children are not only academically challenged but have a myriad of interests and places they would rather be than in an after school tutoring program.” These were sobering words to one volunteering to lend a helping hand to inner city second, third and fourth graders, who wanted no part of taking on addition, subtraction, division and multiplication tables

What can a teacher to do to enter the mindset of a seven, eight, nine or ten year old, whose attention is attracted to video and computer games, arcades, text messaging and all of the modern technical ingenuity coming down the pike? How do we motivate a mind-tired child after a full day of classrooms in a place that he or she does not want to be? How do we convince a child that learning can be more exciting than frolicking with siblings and friends in fun and games distant from the classroom?

Enter, Terrell, a second grader, steeped in an exuberant personality exhibited in all directions but classroom learning. When his second grade teacher, Miss Mullen, related that all Terrell wanted to do was to have fun, it sent me way back, too many years to count, with thoughts of my third grade teacher, Mrs. Lane, who expressively exhibited the persona of an educator having fun. “Learning should be an exciting fun-filled experience,” voiced a bubbling Mrs. Lane, “How can one not get excited in pursuit of all the knowledge that the universe has to offer?” Now, I had only to fathom how to get this message across to Terrell.

We began with reading, writing, spelling, and basic addition and subtraction, all a turn-off for Terrell, who just wanted to have fun and witnessed no interest in “universal knowledge impact” upon his persona. Conversations about his areas of interests led to super heroes’ adventures. I inquired as to whether he was aware of how super heroes were able to communicate with allies in discreet and private messaging. Enter the world of secret messaging and the Cipher Wheel.

“Wouldn’t it be cool to be able to communicate to your friends in a way that your big brother and sister could not understand what you were saying?” I asked Terrell. “What do you mean, Mr. Lee?” was Terrell’s reply. I scribbled the cipher, “OYDKKH EO BQJ.”

(Caesar Shift of four letters will reveal the plaintext message, “School is fun.”) I suggested that Terrell bring this message home to his brother and sister and challenge them to read it. “But I can’t read it myself, Mr. Lee,” was Terrell’s retort. A short introduction to the Cipher Wheel and Terrell could not wait to get home that afternoon with his new found learning tool. I cautioned him to keep the Cipher Wheel out of sight.

At our next session, Terrell was eager to relate the stumping of his siblings and eager for more practice with the Cipher Wheel. Our one hour session zipped by as I entwined the Cipher Wheel with reading, writing, arithmetic and another secret message for Terrell to take home to his siblings.

Future tutoring sessions introduced Terrell to the Caesar Cipher and Cipher Slides as a prelude and introduction to the most rudimentary Affine and Hill Cipher application to secret messaging. My game plan was to tie in addition, subtraction, division and multiplication practice to ciphers and secret messaging. Oh yes, we would face the dreaded multiplication tables that Terrell’s friends in the upper classes had promised him were coming down the pike. Oh, how challenged students do dread the intrusion of the multiplication tables into their uncomplicated world. I promised Terrell that they would be fun and prepped him to look forward to them as an important part of his secret messaging.

And look forward to them Terrell did. His second grade teacher, Miss Mullen, inquired into what mysterious feeding process in our tutoring sessions was prompting Terrell to lobby for the introduction of the multiplication tables in the second grade curriculum. I cautioned Terrell that he might not be the most popular young man in his classroom when the multiplication tables arrived but he responded, “Don’t worry Mr. Lee, I’ll show them how to use them for secret messages.”

Wow! A volunteer tutoring program that I had approached with apprehension had now taken a positive turn for the better. Requests began pouring in from students for my services and fellow tutors began asking if learning was accompanying the “game playing” that was being reported as taken place in our sessions. I had to discontinue substituting for absent tutors as their students wished to stay with me.

But the best was yet to come, with the appearance of the “dreaded multiplication tables,” as we introduced the Affine and Hill ciphering construction approach to our second, third and fourth grade students.

The Affine (Linear Substitution Encryption) and Hill (Lester Hill, U.S. mathematician)

Cipher techniques manipulate numbers in ciphertext with complicated formulae base to disguise message plaintext over and above the simple substitution process. Numbers have been commonly used to encipher plaintext but the Affine and Hill Ciphers use mathematical formulae and logic to disguise the plaintext further through a series of mathematical equations.

The Affine Linear Substitution Encryption in its most basic application form may first apply addition and then multiplication to its plaintext message. To convert the plaintext letter “C” by this method, 5 might be added to the numerical value of the letter (C = 3; 3 + 5 = 8) and that sum multiplied by some other constant, such as 5 (5 x 8 = 40). The resulting cipher letter is N (40 modulo 26 = 14 – N). (Encyclopedia of Cryptology, David E. Newton, Instructional Horizons Inc., 1997)

The Hill Cipher suggests that a series of plaintext letters can be converted into ciphertext with the use of four simultaneous linear equations where variables are raised to no power higher than the first and all variables have the same values. Needless to relate, such complex base formulae do not allow for the ease of plaintext encryption and certainly will not relate to the desire of making elementary classroom mathematics fun and games. But they do provide a path to a simplistic approach of making secret messaging through elementary mathematics fun while achieving the primary objective of simultaneously educating the student.

Supported by the Affine and Hill Cipher premises and willed with the desire to make mathematics fun, we began our journey. A simple alphabetical/numerical slide is constructed, relating letters of the alphabet to a numerical sequence:

a b c d e f g h i j k l m n o p q r s t u v w x y z
1 2 3 4 5 6 7 8 9 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6

Let the fun and games begin. Numerical ciphertext is developed, incorporating the mathematical lessons of the day. This simple slide is sufficient to relate to the second grade’s most basic math problems and is expanded as higher class math relates to double digit multiplication tables, columnar addition and long division type problems. A second grade numerical ciphertext, related to the numerical slide might look like this:

(6 + 3) (6 + 6) (5 + 4) (6 + 5) (3 + 2) (10 + 9)
I l I k e s
(2 + 1) (4 + 4) (10 + 5) (5 + 10) (7 + 5)
c h o o l

The classroom exercise enjoyment is enhanced as secret messages are related to the students and geometrically compounded as students are challenged to develop their own secret notes to take home and challenge the family. (My first secret message to Terrell related to school being fun. He however related that he could come up with much more interesting plaintext.)

This mathematical recipe for secret messaging to initially challenge siblings, friends and family and in later years to cover up messages from uninvited prying eyes establishes an intensive avenue to motivation.

Ah, yes, the interminable age-old competition between the cryptographer and cryptanalyst reared its ugly head one day when a student lamented that a brother had figured out her ciphering slide system. What is a cryptographer to do? Why it’s elementary, my dear Watson (the student’s actual name, Ravena Watson) simply change the slide. Reverse the alphabetical order, use an inside out alphabetical arrangement, arrange the slide with every other letter order, etc. etc. etc. And so, cryptology and mathematics education had been saved to live another day.

“Affine and Hill” brought the classroom alive for both the student and the teacher by demonstrating that learning can be fun. It has transferred the mathematical educational journey from one of “the blahs” to a passion for numbers. This inspirational transference has made both student and teacher eager to return to the classroom in much the same nature of anticipation that is engendered into the looking forward to the newest video game, ball game or latest movie or DVD. It has invigorated this educator into looking forward to the next academic year.