LUKS container with superflous hash in cipher spec inaccessible after conversion to LUKS2
Issue description
Hello,
I have a LUKS container that I created long time ago with a command similar to:
cryptsetup luksFormat /dev/sda6 --hash sha512 --cipher aes-xts-plain64:sha512 --key-size 512 --use-random --verify-passphrase
The :sha512
string in the "--cipher" parameter is incorrect, because the "plain64" IV generator does not use a hash function.
This setup has worked for some time though.
After converting the volume to LUKS2, I was not able to open it. I was receiving an error message similar to:
Cannot use aes-xts-plain64:sha512 cipher for keyslot encryption.
Keyslot open failed.
No usable keyslot is available.
Steps for reproducing the issue
Additional info
Debug log
Output with --debug option: