303-300 · Question #85
A LUKS device was mapped using the command: cryptsetup luksOpen/dev/sda1 crypt-vol Given that this device has three different keys, which of the following commands deletes only the first key?
The correct answer is B. cryptsetup luksDelkey /dev/sda 1 1. Option B is correct because it references the correct underlying block device (/dev/sda1) and specifies key slot 1 as the first key slot in LUKS's convention for this command syntax. LUKS key slots are managed on the raw encrypted device, not the mapped virtual device. Why the…
Question
A LUKS device was mapped using the command: cryptsetup luksOpen/dev/sda1 crypt-vol Given that this device has three different keys, which of the following commands deletes only the first key?
Options
- Acryptsetup luksDelKey /dev/sda 1 0
- Bcryptsetup luksDelkey /dev/sda 1 1
- Ccryptsetup luksDelKey / dev /mapper/crypt- vol 1
- Dcryptsetup luksDelKey / dev /mapper/crypt- vol 0
How the community answered
(29 responses)- A7% (2)
- B90% (26)
- C3% (1)
Explanation
Option B is correct because it references the correct underlying block device (/dev/sda1) and specifies key slot 1 as the first key slot in LUKS's convention for this command syntax. LUKS key slots are managed on the raw encrypted device, not the mapped virtual device.
Why the distractors are wrong:
- C and D are both wrong for the same reason: they target
/dev/mapper/crypt-vol, which is the mapped virtual device created byluksOpen- key management operations must be performed on the actual block device (/dev/sda1), not the mapper. - A specifies key slot
0rather than1. In this command's context, the first key corresponds to slot1, not0, making A's slot reference incorrect.
Memory tip: Think of it this way - luksOpen creates the doorway (/dev/mapper/...), but key management always happens at the lock itself (/dev/sda1). If you're deleting a key, go back to the physical device, never the mapped one. Eliminate any answer using /dev/mapper/ instantly when managing LUKS keys.
Topics
Community Discussion
No community discussion yet for this question.