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)∣(p−1), where ordp(a) is the smallest exponent e≠0 with ae≡1(modp).

Proof. Suppose k=ordp(a). Consider ℓ=GCD(k,p−1).

By the Extended Euclidean Algorithm, there are x,y∈ℤ with kx+(p−1)y=ℓ.

So then

aℓ≡akx+(p−1)y≡1(modp)

. Since

ℓ∣k

(since

k=ordp(a)

, we must have

ℓ≥k

. By construction,

ℓ∣k⟹ℓ=k

, so

k∣(p−1)

.

Q.E.D.

Corollary

If p is prime and a∈(ℤ/pℤ)* and ap−1q≢1(modp) for all primes q∣(p−1),

Then a is a generator of ℤ/pℤ)*.

In particular, given a list {a1,…,ak} of all primes dividing p−1, you can check the preceding condition in time O((log⁡p)4)

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

Proof. We must show that ordp(a)=p−1. By Lagrange's theorem, ordp(a)∣(p−1).

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

If p−1=q1e1…qkek is the factorization of p−1, then any d<p−1 dividing p−1 must divide p−1q1 or p−1q2 or ... or p−1qk.

Now ap−1q≢1(modp) for all q∣(p−1) is equivalent to ap−1q1≢1(modp−1), ..., ap−1qk≢1(modp−1). So if ordp(a)<p−1, it would divide one of p−1q1 or ... or p−1qk, which is impossible.

Therefore

ordp(a)=p−1

.

Q.E.D.

Complexity Bounds

By Theorem 5.4.1 (of Bach and Shallit), computing ae(modn) takes O((log⁡e)(log⁡2n)) bit operations. So computing ap−1q(modp) takes O((log⁡p)3) bit operations. By problem 5 of homework 6, the number of primes dividing p−1 is O(log⁡p)


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!