我有一个由luks加密的分区,该分区受密码短语和密钥文件保护。密钥文件用于日常访问,而密码则放在密封的信封中以备不时之需。五月过去了,我不小心粉碎了密钥文件,因此我使用了信封中的密码短语进行了恢复。现在我想知道,我有两个活动密钥槽,但是我不知道哪个包含无用的密钥文件密码短语,哪个包含我的紧急密码短语。显然,如果删除错误的驱动器,则会丢失驱动器上的所有数据。
#cryptsetup luksDump /dev/sda2
LUKS header information for /dev/sda2
Version:        1
Cipher name:    aes
Cipher mode:    xts-plain64
Hash spec:      sha256
Payload offset: 4096
MK bits:        256
MK digest:      xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx 
MK salt:        xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx 
                xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx 
MK iterations:  371000
UUID:           28c39f66-dcc3-4488-bd54-11ba239f7e68
Key Slot 0: ENABLED
        Iterations:             2968115
        Salt:                   xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx 
                                xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx 
        Key material offset:    8
        AF stripes:             4000
Key Slot 1: ENABLED
        Iterations:             2968115
        Salt:                   xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx 
                                xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx 
        Key material offset:    264
        AF stripes:             4000
Key Slot 2: DISABLED
Key Slot 3: DISABLED
Key Slot 4: DISABLED
Key Slot 5: DISABLED
Key Slot 6: DISABLED
Key Slot 7: DISABLED
luksKillSlot要求从另一个插槽输入密码,因此不存在销毁您拥有的最后一个密钥的风险。但是,我相信原始问题仍然有效。