Cryptography (COMP3223)"/>
Cryptography (COMP3223)
QQ: 942371102
Exercise 1: Alice and Bob want to communicate using the RSA cryptosystem. To do so, Alice chooses two large prime numbers p, q and computes the modulus n = pq.
a) Let ϕ(n) be Euler’s totient function, i.e. ϕ(n) returns the number of elements in the multiplicative group (Z ∗ n , ·).
Prove that if n = pq, where p, q are two prime numbers, then we have ϕ(pq) = (p − 1)(q − 1). [4 marks]
Hint: How many integers m between 1 and pq satisfy the condition gcd(m, pq) = 1?
b) Bob receives x = 18 and y = x d ≡ 324 (mod 697) as the RSA signature. Bob has the modulus n = 697 and the public key e = 33, but does not know Alice’s private key. Verify using the square-and-multiply algorithm that Alice’s signature is correct. Show all steps of the computation. [3 marks]
Exercise 2: The following exercises are on prime numbers.
a) Use the Miller-Rabin Primality Test to test whether n = 1105 is a prime. Choose the exponent a = 7.
b) Eve is given a large composite number n = p × q. She attempts a brute force approach to finding a factor of n by testing whether p divides n for p = 2, 3, 5, 7, . . . until she finds a factor p | n. Prove that Eve has to test at most
d = 2^(b/2+1)/bln2
factors until she finds p | n, where b ≈ log2 (n) is the approximate number of bits in n.
Exercise 3: Alice wants to use the following hash function: Given a prime number p, a generator g ∈ Z ∗ p , and a message of length n consisting of values xi ∈ Zp for i = 1, 2, . . . , n, compute the hash h : Z n p → Zp as
a) Show that this hash function is not cryptographically secure because it fails the second pre-image test. Assume you are given a message x with hash h(x) and use this information to construct a different message x 0 with the same hash, h(x 0 ) = h(x).
b) Show that finding a pre-image x = h −1 (y) for this hash function is at most as hard as computing a discrete logarithm in Z ∗ p . Hint: Assume you are given y and n, and construct x ∈ Z n p such that y = h(x).
更多推荐
Cryptography (COMP3223)
发布评论