Luks2 headers not recognized by sys handler, emits warning
Since the luksDump format is quite different between LUKS version 1 and 2, backupninja fails to recognize the newer format and emits a warning in the logs even though the output is valid.
Dec 27 15:50:37 Debug: /usr/sbin/cryptsetup luksDump "/dev/ram1" | grep '^Payload offset:' | /usr/bin/awk '{print }'
Dec 27 15:50:37 Warning: The computed size of LUKS header is not an integer, skipping /dev/ram1
The luksDump output for LUKS version 2 looks like this:
$ sudo /usr/sbin/cryptsetup luksDump "/dev/ram1"
LUKS header information
Version: 2
Epoch: 3
Metadata area: 16384 [bytes]
Keyslots area: 16744448 [bytes]
UUID: 50137cd5-508d-4b5f-bc59-5a9c2f548e86
Label: (no label)
Subsystem: (no subsystem)
Flags: (no flags)
Data segments:
0: crypt
offset: 16777216 [bytes]
length: (whole device)
cipher: aes-xts-plain64
sector: 512 [bytes]
Keyslots:
0: luks2
Key: 512 bits
Priority: normal
Cipher: aes-xts-plain64
Cipher key: 512 bits
PBKDF: argon2i
Time cost: 17
Memory: 247388
Threads: 2
Salt: 67 25 66 a0 ec 06 9d 90 b7 15 96 dc 1d 86 22 4d
35 db 93 10 c7 f8 50 63 1e 11 f9 28 2b 26 d0 a1
AF stripes: 4000
AF hash: sha256
Area offset:32768 [bytes]
Area length:258048 [bytes]
Digest ID: 0
Tokens:
Digests:
0: pbkdf2
Hash: sha256
Iterations: 130031
Salt: 4f 87 9b ef cb 47 75 fb 60 8a 6b cf f9 64 34 e4
f5 56 6f d1 27 4e 4f 19 90 0a 29 e6 43 df 27 4b
Digest: 27 be 0a 7c 9b 04 ba 31 16 42 f8 a8 f5 a6 85 e8
3b 27 9f 18 d2 f5 42 c5 fa 36 c3 b0 92 af 20 ba
For comparison, this is the version 1 output:
$ sudo /usr/sbin/cryptsetup luksDump "/dev/ram1"
LUKS header information for /dev/ram1
Version: 1
Cipher name: aes
Cipher mode: xts-plain64
Hash spec: sha256
Payload offset: 4096
MK bits: 512
MK digest: 32 6e ea c7 70 b0 42 d8 e8 ed 84 f4 c1 c5 7d 02 4b 50 61 43
MK salt: 19 69 0d 51 70 63 60 45 c0 30 ce 0d d6 af 1e e9
b2 5d 1d 6e 16 87 00 af 01 f5 50 8f 9e 45 1f bd
MK iterations: 128501
UUID: 6410c635-6ebe-44ae-b9d2-27207be763d8
Key Slot 0: ENABLED
Iterations: 2044006
Salt: 5f d7 5a be ab ba f7 c4 4b 56 ac f3 6f db e9 66
7b 10 96 02 04 92 a7 d7 0e 0c 3b 82 d9 55 64 09
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
Edited by Jerome Charaoui