CS代考程序代写 MATH/CSCI 4116 Cryptography Sample Midterm Exam
MATH/CSCI 4116 Cryptography Sample Midterm Exam
• This was an actual 60-minute midterm, written the last time I taught this course.
• Please keep in mind that this was a “closed-book”, in-class exam. So, while the material is a fair representation of what you can expect, some questions would not be suitable for an open-book exams.
• Since this exam was written later in the term, it included the material required to answer Question 7. Please disregard it.
• The value of each question is given in brackets. [Total: 25]
*****************************************
1. [2]
Describe the differences between a code and a cipher.
2. [3]
The Vigen`ere cipher, the Hill cipher, and the permutation cipher are not secure. Explain why.
3. [4]
(a) Find all the invertible residue classes mod 12 and their inverses.
(b) Determine the group of units and the zero divisors of Z/16Z.
4. [3]
Is security of the affine cipher with a given modulus m increased if one encryption is followed by a second encryption with a different key? Give details.
5. [5]
(a) State the definition (not a formula) of Euler’s φ-function.
(b) Find φ(2016). [Here you may use an appropriate formula].
(c) We know that φ(ab) = φ(a)φ(b) whenever gcd(a, b) = 1. Give an example that shows
that the identity is, in general, not true when gcd(a, b) ̸= 1.
6. [4]
Suppose that you know that a Hill cipher with alphabet Z26 and block length 2 is being used, and you have obtained the ciphertext string (7, 0, 13, 3), along with the corresponding plaintext string (5, 14, 14, 19). Find the key.
7. [4] [Disregard]
(a) Show that the polynomial x2 + x + 1 is irreducible over Z/2Z.
(b) Construct the multiplication table for the finite field GF(22), using the irreducible polynomial f(x) = x2 + x + 1.