Computer Science Grade 8 20 min

Cryptography Basics

Cryptography Basics

Tutorial Preview

1

Introduction & Learning Objectives

Learning Objectives Define cryptography, plaintext, ciphertext, and key. Explain the difference between symmetric and asymmetric encryption at a high level. Apply a Caesar cipher to encrypt a simple message. Apply a Caesar cipher to decrypt a simple message. Describe the role of a 'key' in an encryption algorithm. Identify at least three real-world examples where cryptography is used to secure data. Ever sent a secret message that only your friend could read? 🤫 What if the entire internet worked that way to keep your information safe? This lesson introduces cryptography, the science of secret codes for computers. You will learn how messages are scrambled (encrypted) and unscrambled (decrypted) to protect your data online. Understanding these basics is the first s...
2

Key Concepts & Vocabulary

TermDefinitionExample PlaintextThe original, readable message before it is encrypted.The word 'SECRET' is plaintext. CiphertextThe scrambled, unreadable message after it has been encrypted.If 'SECRET' is encrypted, 'VHFUHW' might be the ciphertext. EncryptionThe process of converting plaintext into ciphertext using an algorithm and a key.The action of turning the message 'HELLO' into 'KHOOR'. DecryptionThe process of converting ciphertext back into its original plaintext using an algorithm and a key.The action of turning the ciphertext 'KHOOR' back into 'HELLO'. KeyA piece of secret information (like a number or a word) used by an algorithm to encrypt and decrypt data. The key locks and unlocks the message.In a Caesar c...
3

Core Syntax & Patterns

Caesar Cipher Encryption Algorithm CipherLetter = (PlaintextLetter + Key) % 26 To encrypt a letter, convert it to its number position in the alphabet (A=0, B=1...). Add the key value to this number. The modulo (%) 26 operator ensures that if the result goes past 25 (Z), it 'wraps around' back to the beginning of the alphabet. Caesar Cipher Decryption Algorithm PlaintextLetter = (CipherLetter - Key + 26) % 26 To decrypt a letter, convert it to its number position. Subtract the key value. We add 26 before the modulo to prevent negative results. The modulo (%) 26 operator handles the 'wrap around' for letters near the beginning of the alphabet.

4 more steps in this tutorial

Sign up free to access the complete tutorial with worked examples and practice.

Sign Up Free to Continue

Sample Practice Questions

Challenging
You intercept the ciphertext 'FYYFHP'. You know it was created by encrypting the word 'ATTACK' with a Caesar cipher. Using this information, what would be the ciphertext for the word 'SAFE' if it were encrypted with the SAME key?
A.XFKJ
B.XFLI
C.YFLI
D.WEPI
Challenging
Why is the Caesar cipher, by itself, considered a very weak form of encryption for protecting important secrets like bank passwords?
A.Because it only works on messages written in English.
B.Because the math involved is too complicated for computers.
C.Because there are only 25 possible keys to try.
D.Because it requires a shared key.
Challenging
You need to decrypt the message 'AXA' using a Caesar cipher with a key of 30. What is the original plaintext?
A.CAT
B.DOG
C.CZG
D.GZK

Want to practice and check your answers?

Sign up to access all questions with instant feedback, explanations, and progress tracking.

Start Practicing Free

More from Cybersecurity Advanced

Ready to find your learning gaps?

Take a free diagnostic test and get a personalized learning plan in minutes.