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: Brute Force Attacks & Defenses

Cybersecurity: Brute Force Attacks & Defenses

Try This: More Combinations

Just as a PIN is stronger with an increased number of combinations, so is the cipher. The ascii_shift cipher has more combinations. 

  • Duplicate radio_send_images_caesar_key_unknown as radio_send_images_caesar_key_unknown_try_this.
  • Duplicate radio_receive_images_caesar_brute_force as radio_receive_images_caesar_brute_force_try_this.
  • Replace the caesar functions in both programs with the ascii_shift function from the Cybersecurity: Encryption Intro tutorial’s ASCII Shift Cipher activity.
  • Replace the call caesar(key, packet) blocks from both programs with call ascii_shift(key, packet) blocks. 
  • In radio_send_images_caesar_key_unknown_try_this, change set key to (pick random (1 to 25)) to set key to (pick random (1 to 93)).

To crack the cipher, your project will have to examine more combinations.

  • In radio_receive_images_caesar_brute_force_try_this, change for key in (range start(-1) end (-26) step (-1)) to for key in (range start(-1) end (-94) step (-1)).

You might notice an upper-case HAPPY as well as a lower-case happy. The key that generates the upper-case HAPPY is the correct answer, though either might actually work for a sniffing attacker’s purposes. This is an additional weakness of the ASCII Shift cipher. Make sure not to choose a key that will simply encrypt your upper-case characters as lower-case or vice-versa.

Try This Transmitter Project: radio_send_images_caesar_key_unknown_try_this

Try This Receiver Project: radio_receive_images_caesar_brute_force_try_this


Printer-friendly version
How Using the Random Key Works
Prev
Strengthen Your Cipher with Substitution
Next

DISCUSSION FORUMS | PARALLAX INC. STORE

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

© 2025 Parallax Learn • Built with GeneratePress