Guidelines:

  • Homework assignments are announced on the Blackboard with their deadlines, and must be submitted as PDF through the Blackboard. Assignments submitted by emails or any other means are NOT graded.
  • Before solving the homework problems, you are expected to do the weekly reading assignments and understand the related material.
  • An asterisk (*) indicates supplementary reading material.
  • The homework PDF file must have a header on the first page, and a header for each question. See HW-format. Please follow this format when you submit your homework in order to be graded. See also an example of a HW_Sample, which can be used as a template for your homework.
  • Late submission is subjected to a penalty if it is submitted by the cut-off time (usually 48 hours after the announced deadline).
  • Resubmission: If you submit a wrong file, or modify the solution after submission, you can resubmit within the deadline (at most twice). Only the latest submission on the Blackboard will be graded and late penalty may apply if resubmitted after the deadline.

Reading Assignment [Weeks 1-2]: Introduction to Cryptography, Modular Arithmetic, Prime Numbers.
Forouzan: Chapters 1 and 2.
Stallings: Chapter 1, Sections 2.1-2.4

Homework Assignment HW1:
Forouzan: Chapter 1. Exer: 1, 2, 7, 8(a).
Forouzan: Chapter 2. Exer: 12(a,b), 26, 40(b).
Stallings: Chapter 2. Exer: 2, 3(b,c), 7.
Extra Problems: (Required)
EP#1. Use modular arithmetic as explained in the class to compute the following (Show work for credit).
(a) 3456789 * 34567 (mod 9)
(b) 23456789 * 654321 (mod 11)
(c) 2640 * 3928 (mod 13)
EP#2. Use the extended Euclidean algprithms as explained in the class to find the mubliplication inverse of the following. Show the steps in equations (as show in the class), and verify you answers.
(a) 13 (mod 61).
(b) 58 (mod 147).
Total: 12 exercises.

Reading Assignment [Weeks 3-5]: Symmetric Cipher, Cryptanalysis, Perfect secrecy, Block Ciphers, DES, AES, Operation Modes.
Stallings: Chapter 3*
Forouzan: Chapters 3
BR: Sections 1.3*, 1.4*, 1.4.3
Stallings: Sections 4.1-4.2, (6.2-6.4,6.6)*, 7.1*
Forouzan: Section 5.1, Chapters 6, 7*, 8.
Course materials: Slide Lectures 03, 04, 06, 07, Demos: Enigma, AES.

Homework Assignment HW2:
Stallings: Chapter 3. Exer: 1, 2.
Stallings: Chapter 4. Exer: 1, 2.
Forouzan: Chapter 5. Exer 25, 27.
Forouzan: Chapter 8. Exer 13, 18, 19, 21.
Extra Problems:
EP#1. In Hill cipher, the ciphertext is computed by: C = PK (mod 26), where P is the plaintext matrix and K is the key. All computations are done in (mod 26) for English alphabet.
(a) Explain how Eve can break the system if enough plaintext-ciphertext pairs are provided.
(b) Give an example to illustrate your method in (a).
(c) Name the type of this attack?
(d) Explain any limitation that your method might have. Give an example to show the limitation.
EP#2. Consider a 24-bit ideal block cipher.
(a) What is the key size (the length of the key or number of bits in the key)?
(b) What is the size of the key-space? (How many keys are there?)
EP#3. Answer the following questions about AES:
(a) What are the main advantages and disadvantages of 3DES? How does AES keep the advantages and eliminate the disadvantages?
(b) What are the main requirements of AES stated by NIST?
(c) Briefly describe the 4 stages in the AES round?
(d) The 4 stages in the AES round together provide high security. Explain the weakness of each stage alone.
(e) What are the main strength points of the design of the S-box in AES?
Total: 13 exercises.

Reading Assignment [Weeks 6-7]: Fermat's Theorem, Modular Exponentiation, CRT, Group Theory, Subgroups, Euler's Theorem.
Stalling: Sections 2.4-2.7
Rosen: Chapter 4*
LNGT: Section 1.

Homework Assignment HW3:
Stallings: Chapter 2. Exer: 34, 35.
LNGT: Section 1. Exer: 1, 2, 3, 4, 5, 6(c,d), 7(a,b,c).
Extra Problems:
EP#1. Using Fermat's Little Theorem, answer the following without using a calculator. Show all steps for credit.
(a) Compute 4^255 (mod 13).
(b) Find x such that: x^75 = 8 (mod 37).
(c) Find x such that: x^71 = 4 (mod 37).
EP#2. Using Fermat's Little Theorem for primality test. Answer the following. Show work for credit.
(a) Test whether each of the following numbers is a prime: 101, 341, and 1105. Try at least two bases if needed, and state if the number is pseudoprime to any base you try. You may use a claculator to compute large powers.
(b) Find a composite number that is pseudoprime to base 3 and 7 but not pseudoprime to base 2.
EP#3. Apply the fast modular exponentiation algorithm (show the steps in a table) to compute:
(a) 3^5 (mod 11)
(b) 2^10 (mod 21)
Total: 12 exercises.

Reading Assignment [Weeks 8-9]: Cyclic Groups, Primitive Roots, Permutation Groups, Cayley Theorem.
LNGT: Sections 2, 3.

Homework Assignment HW4:
LNGT: Section 2. Exer: 3(a,b,c,f,g), 6(a,b), 7(a,c,e), 8(a,b), 9.
LNGT: Section 3. Exer: 4, 5, 6(b,c,e), 7, 8.
Total: 10 exercises.

Reading Assignment [Weeks 10-11]: Finite Fields, Public-Key Cryptography, RSA,
Stallings: Chapters 5*, 9.
Forouzan: Chapter 4, Section 10.2.
Course materials: Lecture 08, 09.

Reading Assignment [Weeks 12-13]: DLog, Diffie-Hellman, ElGamal, Digital Signature, DSS, Secure Hashing.
Stallings: Sections 10.1-10.2.
Stallings: Chapter 11*.
Stallings: Sections 13.1*, 13.2, 13.14.
Course materials: Lecture 10.

Reading Assignment [Weeks 14-15]: Blockchains, Integer Factorization, Zero-Knowledge Proofs.
Schneier: Secions 5.1, 5.2.
Almuhammadi: Security and Privacy Using One-Round ZKPs.
Course materials: PPT Slides Lectures 11, 12, and 13.

Homework Assignment HW5:
Q1. Apply the Shift-Xor algorithm to multiply P1=(00001101) by P2=(11001101) in GF(256) using the irreducible polynomial x^8 + x^4 + x^3 + x + 1 as a modulus. Show all the steps in a table as explained in the class.
Q2. Consider an RSA scheme with p = 5 and q =11.
(a) Compute the private key if the public key is 7.
(b) Encrypt the message M = 12 using the public key e = 7.
(c) Prove that computing the totient of n is equivalent to factorizing n in RSA.
Q3. In Diffie-Hellman key exchange protocol, suppose Alice and Bob choose the same private key. Answer the following questions with justifications.
(a) Will they be able to complete the protocol and get the same shared key at the end?
(b) Is the shared key remain secure in this case?
Q4. Consider ElGamal cryptosystem with the following parameters:
prime p = 19, generator g = 2, your private key is x = 6.
(a) Compute your public key.
(b) If you receive the ciphertext C = (14, 13), what is the plaintext?
(c) Encrypt the message M = 5 to Alice, with public-key = (23, 3, 4).
(d) Show that that if Eve can break Diffie-Hellman key exchange scheme in general, then she can also break ElGamal cryptosystem.
Q5. Consider ElGamal digital signature scheme with the following parameters:
prime p = 19, generator g = 2, your private key is x = 6, and Alice's public key is (p = 19, g = 2, y = 9).
(a) Sign the message digest M = 3 using your private key and random parameter k = 5
(b) If Eve gives you a signed document [M = 9, a = 2, b = 9] and she said that this document is signed by Alice. Is Eve telling the truth? How do you know?
(c) If Alice used the same random parameter (k) to sign two documents, can Eve break the system? Give an example of two signatures to justify your claim.
Q6. Answer the following about blockchain:
(a) How immutability is achieved in blockchains?
(b) What is the difference between tamper-evedient and tamper-proof?
(c) What is a decentralized ledger? Give one example.
Q7. Consider the message authentication schemes with secret and with digital signature:
(a) What is the difference between these schemes?
(b) Which scheme is more seucre? Why?
(c) Which scheme is better for a large group of people who send each other several messages a day? Why?
Q8. Answer the following about potential quantum attacks on today's cryptosystems.
(a) Explain the impact of Shor's algorithm on today's cryptosystems. Which of the schemes we covered in this course are effected? Which ones remain secure?
(b) Suppose Eve uses Shor's algorithm to break an RSA key (e = 5, and n = 247), and the quantum circuit finds the period of f(a = 7,N = 247) = 12. Compute the private key. Show work for credit.
Q9. Answer the following about Zero-knowledge proofs.
(a) What is the main reason behind the high cost associated with ZKPs in general?
(b) Consider the zero-knowledge proof of graph-isomorphism. If each graph has 128 nodes, compute the optimal number of rounds.
(c) Explain why ZKPs are needed in the setup of an RSA cryptosystem.
(d) Besides RSA, name three other applications that use ZKPs and explain why ZKP is needed in each case.
(e) What are the main requirements of a zero-knowledge proof?
Q10. Which of the following functions are negligible? Justify your answer in each case.
(a) f(n) = 1/log(n)
(b) f(n) = 1/(2n)
(c) f(n) = 1/(n^2)
(d) f(n) = n/(n!)
Total: 10 exercises.