


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



Please put away all books, calculators, and other portable electronic devices—anything with an ON/OFF switch. You may refer to a single 2-sided sheet of notes. For numerical ques- tions, show your work but do not worry about simplifying answers. For proofs, write your arguments in complete sentences that explain what you are doing. Remember that your paper becomes your only representative after the exam is over.
Problem Your score Possible points 1 9 points
2 8 points 3 5 points 4 4 points
5 8 points 6 8 points 7 8 points
Total: 50 points
a. Alice checks that the gcd(m, n) is 1. Had this gcd been > 1, what urgent unencrypted message would Alice have sent to Bob?
YOU IDIOT: YOUR RSA MODULUS IS NOT SECURE. CHANGE IT IMMEDIATELY!!
b. What arithmetic operation does Alice perform to produce the encrypted message c that she will send to Bob?
She computes c = me.
c. Bob recovers m by raising c to a certain power. What power?
The inverse of e mod (61 − 1)(67 − 1) = 3960. This inverse is calculated by the Euclidean algorithm and turns out to be 233: 3960 = 17 · 232 + 16 = 17 · 233 − 1 and thus 17 · 233 = 1 + 3960.
sage: 1+1 #the input occurs on the lines beginning "sage:" 2 sage: K. = GF(27); K Finite Field in a of size 3^ sage: a.minimal_polynomial() x^3 + 2x + 1 sage: (a^2 + 2a + 2)^
We have a^3 + 2a + 1 = 0, i.e., a^3 = a − 1. Then
(a^2 + 2a + 2)^2 = a^4 + 4a^3 + 8a^2 + 8a + 4 = a^4 + a^3 − a^2 − a + 1 = (a^2 − a) + (a − 1) − a^2 − a + 1 = −a = 2a.
b. The session continues as follows:
sage: EllipticCurve(’11a’).change_ring(GF(3)).order() 5 sage: EllipticCurve(’11a’).change_ring(K).order()
What number does sage output in response to the second command?
In other words, if an elliptic curve has 5 points over the field with 3 elements, how many points does it have over the field with 27 elements? The same type of problem was on the exam last year. As explained in the textbook, one writes #E(Fp) = (1 − α)(1 − β), where αβ = p and α + β = 1 + p − #E(Fp); here p = 3 and E is the curve in question. Hence α + β = 4 − 5 = −1. We are looking for #E(Fp 3 ), which is then (1 − α^3 )(1 − β^3 ) = 1 + p^3 − (α^3 + β^3 ) = 28 − (α^3 + β^3 ). Now −1 = (−1)^3 = (α + β)^3 = α^3 + β^3 + 3αβ(α + β) = α^3 + β^3 − 9, so that α^3 + β^3 = 8. Hence the answer is 28 − 8 = 20.
sage: p=251; R=Integers(p); g = R(6); h= R(242) sage: log(R(2),g); log(R(3),g); log(R(5),g) # cf. solutions to MT 235 16 130 sage: for i in range(15): # 15 is around the square root of p ... print(i, h*g^(-i)) (0, 242) (1, 124) (2, 188) (3, 115) (4, 61) (5, 52) (6, 176) (7, 113) (8, 228) (9, 38) (10, 90) (11, 15) (12, 128) (13, 105) (14, 143)
Square the number to get a(p+1)/^2 = a(p−1)/^2 · a. Because a is a square, the first factor is 1 by Fermat’s Little Theorem.
c. Suppose now that p ≡ 5 mod 8. Show that a(p−1)/^4 is either +1 or −1. In the former case, show that a(p+3)/^8 is a square root of a mod p.
If you square a(p−1)/^4 , you get a(p−1)/^2 , which is 1 (as we just said). Hence a(p−1)/^4 must be a square root of 1, i.e., either +1 or −1. Assume that it’s +1 and square a(p+3)/^8. The result is a(p+3)/^4 = a · a(p−1)/^4 = a.
d. In the latter case, show that 2a · (4a)(p−5)/^8 is a square root of a mod p.
If you square the number, you get 4a^2 · 4 (p−5)/^4 · a(p−5)/^4 = 2(p−1)/^2 · a · a(p−1)/^4 = − 2 (p−1)/^2 a. However, 2 (p−1)/^2 = −1 by quadratic reciprocity, so the product simplifies to a. If you have studied the Tonelli–Shanks algorithm, you know that you start the algorithm by finding a non-square mod p. In general, you pick a random number mod p, check to see whether it’s a non-square and then move on to another random number if it’s in fact a square. In this situation, 2 is a non-square, so we don’t have to make random picks, and the equation p − 1 = 4 · (p − 1)/4 expresses p − 1 as the product of a power of 2 and an odd number.
[This problem is a paraphrase of a question about medical testing that was discussed in an April 15 New York Times blog post “Chances Are” by the Cornell mathematician Steven Strogatz. The blog explains that most doctors got the question wrong; one doctor became “visibly nervous” when seeing it. You can do better—Go Bears!]
Our probability space Ω is the set of 175-bit positive integers with the uniform distribution. Let’s consider the following two events: T is the set of integers in Ω that the test says are prime; A is the set of integers in Ω that are actually prime. Let C (for “composite” or “complement”) be the complement of A in Ω. Our
aim is to calculate the conditional probability Prob(A|T ) = Prob(A ∩ T ) Prob(T )
We have Prob(T ∩ A) = Prob(T |A) Prob(A),
where both factors are known to us. Similarly,
Prob(T ∩ C) = Prob(T |C) Prob(C),
and again both factors in the product are given to us in the problem. Also,
Prob(T ) = Prob(T ∩ A) + Prob(T ∩ C)
because T is the disjoint union of the two subsets in question. Hence we know both the numerator and denominator of the fraction Prob(T ∩ A) = Prob(T |A) Prob(A) and can thus get the answer by subsituting in numbers.
If I’m not mistaken, Prob(T ∩ A) = 0. 9 · 0 .008 and Prob(T ∩ C) = 0. 07 · 0 .992, so that
Prob(T ) = 0. 9 · 0 .008 + 0. 07 · 0 .992 = 0. 07664.
Thus our answer is (0. 9 · 0 .008)/ 0. 07664 ≈ 0 .0939, which is a little over 9.3 percent. Of course, you don’t have to simplify your answer, so writing the probability as a fraction involving a product and a sum of products is fine.