Decrypting with the private key

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

Decrypting with the private key

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Alex's public key encrypts a message to Alex. Which key can decrypt it?
A Alex's private key
B Alex's public key
2. Which statement about asymmetric decryption is correct?
A A message encrypted with a public key is decrypted with the matching private key
B A message encrypted with a public key is decrypted with the same public key
3. An interceptor copies a message and also has the recipient's public key. Can they read it?
A Yes, the public key decrypts it
B No, they need the private key
4. Where should a recipient keep their private key?
A Sent to everyone who wants to message them
B Secret on their own device
5. Why is it safe to share a public key with anyone?
A It can encrypt but cannot decrypt the message
B It is the key that decrypts all messages

Match the Pairs

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

Left columnRight column
1decrypt(message, privateKey) Ainterceptor.decrypt(ciphertext, publicKey) = unreadable
2decrypt(ciphertext, publicKey) -> fails BThe public key cannot undo its own encryption, so the message stays unreadable.
3An interceptor who copies the public key still cannot read the encrypted message. CThe recipient uses their own private key to turn the ciphertext back into readable plaintext.
4The private key stays on the recipient's device and is never sent across the network. DThe private key was sent to the sender. It must stay secret on the recipient's device. Only the public key should be shared.
5plaintext = decrypt(ciphertext, publicKey) EThe recipient's public key was used to decrypt. The public key cannot reverse its own encryption. The recipient's private key must be used.
6send(privateKey) to sender FprivateKey = storedOnRecipientDevice

Definitions

private key decryption

Fill in the Blanks

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

1.
plaintext = DECRYPT(ciphertext, __________)
2.
ciphertext = ENCRYPT(plaintext, _________)
3.
IF key = privateKey THEN OUTPUT _________
4.
result = _______(ciphertext, privateKey)
5.
STORE(privateKey, _______________)

Spot the Error

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

Question 1
A pub ← bob.public
B priv ← bob.private
C cipher ← encrypt(msg, pub)
D plain ← decrypt(cipher, pub)
Question 2
A cipher ← encrypt(msg, bobPriv)
B send(cipher, bob)
C // only Bob's key can decrypt
Question 3
A cipher ← encrypt(msg, bobPub)
B send(msg, bob)
C // hacker sees only cipher
Question 4
A priv ← bob.private
B upload(priv, server)
C share(bob.public, alice)
Question 5
A cipher ← receive()
B msg ← encrypt(cipher, myPriv)
C OUTPUT msg

Answer Key

Decrypting with the private key
Section A: Quick Questions
Q1
A — Alex's private key
Q2
A — A message encrypted with a public key is decrypted with the matching private key
Q3
B — No, they need the private key
Q4
B — Secret on their own device
Q5
A — It can encrypt but cannot decrypt the message
Section B: Match the Pairs
Q1
decrypt(message, privateKey) → The recipient uses their own private key to turn the ciphertext back into readable plaintext.
Q2
decrypt(ciphertext, publicKey) -> fails → The public key cannot undo its own encryption, so the message stays unreadable.
Q3
An interceptor who copies the public key still cannot read the encrypted message. → interceptor.decrypt(ciphertext, publicKey) = unreadable
Q4
The private key stays on the recipient's device and is never sent across the network. → privateKey = storedOnRecipientDevice
Q5
plaintext = decrypt(ciphertext, publicKey) → The recipient's public key was used to decrypt. The public key cannot reverse its own encryption. The recipient's private key must be used.
Q6
send(privateKey) to sender → The private key was sent to the sender. It must stay secret on the recipient's device. Only the public key should be shared.
Section C: Definitions
Q1
private key decryption — Only the recipient's private key can decrypt a message encrypted with their public key. The private key stays secret on the recipient's device, so interceptors cannot read it.
Section D: Fill in the Blanks
Q1
plaintext = DECRYPT(ciphertext, privateKey)
Q2
ciphertext = ENCRYPT(plaintext, publicKey)
Q3
IF key = privateKey THEN OUTPUT plaintext
Q4
result = DECRYPT(ciphertext, privateKey)
Q5
STORE(privateKey, recipientDevice)
Section E: Spot the Error
Q1
D — The public key cannot reverse its own encryption. The message must be decrypted with Bob's private key: decrypt(cipher, priv).
Q2
A — To send Bob a message that only he can read, encrypt it with Bob's public key (bobPub), not his private key.
Q3
B — The encrypted message (cipher) must be sent, not the plaintext. Sending msg would let an interceptor read it.
Q4
B — The private key must stay on the recipient's own device. Uploading it would risk it being exposed, so it should be kept: keep(priv, bobDevice).
Q5
B — The recipient needs to decrypt the received ciphertext with their private key. The function should be decrypt, not encrypt.