wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Cryptography

Total questions: 80

Worksheet time: 41mins

Name
Class
Date
1.

Consider the Vigenere cipher over the lowercase English alphabet, where the key length can be anything from 8 to 12 characters. What is the size of the key space for this scheme?

a)

4 * 26^12

b)

26!

c)

26^12

d)

26^8 + 26^9 + 26^10 + 26^11 + 26^12

2.

Consider the Vigenere cipher over the lowercase English alphabet, where the key has length 8. For which of the following message spaces will this scheme be perfectly secret? (Check all that apply.)

a)

The set of all 8-character strings of lowercase English letters.

b)

The set of all 9-character strings of lowercase English letters.

c)

The set of all strings of lowercase English letters containing at most 8 characters.

d)

The set of all 7-character strings of lowercase English letters.

3.

What is the result of encrypting the ASCII plaintext 'cool!' using the variant Vigenere cipher (where encryption is done using byte-wise XOR) and key 0x01 3F?

a)

0x26 05 E6 35 02

b)

0x63 6F 6F 6C 21

c)

0x62 50 6F 6C 21

d)

0x62 50 6E 53 20

4.

Say we have a scheme with a claimed proof of security with respect to some definition, based on some assumption. The scheme was successfully attacked when used in the real world. What are possible reasons for this? (Check all that apply.)

a)

The proof might be incorrect.

b)

The definition of security may not correctly capture the real-world threat model.

c)

The assumption may be false.

d)

The attacker did not read the proof of security.

5.

In the definition of perfect secrecy, what threat model is assumed?

a)

The attacker can eavesdrop on a single ciphertext.

b)

The attacker is able to interfere with the communication channel between the two honest parties.

c)

The attacker can eavesdrop on as many ciphertexts as it likes.

d)

The attacker can carry out a chosen-plaintext attack.

6.

Consider the Vigenere cipher over the lowercase English alphabet, where the key can have length 1 or length 2, each with 50% probability. Say the distribution over plaintexts is Pr[M='aa'] = 0.4 and Pr[M='ab'] = 0.6. What is Pr[C='bb']? Express your answer to 4 decimal places with a leading 0, i.e., if your answer was 1/2 then you would enter 0.5000 (without a trailing period).

a)

0.01

b)

0.0001

c)

0.0084

d)

0.0072

7.

Consider the Vigenere cipher over the lowercase English alphabet, where the key can have length 1 or length 2, each with 50% probability. Say the distribution over plaintexts is Pr[M='aa'] = 0.4 and Pr[M='ab'] = 0.6. What is Pr[M='aa' | C='bb']? Express your answer to 4 decimal places with a leading 0, i.e., if your answer was 1/2 then you would enter 0.5000 (without a trailing period). Note: carry out the calculation exactly (i.e., do not use the truncated result that you entered as your answer in the previous question) before truncating your answer to 4 decimal places.

a)

0.9473

b)

0.1

c)

0.0024

d)

0.4839

8.

Which of the following are true for obtaining perfect secrecy using the one-time pad, assuming the message space contains messages all of some fixed length? (Check all that apply.)

a)

The all-0 key must be avoided, since when the all-0 key is used the ciphertext is equal to the message being encrypted.

b)

The key should be shared between the two communicating parties, and kept secret from any potential attacker.

c)

The key must be as least as long as the messages in the message space.

d)

The key should be chosen uniformly.

9.

Consider the one-time pad over the message space of 5-bit strings, where Pr[M=00100] = 0.1 and Pr[M=11011] = 0.9. What is Pr[C=00000]? Express your answer to 5 decimal places with a leading 0. I.e., if your answer was 1/2, then you would enter 0.50000 (without a trailing period).

a)

0.0107

b)

0.03125

c)

0.93481

d)

0.83459

10.

Which of the following are true about the Vigenere cipher? (Check all that apply.)

a)

The Vigenere cipher is computationally infeasible to break if the key has length 100, even if 1000s of characters of plaintext are encrypted.

b)

The Vigenere cipher is perfectly secret if the length of the key is equal to the length of the messages in the message space.

c)

The Vigenere cipher can always be broken, regardless of the length of the key and regardless of the length of plaintext being encrypted.

d)

A Vigenere cipher with key of length 100 can be broken (in a reasonable amount of time) using exhaustive search of the key space.

11.

Two ASCII messages containing English letters and spaces only are encrypted using the one-time pad and the same key. The 10th byte of the first ciphertext is observed to be 0xB7 and the 10th byte of the second ciphertext is observed to be 0xE7. Let m1 (resp., m2) denote the 10th ASCII character in the first (resp., second) message. What is the most you can conclude about m1 and m2?

a)

Nothing can be determined about m1 or m2 since the one-time pad is perfectly secret.

b)

m1 is the character 'p' and m2 is the space character.

c)

m1 is the space character and m2 is the character 'p'.

d)

One of m1 or m2 is the space character, and the other is the character 'p'.

e)

m1 is the character 'B' and m2 is the character 'E'.

12.

Three ASCII messages containing English letters and spaces only are encrypted using the one-time pad and the same key. The 10th byte of the first ciphertext is observed to be 0x66, the 10th byte of the second ciphertext is observed to be 0x32, and the 10th byte of the third ciphertext is observed to be 0x23. Let m1 (resp., m2, m3) denote the 10th ASCII character in the first (resp., second, third) message. What is the most you can conclude about m1, m2, and m3?

a)

Exactly one of m1, m2, or m3 is the space character, but nothing else can be determined.

b)

m1 is the character 't', m2 is the space character, and m3 is the character 's'.

c)

m1 is the space character, m2 is the character 't', and m3 is the character 'e'.

d)

Nothing can be determined about m1, m2, or m3 since the one-time pad is perfectly secret.

13.

Which of the following is true about computational secrecy? (Select all that apply.)

a)

Computational secrecy only ensures secrecy against attackers running in some bounded amount of time.

b)

Computational secrecy means that it is trivial for an attacker to always learn the entire message.

c)

Computational secrecy allows an attacker to learn information about the message with small probability.

d)

Computational secrecy currently relies on unproven assumptions.

14.

Let G be a function mapping n-bit inputs to 2n-bit outputs. Which of the following is true of the pseudo one-time pad encryption scheme based on G? (Check all that apply.)

a)

The scheme is perfectly secret.

b)

The scheme is computationally secret if G is a pseudorandom generator.

c)

The scheme can be used securely to encrypt multiple messages using the same key.

d)

The key space of the scheme is at least as large as the message space.

15.

Which of the following attackers can be used to demonstrate that the shift cipher for 3-character messages does not satisfy perfect indistinguishability?

a)

Output m0 = 'aaa' and m1 = 'abc'. Given challenge ciphertext C, output 1 if the three characters of C are all different.

b)

Output m0 = 'aaa' and m1 = 'bbb'. Given challenge ciphertext C, output 0 if the first character of C is 'a'.

c)

Output m0 = 'aaa' and m1 = 'abc'. Given challenge ciphertext C, output 0 if the first character of C is 'a'.

d)

Output m0 = 'abc' and m1 = 'bcd'. Given challenge ciphertext C, output 1 if the three characters of C are all different.

16.

Which of the following is a negligible function? (Check all that apply.)

a)

f(n) = n/2^n

b)

f(n) = 1/n.

c)

f(n) = 1/2^n

d)

f(n) = 1/2

17.

Define the following function G taking n-bit inputs and producing (n+1)-bit outputs: G(x)=x∥0, where ∥ denotes concatenation. Which of the following attackers shows that this G is not a pseudorandom function?

a)

On input an (n+1)-bit string y, output 1 if the first bit of y is 0.

b)

On input an (n+1)-bit string y, output 0 if the first bit of y is 0.

c)

On input an (n+1)-bit string y, output 0 if the last bit of y is 0.

d)

On input an (n+1)-bit string y, output 0 if the first bit of y is equal to the last bit of y.

18.

Say G is a pseudorandom generator taking n-bit inputs and producing 2n-bit outputs. Which of the following are necessarily true? (Check all that apply. The symbol '|' is used here for string concatenation.)

a)

G(r) | G(r+1) is computationally indistinguishable from a uniform, 4n-bit string if r is a uniform n-bit string.

b)

G(0 | r) is computationally indistinguishable from a uniform, 2n-bit string if r is a uniform (n-1)-bit string.

c)

r | G(r) is computationally indistinguishable from a uniform, 3n-bit string if r is a uniform n-bit string.

d)

G(r) is computationally indistinguishable from a uniform, 2n-bit string if r is a uniform n-bit string.

19.

Which of the following is a setting in which a pseudorandom generator could be applied?

a)

You have a 1 MB file and you would like to make sure that it has not been tampered with.

b)

You have a 1 MB file that you would like to compress.

c)

You have a way to generate random bits at the rate of 100 bits/second, but you need 1,000,000 random bits to run a statistical simulation.

20.

Consider a pseudo one-time pad encryption scheme Π constructed using some function G. Which of the following did our proof of security for the pseudo one-time pad show?

a)

If G is a pseudorandom generator, then Π is computationally secret.

b)

Π is always computationally secret, for any G.

c)

If G is a pseudorandom generator, then Π is perfectly secret.

d)

Π is always perfectly secret, for any G.

21.

True or false: any private-key encryption scheme that is CPA-secure must also be computationally indistinguishable.

a)

True

b)

False

22.

True or false: any private-key encryption scheme that is CCA-secure must also be perfectly secret.

a)

True

b)

False

23.

True or false: any private-key encryption scheme that is CCA-secure must also be CPA-secure.

a)

True

b)

False

24.

Let F be a block cipher with 128-bit block length. Consider the following encryption scheme for 256-bit messages: to encrypt message M=m1∥m2 using key k (where m1=m2=128), choose random 128-bit r and compute the ciphertext. Which of the following strategies would lead to a valid chosen-plaintext attack?

a)

Choose random r and let m be arbitrary but not equal to r. Output messages Mo = r||m and M1 = m||m. Output 0 if the second block of the challenge ciphertext is all-0s.

b)

Let m1 and m2 be arbitrary but distinct. Using the encryption oracle, obtain an encryption r||c1||c2 of m1||m2. Output messages M0 = m1||m2 and M1 = m2||m1. Output 0 if the third block of the challenge ciphertext is c2.

c)

There is no attack; this scheme is randomized, so it is CPA-secure.

d)

Let m1 and m2 be arbitrary but distinct. Using the encryption oracle, obtain an encryption r||c1||c2 of m2 || m2. Output messages M0 = m1||m1 and M1 = m1||m2. Output 0 if the third block of the challenge ciphertext is c2.

25.

Let F be a pseudorandom function with 128-bit key and 256-bit block length. Which of the following functions G are necessarily pseudorandom generators? (Select all that apply.)

a)

G(x) = F.(0...0)|F.(1...1), where x is a 128-bit input.

b)

G(x) = F,(0...0)| F,(0...0), where x is a 128-bit input.

c)

G(x) = F.(0...0), where x is a 128-bit input.

d)

G(x) = F0...0(x)| F1...1(x), where x is a 256-bit input

26.

Define the keyed function F as follows: Fk(x) = f O x. Which of the following distinguishers demonstrates that F is not a pseudorandom function?

a)

Given access to an oracle g, query y = g(0... 0). Then output 1 if and only if the first bit of y is equal to 1.

b)

Given access to an oracle g, query g(0 ... 0). Then output 1 because we now have the key.

c)

Given access to an oracle g, query y = g(0...0) and y' = g(0...0). Then output 1 if and only if y = у'.

d)

Given access to an oracle g, query y0 = g(0...0) and y1 = g(1... 1). Then output 1 if and only if Y0 ⊕ У1 = 1... 1.

27.

Let F be a block cipher with n-bit block length. Consider the following encryption scheme: to encrypt a message viewed as a sequence of n-bit blocks m1,m2,...,mt using a key k, choose a random n-bit value r and then output the ciphertext r,Fk(r+1+m1),Fk(r+2+m2),...,Fk(r+t+mt), where addition is done modulo 2n. Which of the following attackers demonstrates that this scheme is not computationally indistinguishable:

a)

Choose random n-bit blocks m and m', and output Mo = m, m and M1 = m, m'. Given challenge ciphertext r, C1, C2, output 1 if and only if c1 = C2.

b)

Let m be an arbitrary n-bit block, and output Mo = m, m and M1 = m, m - 1. Given challenge ciphertext r, C1, C2, output 1 if and only if c1 = C2.

c)

Let m be an arbitrary n-bit block, and output Mo = m and M1 = m, m. Given a challenge ciphertext, output 0 if the challenge ciphertext contains 2 blocks, and output 1 otherwise.

d)

Choose random n-bit blocks m1, m2, m3, m4, and output Mo = m1, m2 and M1 = m3, m4. Given challenge ciphertext r, C1, C2, output 0 if r = 0.0, and output 1 otherwise.

28.

Say we use CBC-mode encryption based on a block cipher with 256-bit key length and 128-bit block length to encrypt a 512-bit message. How long is the resulting ciphertext?

a)

768 bits

b)

Not enough information to determine.

c)

512 bits

d)

640 bits

29.

Assume an honest user wants to send an 8-bit integer to their bank indicating how much money should be transferred to the bank account of an attacker. The user uses CTR-mode encryption based on a block cipher F with 8-bit block length. (Yes, this is a made-up example.) The attacker knows that the amount of money the user wants to transfer is exactly $16, and has compromised a router between the user and the back. The attacker receives the ciphertext 10111100 01100001 (in binary) from the user. What ciphertext should the attacker forward to the bank to initiate a transfer of exactly $32?

a)

10111100 01010001

b)

10111100 00100000

c)

01100001 10111100

d)

10001100 01100001

30.

Assume CTR-mode encryption with PKCS #5 padding and a block cipher with 8-byte block length. Say a 4-byte message is encrypted, resulting in ciphertext 0x00 01 02 03 04 05 06 07 00 01 02 03 04 05 06 07. Which of the following ciphertexts will NOT yield an error upon decryption?

a)

0x00 01 02 03 04 05 06 07 00 01 02 03 04 05 06 F7

b)

0x00 01 02 03 04 05 06 07 00 01 02 03 04 05 07 07

c)

0x00 01 02 03 04 05 06 07 00 01 02 03 05 05 06 07

d)

0x00 01 02 03 04 05 06 07 00 01 02 04 04 05 07 07

31.

True or false: CBC-mode encryption with PKCS #5 padding provides message integrity, as long as the receiver makes sure to verify the padding upon decryption.

a)

True

b)

False

32.

Let F be a block cipher with n-bit block length. Consider the message authentication code for 2n-bit messages defined by Mack(m1,m2)=Fk(m1⊕m2). Which of the following gives a valid attack on this scheme?

a)

Obtain tag t on message m, 0 ... 0 (with m≠0...0), and then output the tag t on the message 0...0,0...0.

b)

Obtain tag t on message m1​,m2​ (with m1​≠m2​), and then output the tag t on the message m2​,m1​.

c)

Obtain tag t on message m,m, and then output the tag 0...0 on the message 0...0,m.

d)

Obtain tag t on message m,0...,0, and then output the tag t⊕(1...1) on the message m,1...1.

33.

Let F be a block cipher with n-bit block length. Consider the message authentication code for 2n-bit messages defined by Mack(m1,m2)=Fk(m1)⊕Fk(m2). Which of the following gives a valid attack on this scheme?

a)

There is no attack; the scheme is secure.

b)

Output the tag 0...0 on the message 0...0,0...0.

c)

Obtain tag t on the message 0...0,1...10...0,1...1, and output the tag t⊕(1...1) on the message 1...1,1...11... 1,1...1.

d)

Obtain tag �t on the message 0...0,1...10...0,1...1, and output the tag t⊕(1...1) on the message 1...1,0... 01...1,0...0.

34.

Assume a sender and receiver use basic CBC-MAC but authenticate/accept messages of different lengths. Which of the following is a valid attack?

a)

Obtain tag t1​ on message m1​, and tag t2​ on message m1​,m2​. Then output the tag t1​ on the message t2​⊕m2​.

b)

Obtain tag t1​ on message m1​, and tag t2​ on message m2​,m1​. Then output the tag t2​ on the message m1​,m2​.

c)

Obtain tag t1​ on message m1​, and tag t2​ on message m1​,m2​. Then output the tag t2​ on the message t1​⊕m2​.

d)

Obtain tag t1​ on message m1​, and tag t2​ on message t1​,m2​. Then output the tag t2​ on the message m1​⊕m2​.

35.

Assume we want to use a hash function with output length as small as possible, subject to being collision resistant against a birthday attack running in time 2^192. Which hash function would be the best choice?

a)

MD5.

b)

SHA-1.

c)

SHA-2, with output truncated to 192 bits.

d)

SHA-3 with 384-bit output.

36.

Let H,H′ be collision-resistant hash functions. Which of the following functions H′′ is NOT necessarily collision-resistant?

a)

H′′(x)=H(x)⊕H′(x).

b)

H′′(x)=H(x)∥H′(x), where ∥∥ denotes concatenation.

c)

H′′(x)=H(H′(x)).

d)

H′′(x)=H(x)∥0...0, where ∥∥ denotes concatenation.

37.

Assume a sender and receiver use the encrypt-and-authenticate approach for variable-length messages, using CTR-mode encryption and a variant of CBC-MAC secure for authenticating variable-length data (and independent keys for each). Which of the following statements is true?

a)

The combination is not CPA-secure, but it does provide integrity.

b)

The combination is CPA-secure, but it does not provide integrity.

c)

The combination is not CPA-secure, and it does not provide integrity because the CTR-mode encryption allows the attacker to forge a tag in the CBC-MAC.

d)

The combination is not CPA-secure, and it does not provide integrity because CTR-mode encryption is malleable.

38.

Let F be a block cipher with block length n. Consider the following encryption scheme for n-bit messages: to encrypt message m using key k, choose a random c0∈{0,1}^n and output the ciphertext c0,c1,Fk(Fk (c0)⊕c1), where c1=Fk(c0)⊕m. Which of the following statements is true?

a)

This can be viewed as an example of the encrypt-and-authenticate approach using CBC-mode and CBC- MAC (with the same key), and is insecure.

b)

This looks like the authenticate-then-encrypt approach using CBC-MAC and CBC-mode encryption (with the same key) -- but here it's ok, since CBC-MAC is applied to something random.

c)

This looks like the encrypt-then-authenticate approach using CTR-mode and CBC-MAC, except that here

the same key is being used for both -- Prof. Katz warned us about that; this looks insecure!

d)

This is an example of the encrypt-then-authenticate approach using CTR-mode and CBC-MAC, so is secure.

39.

Which of the following is the most appropriate primitive for achieving message integrity between two users sharing a key?

a)

Collision-resistant hash function.

b)

Message authentication code.

c)

Block cipher.

d)

Private-key encryption scheme.

40.

Which of the following is an example of a message authentication code used widely in practice?

a)

HMAC.

b)

CBC-mode encryption.

c)

SHA-1.

d)

AES.

41.

Consider the following algorithm for factoring an integer N provided as input (in binary): For i=2to⌈N−

−√⌉, if I divides N, then output(i,N/i). Which of the following statements is true?

a)

This algorithm is correct, but it runs in exponential time.

b)

This algorithm is not correct, because it will sometimes fail to find a factorization of N even if N is composite.

c)

This algorithm runs in sub-linear time, and always factors N if N is composite.

d)

This algorithm is not correct, because it will sometimes output a non-trivial factorization of N even when N is prime.

42.

Which of the following is NOT a group?

a)

The integers under addition.

b)

The set {0,1,2,...,27} under addition modulo 28.

c)

The integers under multiplication.

d)

The set {1,3,7,9} under multiplication modulo 10.

43.

Which of the following is the multiplicative inverse of 10 modulo 15?

a)

10

b)

1

c)

There is none, since gcd(10,15) !=1.

d)

5

44.

What is [5^80 mod79]? (Note that 79 is prime. Don't use a calculator/computer!)

a)

25

b)

15

c)

100

d)

20

45.

How many elements are in the group Z*403? (Note that 403=13⋅31.)

a)

402

b)

403

c)

360

d)

290

46.

Which of the following gives the 3rd root of 92 modulo 187? (Note that 187=11⋅17.)

a)

[92^107 mod 187]

b)

[92^3mod187]

c)

[92^107mod160]

d)

[92^160mod187]

47.

Which of the following problems is hard if the RSA assumption holds? In all the below, N is a product of distinct, large primes p and q, and e is relatively prime to φ(N).

a)

Given N and e, find x such that x^e=8modN.

b)

Given N,e, and a uniform value x∈ZN∗​, find y such that x^e=ymodN.

c)

Given N and e, find x,y such that x^e=ymodN.

d)

Given N, e, and a uniform value y∈ZN∗​, find x such that x^e=ymodN.

48.

Which of the following is a generator of Z13∗​?

a)

3

b)

4

c)

Z13∗​ does not have a generator since it is not a cyclic group.

d)

2

49.

Z23∗ is a cyclic group with generator 5. In this group, what is DH5(2,20)?

a)

22

b)

17

c)

9

d)

5

50.

Let G be a cyclic group of order q and with generator g. Based only on the assumption that the discrete- logarithm problem is hard for this group, which of the following problems is hard?

a)

Find x,y such that gx=y.

b)

Given uniform x∈Zq​ and uniform y∈G, compute yx⋅g.

c)

Given a uniform y∈G, find x such that gx=y.

d)

Given a uniform x∈Zq​, find y such that gx=y.

51.

Which of the following is a drawback of the private-key setting that is NOT addressed by the public-key setting?

a)

The communicating parties need to have some prior relationship.

b)

The communicating parties need to share some secret information in advance.

c)

Users must manage and securely store keys for every other party with whom they wish to communicate securely.

d)

The communicating parties need the ability to generate random bits.

52.

Which of the following BEST describes the security offered by the Diffie-Hellman key-exchange protocol (assuming the DDH problem is hard)?

a)

An attacker eavesdropping on an execution of the protocol cannot distinguish the key shared by the

parties from a uniform key.

b)

An attacker eavesdropping on an execution of the protocol cannot compute the key shared by the parties.

c)

An attacker eavesdropping on an execution of the protocol does not know whether the parties have shared a key or not.

d)

An attacker is unable to impersonate either party taking part in the protocol.

53.

Assume the Diffie-Hellman protocol is run by two parties in the subgroup of Z23∗ generated by 2. (This subgroup has order 11.) If the first party chooses private exponent 3 and the second chooses private exponent 10, which of the following characterizes the execution of the protocol in this case?

a)

The first party sends 8, the second party sends 12, and they share the key 3.

b)

The first party sends 8, the second party sends 1, and they share the key 1.

c)

The first party sends 3, the second party sends 10, and they share the key 11.

d)

The first party sends 8, the second party sends 12, and they share the key 20.

54.

In which of the following scenarios is public-key encryption a better choice than private-key encryption?

a)

A user wants to send his credit-card number to a merchant on the web.

b)

A general wants to communicate securely with a lieutenant.

c)

A user wants to encrypt the contents of her hard drive.

d)

Two police officers want to set up their communication devices to communicate securely before heading out to an operation.

55.

Which of the following would NOT be a secure way for a receiver to distribute her key for a public-key encryption scheme? (Assume a passive, eavesdropping attacker here.)

a)

Email the public key to the other party upon request.

b)

Post the public key on one's webpage.

c)

Post the private key on one's webpage.

d)

Put the public key into a public directory.

56.

Which of the following is true in the public-key setting, but NOT true in the private-key setting?

a)

(Under standard assumptions) there exist schemes that are CPA-secure, but are not CCA-secure.

b)

It is possible to achieve perfect secrecy.

c)

Allowing the attacker to have access to an encryption oracle makes no difference when defining security.

d)

A deterministic encryption scheme cannot be CPA-secure.

57.

Assume for the purposes of this question a public-key encryption scheme for which the time to encrypt a 128-bit message is 100 times slower than the time to compute one AES evaluation. Which of the following is true if we want to encrypt a 100MB message M?

a)

Public-key encryption of M using the given scheme is going to be only about 10 times slower than private-key encryption of M, because for secure private-key encryption AES would have to be used in a chaining mode of operation.

b)

Public-key encryption of M is not possible with the given scheme, since the scheme only supports 128- bit messages.

c)

If hybrid encryption is used, then public-key encryption of M will take roughly the same time as private-

key encryption of M.

d)

Public-key encryption of M using the given scheme is inherently going to be 100 times slower than private-key encryption of M.

58.

Assume El Gamal encryption, where the group being used is Z47∗ with generator 5. (This group has order 46, which is not prime. But El Gamal encryption can be defined in any cyclic group.) Assume the public key contains h=10. Say an attacker sees a ciphertext (41, 18) that is the encryption of some unknown message m. Which of the following is an encryption of [5m mod47]?

a)

(17, 18)

b)

(41, 43)

c)

(1, 5)

d)

(41, 5)

59.

Assume "plain RSA" encryption is used with public key (N=33,e=3). What is the encryption of the message m=2?

a)

2

b)

7

c)

32

d)

8

60.

Which of the following is true about "plain RSA" encryption (assuming the RSA problem is hard)?

a)

If the message m is uniform in ZN∗​, then m cannot be recovered in its entirety from the ciphertext in polynomial time.

b)

If the message m is a uniform, 128-bit string then m cannot be recovered in its entirety from the

ciphertext in polynomial time. (Here, assume N is at least 1000 bits long, and e=3.)

c)

The scheme is CPA-secure, but not CCA-secure.

d)

If the message m is uniform in Zn∗, then no information about m can be recovered from the ciphertext in polynomial time.

61.

The Federal Government wants to be able to issue advisories to the general public while ensuring that no one will be able to tamper with their messages or spoof a fake advisory. Which of the following is the best cryptographic approach to address this problem?

a)

Use a digital signature scheme, with the public key known to everyone, to sign each advisory when it is

released.

b)

Use a message authentication code, with the key known to everyone, to generate a tag for each advisory when it is released.

c)

Use a public-key encryption scheme, with the public key known to everyone, and decrypt each advisory when it is released.

d)

Use multiple message authentication codes, with each member of the public being given a unique key, and generate one tag per key each time an advisory is released.

62.

The president and vice president of a company want to communicate while ensuring integrity of their communication. Which of the following is the best cryptographic approach to address this problem?

a)

Use a message authentication code, with the key shared between them, and generate a tag for each

message they send.

b)

Use a CPA-secure private-key encryption scheme, with the key shared between them, and encrypt each message they send.

c)

Use a digital signature scheme, with the public key known to everyone, and sign each message they send.

d)

Use a message authentication code, with the key made public, and generate a tag for each message they send.

63.

Assume for the purposes of this question a digital signature scheme for which the time to sign a 256-bit message is 100 times slower than the time to evaluate SHA-256 on a 512-bit input. Which of the following is true if we want to sign a 500MB message M?

a)

If the hash-and-sign approach is used, then signing M will take roughly the same time as hashing M.

b)

Signing M using the given scheme is not possible, since it only supports 256-bit messages.

c)

We can securely sign M by breaking it into 256-bit chunks, and signing each chunk.

d)

We can sign M by simply hashing it, and avoid using the digital signature scheme altogether.

64.

Assume the "plain" RSA signature scheme, with public key (N=55,e=3). Which of the following verifies correctly as the signature on the message m=17?

a)

43

b)

4

c)

7

d)

8

65.

Assume the "plain" RSA signature scheme with public key (N,e=3). For which of the following messages is it always possible to forge a signature without seeing any prior signatures or factoring N? (Assume N>1000, and N relatively prime to each of the messages that follow.)

a)

27

b)

37

c)

47

d)

2

66.

Assume the "plain" RSA signature scheme with public key (N,e). Say we want to forge a signature on m=289 but can only obtain a signature on one other message. Which of the following strategies will work? (Assume N>1000.)

a)

Obtain signature σ on m′=288. Output [σ+1modN] as the signature on m.

b)

Obtain signature σ on m′=578. Output [2^-1*σmodN] as the signature on m.

c)

Obtain signature σ on m′=17. Output [σ^2modN] as the signature on m.

d)

Obtain signature σ on m′=288. Output [σ-1modN] as the signature on m.

67.

In this and the next question, assume the Schnorr identification protocol is run in the subgroup of Z23∗ generated by 2. (This subgroup has order 11.) Say the prover's private key is x=7. What is the prover's public key?

a)

7

b)

3

c)

14

d)

13

68.

(This is a continuation of the previous question.) Say the prover runs an execution of the Schnorr identification protocol with a verifier. The prover chooses r=4 and sends A=16. The verifier sends challenge 3. What response does the prover send?

a)

13

b)

3

c)

4

d)

7

69.

As in the lectures, let cert A→B denote a certificate issued by A for B, i.e., certA→B=Sign skA(B,pkB). Assuming D knows pkC and trusts C, which of the following provides evidence to D that A's public key is pkA?

a)

certA→B, pkA, certB→C and pkB

b)

certC→B, pkB, certB→A and pkA

c)

certC→B, pkB, certA→B and pkA

d)

certA→C and pkA

70.

Consider the SSL/TLS handshake protocol as described on slide 5 of the SSL/TLS lecture. Say the encryption of pmk were changed from using a CCA-secure public-key encryption scheme to using a CPA- secure public-key encryption scheme. Which of the following attacks would this change potentially enable?

a)

A passive eavesdropper can now learn Nc and Nb. In combination with other known information, this allows the attacker to recover mk.

b)

An attacker can eavesdrop on an execution of the protocol to learn the ciphertext c. Then, it can

impersonate the client, send modified versions of c to the server, and learn pmk by using information

about whether the server returns an error or not in response to these ciphertexts.

c)

An attacker can impersonate the server by sending its own public key pk∗ to the client. By doing so, it can convince the client to encrypt pmk again, but this time using a public key for which the attacker can decrypt.

d)

A passive eavesdropper can now learn pmk. In combination with Nc and Nb, this allows the attacker to recover mk.

71.

What was your favorite part of this class?

(a)  

72.

What is the most appropriate cryptographic primitive to use if a company wants to distribute authenticated software updates to its customers?

a)

Digital signature scheme.

b)

Public-key encryption scheme.

c)

Pseudorandom function/block cipher.

d)

Hash function.

e)

Message authentication code.

73.

What is the most appropriate cryptographic primitive to use if an individual wants to ensure confidentiality of the files stored on her hard drive?

a)

Message authentication code.

b)

Pseudorandom function/block cipher.

c)

Hash function.

d)

Public-key encryption.

e)

Private-key encryption.

74.

A user wants to design a CPA-secure public-key encryption scheme to be used for emailing large files. Of the following, which would be the best approach?

a)

To encrypt a file M, use DSS to encrypt a random key, and then use that key to encrypt M using HMAC.

b)

To encrypt a file M, hash the file to a short value h=H(M), and then encrypt h using El Gamal encryption.

c)

To encrypt a file M, break it into a sequence of blocks M1, M2,.... Then encrypt each block independently using El Gamal encryption.

d)

To encrypt a file, use El Gamal encryption to encrypt a random AES key; then use AES (with that key) in

CBC mode to encrypt the file.

75.

Consider the following "hybrid" signature scheme, which will give better efficiency when signing long messages. To sign message M using private key sk, choose a uniform key k for a message authentication code and then send k,Signsk(k),Mack(M). Verification is done in the natural way. Which of the following is true regarding this scheme?

a)

This is a secure signature scheme, if the underlying signature scheme and MAC are secure.

b)

This is not secure because it is very likely that a key k will be used twice by the signer.

c)

This is not secure because given k,Signsk​(k),Mack​(M) an attacker can forge k,Signsk​(k),Mack​(M′) on any M′ of its choice.

d)

This is not secure because given the message/signature pair (k,Signsk​(k)) an attacker can easily forge Signsk​(k′) on a key k′ of its choice.

76.

Let G be a group, and consider the following private-key encryption scheme with message space G: The shared key is a uniform element k∈G. To encrypt a message m∈G using key k, output the ciphertext k⋅m. To decrypt a ciphertext c∈G using key k, output the message k−1 ⋅c. Which of the following is true about this scheme?

a)

The scheme is perfectly secret.

b)

The scheme is CCA-secure.

c)

The scheme is CPA-secure, but not CCA-secure.

d)

The scheme is computationally indistinguishable, but not perfectly secret.

77.

Consider hybrid encryption using plain RSA and AES-128 in CTR mode, with public key N,e. Say a 128-bit message m is encrypted, yielding ciphertext c,c0,c1, with c∈ZN*and c0, c1 ∈ {0,1}128. Which of the following would be an encryption of m, the bitwise complement of m?

a)

[2e ⋅ cmodN],c0,c1

b)

c, c-0, c1

c)

c, c0, c-1

d)

The given encryption scheme is CCA-secure (hence non-malleable), so it is infeasible to come up with an encryption of m.

78.

Say El Gamal encryption is used in the subgroup of Z47∗ generated by 4. The public key is 21 and the private key is 4. The ciphertext (34,42) is an encryption of some message m. Which of the following is an encryption of [4mmod47]?

a)

(34, 46)

b)

(34, 27)

c)

(42, 42)

d)

(42, 27)

79.

Consider the plain RSA encryption scheme with public key N=55,e=3. Say the encryption of some unknown message m is 6. What is the encryption of [2mmodN]?

a)

3

b)

12

c)

48

d)

31

80.

Say you have "oracle access" to a piece of code that, given a message m, appends an unknown 8-byte password p, applies PKCS #7 padding, and then encrypts the result using AES-128 in ECB mode with an unknown key. Which of the following attacks can be used to confirm that the first byte of p is 'Z'?

a)

Submit the null message and check whether the first byte of the ciphertext is equal to 'Z'.

b)

Submit the 16-byte message "ZZZZZZZZZZZZZZZZ," and check whether the first byte of the first block of the resulting ciphertext is equal to the first byte of the second block of that ciphertext.

c)

Submit the 1-byte message "Z," and check whether any two bytes in the resulting ciphertext are equal.

d)

Submit the 15-byte message "ABCDEFGHIJKLMNO" and the 16-byte message "ABCDEFGHIJKLMNOZ,"

and check if the first blocks of the resulting ciphertexts are equal.