Thursday, April 3, 2014

RSA Method of Cryptography

RSA: is a crypt o-system, which is known as one of the first practicable public-key crypt o-systems and is widely used for secured data transmission. This method was named after three mathematically trained computer sciences, Ronald Riverst, Aid Shamer, and Lenorad Adleman, who discovered this method in 1977.
In the crypt o-system the encryption key is public and differs from the decryption key which is kept a secret. 
How it works: The bank publishes two numbers on its website, n and e (as in encipher), n and e are about 2000 digits long. 
1, Write your plain text should be under 1000 characters
for example: quiz today   
2. Convert your plain text to a number m (under 2000 digits) by replacing each letter with its 2-digit position in the alphabet
for example: 172109262015040125
3. Computer cipher text C=M raised to the e power mod n. Your the one emailing the C to the bank. 
4. When the bank receives your C, it uses a magic secret number d ( as its decipher) and computes C raised to the d mod n, which equals M. Then it converts M back to your plain text. 

The Encryption: An example of this is: if Brittany transmits her public key (n,e) to Billy and keeps the private key secret. Billy then wishes to send message M to Brittany. He first turns M into an integer m, such that 0 ≤ m < n by using an agreed protocol of the system. he then computes the cipher text c 
corresponding to  c \equiv m^e \pmod{n} , then Billy transmits c to Alice. 

The Decryption: Brittany can recover m from c by using her private key exponent d from the formula 
 m \equiv c^d \pmod{n} . Given m, she can recover the original message M.

Example One: Compute the following RSA method where p=5 and q=29. Find e and f, and also d to figure out what the value of M will be? 

To find the value of n we multiply p by q. 
so since p=5 and q=29 so (p)(q)=145. 
Now we need to find (n)
(145) = 4 x 28 = 112
We pick d=3 and then find e and f so that 
ed + (n) f =1
3 e + 112 f  =1
3(-37) + 112(1) =1
so e = -37
Now we send the message to M=2. 
The sent message is 
.
Exam Question: Compute the following RSA method where p=3 and q =7. Find e, f. and d to figure out what value M with encryption and decryption? 


Citations: Wikipedia and Our Math notes 




No comments:

Post a Comment