nerdexam
LPI

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…

Cryptography

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)
  • A
    7% (2)
  • B
    90% (26)
  • C
    3% (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 by luksOpen - key management operations must be performed on the actual block device (/dev/sda1), not the mapper.
  • A specifies key slot 0 rather than 1. In this command's context, the first key corresponds to slot 1, not 0, 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

#LUKS encryption#key slot management#cryptsetup syntax#key deletion

Community Discussion

No community discussion yet for this question.

Full 303-300 Practice