mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-11 19:00:02 +01:00
Support aes-hctr2 mode.
The HCTR2 encryption was added to Linux kernel for fscrypt, but as it is length-preserving mode (with sector tweak) it can be easily used for disk encryption too. As it need larger IV of size 32 bytes, we need to add exception for aes-hctr2[-plain64] to be accepted in cryptsetup commands. Fixes: #883
This commit is contained in:
@@ -62,6 +62,9 @@ int crypt_cipher_ivsize(const char *name, const char *mode)
|
||||
if (!ca)
|
||||
return -EINVAL;
|
||||
|
||||
if (mode && !strcasecmp(mode, "hctr2"))
|
||||
return 32;
|
||||
|
||||
if (mode && !strcasecmp(mode, "ecb"))
|
||||
return 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user