Loading...
Loading...
Discrete Math · Axiom Academy
REAL WORLD Cryptography and Bijections Explore how substitution ciphers use bijective functions to securely encrypt messages, and discover the mathematics behind breaking codes. Secret Messages in World War II During World War II, encrypted messages could mean the difference between victory and defeat. One of the simplest yet powerful encryption methods is the substitution cipher , where each letter is replaced with another letter. The famous Caesar cipher shifts every letter by a fixed amount. But mathematically, what makes encryption possible—and reversible—is that the encryption function must be a bijection . Create Your Own Encrypted Message Type a message below and watch it get encrypted using the Caesar cipher. Each letter shifts forward by 3 positions in the alphabet. Why Bijections Matter in Cryptography For encryption to work, we need to be able to decrypt our message. This requires the encryption function to be a bijection —a function that is both one-to-one (injective) and onto (surjective). One-to-One (Injective): Different inputs produce different outputs. No two letters encrypt to the same letter. Onto (Surjective): Every possible output is used. All 26 letters appear in the encrypted alphabet. Reversible: Because it's a bijection, we can create an inverse function to decrypt! Decryption: Using the Inverse Function Because our Caesar cipher is a bijection, we can reverse it! To decrypt, we simply shift backward by 3 instead of forward.
This is the written version of the interactive lesson above. See the full Discrete Math course.