Download presentation
Presentation is loading. Please wait.
Published byCrystal Quinn Modified over 9 years ago
1
RSA Public Key Algorithm
2
RSA Algorithm history Invented in 1977 at MIT Named for Ron Rivest, Adi Shamir, and Len Adleman Based on 2 keys, 1 public and 1 private
3
Basic Algorithm A private and a public key are generated by a user. The public key is given to a sender, who encrypts the message using that key. The user then decrypts the message using the private key
4
Key generation 2 large prime numbers P and Q are randomly chosen N = P * Q S = (P-1) (Q-1) Value E is chosen where 1<E<N and the greatest common denominator of E and S is 1 A value D is calculated where (D*E) modS = 1 D is the private key (N,E) is published as the public key
5
Encryption To send a message a person uses the public key The plaintext message is broken into binary segments no larger than N Each segment is encrypted with the algorithm ciphertext = plaintext E mod N
6
Decryption To decrypt the message, the recipient will calculate each segment with plaintext = ciphertext D mod N
7
Confused?
8
Alfred chooses 2 primes P = 19 and Q = 31 N = P*Q = 589
9
Alfred finds e (P-1)(Q-1) = 540 E needs to have no GCD with 540 Can be found with Euclid’s algorithm (Example 27.6, p614 Automata) E = 49
10
Alfred finds D D is computed using an extension of Euclid’s algorithm D = 1069 1069 is the private key (589,49) is the public key
11
Batman wants to send message The message will be “A” ASCII code for A is 65 The encryption algorithm is then: 65 49 mod 589 However, don’t actually need to compute 65 49
12
Batman exploits 2 facts N i+j = N i * N j (N*M) mod K = (N mod K)(M mod K) mod K This is called modular exponentiation Note that 65 49 = 65 1+16+32
13
Batman encrypts message and sends 65 49 mod 589 = 65 1+16+32 mod 589 (65 1 *65 16 *65 32 ) mod 589 (65 1 mod 589)(65 16 mod 589)(65 32 mod 589) mod 589 (65 * 524 * 102) mod 589 3474120 mod 589 = 198 Batman sends Alfred the message 198
14
Alfred decrypts message Alfred uses the private key 1069 and computes 198 1069 mod 589 This is done with the same process used in encryption to retrieve the message “A”
15
Why it’s effective Larger integers increase effectiveness Encryption and decryption are inverses of each other User A can find E and D efficiently Modular exponentiation allows both users to compute encryption and decryption efficiently
16
Why it’s effective Any eavesdropper will not be able to recreate the enciphered text because the modular exponentiation is not an invertible function Also, the private key D cannot be calculated from the public keys N and E
17
References Automata, Computability, and Complexity. Elaine Rich. Pearson Prentice Hall, 2008. RSA Laboratories' Frequently Asked Questions About Today's Cryptography, Version 4.1. RSA Laboratories Inc, 2000. http://www.rsa.com/rsalabs/node.asp?id =2152# http://www.rsa.com/rsalabs/node.asp?id =2152#
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.