

This technique will be more accurate for longer blocks of text and very inaccurate for short words or phrases because there are plenty of words that do not contain E at all. (If you have ever played the board game Scrabble, you might notice that this determines how many points letters are worth!) So, for example, if you read an entire paragraph and notice that the letter D appears more often than any other, odds are that it used a Caesar cipher with a shift of 1 (making E a D in the code). For example, the letter E appears more often than any other one whereas Z appears the least often.

Can they crack your code if they “intercept” your message?

Using the example from the background, the letter x becomes a y becomes b and so on. If it helps for the first try, let them work backward using the original and shifted alphabets you wrote down. See if your friend can decrypt your message.Why do you think you wouldn't want to write down the key? Give your friend the encoded message and tell them the key.Just make sure the piece of paper you give your friend only has the encoded message! If it helps, write down your plain text message first then encode it one letter at a time (such as the “hello” example above). Write down your encoded message using your shifted alphabet.It might be easiest to start out with a simple message (such as a single word or phrase) before you try longer sentences or paragraphs. Pick a message to write to your friend.Shift the entire alphabet by the number you picked and write it down below your original alphabet (as shown above).(If you use 26, you will just wind up with the original alphabet.) This number is your key. Explain the concept of a Caesar cipher to a friend or have them read the background section of this activity.After that you can send messages that are written in cipher so other people can't read them! In order to decode your message, you need to share the “key” (the number 3) with your friend. So, when you write your message, the letter A gets replaced with X, B gets replaced with Y and so on. For example, this would be your key and code if you shift each letter by three spaces: It is a simple form of a “substitution cipher” where you replace each letter of the alphabet with another letter by shifting the whole alphabet a certain number of letters (wrapping around to the beginning once you reach the end). The Caesar cipher, named after Roman Emperor Julius Caesar is one of the earliest and most widely known ciphers. Now cryptography is essential in computer science for keeping everything from e-mails to bank account information secure. Many of the earliest codes, or “ciphers,” such as the one you will create in this project were easy to create by hand. Historically, codes have been used by politicians, spies and countries at war to prevent their enemies from knowing what they’re up to. Try this activity to learn how to create your own “Caesar cipher,” a popular type of code that is easy to learn.Ĭryptography is the study of writing or solving secret codes that are used for secure communication.

If you need to send a secret message to a friend, how could you prevent other people from reading it? One way is to encrypt the message-that is, use a secret code that only you and your friend know.
