Pin it!
Google Plus


6-8, 9-12
Number and Operations
Math Content:
Number and Operations

The following applet allows you to explore these ciphers by encoding and decoding text messages.


Cryptography is science that uses mathematics to encrypt and decrypt data. The most elementary idea in cryptology is the idea of a cryptosystem. This is a system in which information can be made unintelligible to all but the intended reader. The first component of a cryptosystem is the original set of information, called the plaintext. The next element of a cryptosystem is the algorithm, commonly known as the cipher. This is the process that makes the information unreadable to the average person. The next part of a cryptosystem is the information that has been altered, which we call the ciphertext. This is the information that is not recognizable, and therefore can be sent out over public channels without fear of anybody understanding it. Decoding a message is the reverse process of encoding.

One way to encode messages is to replace each character in the message with another character. Such an encoding rule is called a substitution cipher. The first substitution rule we introduce is a shift transformation. The first known shift transformation is attributed to Julius Caesar, and is now called the Caesar cipher. The cipher works in the following way. Each letter in the alphabet is replaced by another letter using a predefined rule which shifts the alphabet a uniform amount to the right.

A Caesar cipher can consist of any size of shift, as long as the sender and receiver agree on this size. Observe that there are 25 different shifts making this cipher easily broken; just try out all the different shift values until the ciphertext makes sense.

To decrease the likely hood of being broken a substitution cipher can include a stretch value which adds a value between each letter.

How to Use

  • Type a short message into the "Uncoded Message:" textbox, and press Update to see the ciphertext in the "Encoded Message:" textbox. Alternatively, select the "Decode" checkbox to decode ciphertext to plaintext.
  • Enter a new "Shift Value" or a new "Stretch Value" and press Update to change how the message is encoded or decoded. Individual letter codes can be changed manually by click-and-dragging the black box to a new location.
  1. Using only a shift, crack the code and decrypt the message "lxwpajcdujcrxwb".
  2. Set the shift value to 0 and the stretch value to 2. Explain why this set of values for shift and stretch would not be a good encryption method.
  3. Which of the stretch values from 2 to 26 with a shift value of 0 produce acceptable encryption methods? What is significant about the relationships between the good values and 26?
  4. Choose a shift and stretch value. Encode a message and give this message to another group to see if they can decode the message.
  5. Reset the code using a shift value of 0 and a stretch value of 1. Then click and drag one of the points vertically to a new location and release. What do you observe happens? Explain why this observation is necessary.
  6. Move as many different points as you desire. Encode a message now and give this message to another group to see if they can decode the message. How many coding schemes are possible in this case?