Grade 10Math

Substitution Cipher

Decode and encode substitution ciphers in Grade 10 math by mapping each letter to a number using modular arithmetic, applying algebraic functions to encrypt and decrypt messages.

Key Concepts

A substitution cipher is a classic encryption method where each letter is replaced by a number based on a secret key. This transforms a readable message into a string of numbers. To decode it, someone needs the exact same key that was used for encryption, which maps the numbers back to their original letters. This is a foundational concept in cryptography.

Encrypting "HI": Using the cipher where H=15 and I=17, the message becomes the number string "15 17". The word "SECRET" is encrypted as "12 9 5 10 9 14" based on the provided cipher key.

Think of it like a secret decoder ring! Each letter gets a secret number buddy. To send a message, you just swap out the letters for their number partners, turning words into a string of code. To read it, you simply swap them back using the key.

Common Questions

How does a substitution cipher encode a message using numbers?

Each letter is mapped to a number (A=1,...,Z=26 or A=0,...,Z=25), then an algebraic function is applied to each number. The output numbers are decoded with the inverse function.

What is a simple linear cipher function and how do you decode it?

A linear cipher uses f(x) = ax+b (mod 26). To decode, apply the inverse: f⁻¹(y) = a⁻¹(y-b) mod 26, where a⁻¹ is the modular multiplicative inverse of a.

Why must the coefficient a in a linear cipher be coprime to 26?

If gcd(a, 26) ≠ 1, then a has no modular inverse and the cipher is not reversible — multiple letters would map to the same encoded letter. a must be coprime to 26 for unique decoding.