crypt_format() should fail with authenticated encryption and wrong key size
crypt_format() is unable to recognize that device is about to be created with wrong (conjuncted) key size for authenticated encryption.
We fixed similar bug for regular LUKS devices recently, this is similar flavour of the issue.
Easily reproducible with crypt_format() call and params cipher="aes-xts-plain64", key_size=32, and params->integrity="hmac-sha256" for example. It's wrong. The key size should have been 64, but crypt_format accepts it and creates new device. Later, any attempt to open such device fails.
(It's reproducible for any integrity profile requiring additional key size)
(also add Reported-by to Vojta Trefny :))