Skip to content
Parallax Learn

Parallax Learn

  • Welcome
  • Tutorials
        • Tutorial Series head tag

          Tutorial Series
        • Tutorial Series

          The special, classroom-ready series pages are organized collections of tutorials for our most popular hardware and/or languages. The tutorials for each topic are conveniently accessible from a single page, shown in the order it is recommended that they be completed.
        • Robotics Series Head tag

          Robotics Series
        • Robotics Series

          • Artificial Intelligence
          • Cybersecurity: Radio Data tutorialCybersecurity
          • cyber:bot + Python
          • cyber:bot + MakeCode
          • Boe-Bot Tutorial SeriesBoe-Bot
          • Arduino Shield-Bot
          • ActivityBot with C TutorialsActivityBot + C
          • ActivityBot with BlocklyProp Tutorial SeriesActivityBot + BlocklyProp
          • Scribbler 3 Tutorial SeriesScribbler 3
        • Electronics & Programming Series Head tag

          Electronics & Programming Series
          • BS2 Board of Education Tutorial SeriesBS2 Board of Education
          • Propeller C-Language BasicsPropeller C Basics
          • FLiP Try-It Kit C Tutorial SeriesFLiP Try-It Kit + C
          • FLiP Try-It Kit BlocklyProp TutorialsFLiP Try-It Kit + BlocklyProp
          • Badge WX Tutorial SeriesBadge WX
          • Propeller BlocklyProp Basics and ProjectsPropeller BlocklyProp Basics
          • View All Tutorial Series »
        • Browse Tutorials
        • Browse Tutorials

          Individual tutorials sorted by robot or kit, and language.
        • By Robot or Kit
          • ActivityBot
          • SumoBot WX
          • Boe-Bot
          • Shield-Bot
          • cyber:bot
          • Badge WX
          • ELEV-8
          • ARLO
        • By Language
        • By Language

          • Propeller C
          • Arduino
          • BlocklyProp
          • PBASIC
          • Python
          • MakeCode
          • View All Tutorials »
  • Educators
  • Reference
  • Downloads
  • Home
  • All Courses
  • Cybersecurity: Encryption Intro

Cybersecurity: Encryption Intro

Encrypt Letters by Hand

The shift cipher is a simple form of encryption that has been used since at least the days of the Roman Empire.  Julius Caesar’s encrypted letters are the first widely known use of a shift cipher. A shift cipher is a type of substitution cipher that replaces each letter in a message with an adjacent letter from the alphabet one, two, three, or ten or more letters away.

If you answered that the ciphertext from the previous page is MJQQT, you are correct!  See how the key of 5 is applied?  Starting with H at the beginning of the plaintext, count 5 letters to the right in the alphabet and use that character (M) in the ciphertext version.  

What about decryption?  If the key is 5 and your ciphertext is MJQQT, count 5 letters earlier in the alphabet for each letter.  For example, the plaintext H in HELLO is 5 letters to the left of the ciphertext letter M from MJQQT.

What happens with a key of 5 when you get to a letter like X?  No problem, just start over at A.  …but make sure to count the jump from Z to A as a letter.  For example, if the plaintext letter is X, then the five character shift is Y Z A B C, and the ciphertext letter is C.  In other words, when you run out of characters, restart at the beginning.  This is called a circular shift.

Now that you can see how to encrypt characters with the Caesar cipher, let’s try it!  

  • Pick a number in the 1 to 25 range (smaller will take less time).  This number is your “key”.
  • Pick a simple word, like your first name, or maybe your pet’s name.
  • Encrypt each letter in the word like this:
    • Start with the first letter – your first plaintext letter.
    • Find it in the alphabet.
    • Count to the right by key letters and pick that letter as your ciphertext letter.  
  • Example: If your key is 3 and your letter is G, counting over 3 will make your ciphertext letter J.
  • Remember, after Z, your next counted letter will be A.
  • Repeat the process for each letter in the word.

Next, show a friend how to decrypt it: 

  • Start with the first ciphertext letter.
  • Find it in the alphabet.
  • Count key letters to the left to find the plaintext letter. Keep in mind, if you reach A, your next counted letter will be Z.
  • Repeat the process for every letter in the word to rebuild the plaintext word.

 


Printer-friendly version
Encrypt Letters with a Caesar Cipher Script
Next

DISCUSSION FORUMS | PARALLAX INC. STORE

About | Terms of Use | Feedback: learn@parallax.com | Copyright©Parallax Inc. 2024

© 2025 Parallax Learn • Built with GeneratePress