MATH 470 Lecture 13

From Notes
Jump to navigation Jump to search

« previous | Tuesday, February 26, 2013 | next »


Lagrange's Theorem

(special case) offers a way to check if a is a generator for (/p)*

If p is prime and a(/p)*,

Then ordp(a)(p1), where ordp(a) is the smallest exponent e0 with ae1(modp).

Proof. Suppose k=ordp(a). Consider =GCD(k,p1).

By the Extended Euclidean Algorithm, there are x,y with kx+(p1)y=.

So then

aakx+(p1)y1(modp)

. Since

k

(since

k=ordp(a)

, we must have

k

. By construction,

k=k

, so

k(p1)

.

Q.E.D.

Corollary

If p is prime and a(/p)* and ap1q≢1(modp) for all primes q(p1),

Then a is a generator of /p)*.

In particular, given a list {a1,,ak} of all primes dividing p1, you can check the preceding condition in time O((logp)4)

Note:
  1. Life is cruel: you usually do NOT have such a list.
  2. If p1 is a product of small primes (to any powers), then life is good!

Proof. We must show that ordp(a)=p1. By Lagrange's theorem, ordp(a)(p1).

So we need to rule out ordp(a) being a divisor of p1 other than p1.

If p1=q1e1qkek is the factorization of p1, then any d<p1 dividing p1 must divide p1q1 or p1q2 or ... or p1qk.

Now ap1q≢1(modp) for all q(p1) is equivalent to ap1q1≢1(modp1), ..., ap1qk≢1(modp1). So if ordp(a)<p1, it would divide one of p1q1 or ... or p1qk, which is impossible.

Therefore

ordp(a)=p1

.

Q.E.D.

Complexity Bounds

By Theorem 5.4.1 (of Bach and Shallit), computing ae(modn) takes O((loge)(log2n)) bit operations. So computing ap1q(modp) takes O((logp)3) bit operations. By problem 5 of homework 6, the number of primes dividing p1 is O(logp)


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 p and q, private decryption key d, public encryption key e, and large number n=pq

If the sensor reads x, transmit (x,xd).

Iran is happy: they can verify that x=(xd)e so they know the UN is not transmitting secrets or anything.

The UN is happy: they can compute xd and check that it really is the supposedly-transmitted xd.

It is hard to mess with x to get x and still have (x)d=xd. If you mess with x and xd, then you need to know d!