Why a symmetric key must be shared

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Why a symmetric key must be shared

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Amir encrypts a message with a symmetric key and sends it to Beth. What must Beth have to decrypt it?
A A different key that only Beth has
B The same key that Amir used
2. When must the symmetric key be shared with the receiver?
A Before the encrypted data is sent
B After the receiver has got the data
3. Which statement is true about symmetric encryption?
A Both the sender and receiver need the key before the message is sent
B Only the sender needs the key, because the receiver can work it out
4. Mia receives ciphertext but does not have the shared key. What happens when she tries to decrypt it?
A She cannot read the message
B She can decrypt it with any key she likes
5. A class of 4 students each want a secret symmetric key with every other student. How does the number of keys change as more users join?
A One key is enough however many users there are
B More users need many more shared keys

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1send(shared_key) AThe secret key is passed to the receiver first, before any encrypted data is sent.
2decrypt(ciphertext, shared_key) Bsender_key = receiver_key
3Both the sender and the receiver need the same key before the message is sent CThe key is sent after the data. The receiver cannot decrypt the message until they already have the key.
4Many users need many shared keys: every pair of users needs its own key DThis assumes one key per user. In symmetric encryption each pair of users needs its own shared key, so many more keys are needed.
5send(ciphertext); send(key) Ekeys ← n * (n - 1) / 2
6keys ← users FOnly gives back the original plaintext if the receiver uses the same key the sender used to encrypt.

Definitions

shared secret key

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
sharedKey ← GenerateKey() SEND _________ TO Bob SEND Encrypt(message, sharedKey) TO Bob
2.
IF hasKey = ____ THEN plain ← Decrypt(cipher, key) ENDIF
3.
IF receiverKey __ senderKey THEN OUTPUT "Cannot decrypt" ENDIF
4.
users ← 4 keys ← users * (users - 1) / _ OUTPUT keys
5.
key ← ReceiveKey() cipher ← ReceiveData() plain ← _______(cipher, key)

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A key ← RECEIVE_KEY()
B cipher ← RECEIVE()
C plain ← DECRYPT(cipher, "K9")
D OUTPUT plain
Question 2
A aliceKey ← "K7"
B bobKey ← "K9"
C plain ← DECRYPT(c, bobKey)
D OUTPUT plain
Question 3
A aliceKey ← "K7"
B bobKey ← "K7"
C IF aliceKey = bobKey THEN
D plain ← ENCRYPT(c, bobKey)
E ELSE
F OUTPUT "Cannot decrypt"
Question 4
A SEND(cipher, Bob)
B cipher ← ENCRYPT(msg, key)
C SEND(cipher, Bob)
Question 5
A key ← "K7"
B SEND_KEY(key, Bob)
C cipher ← ENCRYPT(msg, key)
D SEND(msg, Bob)

Answer Key

Why a symmetric key must be shared
Section A: Quick Questions
Q1
B — The same key that Amir used
Q2
A — Before the encrypted data is sent
Q3
A — Both the sender and receiver need the key before the message is sent
Q4
A — She cannot read the message
Q5
B — More users need many more shared keys
Section B: Match the Pairs
Q1
send(shared_key) → The secret key is passed to the receiver first, before any encrypted data is sent.
Q2
decrypt(ciphertext, shared_key) → Only gives back the original plaintext if the receiver uses the same key the sender used to encrypt.
Q3
Both the sender and the receiver need the same key before the message is sent → sender_key = receiver_key
Q4
Many users need many shared keys: every pair of users needs its own key → keys ← n * (n - 1) / 2
Q5
send(ciphertext); send(key) → The key is sent after the data. The receiver cannot decrypt the message until they already have the key.
Q6
keys ← users → This assumes one key per user. In symmetric encryption each pair of users needs its own shared key, so many more keys are needed.
Section C: Definitions
Q1
shared secret key — In symmetric encryption, the receiver can only decrypt if they hold the same key as the sender, so the key must be shared before any data is sent.
Section D: Fill in the Blanks
Q1
sharedKey ← GenerateKey() SEND sharedKey TO Bob SEND Encrypt(message, sharedKey) TO Bob
Q2
IF hasKey = TRUE THEN plain ← Decrypt(cipher, key) ENDIF
Q3
IF receiverKey <> senderKey THEN OUTPUT "Cannot decrypt" ENDIF
Q4
users ← 4 keys ← users * (users - 1) / 2 OUTPUT keys
Q5
key ← ReceiveKey() cipher ← ReceiveData() plain ← Decrypt(cipher, key)
Section E: Spot the Error
Q1
C — The receiver can only decrypt with the same shared key the sender used. "K9" is a different key, so decryption fails. It should use the key that was received: DECRYPT(cipher, key).
Q2
B — Bob must hold exactly the same key as Alice. Giving him a different key ("K9") means he cannot decrypt her message. It should be bobKey ← aliceKey.
Q3
D — When both keys match, the receiver should DECRYPT the ciphertext to get the plaintext back. ENCRYPT would scramble it again. It should be DECRYPT(c, bobKey).
Q4
A — The key must be shared before any data is sent. Here the ciphertext is sent first, and it does not even exist yet. Line 1 should be SEND_KEY(key, Bob).
Q5
D — After the key has been shared, the sender must send the encrypted data, not the plaintext. Sending msg is insecure and does not use the key. It should be SEND(cipher, Bob).