How.com.vn English: PDF downloadDownload Article
Send messages only you and your friends can decipher just like a secret agent
How.com.vn English: PDF downloadDownload Article

While spies and treasure hunters in movies make cracking codes look super complex, you can actually make your very own secret code or cipher all on your own. No special government training or spy school required. Learn the basic rules of what makes a great code and cipher, and start talking with your friends in secret code next time you see them.

Things You Should Know

  • Create a code by replacing key words and phrases in your message with code words, numbers, symbols, or other letters of the alphabet.
  • Develop your own cipher by developing a pattern that can be applied to each letter of your message, such as shifting each letter forward by 1 along the alphabet.
  • Make a key or code book that has instructions for how to decode or decipher your message.


Method 1
Method 1 of 5:

Using Easy Codes & Ciphers for Kids

How.com.vn English: PDF downloadDownload Article
  1. How.com.vn English: Step 1 Write out words in reverse.
    This is a simple way of encoding messages so they can't be understood with just a quick glance. A message like "Meet me outside" written in reverse would instead be “Teem em edistuo.”[1]
  2. How.com.vn English: Step 2 Split 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 in a message to letter directly below or above it in the grid you just made.[2]
    • For example, the letter A would be replaced with N, B with O, C with P, and so on and so forth.
    • By using a reflected alphabet, the message “Hello” would instead become “Uryyb.”
    Advertisement
  3. How.com.vn English: Step 3 Draw a tic-tac-toe...
    Draw a tic-tac-toe grid to make a pigpen cipher. Draw a tic-tac-toe grid on a piece of paper and write out the letters A through I in the grid going from the left to right, top to bottom, one letter per box. In this example:[3]
    • The first row is made up of the letters A, B, C.
    • The second row has D, E, F.
    • The last row consists of G, H, I.
  4. How.com.vn English: Step 4 Create a second tic-tac-toe grid, but draw a dot in each box.
    Draw another tic-tac-toe grid next to the first one. Fill the grid in with the letters J through R just like how you did with the first grid. Then, draw small dots in each space of the grid as follows:[4]
    • In the first row, starting on the left, place a dot in the lower right corner (letter I), on the bottom side in the middle (letter K), and in the lower left corner (letter L).
    • In the second row, starting on the left, place a dot in the middle of the right side (letter M), in the middle of the bottom side (letter N), and in the middle of the left side (letter O).
    • In the third row, starting on the left, place a dot in the upper right corner (letter P), in the middle of the top side (letter Q), and in the upper left corner (letter R).
  5. How.com.vn English: Step 5 Draw 2 X-shaped grids and fill in the rest of the letters.
    The first X will contain the letters S, T, U, and V. 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, fill in the remaining letters W, X, Y, and Z.[5]
    • In the first (undotted) X shape, write S in the top space, T on the left side, U on the right, and V on the bottom.
    • In the second (dotted) X shape, write W on the top, X on the left side, Y on the right, and Z on the bottom.
  6. How.com.vn English: Step 6 Use the grid surrounding the letters to write in pigpen cipher.
    The grid shapes (including dots) surrounding the letters are used as substitutes for the letters themselves. Use your pigpen cipher key to translate messages into and out of pigpen.[6]
  7. How.com.vn English: Step 7 Choose a date specific date to use in a date shift cipher.
    This might be something with personal significance, like a birthday or the day you graduated college. It could also be something impersonal and arbitrary, like the birthday of George Washington. Write out the date as an unbroken string of numbers. This is going to be your number key.
    • For example, if you were to use George Washington's birthday (2/22/1732), you would write it as 2221732.
    • Each number will tell you how many letters over you’ll need to shift to read the original message.
    • For example, if the letter D is in the encoded phrase and has the number 2 underneath it, this means you must move 2 letters forwards or backwards to get the letter from the decoded message. In this case, it would be either F or B.
    • When making your cipher, be sure to decide on the direction you’ll be moving along the alphabet when encoding and decoding (forwards or backwards).
    • If you've already agreed to use a date shift cipher with someone, come up with a clue (like “Washington”) you can say to each other to talk about the number key.
  8. How.com.vn English: Step 8 Encipher your message with the date shift number key.
    Write out your message on a piece of paper. Underneath the message, write out a single digit of the number key for each letter of your message. When you reach the last digit of the number key, repeat the key from the beginning. For example, using George Washington's birthday (2/22/1732):
    • Message: I'm hungry
    • Enciphering:
      I.m.h.u.n.g.r.y
      2.2.2.1.7.3.2.2
      Shift letters according to the number key, as in…
    • Coded message: K.O.J.V.U.J.T.A
  9. How.com.vn English: Step 9 Use a secret language, like Pig Latin, to both speak and write in code.
    When you speak Pig Latin, words that start with a consonant sound move that sound to the end of the word and add “ay.” It’s the same for words starting with a cluster of consonants. Words that start with vowels just get “way” or “ay” added to the end of the word.[7]
    • Consonant initial examples: pig = igpay ; me = emay ; too = ootay ; wet = etway ; hello = ellohay
    • Consonant cluster initial examples: glove = oveglay ; shirt = irtshay ; cheers = eerschay
    • Vowel initial examples: ate = ateway ; egg = eggay ; until = untilay ; eat = eatay
  10. Advertisement
Method 2
Method 2 of 5:

Creating Your Own Code

How.com.vn English: PDF downloadDownload Article
  1. How.com.vn English: Step 1 Consider the pros and cons of codes before you get started.
    Code books can be stolen, lost, or destroyed, and modern technologies and computer programs can oftentimes break even strong, well-planned code. But codes can be used to condense long messages into a single line, making them great time savers.[8]
    • Codes also serve as good pattern-identification practice, a skill that can be improved as you keep encoding and decoding messages.
  2. How.com.vn English: Step 2 Determine the goal of your code.
    Knowing the purpose of your code from the very start will help you avoid doing any unnecessary work. For example, if your goal is to save time, you might only need a few specific code words or symbols. If you're trying to encode really long and detailed messages, you may need to develop a code book that’s more like a dictionary.[9]
    • Make your codes even more complex by using several different codes in rotation or combination. Just keep in mind that the more codes you use, the more code books you’ll need to make for decoding.
  3. How.com.vn English: Step 3 Develop your code book.
    Start by using constrained writing to condense common phrases into a single code word. For example, “Reading you loud and clear” can be something like “Roy.” Then, replace words that are especially critical to the subject matter of your message with their own unique code words. Things like names, locations, and actions are best to replace with code words.[10]
    • You don’t need to make a code word for every single word in your message. Partially coding what you want to say will be just as effective.
    • For example, the following message replaces just the most important words with code words. In this case, “tango” means “walk,” “restaurant” means “museum,” and “Roy” means “reading you loud and clear.”
      • 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.
  4. How.com.vn English: Step 4 Apply your code book to messages.
    Use the code words in your code book to start encoding messages. Use just a singular code to make it easier to encode your message, or use multiple codes to make it more complex.
  5. How.com.vn English: Step 5 Use a key as an alternative way to encode your message.
    A key message, group of words, letters, symbols, or a combination of these can be used to encode information.[11] The recipient of your message will also need this key phrase or key of letters/symbols to decode the message.[12]
    • 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 keyword as you move along the alphabet. One letter of the keyword is assigned to each letter in your message.
    • Keep repeating the keyword until all the letters in your message have a corresponding letter.
      • 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
  6. How.com.vn English: Step 6 Decode messages using your code book or key.
    As you receive coded messages, refer back to your code book or key to make sense of them. This may take you a bit longer at first, but it’ll become more intuitive as you become more familiar with the code. Soon, you’ll be able to read your code like it’s nothing.[13]
  7. Advertisement
Method 3
Method 3 of 5:

Learning Commonly Used Codes

How.com.vn English: PDF downloadDownload Article
  1. How.com.vn English: Step 1 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. Some features of Mary's code you might find useful for your own attempts at code-creating include:[14]
    • 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.[15]
  2. How.com.vn English: Step 2 Use code phrases similar to military alerts.
    Code phrases can pack a lot of meaning into a single phrase. Even many kinds of military alerts, like the DEFCON system, are well-known codes for a state of defense readiness. To mimic this system, come up with some code words or phrases that apply to your everyday life.[16]
    • 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."
  3. How.com.vn English: Step 3 Encode messages using a book key code.
    Thankfully, books are fairly easy to come by. Using this method, first decide on a book to use as the key to your code. When encoding a message, locate the word you want to send within the book, then send the recipient 3 numbers: the page number, the line number the word is in, and the position of your word within the line starting from the left.[17]
    • 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 the code looking like the following:
      • Encoded Message: 224.10.1 ; 187.15.1 ; 163.1.7 ; 309.4.4
      • Decoded Message: I'm hiding my words.
  4. Advertisement
Method 4
Method 4 of 5:

Developing Your Own Cipher

How.com.vn English: PDF downloadDownload Article
  1. How.com.vn English: Step 1 Weigh out the benefits and difficulties 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. On the other hand, ciphers can be a lot more complex than simple code words, and so might keep your messages more secure form regular folks.[18]
    • 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).[19]
  2. How.com.vn English: Step 2 Invent an algorithm to apply to messages.
    You can either invent a completely new algorithm, or use an existing one, such as the ROT1 Cipher (also called the Caesar Cipher). This method simply rotates each letter in your message forward by a single letter.[20]
    • ROT1 Message: Hello
    • ROT1 Enciphered: i ; f ; m ; m ; p
    • Caesar Ciphers can be modified to rotate forward by a different number of letters. So you could make it so that you rotate forward 3 letters instead of just one. In this case “Hello” would become k ; h ; o ; o ; r
  3. How.com.vn English: Step 3 Apply your algorithm to start enciphering messages.
    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, such as 1 through 7. Adjust your cipher by this value when encrypting a message on that day. So on Monday, you shift letters forward by 1. On Tuesday, it’s 2 letters, and so on.[21]
  4. How.com.vn English: Step 4 Start deciphering incoming...
    Start deciphering incoming messages that follow your cipher. Reading your cipher over and over will help make the deciphering process a whole lot easier as you gain experience. The great thing about ciphers is that their algorithms are consistent and usually follow some kind of pattern. Getting in the habit of reading ciphers will help you notice trends and crack them a lot faster.[22]
  5. Advertisement
Method 5
Method 5 of 5:

Studying Common Ciphers

How.com.vn English: PDF downloadDownload Article
  1. How.com.vn English: Step 1 Master Morse Code...
    Master Morse Code. In spite of its name, Morse Code is actually a cipher, not a code. Dots and dashes represent long and short electrical signals which in turn represent the letters of the alphabet. Common letters in Morse, represented as long ( _ ) and short (.) signals, include:[23]
    • R ; S ; T ; L = ._. ; _.. ; _ ; ._..
    • A ; E ; O : ._ ; . ; _ _ _
  2. How.com.vn English: Step 2 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.”[24]
    • Transposition ciphers generally treat messages or the formation of letters visually. The image of the message is physically transformed into something else to hide its meaning.[25]
  3. How.com.vn English: Step 3 Hide messages by writing them in 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.[26]
    • The name "Matt" would encipher to binary as: 01001101 ; 01000001 ; 01010100 ; 01010100.
  4. Advertisement

Community Q&A

Search
Add New Question
  • Question
    How do I write a Caesar Cypher?
    How.com.vn English: Community Answer
    Community Answer
    Using the alphabet start by counting 3 backwards. Example, A is to X, B is to Y, C is to Z, D is to A, E is to B.
  • Question
    Is a Caesar box the same as a Caesar cipher?
    How.com.vn English: Community Answer
    Community Answer
    No. A Caesar Cipher is very simple--pick a number, N. Then substitute each letter for the letter N places in the alphabet from it. For example, if N = 3, A would become D, B would become E, etc.Note that this isn't at all secure and can be broken very easily by frequency analysis.
  • Question
    Should the code always be 16 characters?
    How.com.vn English: Community Answer
    Community Answer
    No. It can be any number of characters, but the more you have, the harder it is to decode.
See more answers
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
      Advertisement

      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.
      • Learn a different script, such as Runic, and make encryption/decryption keys for those who you want to give messages to. You can find these keys online.
      • If you want your code to be more secure, create additional symbols for common word endings and beginnings, like '-ing' and 'th-'.
      Show More Tips
      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Thanks for submitting a tip for review!
      Advertisement

      About This Article

      How.com.vn is a “wiki,” similar to Wikipedia, which means that many of our articles are co-written by multiple authors. To create this article, 36 people, some anonymous, worked to edit and improve it over time. This article has been viewed 424,057 times.
      215 votes - 83%
      Co-authors: 36
      Updated: April 16, 2024
      Views: 424,057
      Categories: Cryptography
      Article SummaryX

      To create a secret code or cipher, start by writing the letters A through M in one row and the letters N through Z in another row underneath. Then, replace each letter in your message with the letter above or below it to encode your message. For example, since the rows give you letter pairs of H and U, E and R, L and Y, and B and O, you’d encode “Hello” as “Uryyb.” Alternatively, use a simple code like writing words in reverse, such as encoding "Meet me later" to "Teem em retal." To learn how to create a pigpen cipher or a date shift cipher, keep reading!

      Did this summary help you?

      Thanks to all authors for creating a page that has been read 424,057 times.

      Did this article help you?

      ⚠️ Disclaimer:

      Content from Wiki How English language website. Text is available under the Creative Commons Attribution-Share Alike License; additional terms may apply.
      Wiki How does not encourage the violation of any laws, and cannot be responsible for any violations of such laws, should you link to this domain, or use, reproduce, or republish the information contained herein.

      Notices:
      • - A few of these subjects are frequently censored by educational, governmental, corporate, parental and other filtering schemes.
      • - Some articles may contain names, images, artworks or descriptions of events that some cultures restrict access to
      • - Please note: Wiki How does not give you opinion about the law, or advice about medical. If you need specific advice (for example, medical, legal, financial or risk management), please seek a professional who is licensed or knowledgeable in that area.
      • - Readers should not judge the importance of topics based on their coverage on Wiki How, nor think a topic is important just because it is the subject of a Wiki article.

      Advertisement