# rsa algorithm

Post on 26-Feb-2016

37 views

Category:

## Documents

Embed Size (px)

DESCRIPTION

RSA ALGORITHM. BY : Darshana Chaturvedi. INTRODUCTION RSA ALGORITHM EXAMPLES RSA IS EFFECTIVE FERMAT’S LITTLE THEOREM EUCLID’S ALGORITHM REFERENCES. Outline. Cryptography Ancient art. Science of writing in secret code . - PowerPoint PPT Presentation

TRANSCRIPT

Cryptography Hackers and Viruses

RSA ALGORITHMBY : Darshana ChaturvediOutlineINTRODUCTIONRSA ALGORITHMEXAMPLESRSA IS EFFECTIVEFERMATS LITTLE THEOREMEUCLIDS ALGORITHMREFERENCES

IntroductionCryptography Ancient art.Science of writing in secret code.Art of protecting information by encrypting it into an unreadable format, calledcipher text which can be decrypted into the plain text using a secret key.UsesEmail messagesCredit card informationCorporate data

Cont..TypesSymmetric-key systems(uses a single key)Public-key systems introduced in 1970s(uses a public key known to everyone and a private key that only the receiver of the messages uses)Previously both senders and receivers implemented the algorithms by hand but with the advent of computers, things changed.

Cont..Simplest cryptographic systemsAlgorithms for both encryption and decryption are fixed and known to everyone.There are two inputs, the text to be encoded or decoded and a key.

Cont..Symmetric key encryptionNo message can be sent unless there has been some prior agreement on a key.Even if there is an agreement, if the same key is used over an extended period of time, an eavesdropper may be able to infer the key and break the code.

RSA AlgorithmNew keys must be transmitted between the senders and receivers to avoid code breaking.The most widely used public key system is the RSA algorithm.RSA algorithm [Rivest , Shamir and Adleman] in 1978We assume that Bob and Alice wish to exchange secure messages and that Eve is attempting to eavesdrop.

Cont..Assume that Alice wants to send a message to Bob. ThenBob chooses a private key known only to him. Bob exploits a function f to compute his public key, public = f(private).Bob publishes public key.Alice exploits Bobs public key to compute ciphertext= encrypt(plaintext, public) and she sends ciphertext to Bob.Cont..Bob exploits his private key to compute plaintext= decrypt(ciphertext, private). In order for this last step to work, encrypt and decrypt must be designed so that one is the inverse of the other.

Cont..

Cont..If there exist efficient algorithm for performing all four of the steps, then Bob and Alice will be able to exchange messages.We assume that Eve knows the algorithm encrypt and decrypt . So she could easily eavesdrop if she could infer Bobs private key from his public one or if she could compute decrypt without knowing Bobs private key. Cont..RSA algorithm uses the mathematical properties of modular arithmetic and the computational properties of prime numbers to ensure that Bob and Alice can perform their tasks efficiently but Eve cannot.

stepsAlice uses the RSA algorithm to send a message to Bob as follows.Bob constructs his public and private keysBob chooses two large prime numbers p and q. From them, he computes n=p*q.Bob, finds a value e such that 1 < e < p.q and gcd(e,(p-1)(q-1))=1. (in other words, he finds an e such that e and (p-1).(q-1) are relatively prime).Bob computes a value d such that d.e(mod(p-1).(q-1))= 1. In RSA terminology, this value d, rather than the original numbers p and q, is referred to as Bobs private key.Cont..Bob publishes (n,e) as his public key.Alice breaks her message plaintext into segments such that no segment corresponds to a binary number that is larger than n. Then, for each plaintext segment, Alice computes ciphertext = plaintexte(mod n). Then she sends ciphertext to Bob.Bob recreates Alices original message by computing plaintext = ciphertextd(mod n).

Example 1We can illustrate the RSA algorithm with a simplemessage from Alice to Bob.Bob is expecting to receive messages. So he constructs his keys as follows:He chooses two prime numbers, p=3 and q=11. He computes n=p*q=33.He finds an e such that 1

Recommended