240 likes | 444 Views
MESA High School Challenge Network Defender Robot. High School Challenge Team. Challenge Engine / Maze Generation Kevin Chiou Michael Hanna Robert Newsome Cryptography / Ciphers Jackie Akinpelu Alison Ebaugh Niquia Spencer. Additional Support Jeff Chavis Eric Farmer Stephen Hamer
E N D
High School Challenge Team • Challenge Engine / Maze Generation • Kevin Chiou • Michael Hanna • Robert Newsome • Cryptography / Ciphers • Jackie Akinpelu • Alison Ebaugh • Niquia Spencer • Additional Support • Jeff Chavis • Eric Farmer • Stephen Hamer • Tao Jen • Brett Lapin • Bart Paulhamus
Challenge Objective • Objective: Address critical skills required for cyber-related challenges • Primary identified skills: • Programming • Network navigation / pathfinding • Cryptography
Challenge Network • Maze navigation • Mazes represent networks • Networks have been infected with viruses • Robot must find and remove viruses from network • Robot controller determines how robot traverses each network • Defeating viruses • Benign Bugs • Robot must simply “bump” into bug • Worth 1,000 points • Vile Viruses • Must solve crypto puzzle • Worth 5,000 points Robot Benign Bug Vile Virus
Challenge Engine Top view not available on Challenge Day
Custom Mazes • Students can create their own mazes • Save as .maze file • Drag’n’drop .maze files on launcher: • challenge.bat (windows) • challenge.app (mac)
Robot Controller Example • May edit controller between attempts • May reattempt a level as many times as possible • Only the highest score is stored • controller_<NETWORK>.py • controller_default.py
Vile Viruses • After colliding into a Vile Virus, must solve cryptography puzzle to defeat • Guesses must be in ALL CAPS with punctuation excluded • Plaintext (ie. decryption) • Include spaces • e.g. OCEAN CITY • Ciphertext (ie. encryption) • Exclude spaces • e.g. EQORWVGTUEKPEG
Why Cryptography is Important? • Originally cryptography was used by Militaries and governments in order to facilitate secret communications, but now it is also used to protect all types of data • Emails • Credit Card information/Banking records • Personal information • Etc… • We will be looking at 4 different ciphers that have been used in the past to protect information
Caesar Cipher • The Caesar cipher is an substitution cipher where the letters in plaintext are replaced by other letters • To Encrypt a message: each letter in plaintext is shifted by the some number of letters in the alphabet, determined by the shift key • To decrypt a message: subtracting the value of the shift key from every ciphertext letter Encrypt the following message: CYBER with the shift key of 2 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z E A D T G Ciphertext:
Caesar Cipher • The Caesar cipher is an substitution cipher where the letters in plaintext are replaced by other letters • To Encrypt a message: each letter in plaintext is shifted by the some number of letters in the alphabet, determined by the shift key • To decrypt a message: subtracting the value of the shift key from every ciphertext letter Decrypt the following message: PHVD with the shift key of 3 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z M E S A Plaintext:
Vigenere Cipher • The Vigenere cipher is another substitution cipher • The keyword is used to encrypt and decrypt the message • Every letter in the keyword represents a different shift depending on the particular letter’s position in the alphabet • To encrypt a message, each letter in plaintext is sequentially shifted by the some number of letters in the alphabet determined by each letter in the keyword • To decrypt a message sequentially subtract the particular letter in the keyword Encrypt the following message: VIRUS with the shift keyword bad b is the 2th letter in the alphabet, a is the 1st letter in the alphabet, and d is the 4th letter in the alphabet A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Ciphertext: X J V W T
Transposition Cipher In a transposition cipher the letters of the plaintext message are rearranged in a different ways, but the letters are never changed To encrypt a message the message is written out in matrix with fixed number of rows and columns. The columns are then scrambled in a particular way depending on the keyword selected To decrypt a message construct the ciphertext into a matrix with the size of the length of keyword and the rearrange the columns of the matrix to match the sequential order of the letters in the keyword Encrypt the following message: ocean city with the keyword fun Construct the matrix using the keyword FUN ECY CNT Ciphertext: OAI Read the columns in the order indicated by the keyword:
Transposition Cipher • In a transposition cipher the letters of the plaintext message are rearranged in a different ways, but the letters are never changed • To encrypt a message the message is written out in matrix with fixed number of rows and columns. The columns are then scrambled in a particular way depending on the keyword selected • To decrypt a message construct the ciphertext into a matrix with the size of the length of keyword and the rearrange the columns of the matrix to match the sequential order of the letters in the keyword Decrypt the following message: OAIECYCNT with the keyword fun Write the ciphertext in a groups of 3 letters OAI ECY CNT Each group of 3 letters maps to one column in the matrix
Public/Private Key Cipher • Modern take on cryptography • This cryptography system eliminates the need for key exchange, enhancing the security and privacy of the messages • Messages are in the form of positive integers • To calculate the public key (n,e) and private key (n,d) by picking two sets of positive integers (a1, b1) and (a2, b2) and sets Z = a1b1– 1 and calculate the following terms: e = a2 Z + a1, d = b2 Z + b1, and n = (de – 1)/Z • Use the public key (n,e) to encrypt the message c = em (mod n) • Use the private key (n,d) to decrypt the message m = dc (mod n)
Public/Private Key Cipher Example • Suppose you pick a1 = 3, b1= 5, a2 = 2, and b2 = 7 then Z = a1b1– 1= 3*5-1 = 14 • To calculate the public key (n,e) and private key (n,d) e = a2 Z + a1 = 2*14 + 2 = 31 d = b2 Z + b1 = 7*14 + 5 = 103 n = (de – 1)/Z = (103*31-1)/14 = 228 • Use the public key (n,e) to encrypt the message of 13 c = em (mod n) = 31*13 mod ( 228 ) = 175 • Use the private key (n,d) to decrypt the message m = dc (mod n) = 103*175 mod(228) = 13
2013 Challenge Additions • New sense_viruses command for robot • Allows the robot to detect location of nearby viruses • Clues throughout mazes • Requires number base conversion to be able to guess network passphrase for additional points
robot.sense_viruses() • Allows the robot to send out a pulse to detect all viruses within a radius of 10 cells • Returns a list of virus locations relative to robot position • ie. [(1, 2), (-3, 2), (5, -4)] • Three viruses: • (1, 2) – Right 1 and forward 2 • (-3, 2) – Left 3 and forward 2 • (5, -4) – Right 5 and back 4 • Relative to direction robot is facing
robot.sense_viruses() • Data is returned as Python list • Accessing data directly nearby_viruses = robot.sense_viruses() v1_x = nearby_viruses[0][0] v1_y = nearby_viruses[0][1] • Loop through data for virus_position in robot.sense_viruses(): x = virus_position[0] y = virus_position[1] (x, y) = virus_position # Shortcut
Clues – For extra points • Clues are scattered throughout each network • While the robot is traversing the maze, users will see the clues • Address lack of interaction on challenge day • Clues are a number in the format Nb where N is the number and b is the base that the number is in • Users should convert each clue to base 10, which represents a letter (0=space, 1=A, …26=Z) • All clues in a network spell a secret passphrase, but are likely in jumbled order • If enter in the passphrase on the main menu, get extra points
Clues - Continued • Example: • CLUES: 1012, 1103, 334, 135, 157 • BASE 10: 5, 12, 15, 8, 12 • LETTERS: E, L, O, H, L • PHRASE: HELLO