From 5e52599326d50e1ffeb2496811e99527887634a7 Mon Sep 17 00:00:00 2001 From: Milan Broz Date: Sat, 26 May 2012 20:44:14 +0200 Subject: [PATCH] Do not use IV for null cipher. --- TODO | 1 + lib/utils_crypt.c | 2 +- tests/mode-test | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/TODO b/TODO index ad44f21..2644f28 100644 --- a/TODO +++ b/TODO @@ -4,3 +4,4 @@ Version 1.5.0: - FIPS patches (RNG, volume key restrictions, move changekey to library) - online reencryption api? - integrate more metadata formats +- TRIM for keyslots \ No newline at end of file diff --git a/lib/utils_crypt.c b/lib/utils_crypt.c index 8b12167..1fe9555 100644 --- a/lib/utils_crypt.c +++ b/lib/utils_crypt.c @@ -61,7 +61,7 @@ int crypt_parse_name_and_mode(const char *s, char *cipher, int *key_nums, /* Short version for "empty" cipher */ if (!strcmp(s, "null")) { strncpy(cipher, "cipher_null", MAX_CIPHER_LEN); - strncpy(cipher_mode, "ecb-null", 9); + strncpy(cipher_mode, "ecb", 9); if (key_nums) *key_nums = 0; return 0; diff --git a/tests/mode-test b/tests/mode-test index 13d70d7..3801718 100755 --- a/tests/mode-test +++ b/tests/mode-test @@ -134,9 +134,9 @@ dmcrypt aes aes-cbc-plain dmcrypt aes-plain aes-cbc-plain # empty cipher -dmcrypt null cipher_null-ecb-null +dmcrypt null cipher_null-ecb dmcrypt cipher_null cipher_null-cbc-plain -dmcrypt cipher_null-ecb-null +dmcrypt cipher_null-ecb # codebook doesn't support IV at all for cipher in $CIPHERS ; do -- 2.7.4