Как стереть все слоты для ключей LUKS

Узнайте, как стереть каждый определенный слот для ключей LUKS на определенном устройстве.

Покажем информацию заголовка LUKS.

$ sudo cryptsetup luksDump /dev/sdb1 

LUKS header information for /dev/sdb1Version:1Cipher name:aesCipher mode:xts-plain64Hash spec:sha256Payload offset: 4096MK bits:256MK digest:eb 33 45 89 95 2b 67 dd 65 6d 17 d3 ed 7d 05 c4 84 58 5f fc MK salt:b7 0b c3 96 0e ab 70 1b f0 28 9f 39 63 a4 37 95 16 e0 61 e6 98 ab fc c1 18 db 1a 36 bc 00 bd 13 MK iterations:151879UUID: ac32a865-2716-43e3-8db9-798d4279a3a3Key Slot 0: ENABLEDIterations: 2430070Salt: 10 a5 7d 29 c8 7f 21 d8 15 ca 42 08 01 a5 79 0c d4 d7 5b 87 c3 14 cc 33 75 ec ec ba 71 26 8c 67 Key material offset:8AF stripes: 4000Key Slot 1: DISABLEDKey Slot 2: DISABLEDKey Slot 3: DISABLEDKey Slot 4: DISABLEDKey Slot 5: DISABLEDKey Slot 6: DISABLEDKey Slot 7: DISABLED

Удалим ключевые слоты LUKS.

$ sudo cryptsetup luksErase /dev/sdb1

WARNING!========This operation will erase all keyslots on device /dev/sdb1.Device will become unusable after this operation.Are you sure? (Type uppercase yes): YES

Отобразим очищенную информацию заголовка LUKS.

$ sudo cryptsetup luksDump /dev/sdb1

LUKS header information for /dev/sdb1Version:1Cipher name:aesCipher mode:xts-plain64Hash spec:sha256Payload offset: 4096MK bits:256MK digest:eb 33 45 89 95 2b 67 dd 65 6d 17 d3 ed 7d 05 c4 84 58 5f fcMK salt:b7 0b c3 96 0e ab 70 1b f0 28 9f 39 63 a4 37 9516 e0 61 e6 98 ab fc c1 18 db 1a 36 bc 00 bd 13MK iterations:151879UUID: ac32a865-2716-43e3-8db9-798d4279a3a3Key Slot 0: DISABLEDKey Slot 1: DISABLEDKey Slot 2: DISABLEDKey Slot 3: DISABLEDKey Slot 4: DISABLEDKey Slot 5: DISABLEDKey Slot 6: DISABLEDKey Slot 7: DISABLED

Дополнительные примечания

Используйте пакетный режим, чтобы стереть слоты LUKS без диалогового окна подтверждения.

$ sudo cryptsetup luksErase -q /dev/sdb1

Не забудьте удалить каждую резервную копию заголовка LUKS, так как она может использоваться для обхода этой операции.

Отправить комментарий

0 Комментарии