« previous | Tuesday, March 5, 2013 | next »
Midterm
Midterm Thursday after Spring Break
Material is anything up to today.
Practice midterm available on web page
Review
- Powering mod
is easy but slow.
- Computing square roots mod prime
is easy-ish
- Computing square roots mod any integer
is hard: in fact, deciding whether
is NP-Complete
- Deciding existence of square roots mod
can be done by powering, but is faster via quadratic reciprocity of Jacobi symbols
- Factoring appears hard, but is easy if computing square roots mod
is easy.
El Gamal
- Large prime
, with
having at least one huge prime factor
- Generator
for 
- Number
![{\displaystyle a\in [2,2]}](https://wikimedia.org/api/rest_v1/media/math/render/svg/a83ff6347b810ea554f7569ea02a6bbc590a64c4)

are public, recipient holds
secret.
to transmit a message
, the sender computes a random
,
, and
; and then sends
To decode, the recipient computes
Questions:
- How does this hide
? (
appears random, and multiplication by it scrambles
)
- why does decryption work?

Crypytanalysis
Most obvious: find
.
Finding
involves solving
for
. This involves solving the discrete log problem, which is appears to be hard
Example

(i.e.
)

- pick
at random and transmit 
Pohlig-Hellman
Recall:
- If
is a square mod
, then
.
- If
is a non-square mod
, then
.
So if
, we see that
- when
is even, then 
- when
is odd, then 
That is, you can tell the parity of
(the last base-2 digit).
Example
,
,
, and
Notice that
. This would be a bad choice.
Note: Fermat primes are of the form 
We want to find
with
. Is
odd or even? (check Legendre symbol)
So
is even and
.
Now we want to find
Where
is the last digit mod 3.
We find
, so
must be 0.
So
Now we want to find
, and by brute force,
.
So
Yada yada,
The Chinese Remainder Theorem states that we have a unique
such that it is equivalent to (0,0,2,6) mod (2,3,5,7), respectively.
- Combine
and
to get 
- Combine that with
to get 
- Combine that with
to get
.
And indeed,
, and
Note: Pohlig Hellman also handles base 