You are on page 1of 1

Rivest, Shamir, Adleman (RSA) Public-Key Encryption

Mona Gupta, Elizabeth Halpin, Amanda Kiouses, Angela McGee, Magdaleno Nunez,Yasmin Ramirez, Valarie Soerjono, Jessica Tyack, Stephen Wight

In times of war, cryptography emerged as a method of passing messages securely. People could not be relied upon to safely pass the messages and the different sides needed a way to convey messages in secret. The need for secrecy led to the development of codes and ciphers.
The Mono-Alphabetic Substitution Cipher One of the simplest ciphers is the mono-alphabetic substitution cipher, which replaces one character with another character. An example of a simple mono-alphabetic substitution cipher is the Caesar cipher. Using this code in Figure 1
a b c d e f g h I j k l m n o p q r s t u v w x y z c d e f g h I j k l m n o p q r s t u v w x y z a b Figure 1

Modular Arithmetic The Caesar cipher can be made more difficult to break by using modular arithmetic. For example, Eve must make a larger number of guesses before reaching the correct message. Modular arithmetic just cycles numbers within a set range from zero to one less than the modulus. When considering the English alphabet, mod 26 is used (number of letters). The letters are numbered as below in Figure 2. Example 1 Z=25, 25+2=27
A B C D E F G H I J K L M 0 1 2 3 4 5 6 7 8 9 10 11 12 N O P Q R S T U V W X Y Z 13 14 15 16 17 18 19 20 21 22 23 24 25 Figure 2

a normal sentence such as Hello, my name is Caesar is replaced with Fcjjm kw lykc gq aycqyp. Although the message now looks like complete gibberish, the Caesar cipher is not actually secure because the letters are only shifted two characters to the right, so an interceptor only needs to guess a few spaces to break the code. Symmetric-key vs.Public-key cryptography Codes are broken into the two categories of Symmetric-key (SKC) and Public-key (PKC) cryptography. In SKC, both the receiver (Bob) and sender (Alice) have to know the key to encode and decode the message. On the other hand, in PKC only Bob knows how to decode the message while Alice can only encode the message with information the receiver publicizes, stopping any interceptors (Eve) from decrypting and intelligently altering the message.

However, the number must be less than 26 so 27-26=1=B. Or we can say that 271 (mod 26) For larger numbers: 53+1419 (mod 24) In the case of a 24 hour clock. An RSA Security Flaw

Figure 3 RSA Encryption A commonly used Public-key encryption system is RSA. Ronald Rivest, Adi Shamir, and Leonard Adelman developed the RSA encryption system in 1978 to solve the problem involving using a secure line to send the information to decypher the code.RSA uses modular arithmetic to encrypt and decrypt messages. To set up RSA:

Imagine that you are Eve and just intercepted top-secret messages that had been sent to three people in Taiwan. Each of the people that were expecting to receive the message had published an exponent and moduli. The exponents are all 3, but the moduli are different, relatively prime numbers. With only the public knowledge of the exponent and moduli, you can break the system through the help of the Chinese Remainder Theorem, in other words by using a system of congruences. Remember, as the interceptor, you would just get these three encrypted messages, and then you would know the exponent and moduli because its published. By using the published moduli and the messages that you intercepted, you get the following congruences: Published Intercepted Moduli Message n1= 500639 m3 336826 (mod 500639) n2= 773671 m3 595811 (mod 773671) n3= 474883 m3 105827 (mod 474883)

P and Q are prime numbers, usually over 20 digits. M = PQ. N = (P-1)(Q-1). E has no common factors with N. D is the inverse of E in modul0 N. Which means ED 1 (mod N) Bob publicizes M and E. The encryption step is: Alice encodes her message (X) by: C = XE (mod M) Then to decrypt: Bob decodes CD (mod M). by:

(Notice m was raised to the exponent, 3)

So now we have to solve for m3; well use the variable x for simplicity. Since x 336826 (mod 500639) x = 336826+500639y for some integer y. Well then plug this into the second congruence statement. Then: 336826+500639y 595811 (mod 773671) Solving for y, we get: y = 575744+773671z Plugging this value of y into the above, we get: 288240237242+387329875769 z 105827 (mod 474883) Solving for z this time, we get: z = 23495 + 474883 t By plugging this in, we come up with the final solution of
Ronald Rivest, Adi Shamir, Leonard Adelman

For example, if P=17, Q=13, M=221, N=192, E=5, D=77 Bob publicizes the numbers 221 and 5. Alice wants to send the message Hi. H=7 and I=8 according to Figure 2 So Hi= 26(7)+260(8)=190 190573 (mod 221) Alice sends 73 to Bob Bob calculates: 7377 190 (mod 221) 190=26(7)+260(8) 7=H, 8=I Hi.

X = 9449200559621997 + 183936373394810027t Even though this might still seem to be in a mod, since the message must always be smaller than the modulo, we know that x, or originally m3, is smaller than the final modulus (which is n1n2n3). Because of this, we can drop off the 183936373394810027t at the end and just take the cube root of both sides. We end up with: m = 211413 By successively dividing 211413 by 26 (because of the 26 letters in the alphabet), we have: 211413= 263(12) + 262(0) + 261(19)+260(7) (By using Figure 2 we see the values for each letter) M A T H So the decrypted message would be MATH and youve just cracked the code!
Project supported by Chevron and CSUB

Facilitators: Dr. Lam and Natalie Gifford

You might also like