





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






Let π(N) be number of prime numbers that are less than or equal to N. Prime number theorem: π(N) ≈ N/ln(N) If n ≥ 17, N/ln(N) < π(N) < 1.26 N/ln(N) e. g. N = p or q in n=p q. p ≈ q≈ 2 512. Pr(N is a prime| odd N ≈ 2512 ) ≈ 1/ln(2^512 ) = 1/355. Easier to prove “N” is composite than to prove “N” is a prime. (why ?)
“yes” or “no” is a decision by an algorithm for a problem (e.g. Is N composite ?) pr(incorrect answer| “yes”) = 0.
for yes-biased Monte Carlo algorithm pr(composite|”yes”) = 1.
pr(prime|”no”) > 1-ε.
can be highly efficient tiny probability of making an error
no general polynomial-time algorithm available until Agrawal, Kayal, and Saxena (2002) [AKS algorithm] AKS algorithm is still not yet practical for a large prime number.
Solovay-Strassen Algorithm (Algorithm 5.6, page 182) is a yes-biased algorithm with error probability at most 1/2.
Miller-Rabin Algorithm (Algorithm 5.7, page
We can perform several independent random tests to drastically reduce the error probability.
Let n-1 = 2k^ m, m is odd.
Choose “a” randomly between 1 to n-1.
b Å a m^ mod n.
if b = 1, then return (“prime”)
for i=0 to k-1 do if b=-1 mod n, then return (“prime”) else b Å b^2 mod n.
return (“composite”)
x Å f(x) mod n, x’ Å f(x’) mod n, x’ Å f(x’) mod n p Å gcd(x-x’, n)
O(exp[(1.92+o(1)) (ln n)1/3^ [ln ln(n)]2/3])
number field sieve
O(exp[(1+o(1)) [ln p ln ln(p)]0.5])
elliptic curve (p is smallest prime | n)
O(exp[(1+o(1)) [(ln n) ln ln(n)]0.5^ ])
quadratic sieve
Asymptotic Running Time
Factoring Algorithms
RSA-160 found in 2003.
Prizes: from $10,000 to $200,000. http://mathworld.wolfram.com/
p 2 – (n- φ(n)+1) p + n = 0.
n- φ(n) = 18425.
p 2 – (n- φ(n)+1) p + n = 0.
e (^) K (x) = x^2 mod n
d (^) K (y) = y 1/2^ mod n (how ?)
Require n=pq, p=3 mod 4 and q=3 mod n. Recall y (p-1)^ = 1 mod p (and y(q-1)^ = 1 mod q) Since y=x^2 mod p, we have y (p-1)/2^ = 1 mod p.
We can show that x= ±y (p+1)/4^ mod p satisfies x^2 = y mod p.
Likewise, x= ±y (q+1)/4^ mod q satisfies x^2 = y mod q. We can find four solutions using Chinese Remainder Theorem.
x = 23(7+1)/4^ mod 7 = 2^2 mod 7 = 4. x = 23(11+1)/4^ mod 11 = 1^3 mod 11 = 1.
x= 10, 32, 45, 67.
if we can solve Rabin decryption in polynomial time, then we can solve factorization problem in polynomial time.
Modular arithmetic operations are provided to compute residues, perform exponentiation, and compute multiplicative inverses: BigInteger class in Java: http://java.sun.com/j2se/1.4.2/docs/api/java/mat h/BigInteger.html NTL (for C++): http://www.shoup.net/ GMP (for C): http://www.swox.com/gmp/ MAPLE or MATHEMATICA.