First Exam
First Exam
Q1 Q2 Q3 Q4 Q4 Total Grade
Question no
(20) (20) (10) (30) (30) 105
Grade
Problem 1) Let F be a PRF. Show that each of the following MACs is insecure, even if used to
authenticate fixed-length messages?
𝒎𝟏𝟐 = m1 , m2
𝒕𝟏𝟐 = 𝑭𝒌 (𝒎𝟏 ) ⊕ 𝑭𝒌 (𝒎𝟐 )
𝒎𝟐𝟏 = m2 , m1
𝒎𝟏𝟐 = m1 , m2
𝒕𝟏𝟐 = 𝑭𝒌(𝟏||𝒎𝟏 ) ⊕ 𝑭𝒌 (𝟐||𝒎𝟐 )
𝒎𝟏𝟑 = m1 , m𝑥
𝒎𝟏𝟑 = mx , m2
Quality_Assurance_Unit_Exam_Template_2008 2/4
Problem 3) Given are two protocols in which the sender’s party performs the following operation:
Where k is a shared secret key, and kpr is a private key of the sender (not shared with the receiver) and
kpub is a public key of the receiver.
- Decrypt y using the private key of the receiver 𝒌𝒑𝒓𝒓 to obtain 𝑯(𝒙)
- Hash 𝒙 to compare the result with 𝑯(𝒙)
The Frozen ElGamal Digital Signature differs, however, in the signing and the verification phases.
Quality_Assurance_Unit_Exam_Template_2008 4/4
Using padding oracle in CBC mode of encryption, assume that each block is 4 byte of data,
show the complete cryptanalysis steps to find the values of m[0]={2,5,2,1}
Quality_Assurance_Unit_Exam_Template_2008 5/4
𝑚03 = 𝑥03 ⨁𝐼𝑉3
𝑆𝑡𝑒𝑝 1: − ̅̅̅̅
𝐼𝑉3 = 𝐼𝑉3 ⨁𝑔3 ⨁1
𝑔3 = 𝟎 ==> ̅̅̅̅̅
𝑚03 = 𝑥03 ⨁𝐼𝑉3 ⨁𝑔3⨁1
𝑚03 = 𝑚03 ⨁𝑔3 ⨁1
̅̅̅̅̅
𝑚03 = 1⨁0⨁1 = 0
̅̅̅̅̅ Reject
𝑔3 = 𝟏 ==> ̅̅̅̅̅
𝑚03 = 𝑥03 ⨁𝐼𝑉3 ⨁𝑔3⨁1
𝑚03 = 𝑚03 ⨁𝑔3 ⨁1
̅̅̅̅̅
𝑚03 = 1⨁1⨁1 = 1
̅̅̅̅̅ Accept
𝑆𝑡𝑒𝑝 2: −
̅̅̅̅
𝐼𝑉3 = 𝐼𝑉3 ⨁1⨁2
𝑚03 = 𝑥03 ⨁𝐼𝑉3 ⨁1⨁2
̅̅̅̅̅
𝑚03 = 1⨁1⨁2 = 𝟐
̅̅̅̅̅
̅̅̅̅
𝐼𝑉2 = 𝐼𝑉2 ⨁𝑔2 ⨁2
𝑔2 = 𝟎 ==> ̅̅̅̅̅
𝑚02 = 𝑥02 ⨁𝐼𝑉2 ⨁𝑔2⨁2
𝑚02 = 𝑚02 ⨁𝑔2 ⨁2
̅̅̅̅̅
𝑚02 = 2⨁0⨁2 = 0
̅̅̅̅̅ Reject
𝑔2 = 𝟏 ==> ̅̅̅̅̅
𝑚02 = 𝑥02 ⨁𝐼𝑉2 ⨁1⨁2
𝑚02 = 𝑚02 ⨁1⨁2
̅̅̅̅̅
𝑚02 = 2⨁1⨁2 = 1
̅̅̅̅̅ Reject
𝑔2 = 𝟐 ==> ̅̅̅̅̅
𝑚02 = 𝑥02 ⨁𝐼𝑉2 ⨁2⨁2
𝑚02 = 𝑚02 ⨁2⨁2
̅̅̅̅̅
𝑚02 = 2⨁2⨁2 = 2
̅̅̅̅̅ Accept
Quality_Assurance_Unit_Exam_Template_2008 6/4
𝑆𝑡𝑒𝑝 3: −
̅̅̅̅
𝐼𝑉3 = 𝐼𝑉3 ⨁1⨁3
𝑚03 = 𝑥03 ⨁𝐼𝑉3 ⨁1⨁3
̅̅̅̅̅
𝑚03 = 1⨁1⨁3 = 𝟑
̅̅̅̅̅
̅̅̅̅
𝐼𝑉2 = 𝐼𝑉2 ⨁2⨁3
𝑚02 = 𝑥02 ⨁𝐼𝑉2 ⨁2⨁3
̅̅̅̅̅
𝑚02 = 𝑚02 ⨁2⨁3
̅̅̅̅̅
𝑚02 = 2⨁2⨁2 = 3
̅̅̅̅̅
̅̅̅̅
𝐼𝑉1 = 𝐼𝑉1⨁𝑔1 ⨁3
𝑔1 = 𝟎 ==> ̅̅̅̅̅
𝑚01 = 𝑥01 ⨁𝐼𝑉1 ⨁𝑔1⨁3
𝑚01 = 𝑚01 ⨁𝑔1 ⨁3
̅̅̅̅̅
𝑚01 = 5⨁0⨁3 = 6
̅̅̅̅̅ Reject
Quality_Assurance_Unit_Exam_Template_2008 7/4