« previous | Tuesday, February 26, 2013 | next »
Lagrange's Theorem
(special case) offers a way to check if is a generator for
If is prime and ,
Then , where is the smallest exponent with .
Proof. Suppose . Consider .
By the Extended Euclidean Algorithm, there are with .
So then . Since (since , we must have . By construction, , so .
Q.E.D.
Corollary
If is prime and and for all primes ,
Then is a generator of .
In particular, given a list of all primes dividing , you can check the preceding condition in time
Note:
- Life is cruel: you usually do NOT have such a list.
- If is a product of small primes (to any powers), then life is good!
Proof. We must show that . By Lagrange's theorem, .
So we need to rule out being a divisor of other than .
If is the factorization of , then any dividing must divide or or ... or .
Now for all is equivalent to , ..., . So if , it would divide one of or ... or , which is impossible.
Therefore .
Q.E.D.
Complexity Bounds
By Theorem 5.4.1 (of Bach and Shallit), computing takes bit operations. So computing takes bit operations. By problem 5 of homework 6, the number of primes dividing is
Last Words on RSA
et tu Brute?
To solve problem 1 on the homework, frequency analysis might be useful (decrypt and check that text is in English)
In Ruby,
require 'openssl'
base.to_bn.mod_exp(exponent, modulus)
RSA and World Peace
How can the UN monitor Iran's nuclear reactors reliably and still have Iran happy?
Build Good non-tamperable sensors
OR Use RSA as follows: given private large primes and , private decryption key , public encryption key , and large number
If the sensor reads , transmit .
Iran is happy: they can verify that so they know the UN is not transmitting secrets or anything.
The UN is happy: they can compute and check that it really is the supposedly-transmitted .
It is hard to mess with to get and still have . If you mess with and , then you need to know !