CS计算机代考程序代写 scheme . [2.5 marks] Let G:{0, 1}l {0, 1}n be a secure PRG. Is F(k) = 0||G(k)||1 a secure PRG? If it’s a secure PRG, provide brief explanation; if it’s not, provide an attack and computes the advantage of the attack. [The “||” here means connecting two bit sequences.]

. [2.5 marks] Let G:{0, 1}l {0, 1}n be a secure PRG. Is F(k) = 0||G(k)||1 a secure PRG? If it’s a secure PRG, provide brief explanation; if it’s not, provide an attack and computes the advantage of the attack. [The “||” here means connecting two bit sequences.]

2. [1.5 marks] Refer to the ECB mode example discussed in Thursday class, please show that CBC mode with a constant IV is not CPA secure. [hint: need to draw the adversary-challenger figure and calculate the adversary advantage]

3. [2 marks] Using ECB mode, students found that if they use a high-resolution BMP file, the encrypted results also look like noise. Please explain. [hint: the answer is in three sentences]

4. [2 marks] A message of 36 bytes is encrypted using 128-bit AES with the CBC mode. The padding scheme is PKCS#5. Please describe what the padding data are and how many bytes. (1 mark) (2) What if this message has 80 bytes? (1 mark)

5. [2 marks] Alice encrypts a message using the Counter (CTR) mode, and sends it to Bob. Mallory has intercepted the ciphertext. Although she does not know the entire message, she does know that the 17th byte of the plaintext is 1; she wants to change the value to something else (the rest of the messages should not be changed). Mallory does not know the encryption key, so she can only modify the ciphertext. How can she do that (1 mark)? And explain why (1 mark). [hint: the answer is in two sentences]