Python Cryptography Adventures for Young Minds!.pdf
positivechoco
31 views
9 slides
May 06, 2024
Slide 1 of 9
1
2
3
4
5
6
7
8
9
About This Presentation
Python cryptography isn't just educational; it's an adventure waiting to happen! Enroll your child today and watch them embark on a thrilling journey through the world of secret codes and hidden messages.
Size: 3.63 MB
Language: en
Added: May 06, 2024
Slides: 9 pages
Slide Content
PYTHON CRYPTOGRAPHY:PYTHON CRYPTOGRAPHY:PYTHON CRYPTOGRAPHY:
ADVENTURES FORADVENTURES FORADVENTURES FOR
YOUNG MINDS!YOUNG MINDS!YOUNG MINDS!
ARE YOU SEEKING ANARE YOU SEEKING ANARE YOU SEEKING AN
EXCITING CODING COURSEEXCITING CODING COURSEEXCITING CODING COURSE
FOR YOUR CHILD? DIVE INTOFOR YOUR CHILD? DIVE INTOFOR YOUR CHILD? DIVE INTO
THE WORLD OFTHE WORLD OFTHE WORLD OF
CRYPTOGRAPHY WITHCRYPTOGRAPHY WITHCRYPTOGRAPHY WITH
PYTHON! IT'S NOT JUSTPYTHON! IT'S NOT JUSTPYTHON! IT'S NOT JUST
ABOUT SECRET MESSAGES;ABOUT SECRET MESSAGES;ABOUT SECRET MESSAGES;
IT'S A JOURNEY OF PROBLEM-IT'S A JOURNEY OF PROBLEM-IT'S A JOURNEY OF PROBLEM-
SOLVING AND CREATIVITY.SOLVING AND CREATIVITY.SOLVING AND CREATIVITY.
THE THRILL OFTHE THRILL OFTHE THRILL OF
CRYPTOGRAPHYCRYPTOGRAPHYCRYPTOGRAPHY
CRYPTOGRAPHY ISN'T JUST ABOUT
HIDING MESSAGES; IT'S ABOUT
UNLOCKING SECRETS AND SOLVING
PUZZLES. WITH PYTHON, KIDS CAN
EMBARK ON THRILLING ADVENTURES IN
CODEBREAKING.
1. CRACK THE1. CRACK THE1. CRACK THE
CAESAR CIPHERCAESAR CIPHERCAESAR CIPHER
With just a few lines of Python, kids can encrypt and decrypt
messages using the ancient Caesar Cipher. It's like having
their own secret code!
STEP 01
def caesar_cipher(text, shift): encrypted = ''.join(chr((ord(char) - 65 +
shift) % 26 + 65) if char.isalpha() else char for char in text.upper())
return encrypted # Encrypt a message message = "SECRETMESSAGE"
encrypted_message = caesar_cipher(message, 3) print("Encrypted:",
encrypted_message) # Decrypt the message decrypted_message =
caesar_cipher(encrypted_message, -3) print("Decrypted:",
decrypted_message)
EXPLORE THEEXPLORE THEEXPLORE THE
RSA ALGORITHMRSA ALGORITHMRSA ALGORITHM
Delve into modern cryptography with the RSA algorithm. In
Python, kids can generate their own secure keys and encrypt
messages like real-life spies!
STEP 02
from Crypto.PublicKey import RSA from Crypto.Cipher import PKCS1_OAEP #
Generate RSA key pair key = RSA.generate(2048) # Encrypt a message with
the public key cipher = PKCS1_OAEP.new(key.publickey()) message =
b"TOPSECRETMESSAGE" encrypted_message = cipher.encrypt(message)
print("Encrypted:", encrypted_message) # Decrypt the message with the
private key cipher = PKCS1_OAEP.new(key) decrypted_message =
cipher.decrypt(encrypted_message) print("Decrypted:",
decrypted_message.decode())
UNLOCK THE FUN!UNLOCK THE FUN!UNLOCK THE FUN!
Python cryptography isn't just educational; it's an adventure waiting to
happen! Enroll your child today and watch them embark on a thrilling journey
through the world of secret codes and hidden messages.
Book a FreeBook a FreeBook a Free
Trial ClassTrial ClassTrial Class
NowNowNow
www.skoolofcode.us
+1 425-305-4645 [email protected]
Redmond, Washington, USA