LPIC-2 System Security Practice Question
An administrator needs to encrypt a large file using GPG with a symmetric cipher and then decrypt it on another system. Which command encrypts the file using AES256 and prompts for a passphrase?
⚠ Common exam trap
Watch out — candidates often confuse `--encrypt` (which implies public-key encryption) with `--symmetric` (which uses a passphrase), leading them to select option B even though it requires a recipient key rather than a passphrase prompt.
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 --symmetric --cipher-algo AES256 file.txt
`--symmetric` tells GPG to encrypt the file using a symmetric cipher (i.e., a single passphrase shared between sender and receiver), and `--cipher-algo AES256` selects the AES-256 encryption algorithm. The command will prompt for a passphrase interactively, which is exactly what the scenario requires.
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 --clearsign --cipher-algo AES256 file.txt
Why it's wrong here
--clearsign creates a clearsign signature.
- ✗
gpg --encrypt --cipher-algo AES256 file.txt
Why it's wrong here
--encrypt requires a recipient key; prompts for key not passphrase.
- ✗
gpg --sign --cipher-algo AES256 file.txt
Why it's wrong here
--sign creates a signature, not encryption.
- ✓
gpg --symmetric --cipher-algo AES256 file.txt
Why this is correct
Symmetric encryption prompts for passphrase; uses AES256.
Quick reference
Symmetric Encryption Algorithm Comparison
| Algorithm | Key Size | Block Size | Status | Notes |
|---|---|---|---|---|
| AES-128 | 128-bit | 128-bit | Current standard | NIST approved; WPA3, TLS |
| AES-256 | 256-bit | 128-bit | Current standard | Preferred for sensitive / govt data |
| 3DES | 112-bit effective | 64-bit | Deprecated (2023) | Replaced by AES |
| DES | 56-bit | 64-bit | Broken | Cracked in < 24 h; never deploy |
| ChaCha20 | 256-bit | Stream cipher | Current | TLS 1.3, WireGuard |
Go deeper
Related to this question
About these practice questions
This LPIC-2 question is part of Courseiva's 507-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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 LPIC-2 practice question is part of Courseiva's free LPI 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 LPIC-2 exam.