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: Sniffing Attacks and Defenses

Cybersecurity: Sniffing Attacks and Defenses

Your Turn: Encrypted Radio Keyboard cyber:bot Control

Up to this point, you just finished adding encryption to the countdown app from the Cybersecurity: Radio Data tutorial’s Send and Receive Packets activity.  Now, let’s apply the same technique to the wireless cyber:bot keyboard control app from the Cybersecurity: Navigation Control from a Keyboard tutorial’s Terminal Control — Go Wireless! activity.  If you can do this, you will have a level of protection against attackers in future cyber:bot competitions.

 

 

  • Go to Terminal Control — Go Wireless! and get the application running again.  Make sure to use the transmitter script from Your Turn: Handle Transmitter Exceptions and the receiver script at the end of the Receiver Script for cyber:bot Output page.
  • Set the project name of the transmitter script you will modify to terminal_bot_controller_wireless_encrypted.
  • Set the project name of the receiver script as terminal_controlled_bot_wireless_encrypted.
  • Repeat the steps from the previous page you just followed to add encryption to the radio data countdown app:
    • Step 1: Copy the ascii_shift() function from the ASCII Shift Cipher activity’s ascii_shift_cipher script and paste it into the transmitter and receiver scripts, just below the import statements.
    • Step 2: Add key = 5 to the transmitter script and key = -5 to the receiver script.
    • Step 3:
      • In the transmitter script, add packet = ascii_shift(key, packet) immediately above radio.send(packet).
      • In the receiver script, add packet = ascii_shift(key, packet) immediately below and indented from if packet is not None:  MAKE SURE TO INDENT PROPERLY.  The packet = ascii_shift(key, packet) statement has to be indented further than if packet is not none:
  • Add print statements to demonstrate that your data is transmitted and received in an encrypted form.  For hints on how to do this, examine the Try This: Monitor Encrypted Text in the previous activity.
  • Save your scripts.
  • Verify that the app works with encryption as shown below.

 

 


Printer-friendly version
Try This: Monitor Encrypted Text
Prev

DISCUSSION FORUMS | PARALLAX INC. STORE

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

© 2025 Parallax Learn • Built with GeneratePress