My understanding of the Linux encryption protocol is that the keys are "distributed" over the entire disk, so even a tiny amount of damage can cause a significant amount of casualty. In particular, damage to the "master key" (not the password) basically renders the device non-functional unless you have a backup. I am talking here about hard disk encryption (at boot), not home directory encryption.
After mounting my device, the error I receive is familiar:
Command failed with code 1: No key available with this passphrase.
Assuming that I am using the same password, what else could cause this error? My disk image appears to contain a valid version of the header.
> cryptsetup -v luksDump /dev/sdb5
LUKS header information for /dev/sdb5
Version: 1
Cipher name: aes
Cipher mode: xts-plain64
Hash spec: sha1
Payload offset: 4096
MK bits: 512
MK digest: 23 97 8b 80 e5 92 5a 2f dd c8 cf d9 c0 d1 e7 42 7c bc 3e 4f
MK salt: 05 a5 10 62 46 45 36 8a 89 13 f1 94 0f 4b 9a 39
16 ca e0 f9 47 45 fd 0c 1b e0 bd e9 40 c4 91 d3
MK iterations: 40500
UUID: ef71756f-2724-4f44-90ed-29ddb760e73c
Key Slot 0: ENABLED
Iterations: 161615
Salt: f9 ad 13 c6 26 7f 59 c2 72 81 99 4f 67 b9 19 9e
17 bc 17 75 96 d4 7d dd 74 4a d0 87 c7 b8 8d 95
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
Command successful.
I have actually been at this for a while and have a number of theories about what could've happened. Please help me knock these down to the most likely solution.
1) The damage to the hard disk caused the encryption keys to change.
2) I encrypted the disk on Ubuntu 14.04, and am trying to load it on Ubuntu 16.04. Because my password uses special characters, some input protocol is fudging this. In a number of projects I've done, strings containing "!" tend to confuse the command line. So I'm wondering if that could be happening here.
3) I encrypted the hard disk on one device, but am trying to load it on another device. See special characters comment in #2
4) I'm inputting the incorrect password
5) An attacker invaded my machine and re-encrypted it with an alternative password.
6) ... Other? Maybe it's starting at the wrong bit when reading the key?
Obviously #4 is the most likely solution to an outsider, but let's assume my password is correct. Then, theory #5 basically means I'm screwed, and is also unlikely, so let's ignore it for now. Are Theories #1-3 valid? What could Theory #6,7,8 be?