Add option for large IV to storage wrapper.

Also implement some test vectors and use the same limits
as in dm-crypt (IV offset alignnment).
This commit is contained in:
Milan Broz
2020-05-28 08:41:09 +02:00
parent 74e94e7bdd
commit 4a9862a666
7 changed files with 153 additions and 112 deletions

View File

@@ -62,7 +62,7 @@ static int crypt_storage_backend_init(struct crypt_device *cd,
struct crypt_storage *s;
/* iv_start, sector_size */
r = crypt_storage_init(&s, sector_size, cipher, cipher_mode, vk->key, vk->keylength);
r = crypt_storage_init(&s, sector_size, cipher, cipher_mode, vk->key, vk->keylength, flags & LARGE_IV);
if (r)
return r;