My attempts to open a luks container fail with the following messages:
Code:
sudo cryptsetup luksOpen /dev/loop2 test.crypted
Enter LUKS passphrase for /dev/loop2:
key slot 0 unlocked.
Command failed: Invalid offset
As a result, the mapper never gets created in /dev/mapper.
The commands I am using to create my container are the following:
Code:
dd if=/dev/urandom of=test.crypted bs=1M count=256
sudo losetup -d /dev/loop2
sudo losetup /dev/loop2 /phil/test.crypted
sudo cryptsetup -c twofish -s 256 luksFormat /dev/loop2
The resulting container appears to be valid:
Code:
LUKS header information for /dev/loop2
Version: 1
Cipher name: twofish
Cipher mode: cbc-plain
Hash spec: sha1
Payload offset: 2056
MK bits: 256
MK digest: 13 35 90 04 02 03 60 61 c6 6d c1 ed 87 87 ee ee f0 c7 cf 58
MK salt: 1b 48 ff 08 30 99 cf 26 d9 cf 14 54 a5 a3 9a 18
d9 ff 2a 05 55 d0 db 1e 70 57 4c d9 8c 9b f9 f1
MK iterations: 10
UUID: b6c20d41-b03f-4012-afb9-8ca3567ef99a
Key Slot 0: ENABLED
Iterations: 213959
Salt: a4 50 65 16 35 c4 bd 26 30 f5 be 45 8b 9a e5 d1
26 76 03 a3 ed d4 81 68 4b 77 37 2d 8d 4d 5c 6f
Key material offset: 8
AF stripes: 4000
Key Slot 1: DISABLED
Key Slot 2: DISABLED
Key Slot 3: DISABLED
Key Slot 4: DISABLED
Key Slot 5: DISABLED
Key Slot 6: DISABLED
Key Slot 7: DISABLED
However, no mapper after the luksOpen.
I have a non-luks 'vanilla' container that works. Can anyone help me figure what I'm missing?
Thanks!