rsa - algorithm by muthugomathy and meenakshi shetti of git college

31
PUBLIC KEY CRYPTOGRAPHY RSA ENCRYPTION ALGORITHM Meenakshi Shetti Muthu Gomahty V

Upload: kls-gogte-institute-of-technology

Post on 21-May-2015

446 views

Category:

Education


2 download

DESCRIPTION

A nice animated presentation explaining the method of RSA algorithm. Its definition, explanation, advantages, disadvantages.

TRANSCRIPT

Page 1: RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE

PUBLIC KEY CRYPTOGRAPHYRSA ENCRYPTION

ALGORITHM

Meenakshi ShettiMuthu Gomahty V

Page 2: RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE

CONTENTS

• CRYPTOGRAPHY• WHAT IS A KEY ?• PRIVATE KEY CRYPTOGRAPHY• PUBLIC KEY CRYPTOGRAPHY• RSA ALGORITHM• ADVANTAGES• DISADVANTAGES• REFERENCES

Page 3: RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE

CRYPTOGRAPHY

•It’s a greek word which means hidden secret in writing•Cryptography is the practice and study of techniques for secure communication in the presence of third parties(called adversaries).

Page 4: RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE

What is a “key”?

A key is a piece of information (a parameter) that determines the functional output of a cryptographic algorithm or cipher.

Page 5: RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE

PRIVATE KEY CRYPTOGRAPHY

• Also called as Symmetric-key algorithms • They are a class of algorithms for cryptography that

use the same cryptographic keys for both encryption of plaintext and decryption of ciphertext.

Page 6: RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE

Public key cryptography

• Also known as asymmetric cryptography• Refers to a cryptographic algorithm which requires two separate keys, one

of which is secret (or private) and one of which is public.

Page 7: RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE

Non secret ENCRYTION USING LOCK

ALICE BOB

Page 8: RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE

DECRYPTION

ENCRYPTION

Page 9: RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE

EVE

ALICE BOB

Page 10: RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE

TRAP DOOR –ONE WAY FUNCTION

EASY

HARD

Page 11: RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE

46 mod 12 ≡10312345mod 17 ≡ 3910135

BASE

EXPONENET

MODULUS

REMAINDER

Page 12: RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE

memod N ≡ c

Page 13: RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE

EASY

HARD

memod N ≡ c

?emod N ≡ c

Page 14: RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE

memod N ≡ cemod N- public key

m- message C -remainder

Page 15: RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE

cd mod N ≡ mmedmod N ≡ m

me mod N ≡ c

e- encryptiond - decryption

Page 16: RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE

STEP 1 -> PRIME FACTORIZATION

STEP 2 -> PHI FUNCTION

STEP 3-> EULER’S THEOREM

For computation of e and d

Page 17: RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE

Multiplication of two extra large numbers are easy to compute.

But prime factorization of a number is the hardness of the problem .Prime factorization is what used to build the trap door

Page 18: RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE

STEP 1 -> PRIME FACTORIZATION

P1 – 150 digits long

P2 – 150 digits long

P1 * P2 = N

N- 300 digits long

Page 19: RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE

STEP 2 -> PHI FUNCTION - breakability of a number

Given a number N – it output’s how many integers are less than or equal to N that do not share a common factor with N

ɸ[8] = 1 2 3 4 5 6 7 8

ɸ[8] = 1 2 3 4 5 6 7 8

We want to find ɸ[8] , we look at all integers from 1 to 8 , then we count how many integers does not share a factor greater than 1

ɸ[8] = 4

Page 20: RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE

• In the case of ɸ of a prime number – As prime numbers does not share common

factor of any number greater thanɸ[P]=P-1

i.e, ɸ[7] = 1 2 3 4 5 6 7

As none of them share a common factor with 7

ɸ[7] = 7-1 ɸ[7] = 6

Page 21: RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE

ɸ[N] is also multiplicative

ɸ[A*B] = ɸ[A] * ɸ[B]

= (A-1) * (B-1)

ɸ[N] = ɸ[P1] * ɸ[P2]

ɸ[N] = (P1-1) * (P2-1)

77=7*11

ɸ[7] = ɸ[7] * ɸ[11]

ɸ[7] = (7-1) * (11-1) = 6 * 10 =60

Page 22: RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE

STEP 3-> EULER’S THEOREM - Relation between the phi function and modular

exponentiation

mɸ[N]= 1 mod N

Pick 2 numbers that do not share a common factor

m=5, n=8

5ɸ[8]= 1 mod 8

54= 1 mod 8

625=1 mod 8

Page 23: RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE

Modify this equation using 2 simple rules1) 1k=1mk*ɸ[N]= 1 mod NWe multiply eponent ɸ[N] by any number k,

the solution is still 12) 1*m=mm*mk*ɸ[N]= m mod Nmk*ɸ[N]+1= m mod N

Page 24: RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE

We now have an equation to find e and d which depends

on ɸ[N]

mk*ɸ[N]+1= m mod N

me*d= m mod NWhere d= k*ɸ[N]+1

e

Meaning d is ALICE’s private key .

It is the trap door which will perform undo operation

Page 25: RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE

EVE

ALICE BOBP1=53

P1=59N= 53* 59

ɸ[N]=52*58

e=3d=2*(3016)+1 3d=2011

N=3127

e=3N=3127

him=him=89

893 mod 3127=1394

e=3

N=3127

c=1394

ɸ[N]=3016

d=2011

13942011 mod 3127 = 89

cd mod N = m

m=89m=hi

c=1394

Page 26: RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE

• Any one wth N, e and c can find d if and only if they know

the prime factorization of N

• If N is large enough it requirs 100 to 1000 years to find

factorize

• It is the most widely used public key cryptography

algorithm and most copied software in the history

• Every internet user is using RSA whether they realise on

the hardness of prime factorization which results in deep

question of distribution of prime numbers.

Page 27: RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE

APPLICATIONS

• When it comes to assymetric cryptography the most popular and widely used application that comes to anyone's mind is PGP. PGP stands for “Pretty Good Privacy” and is the standard public key cryptography application used today. In the examples of this project we chose to use PGP Desktop. The reason for this choice is that PGP Desktop is easier to use than other text-based versions of PGP such as gnuPGP. PGP Desktop provides us with a very intuitive GUI accessible from the Windows Start Menu ,the PGP taskbar icon and from Windows explorer (shell integration). So from now on, every time we mention PGP, we will be referring to the PGP Desktop version.

Page 28: RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE

ADVANTAGES1. Convenience: It solves the problem of distributing the key for encryption.

2. Provides for message authentication: Public key encryption allows the use

of digital signatures which enables the recipient of a message to verify that

the message is truly from a particular sender.

3. Detection of tampering: The use of digital signatures in public key

encryption allows the receiver to detect if the message was altered in transit.

A digitally signed message cannot be modified without invalidating the

signature.

4. Provide for non-repudiation: Digitally signing a message is akin to

physically signing a document. It is an acknowledgement of the message and

thus, the sender cannot deny it.

Page 29: RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE

DISADVANTAGES1. Public keys should/must be authenticated: No one can be absolutely sure that a

public key belongs to the person it specifies and so everyone must verify that their public

keys belong to them.

2. Slow: Public key encryption is slow compared to symmetric encryption. Not feasible for

use in decrypting bulk messages.

3. Uses up more computer resources: It requires a lot more computer supplies

compared to single-key encryption.

4. Widespread security compromise is possible: If an attacker determines a

person's private key, his or her entire messages can be read.

5. Loss of private key may be irreparable: The loss of a private key means that all

received messages cannot be decrypted

Page 30: RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE

REFERENCES

1. Frederick J. Hirsch. "SSL/TLS Strong Encryption: An Introduction". Apache HTTP Server. Retrieved 2013-04-17.. The first two sections contain a very good introduction to public-key cryptography.

2. N. Ferguson; B. Schneier (2003). Practical Cryptography. Wiley. ISBN 0-471-22357-3.

3. J. Katz; Y. Lindell (2007). Introduction to Modern Cryptography. CRC Press. ISBN 1-58488-551-3.

4. A. J. Menezes; P. C. van Oorschot; S. A. Vanstone (1997). Handbook of Applied Cryptography. ISBN 0-8493-8523-7.

Page 31: RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE

THANK YOU