新しいシステムで暗号化されたディスクを開くことができませんか?

新しいシステムで暗号化されたディスクを開くことができませんか?

Btrfsを使用して暗号化されたSSDでArch Linuxを実行しているシステムがあり、キーファイルを使用してそのシステムでセカンダリ暗号化HDDをオンにしました。キーファイルのパスワードは、私のKeepassデータベースとは異なるシステムの古いキーファイルにも保存されます。 SSDにXFSを使用してProxmoxをインストールし、次のコマンドを実行するパスワードで暗号化されたHDDを開こうとしました。

# cryptsetup open /dev/sdX1 $mapper-name

これは「このパスワードに使用できるキーはありません。

何が問題なの?パスワードは絶対に有効です。 Manjaro Liveシステムでも起動しようとしましたが、同じエラーが発生しました。

LUKSヘッダーを更新するために以下のチュートリアルに従ったかもしれませんが、わかりません。 https://mjg59.dreamwidth.org/66429.html

同じシステム上の他のディスクのロックを簡単に解除することもできます。

LUKSヘッダの詳細については後で添付します。

編集する:

sudo cryptsetup luksOpen --debug /dev/sdb1 disk                                                                                         
# cryptsetup 2.6.1 processing "cryptsetup luksOpen --debug /dev/sdb1 disk"
# Verifying parameters for command open.
# Running command open.
# Installing SIGINT/SIGTERM handler.
# Unblocking interruption on signal.
# Allocating context for crypt device /dev/sdb1.
# Trying to open and read device /dev/sdb1 with direct-io.
# Initialising device-mapper backend library.
# Trying to load any crypt type from device /dev/sdb1.
# Crypto backend (OpenSSL 3.1.1 30 May 2023 [default][legacy]) initialized in cryptsetup library version 2.6.1.
# Detected kernel Linux 6.1.30-1-MANJARO x86_64.
# Loading LUKS2 header (repair disabled).
# Acquiring read lock for device /dev/sdb1.
# Opening lock resource file /run/cryptsetup/L_8:17
# Verifying lock handle for /dev/sdb1.
# Device /dev/sdb1 READ lock taken.
# Trying to read primary LUKS2 header at offset 0x0.
# Opening locked device /dev/sdb1
# Verifying locked device handle (bdev)
# LUKS2 header version 2 of size 16384 bytes, checksum sha256.
# Checksum:e5cfc6dda22398807501ba54430599cad64b8d69c370427636e4da9d4b5695fb (on-disk)
# Checksum:e5cfc6dda22398807501ba54430599cad64b8d69c370427636e4da9d4b5695fb (in-memory)
# Trying to read secondary LUKS2 header at offset 0x4000.
# Reusing open ro fd on device /dev/sdb1
# LUKS2 header version 2 of size 16384 bytes, checksum sha256.
# Checksum:913b9d0d992b2b39071b1f6d6a82e4b6e8efcb27017e0be770eaea656c916fa1 (on-disk)
# Checksum:913b9d0d992b2b39071b1f6d6a82e4b6e8efcb27017e0be770eaea656c916fa1 (in-memory)
# Device size 4000785104896, offset 16777216.
# Device /dev/sdb1 READ lock released.
# PBKDF argon2id, time_ms 2000 (iterations 0), max_memory_kb 1048576, parallel_threads 4.
# Activating volume disk using token (any type) -1.
# dm version   [ opencount flush ]   [16384] (*1)
# dm versions   [ opencount flush ]   [16384] (*1)
# Detected dm-ioctl version 4.47.0.
# Detected dm-crypt version 1.24.0.
# Device-mapper backend running with UDEV support enabled.
# dm status disk  [ opencount noflush ]   [16384] (*1)
No usable token is available.
# Interactive passphrase entry requested.
Enter passphrase for /dev/sdb1: 
# Activating volume disk [keyslot -1] using passphrase.
# dm versions   [ opencount flush ]   [16384] (*1)
# dm status disk  [ opencount noflush ]   [16384] (*1)
# Keyslot 0 priority 1 != 2 (required), skipped.
# Trying to open LUKS2 keyslot 0.
# Running keyslot key derivation.
# Reading keyslot area [0x8000].
# Acquiring read lock for device /dev/sdb1.
# Opening lock resource file /run/cryptsetup/L_8:17
# Verifying lock handle for /dev/sdb1.
# Device /dev/sdb1 READ lock taken.
# Reusing open ro fd on device /dev/sdb1
# Device /dev/sdb1 READ lock released.
# Verifying key from keyslot 0, digest 0.
# Digest 0 (pbkdf2) verify failed with -1.
No key available with this passphrase.
# Interactive passphrase entry requested.
Enter passphrase for /dev/sdb1: 
# Activating volume disk [keyslot -1] using passphrase.
# dm versions   [ opencount flush ]   [16384] (*1)
# dm status disk  [ opencount noflush ]   [16384] (*1)
# Keyslot 0 priority 1 != 2 (required), skipped.
# Trying to open LUKS2 keyslot 0.
# Running keyslot key derivation.
# Reading keyslot area [0x8000].
# Acquiring read lock for device /dev/sdb1.
# Opening lock resource file /run/cryptsetup/L_8:17
# Verifying lock handle for /dev/sdb1.
# Device /dev/sdb1 READ lock taken.
# Reusing open ro fd on device /dev/sdb1
# Device /dev/sdb1 READ lock released.
# Verifying key from keyslot 0, digest 0.
# Digest 0 (pbkdf2) verify failed with -1.
No key available with this passphrase.
# Interactive passphrase entry requested.
Enter passphrase for /dev/sdb1: 
# Activating volume disk [keyslot -1] using passphrase.
# dm versions   [ opencount flush ]   [16384] (*1)
# dm status disk  [ opencount noflush ]   [16384] (*1)
# Keyslot 0 priority 1 != 2 (required), skipped.
# Trying to open LUKS2 keyslot 0.
# Running keyslot key derivation.
# Reading keyslot area [0x8000].
# Acquiring read lock for device /dev/sdb1.
# Opening lock resource file /run/cryptsetup/L_8:17
# Verifying lock handle for /dev/sdb1.
# Device /dev/sdb1 READ lock taken.
# Reusing open ro fd on device /dev/sdb1
# Device /dev/sdb1 READ lock released.
# Verifying key from keyslot 0, digest 0.
# Digest 0 (pbkdf2) verify failed with -1.
No key available with this passphrase.
# Releasing crypt device /dev/sdb1 context.
# Releasing device-mapper backend.
# Closing read only fd for /dev/sdb1.
Command failed with code -2 (no permission or bad passphrase).

そして..

sudo cryptsetup luksDump /dev/sdb1                                                                                                          
LUKS header information
Version:        2
Epoch:          3
Metadata area:  16384 [bytes]
Keyslots area:  16744448 [bytes]
UUID:           276a0c49-344d-452b-98e0-9aaad8cc93f5
Label:          (no label)
Subsystem:      (no subsystem)
Flags:          (no flags)

Data segments:
  0: crypt
        offset: 16777216 [bytes]
        length: (whole device)
        cipher: aes-xts-plain64
        sector: 4096 [bytes]

Keyslots:
  0: luks2
        Key:        512 bits
        Priority:   normal
        Cipher:     aes-xts-plain64
        Cipher key: 512 bits
        PBKDF:      argon2id
        Time cost:  10
        Memory:     1048576
        Threads:    4
        Salt:       0b 00 e6 b8 0d dd 0c 4f 14 e6 33 84 02 83 ba 12 
                    66 40 4f 6d 15 65 f2 e0 c2 23 ef 73 03 0f af ac 
        AF stripes: 4000
        AF hash:    sha256
        Area offset:32768 [bytes]
        Area length:258048 [bytes]
        Digest ID:  0
Tokens:
Digests:
  0: pbkdf2
        Hash:       sha256
        Iterations: 275072
        Salt:       c0 b8 a4 2b e0 c0 f6 db 1f b5 c1 26 9b 8e 90 4f 
                    7e 5f fc 40 e6 89 0e 00 92 21 d9 c2 b1 f9 91 f9 
        Digest:     43 58 b1 65 ba a3 84 0e bf 3b d5 06 e1 38 d9 47 
                    2a 7f fa 00 52 75 07 69 e9 77 10 e3 a8 d5 a5 77

関連情報