Crypt Assignment 4
Crypt Assignment 4
1. I proudly announce my RSA number N = 1, 689, 786, 806, 723 is far too hard to
factor on your calculator. I tell you it is made from a twin prime pair, in other words
N = p(p + 2). Prove me wrong by factoring this number using only a calculator.
2. Let N = pq with p and q distinct primes. Show that if q > 9p then √ Fermat’s
factorisation test is quicker than the variant (where you search for T > 2 N such
that T 2 − 4N is also a square.)
and
1
Cryptography Assignment 4
(e) One of the key reasons why the quadratic sieve works is that for an integer N,
if there exists integers x and y such that
x2 ≡ y2 (mod N)
but
x . ±y (mod N)
then N is composite. Prove this fact.
7. By calculating 3n (mod 41) and 6n (mod 41) for a few (well-chosen) n, show one
of them is a primitive root mod 41 and one of them is not. How many primitive
roots are there mod 41?
8. Knowing that the prime 101 has a primitive root 2, and knowing that
9. The prime 101 has a primitive root 3. Knowing that dlog101,3 (2) = 29 find the
discrete log of 4, 8 and 16 with respect to 3 modulo 101. Find the multiplicative
inverse of 3 modulo 101. Hence find dlog101,3 (68).
10. Alice and Bob wish to share a secret key using Diffie-Hellman. They choose the
prime p = 83 and the primitive root g = 5. Alice chooses her secret exponent to be
a = 9 and Bob chooses his secret exponent to be b = 10. What does Alice send to
Bob? What does Bob send to Alice? What is their secret key?
11. The Diffie-Hellman algorithm works on any cyclic group. Describe the analogous
algorithm on the group Z/nZ (that is the integers mod n, with the group operation
of addition mod n). Explain how this form of the algorithm is completely insecure,
and anybody could find the shared “secret”.