applications of mod:
- hashing [look up good moduli];
-rsa; ("encode" vs "encrypt")
rsa depends on:
prime number th'm;
detect primes probabilistic (and now deterministic),
complexity(?) of factoring
clipper chip; messages as pictures; hidden in pictures
Theorem: The Prime Number th'm:
The number of primes less than N is N/ln(N)
(as N goes to infinity... Or rather,
#primes-less-than(N) = N/ln(N) + O(.);
people are working to improve that big-Oh error bound.)
More details: http://mathworld.wolfram.com/PrimeNumberTheorem.html :
Li(x) ("log integral") is Int_2^x dx/ln(x);
its leading terms are n/log(n) + n/log(n)^2 + 2n/log(n)^3 + ....
pi(x)= Li(x) + O(xe^{-\sqrt(\ln x)/15} )
pi(x)= Li(x) + O(xe^{-0.009(\ln x)^{3/5}/(\ln \ln x)^{1/5}} )
Or, the Riemann hypothesis is equivalent to:
pi(x)= Li(x) + O(\sqrt{x} \log{x} )
How many 100-digit numbers are prime?
About one in 100 (off by a factor of ln(10): closer to 1 in 300).
Encryption:
Usually, requires pre-arranged key with the recipient.
But how then does amazon.com accpet my credit card securely?
[Note that web hops occur over strangers' computers.]
A weird idea: Public-key system:
a box with two keys; if it's locked with one key, only the
other can unlock it (and vice-versa).
[Not clear you can actually build such a box!]
By calling one key private and the other public
(and placing many copies of this public key and lock in mailrooms
or on your webpage),
Can also authenticate messages this way, so you can be sure
that email from Gillis claiming school canceled for snow day
is really from him (or somebody who with his private key).
RSA: A way to create such boxes/keys, out of numbers.
Find p,q large primes (200digits, say).
[There is a fast way to do this that we haven't shown.
Note that primes being common helps us.]
Find an 'exponent' e such that e is relatively prime to (p-1)(q-1).
Finally, find d=e^-1 mod (p-1)(q-1).
(Rosen shows how to use Euclid's algorithm for this; we won't cover it.)
Public key: n, e.
Private key: d
To encrypt a message M, encode it as a number
[difference of 'encode' vs 'encrypt': morse code, area code, zip code,...]
Then publicly send the encryption
C=M^e (mod n), where n,e is the *recipient's*
To decrypt, using the recipient's private key:
[Fix:]
C^d (mod n) = M^(ed) (mod n) = M^{1+k(p-1)(q-1)}. (mod n)
A bit of math can be used to show that this is just M^1:
Mod p, note that M^{1+k(p-1)(q-1)} = M*(M^(p-1))^{k(q-1)} = M*1^{..} = M (mod p)
by fermat's little th'm. Similarly, mod q, this amount is congruent to M.
Thus by the Chinese Remainder Th'm (see Rosen), it is = M mod (pq).
The security of this method hinges upon the inability
to efficintly factor a 400-digit number.
(There are 10^400 potential divisors, or even if you only use primes,
there are still 10^400/400ln(10) ~ 10^397 divisors to test.
How long, at 10^10 divisions/sec?)
Punch line: For years, number theory was thought the 'most pure',
least applied branch of mathematics,
dealing with 200-digit numbers that can't possibly correspond to
counting anything meaningful.
But with the advent of Public-Key crypto, suddenly it's
one of the most economically and militarily important branches of math.