Number Theory is the study of the integers () and their properties. While it was once considered “pure math,” it is now the foundation of modern Cryptography and computer security (e.g., RSA Encryption, Elliptic Curves).

Core Concepts

  • Divisibility: means ” divides .”
  • Primes: Integers greater than 1 with exactly two positive divisors (1 and themselves).
  • Modular Arithmetic: Doing math with a “clock” (remainders).

The Division Algorithm

IMPORTANT

For any integer and divisor , there exist unique integers (quotient) and (remainder) such that:


Greatest Common Divisor (GCD)

The GCD of two numbers is the largest integer that divides both.

  • Euclidean Algorithm: An efficient recursive method to calculate GCD. (See Divisibility and GCD).
  • Linear Combinations: can always be written as .

Modular Arithmetic

We say is congruent to modulo if they have the same remainder when divided by .


Applications

  1. Cryptography: RSA Encryption relies on the difficulty of factoring large numbers.
  2. Hashing: Hash tables use modular arithmetic to map keys to buckets.
  3. Random Number Generation: Linear Congruential Generators (LCGs).