lecture7(1)

# lecture7(1) - Lecture 7 Computations for RSA Encryption...

This preview shows pages 1–3. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Lecture 7: Computations for RSA Encryption Daniel Frances c 2012 Contents 1 RSA algorithm computations 2 1.1 How do create two large prime numbers p,q ? . . . . . . . . . . . . . . . . . . 2 1.2 How do we test that a number is prime? . . . . . . . . . . . . . . . . . . . . 2 1.3 How do we compute numbers like a b mod N for large values of a,b,N ? . . . 2 1.4 How do we solve de mod ( p- 1)( q- 1)? . . . . . . . . . . . . . . . . . . . . 5 1.4.1 Relevance of Extended Euclid Algorithm . . . . . . . . . . . . . . . . 5 1.4.2 Euclid’s Extended Algorithm . . . . . . . . . . . . . . . . . . . . . . 6 1 1 RSA algorithm computations Now that we understand the RSA algorithm in principle let’s deal with some computational questions to allow us to actually try it in the lab with real messages. 1.1 How do create two large prime numbers p, q ? One of the first questions we need to answer is if there are many or very few prime numbers. To help us answer this question we can use Lagrange’s Prime Number Theorem which states that lim x →∞ { number of primes ≤ x x/ ln x } = 1 Therefore for large x, the number of primes ≈ x/ ln x . So for example our Social Insurance numbers have nine digits, so they are numbers ≤ 10 9 so that the number of primes is ≈ 10 9 / ln(10 9 ) = 10 9 / 9 ln 10 ≈ 48 , 254 , 942 ≈ 5 percent of all Social Insurance Numbers are prime. You have more prime numbers than you might think! Believe it or not, the most efficient means of generating a random large prime number is by trial-and-error, i.e. generate a large integer randomly, then test that it is prime. If so, we are done, if not we try again....
View Full Document

{[ snackBarMessage ]}

### Page1 / 6

lecture7(1) - Lecture 7 Computations for RSA Encryption...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online