summaryrefslogtreecommitdiff
path: root/ubifs-utils/mkfs.ubifs/crypto.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2018-10-18 16:37:06 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2018-11-01 12:41:03 +0100
commitb9829c7e5b4a0c4e693a79fd0da36fa37e3e1a1a (patch)
tree8ae2538dead26b79eebce5d6395a59b2dff1e472 /ubifs-utils/mkfs.ubifs/crypto.c
parent8db55980484ed8820530001fc4a58885adf1d213 (diff)
mkfs.ubifs: Check length of master key
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'ubifs-utils/mkfs.ubifs/crypto.c')
-rw-r--r--ubifs-utils/mkfs.ubifs/crypto.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ubifs-utils/mkfs.ubifs/crypto.c b/ubifs-utils/mkfs.ubifs/crypto.c
index f7b5135..bd32737 100644
--- a/ubifs-utils/mkfs.ubifs/crypto.c
+++ b/ubifs-utils/mkfs.ubifs/crypto.c
@@ -281,10 +281,12 @@ ssize_t derive_key_aes(const void *deriving_key, const void *source_key,
static struct cipher ciphers[] = {
{
.name = "AES-128-CBC",
+ .key_length = 16,
.encrypt_block = encrypt_block_aes128_cbc,
.encrypt_fname = encrypt_aes128_cbc_cts,
}, {
.name = "AES-256-XTS",
+ .key_length = 64,
.encrypt_block = encrypt_block_aes256_xts,
.encrypt_fname = encrypt_aes256_cbc_cts,
}