## TL;DR

Number theory is the study of integers — prime numbers, divisibility, modular arithmetic. It is the mathematical foundation of modern cryptography (RSA, ECC, Diffie-Hellman). Primes are infinite (Euclid's proof). Fundamental Theorem of Arithmetic: every integer >1 has unique prime factorization.

## Core Explanation

Modular arithmetic: a ≡ b (mod n) means a - b is divisible by n. RSA: security from difficulty of factoring large semiprimes (n = p*q). Euler's totient φ(n) counts numbers coprime to n. Fermat's Little Theorem: a^(p-1) ≡ 1 (mod p) for prime p. GCD via Euclidean algorithm (O(log n)). Chinese Remainder Theorem reconstructs numbers from modular residues.

## Further Reading

- [undefined](undefined)