summaryrefslogtreecommitdiff
path: root/ubifs-utils
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2018-11-07 21:21:07 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2018-11-09 14:24:39 +0100
commit9ddc6f08c9ecd0a6328ffbef3c444e0a00b2768a (patch)
tree52f7328e9f1f7612c6a85c5b62b98afdc0541e8a /ubifs-utils
parentdd0d9c623e22255b16757c524cecf6c7edf8a3de (diff)
mkfs.ubifs: Fix IV selection
We need to check for AES being in 128-cbc mode and not 256-cbc. fscrypt supports only 128-cbc and 256-xts so far. Signed-off-by: Richard Weinberger <richard@nod.at> Tested-by: Heiko Schocher <hsdenx.de> Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'ubifs-utils')
-rw-r--r--ubifs-utils/mkfs.ubifs/crypto.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ubifs-utils/mkfs.ubifs/crypto.c b/ubifs-utils/mkfs.ubifs/crypto.c
index 9c6073e..cd68e37 100644
--- a/ubifs-utils/mkfs.ubifs/crypto.c
+++ b/ubifs-utils/mkfs.ubifs/crypto.c
@@ -152,7 +152,7 @@ static ssize_t encrypt_block(const void *plaintext, size_t size,
iv.index = cpu_to_le64(block_index);
memset(iv.padding, 0, sizeof(iv.padding));
- if (cipher == EVP_aes_256_cbc()) {
+ if (cipher == EVP_aes_128_cbc()) {
tweak = alloca(ivsize);
gen_essiv_salt(&iv, FS_IV_SIZE, key, key_len, tweak);
} else {