๐Ÿ“ SAT
๐Ÿ“ ACT
๐ŸŽ“ AP Exams

AP Cybersecurity Drill 25: Public and Private Keys in Messaging

Drill 25 ยท

0 / 5
Previous drill
Drill 24
Next drill
Drill 26

About This Drill

AP Cybersecurity Drill 25: Public and Private Keys in Messaging is a practice drill. It contains 5 original questions created by Brian Stewart, a Barron's test prep author with over 20 years of tutoring experience.

Two employees set up encrypted, signed messages using a public-private key pair, and a manager checks who should hold which key; this drill uses an invented company and original figures.

Passage

Holbeck Composites has two employees, Dana and Ravi, exchange messages using asymmetric encryption. Each person has a key pair. A manager writes down who holds which key.

KeyHeld byShared?
Dana's public keyDanaYes; given out freely
Dana's private keyDanaNo; kept secret
Ravi's public keyRaviYes; given out freely
Ravi's private keyRaviNo; kept secret

Questions & Explanations

Question 1. Dana wants to send Ravi a message only Ravi can read. Which key should Dana use to encrypt it?

  • A) Dana's own private key, the secret half of Dana's pair that Dana never shares with anyone else
  • B) Dana's own public key, the freely shared half of Dana's pair that everyone is allowed to obtain
  • C) Ravi's public key, so that only Ravi's matching private key can decrypt and read the message ✓
  • D) Ravi's private key, the secret half of Ravi's pair, which Dana would have to ask Ravi to send first

Explanation: Choice C is correct. Encrypting with the recipient's public key means only the recipient's matching private key can decrypt, so only Ravi can read it. Choice A is incorrect because using Dana's own private key functions as a signing or verifiable operation, not a way to keep the message private from everyone except Ravi. Choice B is incorrect because Dana's public key pairs with Dana's private key, not Ravi's, so Ravi could not decrypt. Choice D is incorrect because a private key is never shared; Ravi would never send it.

Question 2. Ravi wants to prove to Dana that a message truly came from Ravi and was not altered. What should Ravi do?

  • A) Encrypt the message with Dana's private key, which Dana would provide to Ravi for this single message
  • B) Encrypt the message with Ravi's own public key, the half of Ravi's pair that Ravi shares with everyone
  • C) Send the message with no key at all, since a message that arrives unchanged is proof enough of its origin
  • D) Sign the message with Ravi's private key, so Dana can verify it with Ravi's public key and detect changes ✓

Explanation: Choice D is correct. Signing with the sender's private key lets anyone verify the signature with the sender's public key, proving origin and integrity. Choice A is incorrect because a private key is never shared and Dana's key would not prove Ravi sent it. Choice B is incorrect because Ravi's public key is available to everyone, so it proves nothing about the sender. Choice C is incorrect because an unsigned message offers no proof of who sent it or that it is unchanged.

Question 3. A message arrives claiming to be from Ravi, but its signature fails to verify against Ravi's public key. What does this most directly indicate?

  • A) The message is confidential, since a failed signature check is the expected result of strong encryption
  • B) The message may be forged or altered, since a genuine signature from Ravi would verify with Ravi's public key ✓
  • C) The message used the wrong recipient's key, which only ever affects whether the reader can decrypt the body
  • D) The message is safe to trust, since the signature step is optional and its result does not change the content

Explanation: Choice B is correct. A valid signature from Ravi verifies with Ravi's public key; a failed check means the message was not signed by Ravi's private key or was changed after signing, so it may be forged or tampered. Choice A is incorrect because a signature check concerns authenticity, not confidentiality, and a failure is not normal. Choice C is incorrect because the recipient key affects decryption, not signature verification. Choice D is incorrect because a failed signature is a warning, not a sign the message is safe.

Question 4. Why is it acceptable for Dana and Ravi to hand out their public keys freely without weakening security?

  • A) Because a public key can encrypt or verify but cannot decrypt or sign, so sharing it does not expose the private key ✓
  • B) Because public keys are changed automatically every few minutes, so any copy a person obtains stops working almost at once
  • C) Because the company keeps a list of who received each public key and can revoke access from anyone on that list instantly
  • D) Because a public key only works on the internal network, so a copy taken outside the building cannot be used at all

Explanation: Choice A is correct. A public key can only encrypt to its owner or verify the owner's signatures; it cannot decrypt those messages or forge signatures, which require the secret private key, so distributing it is safe. Choice B is incorrect because key pairs do not silently rotate every few minutes. Choice C is incorrect because security does not depend on tracking every recipient of a freely shared key. Choice D is incorrect because public keys are not limited to one network.

Question 5. Dana needs to send Ravi a message that is BOTH private and provably from Dana. What combination achieves this?

  • A) Encrypt with Dana's public key and sign with Ravi's public key, so both freely shared keys are used together
  • B) Encrypt with Ravi's private key and sign with Dana's private key, asking Ravi to share his private key first
  • C) Use Ravi's public key for privacy and Dana's private key for signing, so Ravi can decrypt and verify the sender ✓
  • D) Hash the message twice and send the two digests, since two separate hashes together provide privacy and proof of origin

Explanation: Choice C is correct. Encrypting with Ravi's public key keeps it readable only by Ravi (privacy), and signing with Dana's private key lets Ravi verify Dana as the sender (authenticity). Choice A is incorrect because encrypting with Dana's public key would let only Dana decrypt, and a public key cannot sign. Choice B is incorrect because private keys are never shared, so this is not possible. Choice D is incorrect because hashing provides integrity only, not confidentiality or proof of a specific sender.