# week4 - SIT281 Introduction to Cryptography Week 4...

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

8/4/2010 1 SIT281 Introduction to Cryptography Week 4 Objectives In this lecture we cover sections 3.5, 3.6, 3.7 and 3.9. The topics we study are: >Modular Exponentiation >Theorems of Fermat and Euler >Primitive roots >Finding square roots modulo n.

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

View Full Document
8/4/2010 2 Modular exponentiation > As we mentioned earlier, the security behind many currently used cryptosystems is simply their size (recall the key bit-size charts from week 1). > So in cryptography, we like to ± Generate large numbers quickly in order to implement and Generate large numbers quickly in order to implement and secure systems, and ± Work out ways of reducing large number problems to smaller number problems when trying to decrypt (legitimately) or attack a system. Modular exponentiation- an example Suppose we want to evaluate a large power of 3 modulo 522. > We first evaluate the squares: 3 2 9 (mod 522) 3 4 (3 2 ) 2 81 (mod 522) 3 8 (3 4 ) 2 297 (mod 522) (3 ) 3 16 (3 8 ) 2 513 (mod 522) 3 32 (3 16 ) 2 81(mod 522) 3 64 (3 32 ) 2 81 2 297 (mod 522) and so on.
8/4/2010 3 An example cont’d > We can now easily compute any power of 3 as follows. > As an example, consider 3 1234 . The exponent is not a power of 2, but we can write it as a sum of powers of 2 simply using its binary representation. > How do we get a binary representation of a number? We write it as a sum of powers of two. Writing a number as a sum of powers of 2: > First, find the highest power of 2 equal to or just below 1234: it is 1024. > Now look at the difference, and do the same thing: 1234 – 1024 = 210 and the highest power of 2 near (below) it is 128. > So 1234 = 1024 + 128 + (210 – 128) = 1024 + 128 + 82. > And 82 = 64 + 18 = 64 + 16 + 2. So: 1234 = 1024 + 128 + 64 + 16 + 2 = 2 10 + 2 7 + 2 6 + 2 4 +2.

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

View Full Document
8/4/2010 4 Binary representation From 1234 = 2 10 +2 7 6 4 + 2 + 2 + 2 + 2 we obtain the corresponding binary representation of 1234 as 10011010010. Now back to our problem: So 3 1234 = 3 1024 * 3 128 * 3 64 * 3 16 *3 2 . We can compute the two highest powers: 3 128 (3 64 ) 2 297 2 513 (mod 522) 3 1024 (3 128 ) 8 513 8 (-9) 8 81 4 513 (mod 522) An example cont’d > Multiplying to obtain 3 1234 = 3 1024 * 3 128 * 3 64 * 3 16 2 , we have 3 1234 = (513*513)*297*(513*9) 81*297*(-81) 225*297 9 (mod 522). You will see more of these problems in the homework and prac.
8/4/2010 5 Prime Numbers again We introduce this week a fundamental test for ‘non- primality’. How would you try to factor a 150 digit number? It may be a prime, and therefore not factorable at all. Since the standard factoring algorithm takes too long for most people, you would not be able to determine this in a reasonable amount of time. However, there are some ‘work-arounds’ that have been discovered. Prime Numbers again cont’d The result we prove below can sometimes tell you if a number is composite. Fermat’s Little Theorem. If p is a prime and p | a , then (yes, there is a Fermat’s Big Theorem but we don’t need it!) ). (mod 1 1 p a p Before giving a proof of this very useful result, we discuss some of the implications and do some examples.

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

View Full Document
8/4/2010 6 Fermat’s Little Theorem (FLT) Suppose someone gives us a (large) number and we do not know if it’s prime or not.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 20

week4 - SIT281 Introduction to Cryptography Week 4...

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

View Full Document
Ask a homework question - tutors are online