数値 理論 リファレンス
リファレンス 用 数値 理論 概念: primes, divisibility, modular arithmetic, および theorems.
Primes and Divisibility
A prime number has exactly two positive divisors: 1 and itself. The Fundamental Theorem of Arithmetic states every integer > 1 has a unique prime factorization. The Prime Number Theorem approximates the count of primes below n as n/ln(n). Euclid's algorithm computes GCD in O(log min(a,b)) steps. The Chinese Remainder Theorem solves simultaneous congruences with coprime moduli. Fermat's Little Theorem: a^(p-1) ≡ 1 (mod p) for prime p not dividing a. Euler's theorem generalizes to a^φ(n) ≡ 1 (mod n) for coprime a, n.
- primes
- Unique factorization
- GCD
- Euclid algorithm
- FLT
- a^(p-1) ≡ 1 mod p
FTA O(log n) Fermat little Applications in Cryptography
RSA relies on the difficulty of factoring large semiprimes (n = p*q). The discrete logarithm problem underpins Diffie-Hellman and DSA. Quadratic residues and the Legendre/Jacobi symbols appear in cryptographic constructions. Primality testing: Miller-Rabin (probabilistic), AKS (deterministic but slow). Prime generation for crypto: generate random odd numbers and test. Safe primes (p = 2q+1 with q prime) are needed for some protocols. The Riemann Hypothesis about prime distribution remains unproven but underlies much analysis.
- RSA
- Factoring semiprimes
- DLP
- Discrete log
- Miller-Rabin
- Probabilistic primality
p*q hard DH, DSA fast test