






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!







University of California, Irvine COMPSCI 134: Elements of Cryptography and Computer and Network Security Midterm Exam (Fall 2016) Duration: 90 minutes November 2, 2016, 7pm-8:30pm
Name (First, Last): UCI ID Number:
UCI ID Number:
UCI ID Number:
encrypting m using CFB mode and using the last block as MAC.
it exposes duplicate plaintext blocks.
The formula for decrypting [k, c] is (kx)−^1 · c mod p.
Recall that the parameters of ElGamal Public Key Cryptosystem are: p is a large prime, b is a generator in Zp,
x is a private exponent and y = bx^ mod p is the public key.
UCI ID Number:
Consider the “Plaintext Feedback” (PFB) mode where the encryption formula for ciphertext block Ci is:
Ci = EK (Pi) ⊕ Ci− 1 , C 0 = IV and E() can be any strong block cipher, e.g., AES.
Answer the following questions.
(a) (3 pts) What is the formula for decrypting ciphertext block Ci?
(b) (3 pts) Explain the precise consequence of the loss of ciphertext block Ci. Assume a decryptor is aware of that loss (i.e., knows the index, i, of the lost block).
(c) (3 pts) Are there any security problems in PFB mode? If so, identify one problem and briefly justify your answer. If not, explain why there are no problems.
Solution:
Solution:
(a) Pi = DK (Ci ⊕ Ci− 1 )
(b) Pi and Pi+1 are lost.
(c) It exposes IV and duplicate plaintext blocks, e.g., P consists of three plaintext blocks and all of them are the same. P = P 1 ‖P 2 ‖P 3 = P 1 ‖P 1 ‖P 1 , then EK (P ) = C 1 ‖IV ‖C 1 , where C 1 = EK (P 1 ) ⊕ IV.
UCI ID Number:
(a) (3 pts) Explain how an adversary can recover the secret key (i.e., x) when the signer reuses the same random number r for two different messages. State your assumptions.
(b) (3 pts) Consider a variant of ElGamal signature scheme where m and r are swapped in the signing algorithm, i.e., a digital signature of message m is: [k, c] = [br^ mod p, (r − x · k) · m−^1 mod p − 1]. What is the formula for verifying the signature [k, c] in this variant?
(c) (3 pts) Are there any security problems in the variant, described in (b)? If so, identify one and briefly justify it. If not, explain why not. (Note that in this question, you cannot assume that the signer will reuse the same random number r.)
(Hint: This is a digital signature scheme, so a message needs to be sent along with its signature. Or simply put, in this scheme, a message is always visible to public and thus also to the adversary.)
UCI ID Number:
Solution:
Solution:
(a) Consider two signatures [k, c 1 ] and [k, c 2 ] for messages m 1 and m 2 respectively. c 1 − c 2 = (m 1 − x · k − m 2 + x · k) · r−^1 mod p − 1 (c 1 − c 2 ) · r = (m 1 − m 2 ) mod p − 1 Assume (c 1 − c 2 ) has an inverse in mod p − 1. r = (c 1 − c 2 )−^1 · (m 1 − m 2 ) mod p − 1 Once you learn r, it is easy to find x: x = (m 1 − c 1 · r) · k−^1 mod p − 1.
(b) k = bmc^ · yk^ mod n. This is because bmc^ · yk^ = br−x·k^ · yk^ = br^ · b−xk^ · bxk^ = br^ = k mod n.
(c) An adversary can forge a signature of any message if he knows one legitimate signature of one message. A signature of any message m′, given m and [k, c] is [k, c · m · m′−^1 ] = [k, (r − x · k) · m′−^1 ].
UCI ID Number:
Consider the following identification scheme (known as Guillou-Quisquater scheme) which is also another example of a zero-knowledge proof. For simplicity, assume there is only one honest prover and one honest verifier in this scheme.
The scheme starts by having a trusted third party (TTP) generate a large composite number n, which is a product of two primes p and q. In addition, TTP generates a public RSA exponent e and a private RSA exponent d. TTP publishes n and e but keeps p, q and d secret. Suppose a prover’s public identity (e.g., name or phone number) is I. TTP then gives the prover the value B = I−d^ mod n, which is served as his/her secret.
The identification protocol then cosists of 4 steps and can be described as follows:
Question:
(a) (3 pts) Mathematically show that T = Ic^ · te^ mod n.
(b) (3 pts) Suppose VRF knows a factor modulus (p and q). Explain how VRF can learn PRV’s secret (i.e., B) from this protocol. (Hint: e is a public RSA exponent and I is PRV’s public identity)
(c) (3 pts) Suppose a malicious prover (PRVm) knows c ahead of time (i.e., before the start of the protocol). Explain how PRVm can impersonate PRV without needing to know B, d, p or q.
UCI ID Number:
Solution:
Solution:
(a) T = re^ = (t · B−c)e^ = te^ · B−ec^ = te^ · Iedc^ = te^ · Ic^ mod n since e · d = 1 mod (p − 1)(q − 1).
(b) Since e is public, learning p and q will allow you to find e−^1 or d via EEA. Once you find d, you can compute q = Id^ mod n and thus B = q−^1 = (Id)−^1 = I−d^ mod n since I is also public.
(c) If PRVm knows c in advance, he will then send T = Ic^ mod n and t = 1 to VRF in step 1 and 3 respectively. VRF accepts the identification because te^ · Ic^ = Ic^ = T mod n.