Mathematics 360 Homework (due Nov 6) 47) A. Hulpke

advertisement
Mathematics 360
Homework (due Nov 6)
A. Hulpke
47) For a prime p with primitive root g, determine the discrete logarithm of p − 1 for base g modulo p. (Hint: What
is OrderMod p (p − 1) = OrderMod p (−1)?)
48) Let p = 1297 with p − 1 = 24 34 . Then g = 10 is a primitive root modulo p and a = 9 ≡ 1016 (mod p) fulfills
that OrderMod p (a) = 81. We also are given the information that b = 597 has OrderMod p (b) = 81. Using the “HenselLifting” approach from the lecture, determine an exponent e such that a e ≡ b (mod p).
49) Consider the following 3 prime numbers (you may take primality, and the listed prime factorizations of p − 1 as
given):
p1
= 258280327 = 2 ⋅ 317 + 1,
p2
= 258280367 = 2 ⋅ 151 ⋅ 863 ⋅ 991 + 1,
p3
= 258281567 = 2 ⋅ 4003 ⋅ 32261 + 1,
For which p i is a discrete logarithm calculation easiest, using the algorithms we know? For which p i is it hardest?
Explain your reasoning.
50) An overly organized office has a fire drill every 7 days, an organization meeting every 12 days and a review every
95 days. There was a fire drill 2 days ago, an organization meeting 7 days ago and a review yesterday. In how many days
will all three events happen on the same day?
51) One use of the Chinese remainder theorem is to calculate with larger numbers on a computer. If we need numbers
that are larger than what the processor can represent, we usually in some base b (e.g. the processor register size) and
write numbers in “digits” in this base (i.e. we write n = a 0 + a 1 b + a 2 b 2 + ⋯). Instead, we could choose a number of
primes p 1 , ⋯, p k such that any number in the result is smaller than p 1 ⋅⋯⋅ p k and represent a number n by the remainders
n mod p 1 , n mod p 2 , and so on. Arithmetic then happens in parallel modulo each prime.
Two main advantages of this approach are that there is no carry in the arithmetic; furthermore the calculations modulo
different primes can be parallelized trivially.
As an example of this, let d = det(A) where
⎛
⎜
A=⎜
⎜
⎝
1 20
9 7
3
5
7
3
10
16
18
18
10
20
12
17
⎞
⎟
⎟.
⎟
⎠
You are given the information1 that 0 ≤ d < 10.
Calculate the determinant of A modulo 2 and modulo 5 and reconstruct det(A) from this.
52) a) Determine all n such that φ(n) = 2. (Bonus: Do you recognize these numbers n from trigonometry?)
b) Determine all n such that 2φ(n) = n.
Practice Problems:
1 There
2.18, 2.19, 2.28, 3.4,
are bounds for the size of the determinant based on the entry size, e.g. the Hadamard Bound
Sample Midterm Problems
Midterm 2 (on November 8) will follow roughly the same pattern as midterm 1. These sample problems are more
computation intensive than the exam. I will assume that you know the formulae for φ(n) (given a prime factorization
of n) and for OrderMod p (a k ). The following problems give some idea on what could be on the exam, of course all
homework problems (unless explicitly excluded) are relevant (but the concrete problems often are too hard for an exam).
1) Let p = 463 (which is prime) with primitive root 3. Determine the discrete logarithm of 52 to base 3 mod p, using
the Pohlig-Hellman algorithm with p − 1 = (3 ⋅ 7) ⋅ (2 ⋅ 11). (Note that a naive Babystep-Giantstep algorithm will take
too long as it will require you to calculate almost 50 powers.)
2) Ernie, Bert and the Cookie Monster want to measure the length of Sesame Street. Each of them does it his own way.
Ernie relates:“I made a chalk mark at the beginning of the street and then again every 7 feet. there were 2 feet between
the last mark and the end of the street.” Bert tells you:“Every 11 feet there are lamp posts in the street. The first is 5 foot
from the beginning and the last one is exactly at the end of the street.” Finally the Cookie Monster says: “starting at the
beginning of Sesame Street, I put down a cookie every 13 feet. I ran out of cookies 22 feet from the end.” All three agree
that the length does not exceed 1000 feet. How many feet is Sesame Street long?
3) Let p = 1009, then p is prime, p − 1 = 24 32 7 and 11 is a primitive root modulo p. Determine all e such that
OrderMod p (11 e ) = 3.
4) Let p = 811, a = 39 and b = 49. Then OrderMod p (a) = 81 and OrderMod p (b) = 27.
a) Explain why there must be an e such that a e ≡ b (mod p)
b) Using the “Hensel-Lifting” approach from the lecture, calculate this exponent e (Note that the known orders already
simplify the task!).
5) Let gcd(a, p) = 1 and OrderMod p (a) = x ⋅ y with gcd(x, y) = 1. Let c ≡ a x mod p, d ≡ a y mod p. Show that there
exist e, f such that a ≡ c e ⋅ d f (mod p).
6)
For n = 58 , how many 1 ≤ a < n exist such that gcd(a, n) = 1?
7) You are participating in a Diffie-Hellman key exchange for p = 223 = 2 ⋅ 3 ⋅ 37 and g = 3. You have chosen the secret
exponent a = 9.
a) What number should you send to your partner?
b) Your partner sends you the number 184. What is the secret key shared by your partner and you? Explain the calculations you are doing.
c) Why is your partner stupid? Explain!
8) Let p = 41 = 23 5 + 1 and g a primitive root modulo p.
a) What are the possible orders OrderMod p (a) for 1 ≤ a < p?
b) For each possible order, find a representative, expressed as power of g.
9) Let gcd(a, p) = 1 and OrderMod p (a) = x ⋅ y with gcd(x, y) = 1. Let c ≡ a x mod p, d ≡ a y mod p. Show that there
exist e, f such that a ≡ c e ⋅ d f (mod p).
Download