1.1 Inverses
Explain why we need to find multiplicative inverses modulo a number.
Find 122-1mod 761, if possible, without using an inverse calculator. If not possible, explain what goes wrong in your calculations. If it is possible, make sure you show all of your calculations and justification.
Find 122-1mod 760, if possible, without using an inverse calculator. If not possible, explain what goes wrong in your calculations. If it is possible, make sure you show all of your calculations and justification.
1.2 Building Blocks
a) Suppose that a and b are relatively prime natural numbers such that ab is a perfect square. Show that a and b are each perfect squares.
Show that the converse to (a) holds, and does not require the condition that a and b are relatively
(Uses some Week 6 Information) Classify the integers numbers with rational and/or complex square roots (no proof is necessary). Draw a visual diagram or other picture that demonstrates the classification clearly.
2.1 Check Digits You have likely had the experience of entering a number in an internet form and it immediately coming back with an error message saying something like “number not valid”. How does it know that the number isn’t valid, even before connecting with its servers? It turns out that most long, multi-digit numbers — from drivers license numbers, library book numbers, transit pass numbers, tracking numbers, and lottery ticket numbers — employ check digits – extra digits that check to ensure that there are no errors in the previous ones. Usually these digits are obtained by adding or multiplying the other digits, and then taking the result modulo a number to end-up with a one-digit result. Check-Digit Scheme 1: if the ID number without the check-digit consists of the digits
al, a2, • • • , ak
we take Ei ai mod n or IL a, mod n for some small number n. Since we are dealing with large numbers, we’ll assume that k > 3.
a) Take a recent number that you were given (choose something not-too-secretive, like a tracking number) and speculate about whether the last digit could be a check-digit. If so, what could the operation and modulo be? Note that sometimes first or last digits are stripped from the calculation.
b) What is the greatest possible value of n so that the result of the calculation in check Digit Scheme 1 is a one-digit number? c) Now we introduce a new scheme Check-Digit Scheme 2: This scheme uses a weighing vector, (wi, w2, wk). If the ID number without the check-digits consists of al, a2, , ak, we compute
(ai,a2, • • • ak) • (w17w27• • •
mod n (al • wi,a2 • w2,…,ak • wk) mod n
to obtain the check digit. The ISBN system that catalogues all books uses a check-digit system. Find the weighting vector of the ISBN-10 system and check that the ISBN of a book that you have checks-out.
ItThroughout this problem we are using the same notation that we used in class and in the reading for RSA. tHow many of you made a mistake transcribing the number the first time?? This proves its usefulness!
d) We generally talk about two types of errors in transcribing numbers: either of the type where you write down the wrong number or where you swap the positions of the digits. What is the error-catching capability of Check-Digit Scheme 2? Can it catch ALL possible errors? The following theorem tells. us exactly what errors can be caught. Theorem 2.1. Suppose a number (tor • • a/ satisfies the condition (al, az • • • ak) • (wi, ta21. • • wk) = 0 mod n The single error obtained by substituting a’ for a is undetectable if and only (di — ai)wi is divisible by n. A single swapping error (where ei and aj are swapped) is undetectable if and only if (ai — ai)(wi — wi) is divisible by rt. e) At one point in Querbec, the weighting vector (12,11,10,…,2,1) was used for all drivers’ licenses while Newfoundlanders had the weighting vector (1, 2, 3, 4, 5, 6, 7, 8, 1) applied to their licenses. Which types of errors will the check-digit schemes avoid? (An easier way to answer might be: which ones will they miss? ) What about the ISBN system?
2.2 RSA, Uncovered In the following question we use standard notation to refer to RSA cryptography. a) Why do you need to make the numeric message m into smaller. messages if m > n? Answer this question by giving an example showing what happens when it does not get decomposed into smaller pieces; that is, give an example showing the case where m < n. You should choose a 2-digit n here. b) Demonstrate the importance of using very large numbers when generating keys by deducing the fol-lowing private keys, given the public keys below:
Person 71 e Amen 98662273 1313 Briana 99633329 2791 Cheng 222561187 52107
c) You have to compute a lot of powers when using RSA. How can you more efficiently compute powers like m8 by first computing powers like m2 (called the “square and multiply” technique). Using this technique, how many multiplications do you need to computer m100? Is there a larger power that requires the same number of multiplications?§
littps://www.overleal.com/project/63420ccbb3d93698dff26b40
3.1 Key Exchange The Diffie-Hellman Key Exchange System provides a way for two people – not just the sender of the message – to determine the keyword. Here is the Key Exchange system procedure: 1. Beth and Stephanie agree (Not privately – perhaps over the phone) on a prime number p and some arbitrary integer q with q < p. Since p is prime, gcd(p, q) = 1. 2. Beth and Stephanie privately choose integers b and s respectively with b < p and s < p. 3. Beth computes B = q”( mod p) and Stephanie computes S = q8( mod p). 4. Beth sends B to Stephanie and Stephanie sends S to Beth. 5. Beth computes Sb mod p and Stephanie computes 138 mod p. 6. Beth and Stephanie necessarily come up with the same answer. Call this answer K. 7. By some mutually agreed upon algorithm, the integer K is interpreted as a string of letters, the keyword for the Vigenere encipherment or some other system. I a) Prove that Beth and Stephanie come up with the same answer in step (6). b) In order to determine a key in this system, is it necessary for both Beth and Stephanie to determine primes p, q and integers I), s? Or, can they come up with a key with less information than this? c) How is this system secure? Would you recommend primes or numbers of a certain length? d) You receive the following message:
yasnblifkinvlbaxfj1
Yikes!! BUT… you know that the keyword is generated by a Diffie-Hellman key exchange with p = 4576384930643, q = 64783087731, and the private keys are 476388475629 and 2243552788. Suppose that the mutually agreed upon algorithm to interpret the integer K as a string of letters is the following: • If K contains an odd number of digits, add a 0 to the end • Decompose K into groups of two digits • Compute the value of each two-digit block mod 26 • Determine the letter occupying each alphabetic position in this string of letters (with A=1). Use this information to find the plaintext message.
!This explanation comes from Lewand