LOGBOOK

HELP

1 / 31
Other keys: showSpace: good1-4: rate0: skip5: flag

Question

What is the central insight behind the mathematics of asymmetric cryptography?

Answer

"Centuries-old mathematics in the most modern applications." — The math behind RSA, Diffie-Hellman, and ECC was developed hundreds of years ago by Fermat, Euler, Gauss, and others.

The key operations are surprisingly simple — they all boil down to modular arithmetic, which is essentially the integer remainder after division. As one description puts it: "In primary school you learned 20 ÷ 3 = 6 remainder 2. At university, we make it even simpler: we only care about the remainder. So 20 mod 3 ≡ 2."

The six mathematical "protagonists" whose work underlies all of modern asymmetric crypto:

  • Pierre de Fermat (1607–1665): Little Fermat's Theorem
  • Leonhard Euler (1707–1783): Euler's Theorem, Euler's φ-function
  • Carl Friedrich Gauss (1777–1855): Prime counting function π(n)
  • Niels Henrik Abel (1802–1829): Abelian (commutative) groups
  • Évariste Galois (1811–1832): Group theory, Galois fields
  • George Boole (1815–1864): Boolean algebra, XOR operation

Go deeper:

Time-keeping on this clock uses arithmetic modulo 12. Adding 4 hours to 9 o'clock gives 1 o'clock, since 13 is congruent to 1 modulo 12.
Time-keeping on this clock uses arithmetic modulo 12. Adding 4 hours to 9 o'clock gives 1 o'clock, since 13 is congruent to 1 modulo 12.
The original uploader was Spindled at English Wikipedia. · CC BY-SA 3.0 · Wikimedia Commons
or press any other key

Question

What does $c \equiv a \mod N$ mean, and what are equivalence classes mod N?

Answer

$c \equiv a \mod N$ means that when you divide c by N, the remainder is a. The mod N operation partitions all integers into N equivalence classes.

The integers partitioned into residue classes mod 5

* The integers split into 5 residue classes mod 5 — every integer lands in exactly one, giving the finite set ℤ₅ = {0,1,2,3,4}. *

Definition: $c \equiv a \mod N$ iff $N$ divides $(c - a)$, i.e., $c = a + k \cdot N$ for some integer $k$.

Properties:

  • The result is always in $\{0, 1, 2, ..., N-1\}$
  • Equivalently: $c \mod N = (a + k \cdot N) \mod N$ for any integer $k$

Equivalence classes mod 5:

  • $[0] = \{..., -10, -5, 0, 5, 10, 15, ...\}$
  • $[1] = \{..., -9, -4, 1, 6, 11, 16, ...\}$
  • $[2] = \{..., -8, -3, 2, 7, 12, 17, ...\}$

The set of equivalence classes mod N is written as $\mathbb{Z}_N = \{0, 1, 2, ..., N-1\}$.

Handling negative numbers: Add multiples of N until positive, then reduce. Example: $-55 \mod 9 = (-55 + 7 \times 9) \mod 9 = 8 \mod 9 = 8$

Go deeper:

Time-keeping on this clock uses arithmetic modulo 12. Adding 4 hours to 9 o'clock gives 1 o'clock, since 13 is congruent to 1 modulo 12.
Time-keeping on this clock uses arithmetic modulo 12. Adding 4 hours to 9 o'clock gives 1 o'clock, since 13 is congruent to 1 modulo 12.
The original uploader was Spindled at English Wikipedia. · CC BY-SA 3.0 · Wikimedia Commons
or press any other key