


















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!



















π(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
^ Pr(N is a prime| odd N
≈^2
512 )
≈^ 1/ln(
512 ) =
1/355. ^ Easier to prove “N” is composite than toprove “N” is a prime. (why ?)
^ “yes” or “no” is a decision by an algorithmfor a problem (e.g. Is N composite ?) ^ pr(incorrect answer| “yes”) = 0.
^ can be highly efficient ^ tiny probability of making an error
^ no general polynomial-time algorithmavailable until Agrawal, Kayal, and Saxena(2002) [AKS algorithm] ^ AKS algorithm is still not yet practical for alarge prime number.
k^ m, m is odd. ^ Choose “a” randomlybetween 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, then return(“prime”) ^ else b
Å^ b
2 mod n.
^ return (“composite”)
^ Recall that for aprime n,
^ a n-1^ =1 mod n. ^ If a
n-1=1 mod n, then n can be apossible prime. If many such “a” arefound, it is verylikely n is a prime.
^ no known polynomial time algorithm.
^ simple but not very efficient for a large n. ^ suitable when n has many small primefactors. ^ not effective for RSA (why not ?).
^ 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)) (ln1/3n)
[ln ln(n)]
number field sieve
O(exp[(1+o(1)) [ln p lnln(p)]
elliptic curve (p issmallest prime | n)
O(exp[(1+o(1)) [(ln n)ln ln(n)]
quadratic sieve
Asymptotic RunningTime
Factoring Algorithms
^ p
2 – (n-
φ(n)+1) p + n = 0.
^ implication: we cannot not simply changeother d’s with n unchanged. ^ Algorithm 5. 10: randomized algorithm thatcan factor n in a polynomial time (page204)
^ Algorithm 5. 11: based on extendedEuclidean algorithm and continued fractiontechnique (page 204) ^ implication: we cannot not use too smalld’s as decryption exponent.
^ we choose simpler “e” as a public key thensolve for “d” which is usually not too small.
^ e
(x) = xK
2 mod n
^ d
(y) = yK
1/^
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)/
= 1 mod p.
^ We can show that x= ±y
(p+1)/
mod p satisfies
(^2) x= y mod p. Likewise, x= ±y
(q+1)/
mod q satisfies x
2 = y
mod q. We can find four solutions using ChineseRemainder Theorem.