CompTIA XK0-006 (CompTIA Linux+) Practice Test 40

Question 390

A VPN design uses a public/private key pair per device, and private keys must never leave the endpoint. Which principle is involved?

  1. TLS 1.3
  2. Test handshake negotiation against allowed TLS versions
  3. Asymmetric key ownership
  4. WireGuard VPN
  5. SSH KexAlgorithms configuration
  6. Trusted certificate chain to an accepted authority

Explanation

Correct Answer

C:

Public keys can be distributed to peers while private keys remain secret on each endpoint. Exposing a private key enables impersonation until rotation.

Incorrect Answers

A:

TLS protects the confidentiality and integrity of a negotiated network connection while enabling certificate-based endpoint authentication; the evidence calls for securing private keys used in network authentication, not merely this separate operation.

B:

A handshake probe reveals protocol versions a listener actually accepts; the task involves securing private keys used in network authentication, whereas this addresses another subsystem.

D:

WireGuard uses modern public-key cryptography to protect layer-3 traffic over UDP; that is not equivalent to securing private keys used in network authentication.

E:

The KexAlgorithms list controls permitted SSH key-exchange mechanisms; the administrator instead needs securing private keys used in network authentication; this option serves a different purpose.

F:

TLS clients validate a chain to trusted roots unless a suitable explicit trust decision exists; it answers a neighboring question rather than securing private keys used in network authentication.

Question 391

An HTTPS certificate has the correct DNS name and dates, but the client rejects it because the certificate is marked only for email protection instead of TLS server authentication. Which X.509 extension should be inspected?

  1. Extended Key Usage (EKU)
  2. Subject Alternative Name (SAN)
  3. Not After validity timestamp
  4. Subject Common Name (CN)
  5. Certificate serial number

Explanation

Correct Answer

A:

The Extended Key Usage extension states the intended certificate purposes, such as serverAuth or emailProtection. A certificate lacking suitable TLS server usage can be rejected even when its name and dates match.

Incorrect Answers

B:

SAN identifies DNS names and other identities covered by the certificate. The requested hostname already matches, so name binding is not the reported failure.

C:

Not After marks when a certificate expires. The stem establishes valid dates, so expiration does not explain the certificate being restricted to email use.

D:

The subject common name is an identity field. Modern TLS hostname validation typically uses SAN; neither field specifies permission for server authentication.

E:

The serial number uniquely identifies a certificate within its issuer context, often supporting revocation lookup. It does not authorize a TLS authentication purpose.

Question 392

An administrator must view a PEM certificate's subject, issuer and expiration using OpenSSL. Which command works?

  1. chmod 600 server.key
  2. OCSP responder
  3. Certificate signing request (CSR)
  4. openssl x509 -in cert.pem -noout -text

Explanation

Correct Answer

D:

openssl x509 parses and displays certificate fields without printing its private key. The input must be a certificate rather than an unrelated PEM object.

Incorrect Answers

A:

Owner-only read/write permissions reduce accidental disclosure of a TLS private key; the requirement is inspecting a local X.509 certificate, outside the effect of this choice.

B:

Online Certificate Status Protocol allows checking CA-provided revocation status for a certificate; it does not deliver inspecting a local X.509 certificate, which is decisive in this scenario.

C:

A CSR contains the subject and public key and is signed with the corresponding private key; the evidence calls for inspecting a local X.509 certificate, not merely this separate operation.

Question 393

A certificate authority needs proof that a service controls the private key corresponding to its certificate request. Which artifact normally contains the public key and requested identity?

  1. Not After timestamp
  2. Configure the complete server certificate chain
  3. OCSP responder
  4. Certificate signing request (CSR)

Explanation

Correct Answer

D:

A CSR contains the subject and public key and is signed with the corresponding private key. It does not need to transmit the secret key to the CA.

Incorrect Answers

A:

The X.509 Not After time is the end of a certificate's validity interval; that is not equivalent to requesting a certificate without sending the private key.

B:

Clients may be unable to build a trusted path when intermediates are missing; the administrator instead needs requesting a certificate without sending the private key; this option serves a different purpose.

C:

Online Certificate Status Protocol allows checking CA-provided revocation status for a certificate; it answers a neighboring question rather than requesting a certificate without sending the private key.

Question 394

A shared key must authenticate the integrity and origin of messages between two services. Which primitive is designed for this?

  1. LUKS2 block-device encryption
  2. GPG public-key encryption
  3. cryptsetup luksDump /dev/sdb2
  4. HMAC with a strong hash function

Explanation

Correct Answer

D:

HMAC combines a secret key and cryptographic hash to provide a message authentication code. Plain unkeyed hashing does not authenticate the sender.

Incorrect Answers

A:

LUKS2 manages encrypted block devices with keyslots and metadata; it will not provide authenticating message integrity with a shared secret under these conditions.

B:

GPG can encrypt data to a recipient's public key, allowing decryption with the matching private key; using it would leave authenticating message integrity with a shared secret unresolved.

C:

cryptsetup luksDump reads the encryption header, including format details and keyslot information, without mounting the protected filesystem; the requirement is authenticating message integrity with a shared secret, outside the effect of this choice.

Question 395

Two remote services need to authenticate and encrypt their HTTP traffic. Which transport security protocol family applies?

  1. TLS 1.3
  2. Asymmetric key ownership
  3. WireGuard VPN
  4. SSH KexAlgorithms configuration
  5. openssl s_client -connect host.example:443 -servername host.example

Explanation

Correct Answer

A:

TLS protects the confidentiality and integrity of a negotiated network connection while enabling certificate-based endpoint authentication. Correct certificate validation remains essential.

Incorrect Answers

B:

Public keys can be distributed to peers while private keys remain secret on each endpoint; its scope differs from protecting application transport with modern TLS, so it cannot meet the stated requirement.

C:

WireGuard uses modern public-key cryptography to protect layer-3 traffic over UDP; that is not equivalent to protecting application transport with modern TLS.

D:

The KexAlgorithms list controls permitted SSH key-exchange mechanisms; the administrator instead needs protecting application transport with modern TLS; this option serves a different purpose.

E:

s_client performs a TLS client handshake and prints peer certificates and protocol negotiation details; it answers a neighboring question rather than protecting application transport with modern TLS.

Question 396

A CA certificate has been revoked before its expiry and clients need an online mechanism to learn this. Which facility can provide status?

  1. OCSP responder
  2. Configure the complete server certificate chain
  3. chmod 600 server.key
  4. Not After timestamp

Explanation

Correct Answer

A:

Online Certificate Status Protocol allows checking CA-provided revocation status for a certificate. Client policy and stapling affect how responses are used.

Incorrect Answers

B:

Clients may be unable to build a trusted path when intermediates are missing; this does not achieve checking certificate revocation independently of expiry on the system described.

C:

Owner-only read/write permissions reduce accidental disclosure of a TLS private key; it will not provide checking certificate revocation independently of expiry under these conditions.

D:

The X.509 Not After time is the end of a certificate's validity interval; using it would leave checking certificate revocation independently of expiry unresolved.

Question 397

A user wants to encrypt a file for a colleague using that colleague's public key. Which tool is appropriate?

  1. HMAC with a strong hash function
  2. cryptsetup open /dev/sdb2 secure
  3. LUKS2 block-device encryption
  4. GPG public-key encryption

Explanation

Correct Answer

D:

GPG can encrypt data to a recipient's public key, allowing decryption with the matching private key. Key ownership must be verified to prevent misdirected encryption.

Incorrect Answers

A:

HMAC combines a secret key and cryptographic hash to provide a message authentication code; it does not deliver encrypting a file to a specific public-key recipient, which is decisive in this scenario.

B:

cryptsetup open authenticates the encrypted device and creates a /dev/mapper mapping; the evidence calls for encrypting a file to a specific public-key recipient, not merely this separate operation.

C:

LUKS2 manages encrypted block devices with keyslots and metadata; the task involves encrypting a file to a specific public-key recipient, whereas this addresses another subsystem.

Question 398

A storage administrator wants to check a LUKS device's header metadata and keyslot configuration without decrypting files. Which command fits?

  1. cryptsetup luksDump /dev/sdb2
  2. GPG public-key encryption
  3. LUKS2 block-device encryption
  4. sha256sum release.tar.gz

Explanation

Correct Answer

A:

cryptsetup luksDump reads the encryption header, including format details and keyslot information, without mounting the protected filesystem. The command does not decrypt the volume contents.

Incorrect Answers

B:

GPG can encrypt data to a recipient's public key, allowing decryption with the matching private key; it answers a neighboring question rather than inspecting LUKS header and keyslot metadata.

C:

LUKS2 manages encrypted block devices with keyslots and metadata; that changes a different part of the system; the requested outcome is inspecting LUKS header and keyslot metadata.

D:

sha256sum computes a cryptographic digest for comparison with a trusted reference; this does not achieve inspecting LUKS header and keyslot metadata on the system described.

Question 399

The server must unlock a LUKS2-encrypted block partition to expose a mapper device named secure. Which command is appropriate?

  1. HMAC with a strong hash function
  2. LUKS2 block-device encryption
  3. cryptsetup open /dev/sdb2 secure
  4. GPG public-key encryption

Explanation

Correct Answer

C:

cryptsetup open authenticates the encrypted device and creates a /dev/mapper mapping. Filesystem mounting is a separate step.

Incorrect Answers

A:

HMAC combines a secret key and cryptographic hash to provide a message authentication code; using it would leave opening an encrypted block mapping unresolved.

B:

LUKS2 manages encrypted block devices with keyslots and metadata; the requirement is opening an encrypted block mapping, outside the effect of this choice.

D:

GPG can encrypt data to a recipient's public key, allowing decryption with the matching private key; the evidence calls for opening an encrypted block mapping, not merely this separate operation.

Question 400

A lost laptop contains a Linux data partition that must remain unreadable without the unlock secret. Which technology is suitable?

  1. Cryptographic erasure of key material
  2. cryptsetup open /dev/sdb2 secure
  3. GPG public-key encryption
  4. LUKS2 block-device encryption

Explanation

Correct Answer

D:

LUKS2 manages encrypted block devices with keyslots and metadata. Unlocking exposes a mapped device to the operating system for normal filesystem use.

Incorrect Answers

A:

Destroying all necessary decryption keys can make properly encrypted data computationally inaccessible; its scope differs from encrypting data at rest below the filesystem, so it cannot meet the stated requirement.

B:

cryptsetup open authenticates the encrypted device and creates a /dev/mapper mapping; that is not equivalent to encrypting data at rest below the filesystem.

C:

GPG can encrypt data to a recipient's public key, allowing decryption with the matching private key; the administrator instead needs encrypting data at rest below the filesystem; this option serves a different purpose.

CompTIA Linux+ (XK0-006) Practice Tests