easyMultiple ChoiceObjective-mapped
XK0-006 Practice Question: Needs to verify the authenticity of a downloaded…
A security engineer needs to verify the authenticity of a downloaded file using its detached GPG signature (file.sig). Which command should be used?
⚠ Common exam trap
CompTIA often tests the distinction between detached signatures and embedded signatures, where candidates mistakenly think `--verify` requires the original file as an argument, but GPG automatically infers it from the signature filename.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
gpg --verify file.sig
The `gpg --verify file.sig` command is used to verify the authenticity of a file using its detached GPG signature. The detached signature file (file.sig) contains the cryptographic signature, and GPG checks it against the original file (which must be present in the same directory with the same base name) using the signer's public key from the local keyring. This confirms that the file was signed by the holder of the corresponding private key and has not been tampered with.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
gpg --sign file
Why it's wrong here
This creates a signature, not verify.
- ✗
gpg --list-keys
Why it's wrong here
This lists public keys in the keyring, does not verify files.
- ✓
gpg --verify file.sig
Why this is correct
This command verifies the detached signature file.sig against the original file (file).
- ✗
gpg --decrypt file.gpg
Why it's wrong here
This decrypts a symmetrically encrypted file, not for verifying signatures.
Go deeper
Related to this question
About these practice questions
Courseiva writes every XK0-006 question from scratch — 979 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This XK0-006 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the XK0-006 exam.