Presentation is loading. Please wait.

Presentation is loading. Please wait.

Analysis of the RSA Encryption Algorithm

Similar presentations


Presentation on theme: "Analysis of the RSA Encryption Algorithm"— Presentation transcript:

1 Analysis of the RSA Encryption Algorithm
Betty Huang Computer Systems Lab 1 1

2 Abstract The RSA encryption algorithm is commonly used in public security due to the asymmetric nature of the cipher. The procedure is deceptively simple, though; given two random (large) prime numbers p and q, of which n = pq, and message m, the encrypted text is defined as c = me (mod n). E is some number that is coprime to the totient(n). The public key (n, e), however, makes it difficult for the user to find the private key (n, d), due to the fact that given only n, it is extremely difficult to find the prime factors p and q. The fastest methods currently have O(sqrt(n)) complexity, but require expensive resources and technology (Kaliski). The aim of this paper is to improve on the factorization process required by the RSA encryption algorithm. 2 2

3 Background Purpose of Encryption Algorithms One-way functions
Hash functions: MD5, SHA family Block Cipher: DES, Blowfish 3 3

4 Asymmetric Block Cipher
RSA Rivest, Shamir, Adleman Asymmetric Block Cipher Different Keys for Encryption/Decryption 4

5 Block Ciphers A block cipher consists of two paired algorithms, one for encryption, E, and the other for decryption, E-1. Both algorithms accept two inputs: an input block of size n bits and a key of size k bits, yielding an n-bit output block. For any one fixed key, decryption is the inverse function of encryption, so that for any block M and key K. M is termed the plaintext and C the ciphertext. 5 5

6 Process Initialization: n = pq, with p and q primes
e relatively prime to φ(n) = (p − 1) (q − 1) d inverse of e in Zφ(n) Keys: Public key: (n, e) Private key: (n, d) Encryption: Message M 1 < M < N C = M^e mod n Decryption: M = C^d mod n 6

7 An Example Keys: Setup: public key: (119, 5) p = 7, q = 17
private key: (119, 77) Encryption: M = 19 C = 195 mod 119 = 66 Decryption: C = 6677 mod 119 = 19 Setup: p = 7, q = 17 n = 7*17 = 119 φ(pq) = 6*16 = 96 choose e coprime to φ(pq) ex: e = 5 find d such that de = 1 (mod φ(pq)) d = 77 7

8 Algorithms Prime Generation Primality Tests (Miller-Rabin, etc) GCD
Euler’s Totient Function Modular Multiplicative Inverse Chinese Remainder Theorem Integer Factorization 8

9 Development GMP Library RSA Algorithm Implementation
Integer Factorization 9

10 Development Trial Division
Given a number n, test numbers less than n to find prime divisors 10

11 Development Fermat’s Theorem n = x2 – y2 n = (x + y)(x – y)
Find s = (x - y), t = (x + y) x = (s + t) /2, y = (t - s) / 2 11

12 Pollard’s Rho Method Development
sequence of pseudo-random integers constructed in the following way: x0 = random(0, N − 1) xi = f (xi−1 ) (mod N ), i = 1, 2, · · · where f is a polynomial with integer coefficients, eg. in most practical implementations of the algorithm f (x) = x2 + α, α = 0, -2 12

13 Results Factorization of Fermat 6:
= 18,446,744,073,709,551,617 Factors into: 274,177 × 67,280,421,310,721 13

14 Results 14

15 Results 15


Download ppt "Analysis of the RSA Encryption Algorithm"

Similar presentations


Ads by Google