Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more ➡
Standard view
Full view
of .
×
0 of .
Results for:
P. 1
Discrete_Maths_2002_Lecture_37_3_slides_pp

# Discrete_Maths_2002_Lecture_37_3_slides_pp

Ratings: (0)|Views: 320|Likes:

### Availability:

See More
See less

06/30/2012

pdf

text

original

Lecture 37, 22-October-20021
Discrete Mathematics 2002
1
Introduction
\u2022 Last lecture \u2013 we looked at public key encryption
\u2022 In public key encryption there are 2 types of keys
\u2013aprivate key & apublic key
\u2022 The private key is kept by the receiver

\u2022 The public key is announced by the receiver to
anyone who wants it (e.g. the sender of the
message \u2013 or anyone else!)

\u2022 Thus there are no security issues associated with
the distribution of keys
\u2022 When A wants to send a message to B, A
encrypts the message using B\u2019s public key
\u2022 B decrypts the message using their private key
2
The RSA Algorithm
\u2022 The most common public key encryption

method in use today is the RSA algorithm
\u2022 In RSA, keys are generated as follows:
1. A key centre (which generates & distributes

keys) chooses 2 distinct large prime nosp &q,
and multiplies them:n =pq
2. Thenp \u2013 1 &q \u2013 1 are multiplied:
m= (p\u2013 1)(q\u2013 1)
3. A numberx is chosen so thatx &m are coprime
4. Then the centre computes an integery so that
xy= 1 mod m
5. The participant gets the nosx &n as their
public key, &y &n as their private key
3
Sending a Message with RSA
\u2022 Once a participant has their public & private
keys, they receive a message as follows:

1. The sender converts the message to bits, breaks
it into substrings of the same length, then each
substring (which is an integera that must be

\u2264n) is encrypted using C= axmodn.
Cis the ciphertext \u2013 note the formula uses the
receiver\u2019s public key, which is freely available.
2. The receiver then deciphersC back to a
plaintext characterP byP =Cymodn.
This formula requires knowledge of the private
key, which is known only to the receiver.
Lecture 37, 22-October-20022
Discrete Mathematics 2002
4
Example of Sending a Message
with RSA

\u2022 Last lecture \u2013 we showed that a valid pair of keys for RSA isx = 3 &n = 33 (public key), andy = 7 &n = 33 (private key)

\u2022 Note that the numbers used in this example are
muchsmaller than they would be if we were
encrypting information in a practical situation
\u2022 Example: Use the above keys to encrypt the
messageg (i.e. 7), & show the correct message
is recovered after decryption
5
Why does the RSA Method Work?

\u2022 The theoretical basis that ensures the RSA
method always works comes from an area of
mathematics known as number theory (which is
the study of properties of integers)

\u2022 Note that the process we described for
generating keys has to be followed closely

\u2022 For example, we stated that it was necessary to
them to obtain the numbern that appears in both
the public and private keys:n =pq

6
RSA with non-Prime Starting Nos
\u2022 What happens ifp &q arenot both prime?
\u2022 Suppose we generate keys withp = 3 &q = 8
(note thatq isnot prime)
\u2022 Thenx = 3 &n = 24 (public), andy = 5 &n = 24
(private) are suitable keys
\u2022 If the message is the number 3, it is recovered by

the receiver as the number 3 (as we\u2019d expect)
\u2022 However, the message 2 is recovered as 8
\u2022 Similarly, the message 6 is recovered as 0
\u2022 So the RSA method doesn\u2019t necessarily work

with non-prime values ofp &q
Lecture 37, 22-October-20023
Discrete Mathematics 2002
7
Message Security with RSA

\u2022 A message sent using RSA can be deciphered by
an intruder if they are able to determine (e.g.
guess) the numbery in the private key

\u2022 In the earlier example,y was 7, and this would
be guessed easily with a trial-and-error approach

\u2022 In practice, though, very large nos are used forx
&y (at least tens of digits), so a trial-and-error
approach to findingy would take months or
years, even with the fastest available computers

\u2022 So an intruder isvery unlikely to guessy
8
Message Security with RSA (cont)

\u2022 The other way to break the cipher (other than by stealingy) is to find the original prime nosp &q on which the public & private keys were based

\u2022 Sincen =pq, and the value ofn is publically
available (in the public key), the cipher will be
broken if we can factorn into constituent primes

\u2022 While this may sound fairly easy, it is actually
very difficult to find the factors of large nos (and
it is suggestedn has at least 200 decimal digits)

\u2022 To illustrate this difficulty, the RSA Security Co.
offers prizes of \$10,000 to \$200,000 (US) for
factoring certain nos, of length 174 to 617 digits

9
Become Rich by Factoring Numbers

\u2022 For example, you can earn \$10,000 by factoring 188198812920607963838697239461650439807 163563379417382700763356422988859715234 665485319060606504743045317388011303396 716199692321205734031879550656996221305 168759307650257059

\u2022 The company offers these prizes to \u201cencourage
research into computational number theory and
the practical difficulty of factoring large integers\u201d

\u2022 Given the magnitude of the prizes, it is clearly no easy task to factor large nos, even with the latest computers

## Activity (2)

### Showing

AllMost RecentReviewsAll NotesLikes