Create Secret Codes and Ciphers
Codes are a way of altering a message into one where the original meaning is hidden. Generally this requires a code book or a code word. Ciphers are processes that are applied to a message to hide or encipher a message. These process are reversed to translate or decipher the message.
These two parts, codes and ciphers, are a substantial part of the science of secure communication, also called cryptanalysis. Use simple codes and ciphers with your friends. Create codes and ciphers of your own. Check out examples of common codes and ciphers to polish your skill and deepen your understanding of each.Contents
Sample Coded Paragraphs
Doc:Acrostic Code Paragraph,Acrostic Code Paragraph,Pig Paragraph,Nth Letter Code Paragraph
Steps
Using Simple Ciphers and Codes (Kids)
- Write out words in reverse. This is a simple way of encoding messages so they can't be understood at a glance. A message like "Meet me outside" written in reverse would instead be "Teem em edistuo."
- This code can be easily solved, but it can be useful if you think someone is trying to peek at your message.
- Reflect the alphabet in half to encipher messages. Write out the letters A through M in a single line on a piece of paper. Directly beneath this line, write out the letters N through Z also in a single line. Change each letter of messages to the opposite letter of the two lines of letters you have written out.
- By using a reflected alphabet, the message "Hello" would instead become "Uryyb."
- Try pigpen cipher. Draw a tic tac toe grid on a piece of paper. Write out the letters A through I in the grid going from the left to right, top to bottom. In this example:
- The first row is made up of the letters A, B, C.
- The second is made up of D, E, F.
- The last row is made up of G, H, I.
- Create a second tic tac toe grid with dots. Draw another tic tac toe grid beside the first one. Fill the grid in with the letters J through R, similarly to the first grid. Then mark dots in each space of the grid of each row as described:
- In the first row, starting on the left, place a dot in the lower right corner (letter I), on the bottom middle side (letter K), and in lower left corner (letter L).
- In the second row, starting on the left, place a dot on the middle right side (letter M), on the bottom middle side (letter N), and on the middle left side (letter O).
- In the second row, starting on the left, place a dot in the upper right corner (letter P), on the top middle side (letter Q), and in the upper left corner (letter R).
- Write out two X shapes beneath each grid. These two X shapes will also be filled with letters to complete your pigpen cipher key. In the second X, place dots in the open spaces surrounding where the X crosses so there is a dot on each side of the center of the X. Then:
- In the first (undotted) X shape, write S in the top of the X, T on the left side, U on the right, and V on the bottom.
- In the second X shape, write W in the top of the X, X on the left side, Y on the right, and Z on the bottom.
- Use the grid surrounding the letters to write in pigpen cipher. The grid shapes (including dots) surrounding letters are used as substitutes for the letters themselves. Use your pigpen cipher key to translate messages into and out of pigpen.
Unlocking Codes
- Recognize the limitations of codes. Code books can be stolen, lost, or destroyed. Modern cryptoanlaytic techniques and computer analysis can oftentimes break even strong codes. Even so, codes can condense long messages into a single signal word, making them great time savers.
- Codes serve as good pattern identification practice. This skill can be put to use when encoding, decoding, enciphering, or deciphering messages.
- Codes are naturally used between close friends. Inside jokes could be thought of as a kind of "code." Try developing your code language with your best friends.
- Determine the goal of your code. Knowing the purpose of your code will prevent unnecessary work. If your goal is to save time, you might only need a few specific code words. If you're trying to encode detailed messages, you may need to develop a code book that is more like a dictionary.
- Select common phrases that occur in the messages you want to encode. These are prime targets to be condensed in a code word.
- Codes can be further complicated by using several different codes in rotation or combination. However, the more codes used, the more code books necessary for decoding.
- Develop your code book. Condense common phrases, like "Reading you loud and clear," to something like "Roy." For every conceivable word in your encoded messages and common phrases as well, designate alternative code words.
- Sometimes, partial code can obscure a message sufficiently. For example, if "walk" means "tango" and "museum" means "restaurant" and the previously used code word "Roy" holds its value,
- Message: About yesterday. I wanted to say, Roy. I'll tango to the restaurant as planned. Over and out.
- Meaning: About yesterday. I wanted to say, reading you loud and clear. I'll walk to the museum as planned. Over and out.
- Sometimes, partial code can obscure a message sufficiently. For example, if "walk" means "tango" and "museum" means "restaurant" and the previously used code word "Roy" holds its value,
- Apply your code book to messages. Use the code words in your code book to encode messages. You may find that you can save yourself time by leaving nouns (like names and pronouns like I, me, she) as plain text. However, this decision depends purely on your situation.
- Two-part codes apply two different code books to encode or decode a message. These are much stronger than one-part codes.
- Use a key to encode your message, alternately. A key message, group of words, letters, symbols, or a combination of these can be used to encode your message.
- For example, with the key word "SECRET," each letter of your message would convert to the number of letters between it and the corresponding letter of the key word. As in,
- Message: Hello
- Encoding:
/H/ is 11 letters away from the key /S/
/e/ is the same (zero) as the key /E/
/l/ is 9 letters away from the key /C/
And so on... - Coded Message: 11; 0 ; 9 ; 6 ; 10
The recipient of your message will also need this key phrase or key of letters/symbols to decode the message.
- For example, with the key word "SECRET," each letter of your message would convert to the number of letters between it and the corresponding letter of the key word. As in,
- Decode messages. As you receive coded messages, you'll have to make use of your code book or key word/phrase to make sense of them. This may be difficult at first, but will become more intuitive as you become more familiar with the code.
- To strengthen you encoding ability, you may want to invite your friends to join an amateur code making group. Pass messages to improve your skills.
Learning Common Codes
- Employ the code used by Mary, Queen of Scots. While trying to send messages during a time of political turmoil, Mary, Queen of Scots, used symbols as a substitute code for English letters and common words.
- The use of simple shapes for high frequency letters, like Mary's use of a circle for the letter /A/. This saves time while encoding.
- Common symbols used as part of the new code language, like Mary's use of "8" as code for the letter "Y." These can confuse code breakers who might interpret this as a number and not a code symbol.
- Unique symbols for common words. In Mary's day, "pray" and "bearer" received unique symbols, but these were more common then than they are today. Still, using symbols for frequent words and phrases saves time and adds complexity.
Some features of Mary's code you might find useful for your own crypto-education include:
- Use code phrases similar to military alerts. Code phrases can collapse a lot of meaning into a single phrase. Even many kinds of military alert, like the DEFCON system, are simply well-known codes for a state of defense readiness.
- For example, instead of saying "I've got to run to my locker" among your friends, you might use the code word "Sloppy."
- To let your friends know that the person you want to date has entered the room, you might say the code phrase, "My cousin Bruce likes hockey, too."
Come up with suitable code words/phrases in your everyday life.
- Encode messages with a book key code. Books are relatively easy to come by. If a book has been decided upon as the key to a code, when you receive a message you can go to a bookstore or library to look up the key to decode it.
- For example, you might decide on using Frank Herbert's Dune, with code numbers representing the page, line, and number word starting from the left.
- Encoded Message: 224.10.1 ; 187.15.1 ; 163.1.7 ; 309.4.4
- Decoded Message: I'm hiding my words.
- Different editions of books might use different page numbers. To ensure the right book is used as a key, include publication information, like edition, year published, and so on with your book key.
- For example, you might decide on using Frank Herbert's Dune, with code numbers representing the page, line, and number word starting from the left.
Deciphering Ciphers
- Determine the suitability of using a cipher. A cipher uses an algorithm, which is like a process or transformation that is applied to a message consistently. This means that anyone who knows the cipher can translate it.
- Complex ciphers can puzzle even trained cryptanalysts. Sometimes the math behind complex ciphers can prove a suitable defense for hiding everyday messages.
- Many cryptographers add a key, like the date, to strengthen ciphers. This key adjusts the output values by the corresponding number of the day of the month (on the first, all output values would be changed by one).
- Invent an algorithm to apply to messages. One of the simplest ciphers you can apply is the ROT1 Cipher (sometimes called Caesar Cipher). This name simply means you should rotate a single letter forward in the alphabet for each letter of your message.
- ROT1 Message: Hello
- ROT1 Enciphered: i ; f ; m ; m ; p
- Caesar Ciphers can be modified to rotate forward a number of different letters of the alphabet. In concept, ROT1 and ROT13 are essentially the same.
- Ciphers can be incredibly complex. Some require the use of coordinates, times, and other values as well. Some cipher process may require the use of a computer.
- Encipher messages. Use your algorithm to encrypt your messages. As you learn the enciphering process, your speed should increase. Add to your algorithm to make it more complex. For example,
- Include a rotating condition to your cipher, like the day of the week. For each day of the week, assign a value. Adjust your cipher by this value when encrypting a message on that day.
- Include a page number with your enciphered message. Each corresponding letter of that page will serve as a key for the message, as in,
- 1st Deciphered Message: 7 ; 2 ; 3 ; 6 ; 3
- Book Key: A_girl (spaces aren't counted)
/H/ is 7 letters away from /A/
/e/ is 2 letters away from /g/
/l/ is 3 spaces away from /i/
And so on... - Key Adjusted Message: Hello
- Decipher messages. When you become experienced reading your cipher it should become second nature, or at least easier. As the application of these processes (algorithms) is consistent, habit will help you notice trends and gain intuition when working with this kind of cryptographic system.
- Amateur cryptography clubs are popular online. Many of these are free and offer primers in the basics of modern ciphering.
Grasping Standard Ciphers
- Master Morse Code. Regardless of its name, Morse Code is a cipher. Dots and dashes represent long and short electrical signals which, in turn, represent the letters of the alphabet. This enabled old-time electrical communication (telegraphs). Common letters in Morse, represented as long ( _ ) and short (.) signals, include:
- R ; S ; T ; L : ._. ; _.. ; _ ; ._..
- A ; E ; O : ._ ; . ; _ _ _
- Make use of transposition ciphers. Many greats in history, like the genius Leonardo da Vinci, have written out messages as they would look reflected in a mirror. Because of this, enciphering in this fashion is often called "mirror writing." These kinds of ciphers can be difficult at first, but generally become second nature quickly.
- Transposition ciphers generally treat messages or the formation of letters visually. The image of the message is transformed to hide its meaning.
- Convert messages to binary. Binary is the language of 1's and 0's used by computers. Combinations of these 1's and 0's can be enciphered and then deciphered with a binary key, or by calculating the values represented by the 1's and 0's for each letter communicated in a message.
- The name "Matt" would encipher to binary as: 01001101 ; 01000001 ; 01010100 ; 01010100.
Tips
- Devise a way to encipher spaces between words as well as the words themselves. This will strengthen your code and make it harder to break. For example, you can use a letter ( E, T, A, O, and N work best) instead of a space. These are called nulls.
- if you speak Hebrew you can write in your keyboard in English when it is set to Hebrew
(this method can be used with any language that does not use English alphabet
Warnings
- Having a code or cipher does not guarantee the security of your message. Cryptanalysis may break your code, or human error, like the loss of a code book, might as well.
Related Articles
- Create a Stacked Cipher
- Spy
- Speak and Translate Minionese
Sources and Citations
- ↑ https://www.khanacademy.org/computing/computer-science/cryptography/ciphers/a/ciphers-vs-codes
- ↑ http://www.unmuseum.org/cipher.htm
- ↑ http://kidsactivitiesblog.com/27282/secret-codes-to-write-a-coded-letter
- http://www.makeandtakes.com/3-secret-codes-to-try-with-your-kids
- ↑ http://www.civilwarsignals.org/cipher/pigpencipher.html
- https://www.dpmms.cam.ac.uk/~tkc/CodesandCryptography/CodesandCryptography.pdf
- http://www.nationalarchives.gov.uk/spies/glossary/default.htm#codes
- http://www.nationalarchives.gov.uk/spies/ciphers/
- http://io9.gizmodo.com/check-out-the-cipher-from-an-assassination-attempt-on-q-1567478070
- https://asecuritysite.com/coding/mary
- http://encyclopedia.thefreedictionary.com/DEFCON
- http://www.topspysecrets.com/book-cipher.html
- http://rumkin.com/tools/cipher/caesar.php
- https://www.iacr.org/
- http://www.learnmorsecode.com/
- https://www.mos.org/leonardo/activities/mirror-writing
- http://listverse.com/2012/03/13/10-codes-and-ciphers/
- https://www.sciencefriday.com/educational-resources/write-your-name-in-binary-code/