CompTIA Security+ · SY0-701

Security+ Cryptography and PKI Practice Questions

Cryptography is one of the topics Security+ candidates find hardest, mostly because the terms sound alike. These 15 original questions cover which key does what, hashing and salting, key exchange, and the certificate lifecycle from signing request to revocation. Every answer is explained.

What these 15 questions cover

  • Symmetric and asymmetric encryption, and which key does what
  • Hashing, salting and file integrity
  • Key exchange with Diffie-Hellman
  • Certificates: CSR, wildcard, SAN and trusted roots
  • Revocation with CRL and OCSP
  • Key escrow, HSM and TPM
Question 1 of 15

Symmetric encryption

A backup administrator must encrypt a 2 TB backup file every night and needs the encryption to finish as quickly as possible. The same system will later decrypt the file. Which algorithm is the BEST choice for encrypting the file?

All 15 Security+ Cryptography and PKI questions with answers

Try the set above first. Then open any question below to check the answer and read why it is correct.

  1. Symmetric encryption

    1. A backup administrator must encrypt a 2 TB backup file every night and needs the encryption to finish as quickly as possible. The same system will later decrypt the file. Which algorithm is the BEST choice for encrypting the file?

    • A. RSA-4096
    • B. AES-256
    • C. SHA-256
    • D. ECDSA
    Show the answer

    B. AES-256

    AES is a symmetric algorithm, and symmetric encryption is far faster than asymmetric encryption for large amounts of data. RSA is asymmetric and much slower, so it is used to protect small items such as keys, not multi-terabyte files.

  2. Asymmetric encryption

    2. Dana wants to send Luis a confidential message using asymmetric encryption so that only Luis can read it. Which key should Dana use to encrypt the message?

    • A. Dana's private key
    • B. Dana's public key
    • C. Luis's public key
    • D. Luis's private key
    Show the answer

    C. Luis's public key

    Data encrypted with Luis's public key can be decrypted only with Luis's private key, which only he holds. Encrypting with Dana's private key would not keep the message confidential, because anyone with her public key could decrypt it.

  3. Digital signatures

    3. Priya digitally signs a contract and emails it to a supplier. Which key does the supplier use to verify the signature?

    • A. Priya's public key
    • B. Priya's private key
    • C. The supplier's public key
    • D. The supplier's private key
    Show the answer

    A. Priya's public key

    A signature is created with the signer's private key and verified with the signer's public key. The supplier never has Priya's private key, because a private key is not shared with anyone.

  4. Hashing and integrity

    4. A software vendor publishes the SHA-256 hash of an installer on its website. An administrator downloads the installer, computes its SHA-256 hash and gets a different value. What does this result indicate?

    • A. The installer was encrypted with a different symmetric key
    • B. The vendor's certificate has been revoked
    • C. The administrator used the wrong private key
    • D. The downloaded file is not identical to the published one
    Show the answer

    D. The downloaded file is not identical to the published one

    A hash function produces the same output for the same input, so a different hash means the file was changed or corrupted. A plain SHA-256 hash involves no keys, so the options about symmetric keys and private keys do not apply.

  5. Password salting

    5. A review of a password database shows that two users who chose the same password have identical stored hashes, and that the hashes match entries in precomputed rainbow tables. Which change addresses both problems?

    • A. Encoding each stored hash with Base64
    • B. Adding a unique random salt to each password before hashing
    • C. Truncating each stored hash to half its length
    • D. Signing the entire password database with the company's private key
    Show the answer

    B. Adding a unique random salt to each password before hashing

    A unique salt makes identical passwords produce different hashes and makes precomputed rainbow tables useless, since a table would be needed for every salt. Base64 is only an encoding that is trivially reversed, so it changes how the hash looks without adding any protection.

  6. Key exchange

    6. Two systems that have never communicated need to agree on a shared secret key over an untrusted network, without sending the key itself across the network. Which algorithm is designed for this purpose?

    • A. Diffie-Hellman
    • B. AES
    • C. SHA-3
    • D. HMAC
    Show the answer

    A. Diffie-Hellman

    Diffie-Hellman lets two parties each combine their own private value with exchanged public values to arrive at the same shared secret, which is never transmitted. AES needs both sides to already have the same key, which is the problem being solved.

  7. Certificate requests

    7. An administrator needs a TLS certificate from a public certificate authority for a new web server. After generating a key pair on the server, what does the administrator send to the certificate authority?

    • A. The server's private key
    • B. A certificate revocation list
    • C. A certificate signing request
    • D. A copy of the certificate authority's root certificate
    Show the answer

    C. A certificate signing request

    A certificate signing request (CSR) carries the public key and identifying details, which the certificate authority validates and signs to create the certificate. The private key is never sent and should stay on the server.

  8. Certificate revocation

    8. An application needs to check whether one specific certificate has been revoked. It must get a current answer for that certificate alone, without downloading a full list of every revoked certificate. Which mechanism should it use?

    • A. Certificate revocation list
    • B. Certificate signing request
    • C. Key escrow
    • D. Online Certificate Status Protocol
    Show the answer

    D. Online Certificate Status Protocol

    The Online Certificate Status Protocol (OCSP) returns the status of a single certificate on request. A certificate revocation list (CRL) is the full list published periodically by the certificate authority, which is what the application wants to avoid downloading.

  9. Certificate revocation

    9. An administrator discovers that the private key for a web server's TLS certificate was copied by an attacker. The certificate does not expire for another ten months. What should the administrator ask the certificate authority to do with the existing certificate?

    • A. Revoke it
    • B. Renew it with the same key pair
    • C. Extend its expiration date
    • D. Add another hostname to it
    Show the answer

    A. Revoke it

    A certificate whose private key is compromised must be revoked so that clients stop trusting it, and a new certificate should be issued with a new key pair. Renewing with the same key pair would leave the attacker holding a valid private key.

  10. Certificate types

    10. A company launches new subdomains of example.com almost every week, such as shop.example.com and help.example.com. It wants a single certificate that will cover these and future first-level subdomains without being reissued each time. Which certificate type should it request?

    • A. Self-signed certificate
    • B. Code signing certificate
    • C. Wildcard certificate
    • D. Root certificate
    Show the answer

    C. Wildcard certificate

    A wildcard certificate for *.example.com is valid for any first-level subdomain of that domain, including ones created later. A self-signed certificate is not issued by a trusted certificate authority, so browsers would show warnings.

  11. Certificate types

    11. A company wants one certificate to secure three sites on different domains: www.example.com, www.example.net and portal.example.org. Which certificate feature makes this possible?

    • A. Wildcard
    • B. Certificate pinning
    • C. OCSP stapling
    • D. Subject alternative name
    Show the answer

    D. Subject alternative name

    The subject alternative name (SAN) field lists multiple hostnames, including names on different domains, that a single certificate is valid for. A wildcard covers subdomains of one domain only, so it cannot span .com, .net and .org sites.

  12. Key management

    12. An employee encrypted important project files and then left the company without handing over the decryption key, so the files are unreadable. To prevent a repeat, the company wants copies of decryption keys held securely by a trusted party for authorized recovery. What is this arrangement called?

    • A. Key stretching
    • B. Key escrow
    • C. Key exchange
    • D. Certificate revocation
    Show the answer

    B. Key escrow

    Key escrow stores copies of keys with a trusted party so that authorized people can recover encrypted data. Key stretching makes a weak key or password harder to brute force and has nothing to do with recovery.

  13. Secure key storage

    13. A company is building an internal certificate authority. It needs a dedicated, tamper-resistant appliance to generate and store the CA's private key and to perform signing operations for several servers on the network. Which should it use?

    • A. Trusted Platform Module
    • B. Secure enclave
    • C. Hardware security module
    • D. Self-encrypting drive
    Show the answer

    C. Hardware security module

    A hardware security module (HSM) is a dedicated, tamper-resistant device for generating and protecting keys and performing cryptographic operations, and it can serve multiple systems. A Trusted Platform Module is a chip built into a single computer and protects keys for that device only.

  14. Secure key storage

    14. A company wants each laptop's full-disk encryption key to be protected by a chip on that laptop's motherboard, so that the drive cannot be unlocked if it is moved to another computer. Which component provides this?

    • A. Trusted Platform Module
    • B. Hardware security module
    • C. Key escrow agent
    • D. Certificate authority
    Show the answer

    A. Trusted Platform Module

    A Trusted Platform Module (TPM) is a chip on the motherboard that stores keys bound to that specific device and supports full-disk encryption. A hardware security module is a separate appliance or add-on device used mainly for servers and key management at scale.

  15. Certificate trust

    15. A company issues a certificate for an intranet site from its own internal certificate authority. The certificate is valid and matches the site name, but employee browsers warn that the issuer is not trusted. What is the correct fix?

    • A. Add the intranet certificate to the certificate revocation list
    • B. Replace the certificate with a self-signed certificate
    • C. Enable OCSP stapling on the intranet web server
    • D. Install the internal root CA certificate on the clients
    Show the answer

    D. Install the internal root CA certificate on the clients

    A browser trusts a certificate only if it chains to a root certificate in its trusted store, so the internal root must be distributed to the clients. A self-signed certificate would have no trusted issuer at all and would produce the same kind of warning.

More Security+ practice questions by topic

Frequently asked questions

Which Security+ domain covers cryptography and PKI?
Most of it sits in Domain 1, General Security Concepts, which includes an objective on cryptographic solutions and public key infrastructure. Related ideas such as data encryption and secure protocols also appear in the architecture and operations domains.
Do I need to do cryptographic math on the Security+ exam?
No. You need to know what each tool is for: symmetric encryption for speed, asymmetric encryption for key exchange and signatures, hashing for integrity, and certificates for binding a public key to an identity.
What is an easy way to remember which key is used?
For confidentiality, encrypt with the recipient's public key and they decrypt with their private key. For a digital signature, the sender signs with their own private key and anyone verifies with the sender's public key.

Practice Security+ PBQs

Performance-based questions (PBQs) are the hands-on simulations on the real exam. Practice them in our PBQ labs.

More Security+ resources

Want more Security+ Cryptography and PKI questions?

Practice by domain in the full question bank, take timed mock exams and see exactly where to focus next.

Get started