Applied Math
Grade 10-12
Cryptography Mathematics Cheat Sheet
A printable reference covering modular arithmetic, Caesar ciphers, affine ciphers, RSA, prime numbers, and encryption keys for grades 10-12.
Related Tools
Related Worksheets
Related Infographics
Study as Flashcards
Cryptography mathematics studies how numbers, functions, and keys are used to protect information. This cheat sheet helps students connect algebra, number theory, and modular arithmetic to real encryption methods. It is useful for solving cipher problems, checking key conditions, and understanding why secure communication depends on hard math problems.
Key Facts
- In modular arithmetic, a ≡ b mod n means a and b have the same remainder when divided by n.
- A Caesar cipher encrypts a letter number x using E(x) = (x + k) mod 26, where k is the shift key.
- A Caesar cipher decrypts using D(y) = (y - k) mod 26, then adjusts the result to a number from 0 to 25.
- An affine cipher encrypts using E(x) = (ax + b) mod 26, where gcd(a, 26) = 1 is required.
- An affine cipher decrypts using D(y) = a^-1(y - b) mod 26, where a^-1 is the modular inverse of a.
- A number a has a modular inverse mod n only when gcd(a, n) = 1.
- In RSA, choose primes p and q, compute n = pq and phi(n) = (p - 1)(q - 1), then choose e with gcd(e, phi(n)) = 1.
- RSA encryption uses c = m^e mod n, and RSA decryption uses m = c^d mod n where ed ≡ 1 mod phi(n).
Vocabulary
- Plaintext
- The original readable message before encryption is applied.
- Ciphertext
- The scrambled message produced after encryption.
- Key
- A number or set of numbers that controls how a message is encrypted or decrypted.
- Modular arithmetic
- A system of arithmetic where numbers wrap around after reaching a fixed modulus.
- Modular inverse
- The modular inverse of a mod n is a number a^-1 such that aa^-1 ≡ 1 mod n.
- Public key
- A key shared openly so others can encrypt messages or verify digital information.
Common Mistakes to Avoid
- Using normal division instead of remainders is wrong because modular arithmetic depends on the remainder after division by the modulus.
- Forgetting to wrap negative values is wrong because results like -3 mod 26 should be rewritten as 23.
- Choosing any value of a in an affine cipher is wrong because a must satisfy gcd(a, 26) = 1 to make decryption possible.
- Confusing the public exponent e with the private exponent d is wrong because e encrypts in RSA while d reverses the operation.
- Using letters without assigning consistent numbers is wrong because changing between A = 0 and A = 1 systems changes the encrypted result.
Practice Questions
- 1 Encrypt the letter H using a Caesar cipher with A = 0 and shift k = 5.
- 2 Find 17 mod 5, 38 mod 9, and -4 mod 26.
- 3 For the affine cipher E(x) = (5x + 8) mod 26, encrypt the letter C using A = 0.
- 4 Explain why RSA can have a public encryption key without making the private decryption key easy to find.