{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# tut10sols - The University of Sydney MATH2068 Number Theory...

This preview shows pages 1–2. 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: The University of Sydney MATH2068 Number Theory and Cryptography (http://www.maths.usyd.edu.au/u/UG/IM/MATH2068/) Semester 2, 2008 Lecturer: R. Howlett Tutorial 10 1. What is the minimum number of multiplications required to compute the 871st power of a number? (Use repeated squaring as much as possible.) Solution. Exponents that are powers of 2 are easiest: m 2 requires one multiplication, m 4 two, m 8 three, and so on. One can compute m 2 k with k multiplications. Now any number N can be written as a sum of powers of 2 – this just corresponds to writing it in binary notation – and this enables m N to be expressed as a prod- uct of numbers of the form 2 k , for various k . The number of factors involved will be exactly the number of 1’s in the binary representation of N. Thus, for example, 871 = (1101100111) 2 tells us that m 871 = m 2 9 m 2 8 m 2 6 m 2 5 m 2 2 m 2 1 m 2 . Given that one has already calculated m 2 k i for i = 1 , 2 , . . . , s , to compute m 2 k 1 m 2 k 2 ··· m 2 ks requires a further s- 1 multiplications. So for 871 we need 9 multiplications to get m 2 9 , and in the process we get m 2 k for all k less than 9, and then we need another 6 multiplications after that, since there are seven 1’s in the binary representation of 871. So the answer to the present question is 15. The worst kind of number for this is a number one less than a power of 2, since all of the binary digits will then be 1. To compute m 2 k- 1 will take 2( k- 1) multiplications: k- 1 to compute m 2 k- 1 and all the earlier m 2 i ’s, and a further k- 1 to multiply them together. 2. ( i ) Using the Elgamal public key (47 , 5 , 2), encipher the “message” [12,26,33]. (The first step is to choose an arbitrary number less than 47. Choose 8.) ( ii ) Show that the private key for the public key in Part ( i ) is 18, and check your answer to Part ( i ) by deciphering the ciphertext you obtained....
View Full Document

{[ snackBarMessage ]}

### Page1 / 2

tut10sols - The University of Sydney MATH2068 Number Theory...

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

View Full Document
Ask a homework question - tutors are online