aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilan Broz <gmazyland@gmail.com>2014-06-17 23:09:13 +0200
committerMilan Broz <gmazyland@gmail.com>2014-06-17 23:09:13 +0200
commit91c739958c03f5909192398c0385bdbb1c3e2868 (patch)
tree9ee4be1024a4d1370742cb672cc6ec0a14682e63
parent1a6e1ae91822f364f141c6083445c63ec8863b29 (diff)
downloadcryptsetup-91c739958c03f5909192398c0385bdbb1c3e2868.tar.gz
Allow ECB mode in cryptsetup benchmark.
-rw-r--r--TODO1
-rw-r--r--src/cryptsetup.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/TODO b/TODO
index c183cdb..17d0680 100644
--- a/TODO
+++ b/TODO
@@ -4,7 +4,6 @@ Version 1.7:
- TRIM for keyslots
- Do we need crypt_data_path() - path to data device (if differs)?
- Resync ETA time is not accurate, calculate it better (last minute window?).
-- Crypt benchmark cannot test ECB mode.
- crypto backend should initialise itself only once (debug log)
- Extend existing LUKS header to use another KDF? (https://password-hashing.net/)
- Fix all crazy automake warnings (or switch to Cmake).
diff --git a/src/cryptsetup.c b/src/cryptsetup.c
index 89cb17b..3b63a2b 100644
--- a/src/cryptsetup.c
+++ b/src/cryptsetup.c
@@ -540,6 +540,9 @@ static int action_benchmark(void)
strstr(cipher, "cast5"))
iv_size = 8;
+ if (!strcmp(cipher_mode, "ecb"))
+ iv_size = 0;
+
r = benchmark_cipher_loop(cipher, cipher_mode,
key_size / 8, iv_size,
&enc_mbr, &dec_mbr);