nerdexam
CompTIA

LX0-104 · Question #355

An administrator has created a mapping with the following command: cryptsetup luksOpen /dev/sda1 cryptvol and has set three different keys. Which command below will delete the first key?

The correct answer is A. cryptsetup luksDelKey /dev/sda1 0. To delete the first key from a LUKS encrypted volume, the cryptsetup luksDelKey command is used, specifying the underlying device and the zero-indexed key slot number.

Security

Question

An administrator has created a mapping with the following command: cryptsetup luksOpen /dev/sda1 cryptvol and has set three different keys. Which command below will delete the first key?

Options

  • Acryptsetup luksDelKey /dev/sda1 0
  • Bcryptsetup luksDelKey /dev/sda1 1
  • Ccryptsetup luksDelKey /dev/mapper/cryptvol 1
  • Dcryptsetup luksDelKey /dev/mapper/cryptvol 0

How the community answered

(20 responses)
  • A
    90% (18)
  • B
    5% (1)
  • C
    5% (1)

Why each option

To delete the first key from a LUKS encrypted volume, the `cryptsetup luksDelKey` command is used, specifying the underlying device and the zero-indexed key slot number.

Acryptsetup luksDelKey /dev/sda1 0Correct

The `cryptsetup luksDelKey` command deletes a key from a LUKS volume, requires the underlying device (`/dev/sda1`) where the LUKS header resides, and uses a zero-indexed slot number (0 for the first key).

Bcryptsetup luksDelKey /dev/sda1 1

While the device is correct, using index `1` would delete the second key slot, not the first.

Ccryptsetup luksDelKey /dev/mapper/cryptvol 1

The `/dev/mapper/cryptvol` refers to the decrypted mapped device, not the underlying LUKS-encrypted device where key slots are managed.

Dcryptsetup luksDelKey /dev/mapper/cryptvol 0

The `/dev/mapper/cryptvol` refers to the decrypted mapped device, not the underlying LUKS-encrypted device where key slots are managed.

Concept tested: LUKS key deletion

Source: https://man7.org/linux/man-pages/man8/cryptsetup.8.html

Topics

#LUKS#cryptsetup#Key management

Community Discussion

No community discussion yet for this question.

Full LX0-104 Practice