COM6103
Big Data Security and Privacy
2022/23 Semester 2
In-class Assignment 1
Lecture 2
Symmetric cryptography
Save all answers in an ipynb file and name it YourSID_YourName_In-class1.ipynb , e.g., s123456_ZHANG_Chen_In-class1.ipynb . Submit the ipynb file to Moodle.
Question 1.
Alice and Bob work for a real estate agent. Eve is an ex-security engineer.
Q1. Eve has tricked Alice into decrypting a bunch of ciphertexts that Alice encrypted last month but forgot about. What type of attack is Eve employing?
Q2. Eve has an antenna that can pick up Alice's encrypted cell phone conversations. What type of attack is Eve employing?
Q3. Eve has bet Bob that she can figure out the AES secret key he shares with Alice if he will simply encrypt 20 messages for Eve using that key. For some unknown reason, Bob agrees. Eve gives him 20 messages, which he then encrypts and emails back to Eve. What kind of attack is Eve using here?
-----------------------------------------------------------------------------------------------------------------
Question 2.
Consider two messages and , each of n blocks : = ||||..|| and M2 = ||||..||, where and differ only in the first block. Assume the same key is used for all encryptions. Which of the following statements hold? Please explain our answer.
Q1. If and are encrypted using electronic code book mode (ECB), none of the cipher text blocks will repeat between each message.
Q2.If and are encrypted using cipher block chaining (CBC), but the same initialization vector (IV) is used for encrypting both messages, none of the ciphertext blocks will repeat between each message.
-----------------------------------------------------------------------------------------------------------------
Question 3. Hand-on exploration
Encrypt the data with CBC mode. See In-Class Assignment 1.ipynb for details.
Demo:
Hint: the parameter ‘cipher.iv’ is required in decryption.
- End-