MATH 470 Lecture 19

From Notes
Jump to navigation Jump to search

« previous | Thursday, March 28, 2013 | next »


Tests will be graded by tomorrow, and are viewable during office hours on Monday 11:00 – 12:30

From Yesterday

The secret was 23:

Three pairs for group were:

  • (12,96)
  • (38,25)
  • (2,17)


Randomness and Collisions: The Birthday Paradox

What are the chances that among 25 people, there exist at least 2 people with the same birthday?

Very likely: 1Pr[no common birthdays], and the probability that there are no common birthdays is

1364365363365=j=124(1j365)

With a little work, we can get an estimate:

j=124(1j365)1e25(251)2(365)

Similarly, when picking r numbered balls (with replacement) out of an urn with n, the probability of getting a collision is at least

1er(r1)2n

Back to Signatures: Priority

This is an example of "Blind" Signatures

Suppose Pfizer and Roche are developing a cure for cancer. They are entering trials with patients, but want to later claim priority.

They want to prevent espionage by the other company.

If they want the CDC to believe their claim of priority, all parties can do the following:

Reveal that you know something without telling anyone what it is.

  • CDC generates 2 RSA instances: (p1,q1,n1,e1,d1) and (p1,q1,n1,e1,d1).
  • CDC sends set 1 (n1,e1) to Pfizer and set 2 (n2,e2) to Roche
  • Pfizer picks a random k1(/n1)* and sends t1=k1e1m1(modn1) to the CDC.
  • The CDC signs t1 by computing s1=t1d1(modn1) and sends it back to Pfizer
  • Pfizer keeps s1/k1
  • Roche does the same with subscript 2

Each message mi is the formula for the cancer drugs.

Assuming these dialogues happened today (28 Mar. 2013), when trials are done, Pfizer (or Roche) can say: "I was first!" and prove it:

Proof. Pfizer observes

s1k1=t1d1k1=(k1e1m1)d1k1=m1d1

CRC evaluates (m1d1)e1=m1

Now in order for this to work, the CDC must be honest

Hash Functions

For digital signatures to be practical, we need to sign digests of messages instead of messages because RSA and El Gamal run in cubic time, not linear time (i.e. slow).

How do we get a digest?

Simple idea: use first few hundred bits

However, this can lead to collisions if two messages start with the same thing.

Mathematically, we want a function

H:{0,1}N{0,1}n

(maps bit strings of length N to bit strings of length n)

such that

  1. H can be computed relatively quickly (On))
  2. H is pre-image resistant, i.e. given y, finding m with H(m)=y is very hard.
  3. H is strongly collision-free: it is very hard to find m1 and m2 with H(m1)=H(m2) [1]
Note: For N>n with H having no collisions, this is impossible!
Note: requirements 2 and 3 are for cryptographic hash functions. For computing programming hashes for use in hash tables, requirements 2 and 3 may be discarded

Example Hash Functions

  1. H(m)=m(modn)
    • (1 passes) easy to compute
    • (2 fails) given y, it's easy to find m with H(m)=y, namely m=y.
    • (3 fails) take H(m1)=H(m1+n)
  2. H(x)=αx(modp)
    • (1 passes) easy
    • (2 passes) discrete log is hard
    • (3 passes) only if α is a generator for p
    • BUT range is still considerably big: H(13081)513081103103(mod104729)


Digression: Transmitting Keys via RSA

Suppose you want to transmit a 56-bit (< 1017) DES key using RSA with n having 200 bits (> 1060).

You would like your adversary to be forced to search through all possibilities if she tries to read your message.

However, using RSA naïvely enables Eve to find the 56-bit key after searching just 2E9 possibilities!

  1. Compute ye(modn) for y{1,,109}
  2. Upon seeing your message c=me, she computes cxe for x{1,,109}
  3. Now Eve looks for collisions ye=cx by checking (1092)1018 possibilities in total, BUT
  4. Thanks to the birthday paradox, Eve will find a collision with probability 2E9 checks!


The collisions work because ye=cxec=(xy)e=((xy)1)e, and so m=(xy)1

Eve just found an encrypted key with relatively little work

What to do!?

Padding

Concatenate 72 random bits to the front and back of the key.

This still is not quite secure: Eve could figure out how the padding scheme works

OAEP-Padding Scheme

1994: Bellaire and Rogaway

Based on hash functions, but performs the inverse {0,1}n{0,1}N mapping.


Footnotes

  1. Sometimes, it's enough to have H be weakly collision-free: given x it is very hard to find x with H(x)=H(x).